wt.epm.workspaces
Class EPMAsStoredHelper

java.lang.Object
  extended bywt.epm.workspaces.EPMAsStoredHelper

public class EPMAsStoredHelper
extends Object


Field Summary
private static Map checkDependenciesCache
           
private static String EPMRESOURCE
           
private static Class[] linkClasses
           
static boolean log
           
static boolean logTime
           
static boolean logTrace
           
 
Constructor Summary
EPMAsStoredHelper()
           
 
Method Summary
static QueryResult copyEPMAsStoredConfig(CopyObjectInfo[] copyInfo, boolean replace)
          This method copies forward EPMAsStoredConfig for each of the given originals to the corresponding copy.
static EPMAsStoredConfig createEPMAsStoredConfig(Collection checkinObjects, ConfigSpec configSpec, boolean isSBCheckin)
          Returns an EPMAsStoredConfig created for the given checkInObjects.
static EPMAsStoredConfig createEPMAsStoredConfig(Collection checkinObjects, EPMWorkspace workspace)
          Returns an EPMAsStoredConfig created for the given checkInObjects.
private static EPMAsStoredConfig createEPMAsStoredConfigInternal(Collection checkinObjects, Object configuration, boolean isSBCheckin)
           
static QueryResult extractsOwners(List baselineables)
          Returns a subset of the given baselineables, where the subset already exists in EPMAsStoredMember as owners.
protected static void filterAndValidateMembers(EPMConfigurationType type, Vector owners, Vector members)
          Filters out objects in the owners and members lists if objects are duplicates.
private static void filterMembers(EPMConfigurationType type, Vector owners, Vector members)
          Filters out objects in the owners and members lists if objects are duplicates or have the same master.
private static List filterMembers(List objects)
          Given a list of objects, returns a list of EPMDocuments or WTDocuments.
private static List filterOwners(Collection objects)
          Given a list of objects, returns a list of EPMDocuments whose authoring apps are listed in wt.epm.workspaces.createAsStored.AuthoringApplications and the system is configured to create as-stored config.
private static List filterSBMembers(List objects, WTContainerRef containerRef)
          Given a list of objects, returns a list of objects that are in the same solution as the given container.
static Map findOwnerIterations(long[] branchIds)
          Given an array of branchids, returns a Map of EPMDocument iterations of each version that are owners of an as-stored configuration The key in the map is the branchId, and the corresponding value is a List of EPMDocuments

Supported API: false
static QueryResult[] findSubstitutes(EPMAsStoredConfig asStoredConfig, QueryResult objects)
           
static EPMAsStoredConfig getAsStoredConfig(Baselineable document)
          Returns the associated EPMAsStoredConfig to which this document is an owner

Supported API: true
private static QueryResult getMembers(EPMAsStoredConfig asStoredConfig)
          Returns a list of baselineables of the given as-stored config which have not been substituted.
static QueryResult getOwners(EPMAsStoredConfig asStoredConfig)
          Returns the owners of the As Stored Config

Supported API: true
static WhereExpression getOwnerWhereExpression(boolean isOwner)
           
private static List removeComponents(List objects, DependencyGraph graph)
          Given a list of objects and a dependency graph, returns a list of objects that have dependents.
private static List traceDependencies(Collection owners, EPMWorkspace workspace)
           
private static void validateMasters(Vector members)
          Filters out objects in the list of members (including owners) if objects have the same master.
private static void validateMembers(EPMConfigurationType type, Vector owners, Vector members)
          Validates the given parameters as valid for creating / copying an EPMAsStoredConfig.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPMRESOURCE

private static final String EPMRESOURCE
See Also:
Constant Field Values

log

public static boolean log

logTrace

public static boolean logTrace

logTime

public static boolean logTime

checkDependenciesCache

private static Map checkDependenciesCache

linkClasses

private static Class[] linkClasses
Constructor Detail

EPMAsStoredHelper

public EPMAsStoredHelper()
Method Detail

filterMembers

private static void filterMembers(EPMConfigurationType type,
                                  Vector owners,
                                  Vector members)
                           throws WTException
Filters out objects in the owners and members lists if objects are duplicates or have the same master.

Supported API: false

Parameters:
type - the EPMConfiguration Type - not used at this version
owners - a list of EPMDocuments
members - a list of EPMDocuments or WTDocuments
Throws:
WTException

validateMembers

private static void validateMembers(EPMConfigurationType type,
                                    Vector owners,
                                    Vector members)
                             throws WTException
Validates the given parameters as valid for creating / copying an EPMAsStoredConfig.

Supported API: false

Parameters:
type - the EPMConfiguration Type - not used at this version
owners - a list of EPMDocuments
members - a list of EPMDocuments or WTDocuments
Throws:
WTException

findSubstitutes

public static QueryResult[] findSubstitutes(EPMAsStoredConfig asStoredConfig,
                                            QueryResult objects)
                                     throws WTException,
                                            WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getAsStoredConfig

public static EPMAsStoredConfig getAsStoredConfig(Baselineable document)
                                           throws WTException
Returns the associated EPMAsStoredConfig to which this document is an owner

Supported API: true

Parameters:
document - a Baselineable
Throws:
WTException

getOwners

public static QueryResult getOwners(EPMAsStoredConfig asStoredConfig)
                             throws WTException
Returns the owners of the As Stored Config

Supported API: true

Parameters:
asStoredConfig - EPMAsStoredConfig
Throws:
WTException

extractsOwners

public static QueryResult extractsOwners(List baselineables)
                                  throws WTException
Returns a subset of the given baselineables, where the subset already exists in EPMAsStoredMember as owners.

Supported API: true

Throws:
WTException

getMembers

private static QueryResult getMembers(EPMAsStoredConfig asStoredConfig)
                               throws WTException
Returns a list of baselineables of the given as-stored config which have not been substituted.

Supported API: false

Parameters:
asStoredConfig -
Throws:
WTException

findOwnerIterations

public static Map findOwnerIterations(long[] branchIds)
                               throws WTException
Given an array of branchids, returns a Map of EPMDocument iterations of each version that are owners of an as-stored configuration The key in the map is the branchId, and the corresponding value is a List of EPMDocuments

Supported API: false

Throws:
WTException

copyEPMAsStoredConfig

public static QueryResult copyEPMAsStoredConfig(CopyObjectInfo[] copyInfo,
                                                boolean replace)
                                         throws WTException
This method copies forward EPMAsStoredConfig for each of the given originals to the corresponding copy. If one or more originals share the same EPMAsStoredConfig then the corresponding copies also share same copied EPMAsStoredConfig.

Supported API: false

Parameters:
copyInfo - a list of original EPMDocuments and the target / copied EPMDocuments to which the EPMAsStoredConfig is to be copied
replace - whether or not to keep the originals in the copied as-stored config. if true then if any of the original appears in the as-stored config being copied then it is replaced by the corresponding target / copy in the copied as-stored config. ( e.g. can be used for revise operations ) if false then the original is copied as member and the target / copy (as owner or member depending upon how the original was linked) is added in the copied as-stored (e.g. can be used for copy operation)
Throws:
WTException

filterAndValidateMembers

protected static void filterAndValidateMembers(EPMConfigurationType type,
                                               Vector owners,
                                               Vector members)
                                        throws WTException
Filters out objects in the owners and members lists if objects are duplicates. Validates members.

Supported API: false

Parameters:
type - the EPMConfiguration Type - not used at this version
owners - a list of EPMDocuments
members - a list of EPMDocuments or WTDocuments
Throws:
WTException

getOwnerWhereExpression

public static WhereExpression getOwnerWhereExpression(boolean isOwner)
                                               throws WTException
Throws:
WTException

validateMasters

private static void validateMasters(Vector members)
                             throws WTException
Filters out objects in the list of members (including owners) if objects have the same master.

Supported API: false

Parameters:
members - a list of EPMDocuments or WTDocuments
Throws:
WTException

createEPMAsStoredConfig

public static EPMAsStoredConfig createEPMAsStoredConfig(Collection checkinObjects,
                                                        EPMWorkspace workspace)
                                                 throws WTException,
                                                        WTPropertyVetoException
Returns an EPMAsStoredConfig created for the given checkInObjects. This function handles the creation of as-stored config for check in from a workspace.

Supported API: false

Parameters:
checkinObjects - List a list of checked in objects
workspace - EPMWorkspace workspace used to find dependents of the checked-in objects
Throws:
WTException
WTPropertyVetoException

createEPMAsStoredConfig

public static EPMAsStoredConfig createEPMAsStoredConfig(Collection checkinObjects,
                                                        ConfigSpec configSpec,
                                                        boolean isSBCheckin)
                                                 throws WTException,
                                                        WTPropertyVetoException
Returns an EPMAsStoredConfig created for the given checkInObjects. This function handles the creation of as-stored config for check in from a workspace and sandbox.

Supported API: false

Parameters:
checkinObjects - List a list of checked in objects
configSpec - ConfigSpec config spec used to find dependents of the checked-in objects
isSBCheckin - boolean indicating whether the checkin is from workspace or sandbox
Throws:
WTException
WTPropertyVetoException

createEPMAsStoredConfigInternal

private static EPMAsStoredConfig createEPMAsStoredConfigInternal(Collection checkinObjects,
                                                                 Object configuration,
                                                                 boolean isSBCheckin)
                                                          throws WTException,
                                                                 WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

traceDependencies

private static List traceDependencies(Collection owners,
                                      EPMWorkspace workspace)
                               throws WTException
Throws:
WTException

filterOwners

private static List filterOwners(Collection objects)
                          throws WTException
Given a list of objects, returns a list of EPMDocuments whose authoring apps are listed in wt.epm.workspaces.createAsStored.AuthoringApplications and the system is configured to create as-stored config.

Supported API: false

Parameters:
objects - Collection a list of objects
Throws:
WTException

filterMembers

private static List filterMembers(List objects)
                           throws WTException
Given a list of objects, returns a list of EPMDocuments or WTDocuments. Returns the original copy if the EPMDocument or WTDocument is a working copy.

Supported API: false

Parameters:
objects - Collection a list of objects
Throws:
WTException

filterSBMembers

private static List filterSBMembers(List objects,
                                    WTContainerRef containerRef)
                             throws WTException
Given a list of objects, returns a list of objects that are in the same solution as the given container. If the object is a Sandbox working copy, returns its original copy.

Supported API: false

Parameters:
objects - Collection a list of objects
Throws:
WTException

removeComponents

private static List removeComponents(List objects,
                                     DependencyGraph graph)
                              throws WTException
Given a list of objects and a dependency graph, returns a list of objects that have dependents.

Supported API: false

Parameters:
objects - Collection a list of objects
Throws:
WTException