|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.util.UnitIdentifierUtil
Field Summary | |
static char |
ASSEMBLY_SEPARATOR
Supported API: true |
private static String |
CLASSNAME
|
static char |
MODULE_SEPARATOR
Supported API: true |
static char |
PACKAGE_SEPARATOR
Supported API: true |
private static String[] |
PACKAGE_UNITS
|
static char |
SUBSYSTEM_SEPARATOR
Supported API: true |
Constructor Summary | |
UnitIdentifierUtil()
|
Method Summary | |
private static String |
concatenateNames(String name1,
String name2,
char delimeter)
|
static String |
getBaseUnitName(String identifier)
Gets the base unit name from a unit identifier. |
static String |
getModuleName(String identifier)
Gets the module name from a unit identifier. |
static String |
getModuleQualifiedName(String module_name,
String unit_name)
Gets the module qualified unit identifier, given a module name and a unit name. |
static String |
getModuleQualifiedName(String module_name,
String sub_name,
String pkg_name)
Gets the module qualified unit identifier, given a module name, subsystem name and and unit name. |
static String |
getPackageName(String identifier)
Gets the package name from a unit identifier. |
static String |
getSubsystemName(String identifier)
Gets the subsystem name from a unit identifier. |
static String |
getUnitName(String identifier)
Gets the unit name from a unit identifier- i.e., strip off the module qualification. |
private static String |
getUnitName(String sub_name,
String pkg_name)
|
static boolean |
isClassTarget(String target)
Determine if target represents a class. |
static boolean |
isFileTarget(String target)
Determine if the target represents a file that lists the actual targets. |
static boolean |
isModuleIdentifier(String identifier)
Determine if identifier represents a module. |
static boolean |
isModuleQualified(String identifier)
Determine if identifier is module qualified (really a unit identifier). |
static boolean |
isModuleTarget(String target)
Determine if target represents a module. |
static boolean |
isPackageIdentifier(String identifier)
Determine if identifier represents a module. |
protected static boolean |
isPackageQualified(String identifier)
Determine if identifier is package qualified. |
static boolean |
isPackageTarget(String target)
Determine if target represents a package. |
static boolean |
isRegistryTarget(String target)
Determine if the target represents the entire registry. |
static boolean |
isSubsystemIdentifier(String identifier)
Determine if identifier represents a module. |
static boolean |
isSubsystemTarget(String target)
Determine if target represents a subsystem. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String CLASSNAME
private static final String[] PACKAGE_UNITS
public static final char ASSEMBLY_SEPARATOR
public static final char MODULE_SEPARATOR
public static final char SUBSYSTEM_SEPARATOR
public static final char PACKAGE_SEPARATOR
Constructor Detail |
public UnitIdentifierUtil()
Method Detail |
public static boolean isPackageIdentifier(String identifier)
Example Usage: UnitIdentifierUtil.isPackageIdentifier( "WNC/CommonCore:wt.util.LogFile" ); // return true (false positive) UnitIdentifierUtil.isPackageIdentifier( "WNC/CommonCore:wt.util" ); // return true UnitIdentifierUtil.isPackageIdentifier( "WNC/CommonCore:wt" ); // return true (if it is defined in property) UnitIdentifierUtil.isPackageIdentifier( "WNC/CommonCore:sub1" ); // return false UnitIdentifierUtil.isPackageIdentifier( "WNC/CommonCore" ); // return false
identifier
- external form for a unit identifier
protected static boolean isPackageQualified(String identifier)
Example Usage: UnitIdentifierUtil.isPackageQualified( "WNC/CommonCore:wt.util" ); // return true UnitIdentifierUtil.isPackageQualified( "WNC/CommonCore:wt" ); // return false UnitIdentifierUtil.isPackageQualified( "wt.util" ); // return true
identifier
- external form for a unit identifier
public static boolean isModuleQualified(String identifier)
Example Usage: UnitIdentifierUtil.isModuleQualified( "WNC/CommonCore:wt.util" ); // return true UnitIdentifierUtil.isModuleQualified( "WNC/CommonCore:" ); // return true UnitIdentifierUtil.isModuleQualified( "WNC/CommonCore" ); // return false UnitIdentifierUtil.isModuleQualified( ":" ); // return true
identifier
- external form for a unit identifier
public static boolean isFileTarget(String target)
Example Usage: UnitIdentifierUtil.isRegistryTarget( "inputFile" ); // return true UnitIdentifierUtil.isRegistryTarget( "file" ); // return true UnitIdentifierUtil.isRegistryTarget( "file=c:\inputFile.txt" ); // return true
target
- string that defines a target
public static boolean isRegistryTarget(String target)
Example Usage: UnitIdentifierUtil.isRegistryTarget( "registry" ); // return true UnitIdentifierUtil.isRegistryTarget( "install" ); // return true UnitIdentifierUtil.isRegistryTarget( "*" ); // return true UnitIdentifierUtil.isRegistryTarget( "" ); // return true UnitIdentifierUtil.isRegistryTarget( null ); // return true
target
- string that defines a target
public static boolean isModuleTarget(String target)
Example Usage: UnitIdentifierUtil.isModuleTarget( "WNC/CommonCore:wt.util" ); // return false UnitIdentifierUtil.isModuleTarget( "WNC/CommonCore:sub1" ); // return false UnitIdentifierUtil.isModuleTarget( "WNC/CommonCore:" ); // return true UnitIdentifierUtil.isModuleTarget( "WNC/CommonCore" ); // return true UnitIdentifierUtil.isModuleTarget( "registry" ); // return false
target
- external form for a unit identifier
public static boolean isModuleIdentifier(String identifier)
Example Usage: UnitIdentifierUtil.isModuleIdentifier( "WNC/CommonCore:wt.util" ); // return false UnitIdentifierUtil.isModuleIdentifier( "WNC/CommonCore:sub1" ); // return false UnitIdentifierUtil.isModuleIdentifier( "WNC/CommonCore:" ); // return false UnitIdentifierUtil.isModuleIdentifier( "WNC/CommonCore" ); // return true UnitIdentifierUtil.isModuleIdentifier( "registry" ); // return true (false positive)
identifier
- external form for a unit identifier
public static boolean isSubsystemTarget(String target)
Example Usage: UnitIdentifierUtil.isSubsystemTarget( "WNC/CommonCore:wt.util" ); // return false UnitIdentifierUtil.isSubsystemTarget( "WNC/CommonCore:wt" ); // return true UnitIdentifierUtil.isSubsystemTarget( "WNC/CommonCore:sub1" ); // return true UnitIdentifierUtil.isSubsystemTarget( "WNC/CommonCore" ); // return false
target
- external form for a unit identifier
public static boolean isSubsystemIdentifier(String identifier)
Example Usage: UnitIdentifierUtil.isSubsystemIdentifier( "WNC/CommonCore:wt.util" ); // return false UnitIdentifierUtil.isSubsystemIdentifier( "WNC/CommonCore:sub1" ); // return true UnitIdentifierUtil.isSubsystemIdentifier( "WNC/CommonCore:wt" ); // return false UnitIdentifierUtil.isSubsystemIdentifier( "WNC/CommonCore" ); // return false
identifier
- external form for a unit identifier
public static boolean isPackageTarget(String target)
Example Usage: UnitIdentifierUtil.isPackageTarget( "WNC/CommonCore:wt.util.*" ); // return true UnitIdentifierUtil.isPackageTarget( "WNC/CommonCore:wt.util" ); // return false
target
- an identifier to process, package target must end with "*" to distinguish from a class
public static boolean isClassTarget(String target)
Example Usage: UnitIdentifierUtil.isClassTarget( "WNC/CommonCore:wt.util.*" ); // return false UnitIdentifierUtil.isClassTarget( "WNC/CommonCore:wt.util" ); // return true (false positive) UnitIdentifierUtil.isClassTarget( "WNC/CommonCore:wt.util.LogFile" ); // return true
target
- an identifier to process, class target must not end with "*" and must contain a package separator "."
public static String getModuleName(String identifier)
Example Usage: UnitIdentifierUtil.getModuleName( "WNC/CommonCore:wt.util.*" ); // return "WNC/CommonCore" UnitIdentifierUtil.getModuleName( "WNC/CommonCore:wt.util" ); // return "WNC/CommonCore" UnitIdentifierUtil.getModuleName( "WNC/CommonCore:wt.util.LogFile" ); // return "WNC/CommonCore" UnitIdentifierUtil.getModuleName( "WNC/CommonCore:sub1" ); // return "WNC/CommonCore" UnitIdentifierUtil.getModuleName( "WNC/CommonCore" ); // return "WNC/CommonCore" UnitIdentifierUtil.getModuleName( "wt.util" ); // return ""
identifier
- external form for a unit identifier
public static String getSubsystemName(String identifier)
Example Usage: UnitIdentifierUtil.getSubsystemName( "WNC/CommonCore:wt.util.*" ); // return "" UnitIdentifierUtil.getSubsystemName( "WNC/CommonCore:wt.util" ); // return "" UnitIdentifierUtil.getSubsystemName( "wt.util" ); // return "" UnitIdentifierUtil.getSubsystemName( "WNC/CommonCore:wt.util.LogFile" ); // return "" UnitIdentifierUtil.getSubsystemName( "WNC/CommonCore:sub1" ); // return "sub1" UnitIdentifierUtil.getSubsystemName( "WNC/CommonCore" ); // return "" UnitIdentifierUtil.getSubsystemName( "WNC/Windchill:ApplicationServices/Indexing/wt.index"); // return "ApplicationServices/Indexing"
identifier
- external form for a unit identifier
public static String getPackageName(String identifier)
Example Usage: UnitIdentifierUtil.getPackageName( "WNC/CommonCore:wt.util.*" ); // return "wt.util.*" UnitIdentifierUtil.getPackageName( "WNC/CommonCore:wt.util" ); // return "wt.util" UnitIdentifierUtil.getPackageName( "wt.util" ); // return "wt.util" UnitIdentifierUtil.getPackageName( "WNC/CommonCore:wt.util.LogFile" ); // return "wt.util.LogFile" UnitIdentifierUtil.getPackageName( "WNC/CommonCore:sub1" ); // return "" UnitIdentifierUtil.getPackageName( "WNC/CommonCore" ); // return "" UnitIdentifierUtil.getPackageName( "WNC/Windchill:ApplicationServices/Indexing/wt.index"); // return "wt.index"
identifier
- external form for a unit identifier
public static String getUnitName(String identifier)
Example Usage: UnitIdentifierUtil.getUnitName( "WNC/CommonCore:wt.util.*" ); // return "wt.util.*" UnitIdentifierUtil.getUnitName( "WNC/CommonCore:wt.util" ); // return "wt.util" UnitIdentifierUtil.getUnitName( "wt.util" ); // return "wt.util" UnitIdentifierUtil.getUnitName( "WNC/CommonCore:wt.util.LogFile" ); // return "wt.util.LogFile" UnitIdentifierUtil.getUnitName( "WNC/CommonCore:sub1" ); // return "sub1" UnitIdentifierUtil.getUnitName( "WNC/CommonCore" ); // return "WNC/CommonCore" UnitIdentifierUtil.getUnitName( "WNC/Windchill:ApplicationServices/Indexing/wt.index"); // return "ApplicationServices/Indexing/wt.index"
identifier
- external form for a unit identifier
public static String getBaseUnitName(String identifier)
Example Usage: UnitIdentifierUtil.getBaseUnitName( "WNC/CommonCore:wt.util.*" ); // return "wt.util.*" UnitIdentifierUtil.getBaseUnitName( "WNC/CommonCore:wt.util" ); // return "wt.util" UnitIdentifierUtil.getBaseUnitName( "wt.util" ); // return "wt.util" UnitIdentifierUtil.getBaseUnitName( "WNC/CommonCore:wt.util.LogFile" ); // return "wt.util.LogFile" UnitIdentifierUtil.getBaseUnitName( "WNC/CommonCore:sub1" ); // return "sub1" UnitIdentifierUtil.getBaseUnitName( "WNC/CommonCore" ); // return "WNC/CommonCore" UnitIdentifierUtil.getBaseUnitName( "WNC/Windchill:ApplicationServices/Indexing/wt.index"); // return "wt.index"
identifier
- external form for a unit identifier
public static String getModuleQualifiedName(String module_name, String unit_name)
Example Usage: UnitIdentifierUtil.getModuleQualifiedName( "WNC/CommonCore", "wt.util" ); // return "WNC/CommonCore:wt.util.*" UnitIdentifierUtil.getModuleQualifiedName( "WNC/CommonCore", "" ); // return "WNC/CommonCore" UnitIdentifierUtil.getModuleQualifiedName( "", "wt.util" ); // return "wt.util" UnitIdentifierUtil.getModuleQualifiedName( "", "" ); // return ""
module_name
- module nameunit_name
- unit (subsystem, package or class) name
public static String getModuleQualifiedName(String module_name, String sub_name, String pkg_name)
Example Usage: UnitIdentifierUtil.getModuleQualifiedName( "WNC/CommonCore", "", "wt.util" ); // return "WNC/CommonCore:wt.util.*" UnitIdentifierUtil.getModuleQualifiedName( "WNC/CommonCore", "", "" ); // return "WNC/CommonCore" UnitIdentifierUtil.getModuleQualifiedName( "", "", "wt.util" ); // return "wt.util" UnitIdentifierUtil.getModuleQualifiedName( "", "", "" ); // return "" UnitIdentifierUtil.getModuleQualifiedName( "WNC/CommonCore", "ApplicationServices/Indexing", "" ); // return "WNC/CommonCore:ApplicationServices/Indexing" UnitIdentifierUtil.getModuleQualifiedName( "WNC/CommonCore", "ApplicationServices/Indexing", "wt.util" ); // return "WNC/CommonCore:ApplicationServices/Indexing/wt.util"
module_name
- module name
private static String getUnitName(String sub_name, String pkg_name)
private static String concatenateNames(String name1, String name2, char delimeter)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |