|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.File
com.ptc.windchill.util.ModuleArtifact
ModuleArtifact is a specialization of the File class defines an artifact
according to a standard set of components.
If the object is constructed with a null unit, it is considered to be
a file for a module, therefore the qualified module name will be used
as the name space for the file.
If the object is constructed with a zero length string ("") unit, it
is considered to be an empty package, so the qualified module name will
NOT be used as the name space for the file.
To construct an object that represents the directory for a type of artifact,
the two argument constructor MUST be used.
Supported API: false
Extendable: false
Field Summary | |
private String |
artifactDir
|
protected ModuleArtifact |
artifactFile
|
private String |
artifactName
|
private static String |
CLASSNAME
|
private String |
fileExtension
|
private String |
fileName
|
private String |
moduleDir
|
protected ModuleArtifact |
moduleFile
|
private String |
moduleName
|
private static String |
RESOURCE
|
private String |
unitDir
|
protected ModuleArtifact |
unitFile
|
private String |
unitName
|
private static char |
UNIX_SEPARATOR
|
static ModuleArtifact |
WINDCHILL_BIN
Windchill install bin location. |
static ModuleArtifact |
WINDCHILL_LOG
Windchill install log file location. |
static ModuleArtifact |
WINDCHILL_RB
Windchill install resource bundle location. |
Fields inherited from class java.io.File |
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary | |
protected |
ModuleArtifact(String file_name)
Constructor to "wrap" File constructor. |
|
ModuleArtifact(String module,
String artifact)
Constructs a ModuleArtifact that represents the directory for a particular type of artifact. |
|
ModuleArtifact(String module,
String artifact,
String unit)
Constructs a ModuleArtifact that represents the directory for a specific unit (module, subsystem, or package), for a particular type of artifact. |
|
ModuleArtifact(String artifact,
String qualified_unit,
String name,
String extension)
Constructs a ModuleArtifact that represents a specific file, for a particular type of artifact. |
|
ModuleArtifact(String module,
String artifact,
String unit,
String name,
String extension)
Constructs a ModuleArtifact that represents a specific file, for a particular type of artifact. |
Method Summary | |
protected static String |
buildFilePath(String module,
String artifact)
|
protected static String |
buildFilePath(String module,
String artifact,
String unit,
String name,
String extension)
|
String |
getArtifactDir()
Gets the value of the attribute: artifactDir; The directory for the type of artifact, which is directly under the module's root directory. |
ModuleArtifact |
getArtifactFile()
Gets the full path of the artifact location. |
String |
getArtifactName()
Gets the value of the attribute: artifactName; The name of the artifact. |
String |
getFileExtension()
Gets the value of the attribute: fileExtension; The extension of the file name. |
String |
getFileName()
Gets the value of the attribute: fileName; The base name of the file. |
String |
getModuleDir()
Gets the value of the attribute: moduleDir; The root directory for the module. |
ModuleArtifact |
getModuleFile()
Gets the full path of the module location. |
String |
getModuleName()
Gets the value of the attribute: moduleName; The name of the module. |
File |
getParentFile()
Returns this ModuleArtifact's parent as a ModuleArtifact instance. |
String |
getQualifiedUnit()
Module qualified Package, or Subsystem, name. |
String |
getRelativePath(File relative_to)
Gets the portion of the path relative to the artifact location. |
static String |
getRelativePath(File descendent,
File ancestor)
Gets the portion of the desendent path that is relative to the ancestor path. |
static String |
getStandardPath(File file)
Gets CanonicalPath, unless CanonicalPath resolves to a symbolically linked path, in which case it gets the AbsolutePath. |
String |
getUnitDir()
Gets the value of the attribute: unitDir; The directory of the unit. |
protected static String |
getUnitDir(String module,
String artifactDir,
String unqualifiedUnit)
|
ModuleArtifact |
getUnitFile()
Gets the full path of the unit location. |
String |
getUnitName()
Gets the value of the attribute: unitName; The name of the package or subsystem unit. |
private void |
init(String module,
String artifact)
|
protected void |
initialize(String module,
String artifact)
|
protected void |
initialize(String module,
String artifact,
String unit,
String name,
String extension)
Initialize the ModuleArtifact that represents a specific file, for a particular type of artifact. |
static boolean |
isAncestor(File descendent,
File ancestor)
Determine if one path is an ancestor to another. |
protected static boolean |
isModuleNameSpaced(String unit)
|
protected ModuleArtifact |
newInstance(String module,
String artifact)
Construct new instance of this object. |
protected ModuleArtifact |
newInstance(String module,
String artifact,
String unit)
Construct new instance of this object. |
protected ModuleArtifact |
newInstance(String module,
String artifact,
String unit,
String file_name,
String extension)
Construct new instance of this object. |
ModuleArtifact |
setArtifactDir(String artifact_dir)
Supported API: false |
ModuleArtifact |
setFileExtension(String extension)
Supported API: false |
ModuleArtifact |
setFileName(String name)
Supported API: false |
ModuleArtifact |
setModuleDir(String module_dir)
Supported API: false |
ModuleArtifact |
setUnitDir(String unit_dir)
Supported API: false |
protected static String |
unitDir(String unit)
|
protected static String |
unitDir(String module,
String unit)
|
Methods inherited from class java.io.File |
canRead, canWrite, compareTo, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final ModuleArtifact WINDCHILL_BIN
public static final ModuleArtifact WINDCHILL_RB
public static final ModuleArtifact WINDCHILL_LOG
private String moduleName
private String artifactName
private String unitName
private String moduleDir
private String artifactDir
private String unitDir
private String fileName
private String fileExtension
private static final char UNIX_SEPARATOR
protected ModuleArtifact moduleFile
protected ModuleArtifact artifactFile
protected ModuleArtifact unitFile
Constructor Detail |
public ModuleArtifact(String module, String artifact)
module
- artifact
- public ModuleArtifact(String module, String artifact, String unit)
module
- artifact
- unit
- public ModuleArtifact(String module, String artifact, String unit, String name, String extension)
module
- artifact
- unit
- name
- extension
- public ModuleArtifact(String artifact, String qualified_unit, String name, String extension)
artifact
- qualified_unit
- name
- extension
- protected ModuleArtifact(String file_name)
Method Detail |
public String getModuleName()
public String getArtifactName()
public String getUnitName()
public String getModuleDir()
public String getArtifactDir()
public String getUnitDir()
public String getFileName()
public String getFileExtension()
public String getQualifiedUnit()
public String getRelativePath(File relative_to)
relative_to
-
public File getParentFile()
public ModuleArtifact getModuleFile()
public ModuleArtifact getArtifactFile()
public ModuleArtifact getUnitFile()
public ModuleArtifact setModuleDir(String module_dir)
module_dir
-
public ModuleArtifact setUnitDir(String unit_dir)
unit_dir
-
public ModuleArtifact setArtifactDir(String artifact_dir)
artifact_dir
-
public ModuleArtifact setFileName(String name)
name
-
public ModuleArtifact setFileExtension(String extension)
extension
-
public static boolean isAncestor(File descendent, File ancestor)
descendent
- ancestor
-
public static String getRelativePath(File descendent, File ancestor)
descendent
- ancestor
-
public static String getStandardPath(File file)
file
-
protected ModuleArtifact newInstance(String module, String artifact)
protected ModuleArtifact newInstance(String module, String artifact, String unit)
protected ModuleArtifact newInstance(String module, String artifact, String unit, String file_name, String extension)
protected void initialize(String module, String artifact, String unit, String name, String extension)
private void init(String module, String artifact)
protected void initialize(String module, String artifact)
protected static String buildFilePath(String module, String artifact)
protected static String buildFilePath(String module, String artifact, String unit, String name, String extension)
protected static String getUnitDir(String module, String artifactDir, String unqualifiedUnit)
protected static String unitDir(String module, String unit)
protected static String unitDir(String unit)
protected static boolean isModuleNameSpaced(String unit)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |