wt.epm.workspaces
Class EPMAsStoredConfigSpec

java.lang.Object
  extended bywt.epm.workspaces.EPMAsStoredConfigSpec
All Implemented Interfaces:
ConfigSpec, Evolvable, Externalizable, Serializable

public class EPMAsStoredConfigSpec
extends Object
implements ConfigSpec, Evolvable, Externalizable

The EPMAsStoredConfigSpec can be applied to Baselineables to filter those elements based on membership in an EPMAsStoredConfig. Substitution options are read from preferences and result in the following order of substitution rules when the iteration is not found in the configuration: 1) If substitutes are allowed, do not filter out links marked as substitutes. 2) If no iteration is found, use latest.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private  boolean allowSubstitutes
           
private  Vector asStoredConfigRefs
           
private static Class BASELINE_MEMBER_LINK
           
private static String BASELINEABLE_ROLE
           
private static String CLASSNAME
           
private static String DATABASE_ID
           
private static String EPMAS_STORED_CONFIG_ROLE
           
static long EXTERNALIZATION_VERSION_UID
           
private  LatestConfigSpec latestConfigSpec
           
private static String MASTER_ID
           
protected static long OLD_FORMAT_VERSION_UID
           
private  WTContainerRef preferredContainer
           
static long R70_EXTERNALIZATION_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Constructor Summary
EPMAsStoredConfigSpec()
           
 
Method Summary
 QuerySpec appendSearchCriteria(QuerySpec querySpec)
          Appends to the QuerySpec based on the substitution rules to be followed.
private static long[] extractIds(Collection objectReferences)
          Returns the object ids of the given list of ObjectReference objects.
static Set getConfigsForSeeds(List baselineables)
           
protected static WTSet getContainers(Collection documents)
           
private static WTSet getOwnerContainers(Collection asStoredConfigurations)
          Given a list of as-stored configurations, returns a set of their owners' container references.
protected  SubSelectExpression inBaseline()
           
private  SubSelectExpression inProject(WTContainerRef projectRef, Class mainClass)
           
 boolean isAllowSubstitutes()
          Gets the value of the attribute: allowSubstitutes; Do not filter out members marked as substitutes.
protected  SubSelectExpression masterInBaseline(Class objectClass)
           
static EPMAsStoredConfigSpec newEPMAsStoredConfigSpec(EPMAsStoredConfig configuration)
          Factory method to create a new EPMAsStoredConfigSpec using the specified EPMAsStoredConfig.
static EPMAsStoredConfigSpec newEPMAsStoredConfigSpec(EPMDocument seed)
          Factory method to create a new EPMAsStoredConfigSpec given a seed object.
static EPMAsStoredConfigSpec newEPMAsStoredConfigSpec(List seeds)
          Factory method to create a new EPMAsStoredConfigSpec given a list of seed objects.
