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

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

public class RuleUtilities
extends Object


Field Summary
private static String FOLDER_ID
           
private static String LIFE_CYCLE_ID
           
private static String RULE_RESOURCE
           
private static String TEAM_TEMPLATE_ID
           
private static boolean VERBOSE
           
private static String VIEW_ID
           
 
Constructor Summary
RuleUtilities()
           
 
Method Summary
private static Object evaluateInitRuleAttrValue(AttrValue attrValue, Class revisionControlledObjectClass, WTContainerRef containerRef)
          For the specified AttrValue and for specified business object's Type (Class), evaluate the attribute's value from the init rule from the specified container.
static Rule getBusinessObjectInitRule(Class objectClass, WTContainer container)
          Get the container based Rule for initializing the specified type of object for the specified container
static Rule getCADDocInitRule(WTContainer container)
          Get the container based Rule for initializing the new EPMDocument object for the specified container
static String getFolderLocation(CabinetBased cb)
          For the specified CabinetBased object, return back the string form of the default folder location.
static String getLifeCycle(LifeCycleManaged lcm)
          Deprecated. Use getLifeCycleName()
static String getLifeCycleName(LifeCycleManaged lcm)
          For the specified LifeCycleManaged object, return back the life cycle template name.
static String getLifeCycleName(WTContainer container, Class revisionControlledObjectClass)
          For the specified container, find out the default life cycle name for the specified type (class) of RevisionControlled objects
private static LifeCycleTemplate getLifeCycleTemplate(WTContainer container, Class revisionControlledObjectClass)
          For the specified container, find out the default life cycle template for the specified type (class) of RevisionControlled objects
static LifeCycleTemplateMaster getLifeCycleTemplateMaster(LifeCycleManaged lcm, WTContainer container)
          For the specified LifeCycleManaged object, return back the life cycle template master.
private static LifeCycleTemplateMaster getLifeCycleTemplateMaster(LifeCycleTemplate lifeCycleTemplate, WTContainer container)
          For the specified LifeCycleTemplate object, return back the life cycle template master.
static LifeCycleTemplateMaster getLifeCycleTemplateMaster(WTContainer container, Class revisionControlledObjectClass)
          For the specified container, find out the default life cycle for the specified type (class) of RevisionControlled objects
static Rule getPartInitRule(WTContainer container)
          Get the container based Rule for initializing the new WTPart object for the specified container
static Folder getTargetFolder(WTContainer container, Class revisionControlledObjectClass)
          For the specified container, find out the default target folder for the specified type (class) of RevisionControlled objects
static String getTeam(TeamManaged tm)
          For the specified TeamManaged object, return back it's team template identity.
static TeamTemplate getTeamTemplate(WTContainer container, Class revisionControlledObjectClass)
          For the specified container, find out the default team template for the specified type (class) of RevisionControlled objects
static String getTeamTemplateIdentity(WTContainer container, Class revisionControlledObjectClass)
          For the specified container, find out the default team template identity for the specified type (class) of RevisionControlled objects
static View getView(WTContainer container, Class revisionControlledObjectClass)
          For the specified container, find out the view for the specified type (class) of RevisionControlled objects.
static String getViewName(WTContainer container, Class revisionControlledObjectClass)
          For the specified container, find out the view for the specified type (class) of RevisionControlled objects.
 
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

RULE_RESOURCE

private static final String RULE_RESOURCE
See Also:
Constant Field Values

FOLDER_ID

private static final String FOLDER_ID
See Also:
Constant Field Values

LIFE_CYCLE_ID

private static final String LIFE_CYCLE_ID
See Also:
Constant Field Values

TEAM_TEMPLATE_ID

private static final String TEAM_TEMPLATE_ID
See Also:
Constant Field Values

VIEW_ID

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

RuleUtilities

public RuleUtilities()
Method Detail

getCADDocInitRule

public static Rule getCADDocInitRule(WTContainer container)
                              throws WTException,
                                     RuleException
Get the container based Rule for initializing the new EPMDocument object for the specified container

Throws:
WTException
RuleException

getPartInitRule

public static Rule getPartInitRule(WTContainer container)
                            throws WTException,
                                   RuleException
