com.ptc.windchill.util.packaging.install
Class AbstractPackagingConsumer

java.lang.Object
  extended bycom.ptc.windchill.util.packaging.processor.PackagingTraverser
      extended bycom.ptc.windchill.util.packaging.install.AbstractPackagingConsumer
All Implemented Interfaces:
ClassProcessor, ExecutableApp, ModuleProcessor, PackageProcessor, RegistryProcessor, Serializable, SubsystemProcessor
Direct Known Subclasses:
AbstractInstallParticipant

public abstract class AbstractPackagingConsumer
extends PackagingTraverser
implements Serializable

A class that consumes information from the packaging organization hieracrchy.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private  ModuleArtifact cacheArtifact
           
private  boolean cached
           
private static String CLASSNAME
           
private  String context
           
static boolean DEBUG
           
private  boolean initialized
           
protected static String INSTALL_CONTEXT
           
private static DebugWriter LOG
           
private static String RESOURCE
           
private static String SIMPLE_CLASSNAME
           
 
Fields inherited from class com.ptc.windchill.util.packaging.processor.PackagingTraverser
PROCESS_3RD_PARTY, PROCESS_DEPS, PROCESS_MULTIPLE, PROCESS_NON_MODELED, RECURSE_DEPS
 
Constructor Summary
AbstractPackagingConsumer()
           
 
Method Summary
protected abstract  String getArtifactExtension()
          Get the file extension for the artifacts being processed.
protected  ModuleArtifact getCacheArtifact()
          Get the aggregated cache artifact.
protected abstract  String getConsumerName()
          Get the name of the consumer.
protected  String getContext()
          Gets the value of the attribute: context.
protected  ModuleArtifact getUnitArtifact(UnitIdentifier unit)
          Get the unit supplied artifact.
 void initialize()
          Initialize any configuration variables and prepare output files for writing (loadCache).
protected  void initializeConfiguration()
          Intitialize configuration variables.
protected  boolean isCached()
          Gets the value of the attribute: cached.
protected  boolean isInitialized()
          Gets the value of the attribute: initialized.
protected abstract  boolean loadCache()
          Load the aggregate cache artifact.
 void postProcess()
          Write and close output files (storeCache).
 void processModule(UnitIdentifier module_identifier, boolean deps, boolean recurse)
          Overrides the super class, in order to wrap with consumer specific initialization and cache handling, prior to processing the module.
protected  void setCached(boolean a_Cached)
          Sets the value of the attribute: cached.
protected  void setContext(String a_Context)
          Sets the value of the attribute: context.
protected  void setInitialized(boolean a_Initialized)
          Sets the value of the attribute: initialized.
protected abstract  void storeCache()
          Store the aggregate cache artifact.
 
Methods inherited from class com.ptc.windchill.util.packaging.processor.PackagingTraverser
argsOK, execute, getModuleIdentifier, isFile, isIncludedModule, isIncludedPackage, packageName, processClass, processClass, processDependency, processedModule, processFile, processModule, processModule, processModule, processPackage, processPackage, processRegistry, processSubsystem, processSubsystem, processTarget, processTargets, setClassProcessor, setModuleProcessor, setPackageProcessor, setRegistryProcessor, setSubsystemProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

initialized

private boolean initialized

cached

private boolean cached

context

private String context

INSTALL_CONTEXT

protected static final String INSTALL_CONTEXT
See Also:
Constant Field Values

SIMPLE_CLASSNAME

private static final String SIMPLE_CLASSNAME

DEBUG

public static final boolean DEBUG

LOG

private static final DebugWriter LOG

cacheArtifact

private ModuleArtifact cacheArtifact
Constructor Detail

AbstractPackagingConsumer

public AbstractPackagingConsumer()
Method Detail

isInitialized

protected boolean isInitialized()
Gets the value of the attribute: initialized.

Supported API: false

Returns:
boolean

setInitialized

protected void setInitialized(boolean a_Initialized)
Sets the value of the attribute: initialized.

Supported API: false

Parameters:
a_Initialized -

isCached

protected boolean isCached()
Gets the value of the attribute: cached.

Supported API: false

Returns:
boolean

setCached

protected void setCached(boolean a_Cached)
                  throws WTPropertyVetoException
Sets the value of the attribute: cached.

Supported API: false

Parameters:
a_Cached -
Throws:
WTPropertyVetoException

getContext

protected String getContext()
Gets the value of the attribute: context.

Supported API: false

Returns:
String

setContext

protected void setContext(String a_Context)
                   throws WTPropertyVetoException
Sets the value of the attribute: context.

Supported API: false

Parameters:
a_Context -
Throws:
WTPropertyVetoException

processModule

public void processModule(UnitIdentifier module_identifier,
                          boolean deps,
                          boolean recurse)
                   throws WTException
Overrides the super class, in order to wrap with consumer specific initialization and cache handling, prior to processing the module.

Supported API: false

Overrides:
processModule in class PackagingTraverser
Parameters:
module_identifier -
deps -
recurse -
Throws:
WTException

initializeConfiguration

protected void initializeConfiguration()
Intitialize configuration variables.

Supported API: false


initialize

public void initialize()
                throws WTException
Initialize any configuration variables and prepare output files for writing (loadCache).

Supported API: false

Overrides:
initialize in class PackagingTraverser
Throws:
WTException

postProcess

public void postProcess()
                 throws WTException
Write and close output files (storeCache).

Supported API: false

Overrides:
postProcess in class PackagingTraverser
Throws:
WTException

getConsumerName

protected abstract String getConsumerName()
Get the name of the consumer. Can be used in file name patterns, etc.

Supported API: false

Returns:
String

getArtifactExtension

protected abstract String getArtifactExtension()
Get the file extension for the artifacts being processed. Used when unit supplied artifacts are aggregated into a single artifact representing all the information for the installation.

Supported API: false

Returns:
String

getUnitArtifact

protected ModuleArtifact getUnitArtifact(UnitIdentifier unit)
Get the unit supplied artifact.

Supported API: false

Parameters:
unit -
Returns:
ModuleArtifact

getCacheArtifact

protected ModuleArtifact getCacheArtifact()
Get the aggregated cache artifact.

Supported API: false

Returns:
ModuleArtifact

loadCache

protected abstract boolean loadCache()
                              throws WTException
Load the aggregate cache artifact. The result of processing the target unit(s).

Supported API: false

Returns:
boolean
Throws:
WTException

storeCache

protected abstract void storeCache()
                            throws WTException
Store the aggregate cache artifact. The result of processing the target unit(s).

Supported API: false

Throws:
WTException