protected  QuerySpec newSubSelect()
           
 QueryResult process(QueryResult results)
          Returns a clone of the results.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(EPMAsStoredConfigSpec thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setAllowSubstitutes(boolean a_AllowSubstitutes)
          Sets the value of the attribute: allowSubstitutes; Do not filter out members marked as substitutes.
private  void setAsStoredConfig(EPMAsStoredConfig a_AsStoredConfig)
          Sets the As-stored config refs given a list of seed Baselineables

Supported API: false
private  void setAsStoredConfigRefs(List seeds)
          Sets the As-stored config refs given a list of seed Baselineables

Supported API: false
private  void setPreferredContainer()
          Sets the preferred container based on the as-stored configuration references.
private  void setPreferredContainer(Collection containerRefs)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
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

allowSubstitutes

private boolean allowSubstitutes

preferredContainer

private WTContainerRef preferredContainer

asStoredConfigRefs

private Vector asStoredConfigRefs

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

latestConfigSpec

private LatestConfigSpec latestConfigSpec

BASELINE_MEMBER_LINK

private static final Class BASELINE_MEMBER_LINK

EPMAS_STORED_CONFIG_ROLE

private static final String EPMAS_STORED_CONFIG_ROLE
See Also:
Constant Field Values

BASELINEABLE_ROLE

private static final String BASELINEABLE_ROLE
See Also:
Constant Field Values

DATABASE_ID

private static final String DATABASE_ID
See Also:
Constant Field Values

MASTER_ID

private static final String MASTER_ID
See Also:
Constant Field Values

R70_EXTERNALIZATION_VERSION_UID

public static final long R70_EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

EPMAsStoredConfigSpec

public EPMAsStoredConfigSpec()
                      throws WTPropertyVetoException
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(EPMAsStoredConfigSpec thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

isAllowSubstitutes

public boolean isAllowSubstitutes()
Gets the value of the attribute: allowSubstitutes; Do not filter out members marked as substitutes. This value is set automatically by reading a preference.

Supported API: false

Returns:
boolean

setAllowSubstitutes

public void setAllowSubstitutes(boolean a_AllowSubstitutes)
                         throws WTPropertyVetoException
Sets the value of the attribute: allowSubstitutes; Do not filter out members marked as substitutes. This value is set automatically by reading a preference.

Supported API: false

Parameters:
a_AllowSubstitutes -
Throws:
WTPropertyVetoException

appendSearchCriteria

public QuerySpec appendSearchCriteria(QuerySpec querySpec)
                               throws WTException,
                                      QueryException
Appends to the QuerySpec based on the substitution rules to be followed.

Supported API: true

Specified by:
appendSearchCriteria in interface ConfigSpec
Parameters:
querySpec - A QuerySpec with a target class that is Iterated.
Returns:
QuerySpec
Throws:
WTException
QueryException
See Also:
QuerySpec, SearchCondition

process

public QueryResult process(QueryResult results)
                    throws WTException
Returns a clone of the results. No processing is done: it is expected that the results have already been pre-filtered by the search.

Supported API: true

Specified by:
process in interface ConfigSpec
Parameters:
results - QueryResult of iterations to filter. Assumed to be the result of a query that included the additional search conditions applied by appendSearchCriteria. Note that after enumerating through the elements of this QueryResult, it should be reset.
Returns:
QueryResult
Throws:
WTException
See Also:
QueryResult, Iterated

newEPMAsStoredConfigSpec

public static EPMAsStoredConfigSpec newEPMAsStoredConfigSpec(EPMDocument seed)
                                                      throws WTPropertyVetoException,
                                                             WTException
Factory method to create a new EPMAsStoredConfigSpec given a seed object. Null is returned if the seed is not an owner of an EPMAsStoredConfig.

Supported API: true

Parameters:
seed - Use the EPMAsStoredConfig to which the seed has an owner association.
Returns:
EPMAsStoredConfigSpec
Throws:
WTPropertyVetoException
WTException

newEPMAsStoredConfigSpec

public static EPMAsStoredConfigSpec newEPMAsStoredConfigSpec(EPMAsStoredConfig configuration)
                                                      throws WTPropertyVetoException,
                                                             WTException
Factory method to create a new EPMAsStoredConfigSpec using the specified EPMAsStoredConfig.

Supported API: true

Parameters:
configuration -
Returns:
EPMAsStoredConfigSpec
Throws:
WTPropertyVetoException
WTException

newEPMAsStoredConfigSpec

public static EPMAsStoredConfigSpec newEPMAsStoredConfigSpec(List seeds)
                                                      throws WTPropertyVetoException,
                                                             WTException
Factory method to create a new EPMAsStoredConfigSpec given a list of seed objects.

Supported API: true

Parameters:
seeds - Use the EPMAsStoredConfig to which the seed has an owner association.
Returns:
EPMAsStoredConfigSpec
Throws:
WTPropertyVetoException
WTException

inBaseline

protected SubSelectExpression inBaseline()
                                  throws QueryException
Throws:
QueryException

masterInBaseline

protected SubSelectExpression masterInBaseline(Class objectClass)
                                        throws QueryException
Throws:
QueryException

newSubSelect

protected QuerySpec newSubSelect()
                          throws QueryException
Throws:
QueryException

setAsStoredConfigRefs

private void setAsStoredConfigRefs(List seeds)
                            throws WTException
Sets the As-stored config refs given a list of seed Baselineables

Supported API: false

Parameters:
seeds - Use the as-stored config specs where the EPMDocuments are owners
Throws:
WTException

setAsStoredConfig

private void setAsStoredConfig(EPMAsStoredConfig a_AsStoredConfig)
                        throws WTPropertyVetoException,
                               WTException
Sets the As-stored config refs given a list of seed Baselineables

Supported API: false

Parameters:
a_AsStoredConfig - Use the single as-stored config spec
Throws:
WTPropertyVetoException
WTException

getConfigsForSeeds

public static Set getConfigsForSeeds(List baselineables)
                              throws WTException
Throws:
WTException

inProject

private SubSelectExpression inProject(WTContainerRef projectRef,
                                      Class mainClass)
                               throws WTException
Throws:
WTException

setPreferredContainer

private void setPreferredContainer()
                            throws WTException
Sets the preferred container based on the as-stored configuration references.

Throws:
WTException

setPreferredContainer

private void setPreferredContainer(Collection containerRefs)
                            throws WTException
Throws:
WTException

getContainers

protected static WTSet getContainers(Collection documents)
                              throws WTException
Throws:
WTException

getOwnerContainers

private static WTSet getOwnerContainers(Collection asStoredConfigurations)
                                 throws WTException
Given a list of as-stored configurations, returns a set of their owners' container references.

Parameters:
asStoredConfigurations - a list of ObjectReference to EPMAsStoredConfig
Returns:
Set a set of WTContainerRef that the as-stored config owners belong to.
Throws:
WTException

extractIds

private static long[] extractIds(Collection objectReferences)
                          throws WTException
Returns the object ids of the given list of ObjectReference objects.

Throws:
WTException