Get the container based Rule for initializing the new WTPart object for the specified container

Throws:
WTException
RuleException

getBusinessObjectInitRule

public static Rule getBusinessObjectInitRule(Class objectClass,
                                             WTContainer container)
                                      throws WTException,
                                             RuleException
Get the container based Rule for initializing the specified type of object for the specified container

Throws:
WTException
RuleException

getTeam

public static String getTeam(TeamManaged tm)
For the specified TeamManaged object, return back it's team template identity.


getLifeCycle

public static String getLifeCycle(LifeCycleManaged lcm)
Deprecated. Use getLifeCycleName()

For the specified LifeCycleManaged object, return back the life cycle template name.


getLifeCycleName

public static String getLifeCycleName(LifeCycleManaged lcm)
For the specified LifeCycleManaged object, return back the life cycle template name.


getLifeCycleTemplateMaster

public static LifeCycleTemplateMaster getLifeCycleTemplateMaster(LifeCycleManaged lcm,
                                                                 WTContainer container)
                                                          throws WTException,
                                                                 LifeCycleException
For the specified LifeCycleManaged object, return back the life cycle template master.

Throws:
WTException
LifeCycleException

getLifeCycleTemplateMaster

private static LifeCycleTemplateMaster getLifeCycleTemplateMaster(LifeCycleTemplate lifeCycleTemplate,
                                                                  WTContainer container)
                                                           throws WTException,
                                                                  LifeCycleException
For the specified LifeCycleTemplate object, return back the life cycle template master.

Throws:
WTException
LifeCycleException

getFolderLocation

public static String getFolderLocation(CabinetBased cb)
                                throws WTException
For the specified CabinetBased object, return back the string form of the default folder location. Will FolderHelper.getLocation() API return the system cabinet for the container? If not, will need to do this differently.

Throws:
WTException

getTeamTemplateIdentity

public static String getTeamTemplateIdentity(WTContainer container,
                                             Class revisionControlledObjectClass)
                                      throws WTException
For the specified container, find out the default team template identity for the specified type (class) of RevisionControlled objects

Throws:
WTException

getTeamTemplate

public static TeamTemplate getTeamTemplate(WTContainer container,
                                           Class revisionControlledObjectClass)
                                    throws WTException
For the specified container, find out the default team template for the specified type (class) of RevisionControlled objects

Throws:
WTException

getLifeCycleName

public static String getLifeCycleName(WTContainer container,
                                      Class revisionControlledObjectClass)
                               throws WTException
For the specified container, find out the default life cycle name for the specified type (class) of RevisionControlled objects

Throws:
WTException

getLifeCycleTemplateMaster

public static LifeCycleTemplateMaster getLifeCycleTemplateMaster(WTContainer container,
                                                                 Class revisionControlledObjectClass)
                                                          throws WTException
For the specified container, find out the default life cycle for the specified type (class) of RevisionControlled objects

Throws:
WTException

getLifeCycleTemplate

private static LifeCycleTemplate getLifeCycleTemplate(WTContainer container,
                                                      Class revisionControlledObjectClass)
                                               throws WTException
For the specified container, find out the default life cycle template for the specified type (class) of RevisionControlled objects

Throws:
WTException

getTargetFolder

public static Folder getTargetFolder(WTContainer container,
                                     Class revisionControlledObjectClass)
                              throws WTException
For the specified container, find out the default target folder for the specified type (class) of RevisionControlled objects

Throws:
WTException

getViewName

public static String getViewName(WTContainer container,
                                 Class revisionControlledObjectClass)
                          throws WTException
For the specified container, find out the view for the specified type (class) of RevisionControlled objects.

Throws:
WTException

getView

public static View getView(WTContainer container,
                           Class revisionControlledObjectClass)
                    throws WTException
For the specified container, find out the view for the specified type (class) of RevisionControlled objects.

Throws:
WTException

evaluateInitRuleAttrValue

private static Object evaluateInitRuleAttrValue(AttrValue attrValue,
                                                Class revisionControlledObjectClass,
                                                WTContainerRef containerRef)
                                         throws WTException
For the specified AttrValue and for specified business object's Type (Class), evaluate the attribute's value from the init rule from the specified container.

Throws:
WTException