|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.structconf.TargetFileContentsCollector
An XconfHandler that will record the values of all properties, services, and resources specified from the root declaration and site xconf files, will assign each of these to its target property file, and will write these derived files after the parse of xconf files is complete
XconfHandler
Nested Class Summary | |
private class |
TargetFileContentsCollector.CollectingXconfHandler
|
Field Summary | |
private boolean |
analysisNeeded_
|
private String |
currentServiceOrResourcePropStart_
|
private URLSet |
declXconfUrls_
|
private HashSet |
derivedFiles_
|
private HashMap |
derivedProperties_
|
private boolean |
lenientValidation_
|
private static String |
LINE_SEPARATOR
|
private ArrayList |
propagationActionInstantiators_
|
private HashMap |
propertyInfos_
|
private static HashMap |
providerPropsFromName__
|
private URLSet |
siteXconfUrls_
|
private HashMap |
targetFilePathsIsDeclaredMap_
|
private boolean |
targetUnix_
|
private static String |
TypeBasedServiceProviderFromProperties
|
private static String |
TypeBasedServiceProviderFromProperties_customPropertyFiles
|
private static String |
WTServiceProviderFromProperties
|
private static String |
WTServiceProviderFromProperties_customPropertyFiles
|
private XconfAnalysis |
xconfAnalysis_
|
Constructor Summary | |
TargetFileContentsCollector(boolean target_unix,
boolean lenient_validation)
|
Method Summary | |
private void |
addDerivedFile(DerivedFile derived_file)
|
private FileUtil.FileInfo[] |
backup(DerivedFile[] derived_files)
|
private void |
buildDerivedProperties()
|
private void |
checkWritability(DerivedFile[] derived_files)
|
private void |
cleanupUnnecessaryBackups(FileUtil.FileInfo[] updated_file_info,
FileUtil.FileInfo[] backup_file_info)
|
(package private) void |
collect()
|
private void |
evaluatePropagationActions()
|
Collection |
getAllPropertyNames()
All property names collected. |
XconfAnalysis |
getAnalysis()
|
private File |
getCanonicalizedTargetFileFromParser(XconfParser parser)
All requests to parser.getCurrentTargetFile() should go thorugh this method so that we can accurately track if target files are referenced from declarative xconfs of site xconfs!!! |
(package private) URL[] |
getDeclarativeXconfUrls()
|
private DerivedProperties |
getDerivedProperties(File canonicalized_target_file,
boolean is_annotated)
Method getDerivedProperties. |
private PropertyInfo |
getPropertyInfo_(String prop_name)
|
private PropertyInfo |
getPropertyInfo_(String prop_name,
boolean overridable,
String multi_valued_delimiter)
|
PropertyInfo |
getPropertyInfo(String property_name)
All values for the specified property. |
(package private) Iterator |
getPropertyInfos()
Gets iterator over unordered set of properties. |
(package private) URL[] |
getSiteXconfUrls()
|
private String |
getTargetFileRelativePathFromParser(XconfParser parser)
|
private DerivedFile[] |
getTargetFiles()
|
private File |
getUncanonicalizedTargetFileFromParser(XconfParser parser)
|
(package private) ArrayList |
getUndeclaredTargetFiles()
Collection of File which are not referenced from declarative xconf files. |
private File |
getWtPropertiesTargetFileCanonicalized()
Returns the canonical file for wt.properties. |
private File |
getWtPropertiesTargetFileUncanonicalized()
Returns the canonical file for wt.properties. |
private boolean |
isADeclaredTargetFile(File canonicalized_target_file)
Report if the target file was referenced from a declarative xconf file. |
private boolean |
isADeclaredTargetFile(String canonicalized_target_file_path)
Report if the target file was referenced from a declarative xconf file. |
(package private) boolean |
isXconfDeclarative(URL xconf_url)
|
private void |
markTargetFileDeclared(File canonicalized_target_file,
boolean is_declared)
Keep track of which target files are referenced from declarative xconf files. |
(package private) static boolean |
propIsAServiceProviderProperty(String property_name)
|
private void |
resetContainers()
|
private FileUtil.FileInfo[] |
write(DerivedFile[] derived_files,
FileUtil.FileInfo[] matching_backups)
|
(package private) FileUtil.FileInfo[] |
writeTargetFiles()
Write all target files, backing them up first and return a set of FileInfo instances describing the produced files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String LINE_SEPARATOR
private static final String WTServiceProviderFromProperties
private static final String TypeBasedServiceProviderFromProperties
private static final String WTServiceProviderFromProperties_customPropertyFiles
private static final String TypeBasedServiceProviderFromProperties_customPropertyFiles
private static final HashMap providerPropsFromName__
private boolean lenientValidation_
private boolean targetUnix_
private URLSet siteXconfUrls_
private URLSet declXconfUrls_
private HashMap propertyInfos_
private HashMap derivedProperties_
private HashSet derivedFiles_
private ArrayList propagationActionInstantiators_
private String currentServiceOrResourcePropStart_
private HashMap targetFilePathsIsDeclaredMap_
private XconfAnalysis xconfAnalysis_
private boolean analysisNeeded_
Constructor Detail |
public TargetFileContentsCollector(boolean target_unix, boolean lenient_validation)
Method Detail |
public PropertyInfo getPropertyInfo(String property_name)
getPropertyInfo
in interface CollectedProperties
Iterator getPropertyInfos()
private PropertyInfo getPropertyInfo_(String prop_name) throws SAXException
SAXException
private PropertyInfo getPropertyInfo_(String prop_name, boolean overridable, String multi_valued_delimiter) throws SAXException
SAXException
private void resetContainers()
void collect() throws StructConfManagerException
StructConfManagerException
URL[] getSiteXconfUrls()
URL[] getDeclarativeXconfUrls()
boolean isXconfDeclarative(URL xconf_url)
private File getWtPropertiesTargetFileCanonicalized() throws SAXException
SAXException
private File getWtPropertiesTargetFileUncanonicalized() throws SAXException
SAXException
public Collection getAllPropertyNames()
getAllPropertyNames
in interface CollectedProperties
private void addDerivedFile(DerivedFile derived_file)
private DerivedFile[] getTargetFiles()
private DerivedProperties getDerivedProperties(File canonicalized_target_file, boolean is_annotated) throws IOException
IOException
private boolean isADeclaredTargetFile(File canonicalized_target_file)
private boolean isADeclaredTargetFile(String canonicalized_target_file_path)
private void markTargetFileDeclared(File canonicalized_target_file, boolean is_declared)
ArrayList getUndeclaredTargetFiles()
File
which are not referenced from declarative xconf files.
public XconfAnalysis getAnalysis()
FileUtil.FileInfo[] writeTargetFiles() throws StructConfManagerException, PartialPropagationException
FileInfo
instances describing the produced files.
StructConfManagerException
PartialPropagationException
- if not all files were successfully writtenprivate void buildDerivedProperties() throws IOException
IOException
private void checkWritability(DerivedFile[] derived_files) throws PropagationException
PropagationException
private void evaluatePropagationActions() throws PropagationActionException
PropagationActionException
private FileUtil.FileInfo[] backup(DerivedFile[] derived_files) throws StructConfManagerException
StructConfManagerException
private FileUtil.FileInfo[] write(DerivedFile[] derived_files, FileUtil.FileInfo[] matching_backups) throws PartialPropagationException
PartialPropagationException
private void cleanupUnnecessaryBackups(FileUtil.FileInfo[] updated_file_info, FileUtil.FileInfo[] backup_file_info)
private File getCanonicalizedTargetFileFromParser(XconfParser parser)
private String getTargetFileRelativePathFromParser(XconfParser parser)
private File getUncanonicalizedTargetFileFromParser(XconfParser parser)
static boolean propIsAServiceProviderProperty(String property_name)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |