com.ptc.windchill.cadx.common.util
Class BaselineUtilities

java.lang.Object
  extended bycom.ptc.windchill.cadx.common.util.BaselineUtilities

public class BaselineUtilities
extends Object


Field Summary
private static String EPMASSTOREDMEMBER_OWNER
           
private static boolean VERBOSE
           
 
Constructor Summary
BaselineUtilities()
           
 
Method Summary
private  Baseline addToBaseline(Object[] objects, Baseline baseline)
           
 Baseline createBaseline(CreationDefaults defaults, Baselineable[] objects)
          Deprecated. Use createBaseline(CreationDefaults defaults, Baselineable[] objects, WTContainer container )
 Baseline createBaseline(CreationDefaults defaults, Baselineable[] objects, WTContainer container)
           
static Baseline createBaseline(String name, String number, Folder folder, String lifecycle)
           
 boolean doesBaselineExist(String number, WTContainer container)
           
static String generateBaselineNumber()
          Utility function that will generate a number for a baseline using user name and date.
static ManagedBaseline[] getAllBaselines()
           
static EPMAsStoredConfig getAsStoredConfig(Baselineable seedObject)
          return the AsStoredConfig associated with specified seedObject
static EPMAsStoredConfig getAsStoredConfig(String seedObjectNumber)
          Deprecated. For large set of objects, using this method is very expensive as it needs to get object for oid one by one. Use getAsStoredConfig(EPMDocument seedObject) instead.
static Integer getAsStoredConfigCount(Collection baselineables)
          For the specified baselineables collection, return count of EPMAsStoredMember rows
static Vector getAsStoredIterationsForItem(Baselineable a_baselineable)
           
static ManagedBaseline getBaseline(String baselineNumber, WTContainer container)
           
static Folder getBaselineDefaultFolder(WTContainer container)
           
static Vector getBaselineLifecycleCandidates(WTContainer container)
          Utility method that will return a list of lifecycle Templates that can be used in the creation of a baseline
static ManagedBaseline[] getBaselinesForItem(Object object)
          Deprecated. This method does not provide good data retrieval performance. Instead use getBaselinesForItemBranchId() for improved performance.
static QueryResult getBaselinesForItemBranchId(Baselineable a_baselineable, long branchIdentifier)
          For the specified Baselineable object, get all the ManagedBaseline(s) to which this Baselineable is part of.
static QueryResult getBaselinesForItemBranchId(Object object)
          For the specified Baselineable object, get all the ManagedBaseline(s) to which this Baselineable is part of.
static Vector navigateAsStoredForItem(Baselineable a_baselineable, EPMAsStoredConfigSpec a_configspec)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

private static boolean VERBOSE

EPMASSTOREDMEMBER_OWNER

private static final String EPMASSTOREDMEMBER_OWNER
See Also:
Constant Field Values
Constructor Detail

BaselineUtilities

public BaselineUtilities()
Method Detail

createBaseline

public Baseline createBaseline(CreationDefaults defaults,
                               Baselineable[] objects)
Deprecated. Use createBaseline(CreationDefaults defaults, Baselineable[] objects, WTContainer container )

What do you need to create a baseline? Name, Number, Folder, objects to add


createBaseline

public Baseline createBaseline(CreationDefaults defaults,
                               Baselineable[] objects,
                               WTContainer container)

doesBaselineExist

public boolean doesBaselineExist(String number,
                                 WTContainer container)

addToBaseline

private Baseline addToBaseline(Object[] objects,
                               Baseline baseline)
                        throws WTException
Throws:
WTException

getAllBaselines

public static ManagedBaseline[] getAllBaselines()
                                         throws WTException
Throws:
WTException

getBaseline

public static ManagedBaseline getBaseline(String baselineNumber,
                                          WTContainer container)
                                   throws WTException
Throws:
WTException

getBaselinesForItem

public static ManagedBaseline[] getBaselinesForItem(Object object)
                                             throws WTException,
                                                    WTPropertyVetoException
Deprecated. This method does not provide good data retrieval performance. Instead use getBaselinesForItemBranchId() for improved performance.

searches the database for all managed baselines which contain the any iteration of the given object

Throws:
WTException
WTPropertyVetoException

getBaselinesForItemBranchId

public static QueryResult getBaselinesForItemBranchId(Object object)
                                               throws WTException,
                                                      WTPropertyVetoException
For the specified Baselineable object, get all the ManagedBaseline(s) to which this Baselineable is part of. Filter out only those ManagedBaselines which are associated to the Baselineable's iteration in the same version as version of the specified Baselineable. For example, if the "version.iteration" of the specified EPMDocument object is "B.3", then ManageBaselines associated with iterations B.1, B.2 & B.3 are returned.

Throws:
WTException
WTPropertyVetoException

getBaselinesForItemBranchId

public static QueryResult getBaselinesForItemBranchId(Baselineable a_baselineable,
                                                      long branchIdentifier)
                                               throws WTException,
                                                      WTPropertyVetoException
For the specified Baselineable object, get all the ManagedBaseline(s) to which this Baselineable is part of. Filter out only those ManagedBaselines which are associated to the Baselineable's iteration in the specified version (also called branchIdentifier). For example, if the version as per specified branchIdentifier is 'B.2', then ManageBaselines associated with iterations B.1, B.2, B.3... are returned.

Throws:
WTException
WTPropertyVetoException

generateBaselineNumber

public static String generateBaselineNumber()
                                     throws WTException
Utility function that will generate a number for a baseline using user name and date.

Returns:
Throws:
WTException

getBaselineLifecycleCandidates

public static Vector getBaselineLifecycleCandidates(WTContainer container)
                                             throws WTException
Utility method that will return a list of lifecycle Templates that can be used in the creation of a baseline

Returns:
Throws:
WTException

getBaselineDefaultFolder

public static Folder getBaselineDefaultFolder(WTContainer container)
                                       throws WTException
Throws:
WTException

createBaseline

public static Baseline createBaseline(String name,
                                      String number,
                                      Folder folder,
                                      String lifecycle)
                               throws WTException
Throws:
WTException

getAsStoredIterationsForItem

public static Vector getAsStoredIterationsForItem(Baselineable a_baselineable)
                                           throws PersistenceException,
                                                  WTException
Throws:
PersistenceException
WTException

navigateAsStoredForItem

public static Vector navigateAsStoredForItem(Baselineable a_baselineable,
                                             EPMAsStoredConfigSpec a_configspec)

getAsStoredConfig

public static EPMAsStoredConfig getAsStoredConfig(String seedObjectNumber)
                                           throws WTException
Deprecated. For large set of objects, using this method is very expensive as it needs to get object for oid one by one. Use getAsStoredConfig(EPMDocument seedObject) instead.

return the AsStoredConfig associated with a seedObject's oid that's EPMDoc

Parameters:
seedObjectNumber -
Returns:
Throws:
WTException

getAsStoredConfig

public static EPMAsStoredConfig getAsStoredConfig(Baselineable seedObject)
                                           throws WTException
return the AsStoredConfig associated with specified seedObject

Parameters:
seedObject -
Returns:
Throws:
WTException

getAsStoredConfigCount

public static Integer getAsStoredConfigCount(Collection baselineables)
                                      throws WTException
For the specified baselineables collection, return count of EPMAsStoredMember rows

Parameters:
baselineables -
Returns:
Throws:
WTException