wt.rule.impl
Class RuleApplierHelper

java.lang.Object
  extended bywt.rule.impl.RuleApplierHelper

public class RuleApplierHelper
extends Object

This class provides utilities that are useful to implementors of the RuleApplier interface.


Field Summary
private static String RESOURCE
          Deprecated.  
private static DateFormat UNIQUE_NUMBER_DATE_FORMAT
          Deprecated.  
static String XML_ATTR_CLASS
          Deprecated.  
static String XML_ATTR_IDENTITY
          Deprecated.  
static String XML_ATTR_METHOD
          Deprecated.  
static String XML_ATTR_OBJECT
          Deprecated.  
static String XML_ATTR_SELECT
          Deprecated.  
static String XML_CONTEXT
          Deprecated.  
static String XML_CONTEXT_PROJECT
          Deprecated.  
static String XML_CONTEXT_TARGET
          Deprecated.  
static String XML_CONTEXT_TEAM
          Deprecated.  
static String XML_INVOKE
          Deprecated.  
static String XML_LIFECYCLEMANAGED
          Deprecated.  
 
Constructor Summary
RuleApplierHelper()
          Deprecated.  
 
Method Summary
static void assignLocation(Foldered f, Map data)
          Deprecated.  
static ContentHolder copyContent(ContentHolder copyFrom, ContentHolder copyTo)
          Deprecated.  
private static Persistable copyObject(Persistable obj)
          Deprecated.  
static Persistable copyRelationships(Persistable copyFrom, Persistable copyTo, Class linkClass, String otherRole, boolean deep)
          Deprecated.  
static String createUniqueNumber()
          Deprecated.  
private static BinaryLink duplicateLink(BinaryLink link)
          Deprecated.  
static String getAdminDomain(DomainAdministered da)
          Deprecated.  
static String getDepartment(WTDocument doc)
          Deprecated.  
static String getDescription(Team team)
          Deprecated.  
static String getDescription(WTDocument doc)
          Deprecated.  
static String getDocType(WTDocument doc)
          Deprecated.  
static String getIdentity(Identified i)
          Deprecated.  
static String getLifeCycle(LifeCycleManaged lcm)
          Deprecated.  
static String getLocation(CabinetBased cb)
          Deprecated.  
static String getName(Team team)
          Deprecated.  
static String getName(WTDocument doc)
          Deprecated.  
static String getName(WTPart part)
          Deprecated.  
static String getNumber(WTDocument doc)
          Deprecated.  
static String getNumber(WTPart part)
          Deprecated.  
static String getPartType(WTPart part)
          Deprecated.  
static String getSource(WTPart part)
          Deprecated.  
static String getState(LifeCycleManaged lcm)
          Deprecated.  
static String getTitle(WTDocument doc)
          Deprecated.  
static String getValue(LifeCycleManaged lcm, String key)
          Deprecated.  
static String getValue(Team team, String key)
          Deprecated.  
static String getValue(WTDocument doc, String key)
          Deprecated.  
static String getValue(WTPart part, String key)
          Deprecated.  
static String getView(ViewManageable vm)
          Deprecated.  
static DomainAdministered setAdminDomain(DomainAdministered da, WTContainerRef container, Map data)
          Deprecated.  
static void setDepartment(WTDocument doc, Map data)
          Deprecated.  
static void setDescription(WTDocument doc, Map data)
          Deprecated.  
static void setDocType(WTDocument doc, Map data)
          Deprecated.  
static LifeCycleManaged setLifeCycle(LifeCycleManaged lcm, Map data)
          Deprecated.  
static void setName(WTDocument doc, Map data)
          Deprecated.  
static void setName(WTPart part, Map data)
          Deprecated.  
static void setNumber(WTDocument doc, Map data)
          Deprecated.  
static void setNumber(WTPart part, Map data)
          Deprecated.  
static void setPartType(WTPart part, Map data)
          Deprecated.  
static void setSource(WTPart part, Map data)
          Deprecated.  
static LifeCycleManaged setState(LifeCycleManaged lcm, Map data)
          Deprecated.  
static void setTitle(WTDocument doc, Map data)
          Deprecated.  
static void setView(ViewManageable vm, Map data)
          Deprecated.  
 
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
Deprecated. 
See Also:
Constant Field Values

XML_CONTEXT

public static final String XML_CONTEXT
Deprecated. 
See Also:
Constant Field Values

XML_ATTR_OBJECT

public static final String XML_ATTR_OBJECT
Deprecated. 
See Also:
Constant Field Values

XML_ATTR_SELECT

public static final String XML_ATTR_SELECT
Deprecated. 
See Also:
Constant Field Values

XML_CONTEXT_TARGET

public static final String XML_CONTEXT_TARGET
Deprecated. 
See Also:
Constant Field Values

XML_CONTEXT_PROJECT

public static final String XML_CONTEXT_PROJECT
Deprecated. 
See Also:
Constant Field Values

XML_CONTEXT_TEAM

public static final String XML_CONTEXT_TEAM
Deprecated. 
See Also:
Constant Field Values

XML_INVOKE

public static final String XML_INVOKE
Deprecated. 
See Also:
Constant Field Values

XML_ATTR_IDENTITY

public static final String XML_ATTR_IDENTITY
Deprecated. 
See Also:
Constant Field Values

XML_ATTR_CLASS

public static final String XML_ATTR_CLASS
Deprecated. 
See Also:
Constant Field Values

XML_ATTR_METHOD

public static final String XML_ATTR_METHOD
Deprecated. 
See Also:
Constant Field Values

XML_LIFECYCLEMANAGED

public static final String XML_LIFECYCLEMANAGED
Deprecated. 
See Also:
Constant Field Values

UNIQUE_NUMBER_DATE_FORMAT

private static final DateFormat UNIQUE_NUMBER_DATE_FORMAT
Deprecated. 
Constructor Detail

RuleApplierHelper

public RuleApplierHelper()
Deprecated. 
Method Detail

createUniqueNumber

public static String createUniqueNumber()
Deprecated.  

Get a string that can be used as the unique number of a WTDocument or a WTPart.


setAdminDomain

public static DomainAdministered setAdminDomain(DomainAdministered da,
                                                WTContainerRef container,
                                                Map data)
                                         throws WTException
Deprecated.  

Set the domain of the specified DomainAdministered object based on the provided rule specification (data). If the rule specification does not provide a value for the domain then do nothing to the object. Set the object's domain to a domain that belongs to the specified container.

Throws:
WTException
See Also:
DomainAdministeredHelper.setAdminDomain(wt.admin.DomainAdministered, wt.admin.AdministrativeDomain)

getAdminDomain

public static String getAdminDomain(DomainAdministered da)
                             throws WTException
Deprecated.  

Get the string representation of the domain of the specified DomainAdministered object that is appropriate to be used in a rule specification.

Throws:
WTException
See Also:
DomainAdministeredHelper.getAdminDomain(wt.admin.DomainAdministered)

assignLocation

public static void assignLocation(Foldered f,
                                  Map data)
                           throws WTException
Deprecated.  

Assign a location to the specified Foldered object based on the provided rule specification (data). If the rule specification does not provide a value for the folder then do nothing to the object.

Throws:
WTException
See Also:
FolderHelper.assignLocation(wt.folder.FolderEntry, wt.folder.Folder)

getLocation

public static String getLocation(CabinetBased cb)
                          throws WTException
Deprecated.  

Get the string representation of the location of the specified CabinetBased object that is appropriate to be used in a rule specification.

Throws:
WTException
See Also:
FolderHelper.getLocation(wt.folder.CabinetBased)

setLifeCycle

public static LifeCycleManaged setLifeCycle(LifeCycleManaged lcm,
                                            Map data)
                                     throws WTException,
                                            WTPropertyVetoException
Deprecated.  

Set the lifecycle of the specified LifeCycleManaged object based on the provided rule specification (data). If the rule specification does not provide a value for the lifecycle then do nothing to the object. If the object is already persistent then use LifeCycleService.reassign(wt.lifecycle.LifeCycleManaged, wt.lifecycle.LifeCycleTemplateReference) to change the lifecycle.

When searching for a lifecycle, the container hierarchy beginning with the LifeCycleManaged object's container is searched. If the object does not have a container, then the Classic container is searched.

Throws:
RuleException - if the specified lifecycle cannot be found
WTException
WTPropertyVetoException
See Also:
LifeCycleHelper.setLifeCycle(wt.lifecycle.LifeCycleManaged, wt.lifecycle.LifeCycleTemplate), LifeCycleService.reassign(wt.lifecycle.LifeCycleManaged, wt.lifecycle.LifeCycleTemplateReference), LifeCycleService.getLifeCycleTemplate(wt.lifecycle.LifeCycleManaged)

getLifeCycle

public static String getLifeCycle(LifeCycleManaged lcm)
                           throws WTException
Deprecated.  

Get the string representation of the lifecycle of the specified LifeCycleManaged object that is appropriate to be used in a rule specification.

Throws:
WTException
See Also:
LifeCycleManaged.getLifeCycleName()

setState

public static LifeCycleManaged setState(LifeCycleManaged lcm,
                                        Map data)
                                 throws WTException,
                                        WTPropertyVetoException
Deprecated.  

Set the state of the specified LifeCycleManaged object based on the provided rule specification (data). If the rule specification does not provide a value for the state then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
LifeCycleServerHelper.setState(wt.lifecycle.LifeCycleManaged, wt.lifecycle.State)

getState

public static String getState(LifeCycleManaged lcm)
                       throws WTException
Deprecated.  

Get the string representation of the state of the specified LifeCycleManaged object that is appropriate to be used in a rule specification.

Throws:
WTException
See Also:
LifeCycleManaged.getState()

getIdentity

public static String getIdentity(Identified i)
                          throws WTException
Deprecated.  

Get the string representation of the identity of the specified Identified object that is appropriate to be used in a rule specification.

Throws:
WTException
See Also:
Identified.getIdentificationObject(), IdentificationObject.getIdentity()

setDescription

public static void setDescription(WTDocument doc,
                                  Map data)
                           throws WTException,
                                  WTPropertyVetoException
Deprecated.  

Set the description of the specified WTDocument object based on the provided rule specification (data). If the rule specification does not provide a value for the description then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
WTDocument.setDescription(java.lang.String)

getDescription

public static String getDescription(WTDocument doc)
Deprecated.  

Get the string representation of the description of the specified WTDocument object that is appropriate to be used in a rule specification.

See Also:
WTDocument.getDescription()

getDescription

public static String getDescription(Team team)
Deprecated.  

Get the string representation of the description of the specified Team object that is appropriate to be used in a rule specification.

See Also:
Team.getDescription()

setDepartment

public static void setDepartment(WTDocument doc,
                                 Map data)
                          throws WTException,
                                 WTPropertyVetoException
Deprecated.  

Set the department of the specified WTDocument object based on the provided rule specification (data). If the rule specification does not provide a value for the department then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
WTDocument.setDepartment(wt.doc.DepartmentList)

getDepartment

public static String getDepartment(WTDocument doc)
Deprecated.  

Get the string representation of the department of the specified WTDocument object that is appropriate to be used in a rule specification.

See Also:
WTDocument.getDepartment()

setTitle

public static void setTitle(WTDocument doc,
                            Map data)
                     throws WTException,
                            WTPropertyVetoException
Deprecated.  

Set the title of the specified WTDocument object based on the provided rule specification (data). If the rule specification does not provide a value for the title then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
WTDocument.setTitle(java.lang.String)

getTitle

public static String getTitle(WTDocument doc)
Deprecated.  

Get the string representation of the title of the specified WTDocument object that is appropriate to be used in a rule specification.

See Also:
WTDocument.getTitle()

setDocType

public static void setDocType(WTDocument doc,
                              Map data)
                       throws WTException,
                              WTPropertyVetoException
Deprecated.  

Set the document type of the specified WTDocument object based on the provided rule specification (data). If the rule specification does not provide a value for the document type then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
WTDocument.setDocType(wt.doc.DocumentType)

getDocType

public static String getDocType(WTDocument doc)
Deprecated.  

Get the string representation of the docType of the specified WTDocument object that is appropriate to be used in a rule specification.

See Also:
WTDocument.getDocType()

setName

public static void setName(WTDocument doc,
                           Map data)
                    throws WTException,
                           WTPropertyVetoException
Deprecated.  

Set the name of the specified WTDocument object based on the provided rule specification (data). If the rule specification does not provide a value for the name then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
WTDocument.setName(java.lang.String)

getName

public static String getName(WTDocument doc)
                      throws WTException
Deprecated.  

Get the string representation of the name of the specified WTDocument object that is appropriate to be used in a rule specification.

Throws:
WTException
See Also:
WTDocument.getName()

setName

public static void setName(WTPart part,
                           Map data)
                    throws WTException,
                           WTPropertyVetoException
Deprecated.  

Set the name of the specified wt.doc.WTPart object based on the provided rule specification (data). If the rule specification does not provide a value for the name then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
wt.doc.WTPart#setName

getName

public static String getName(WTPart part)
                      throws WTException
Deprecated.  

Get the string representation of the name of the specified WTPart object that is appropriate to be used in a rule specification.

Throws:
WTException
See Also:
WTPart.getName()

getName

public static String getName(Team team)
                      throws WTException
Deprecated.  

Get the string representation of the name of the specified Team object that is appropriate to be used in a rule specification.

Throws:
WTException
See Also:
Team.getName()

setNumber

public static void setNumber(WTDocument doc,
                             Map data)
                      throws WTException,
                             WTPropertyVetoException
Deprecated.  

Set the number of the specified WTDocument object based on the provided rule specification (data). If the rule specification does not provide a value for the number then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
WTDocument.setNumber(java.lang.String)

getNumber

public static String getNumber(WTDocument doc)
                        throws WTException
Deprecated.  

Get the string representation of the number of the specified WTDocument object that is appropriate to be used in a rule specification.

Throws:
WTException
See Also:
WTDocument.getNumber()

setNumber

public static void setNumber(WTPart part,
                             Map data)
                      throws WTException,
                             WTPropertyVetoException
Deprecated.  

Set the number of the specified WTPart object based on the provided rule specification (data). If the rule specification does not provide a value for the number then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
wt.doc.WTPart#setNumber

getNumber

public static String getNumber(WTPart part)
                        throws WTException
Deprecated.  

Get the string representation of the number of the specified WTPart object that is appropriate to be used in a rule specification.

Throws:
WTException
See Also:
wt.doc.WTPart#getNumber

setPartType

public static void setPartType(WTPart part,
                               Map data)
                        throws WTException,
                               WTPropertyVetoException
Deprecated.  

Set the part type of the specified WTPart object based on the provided rule specification (data). If the rule specification does not provide a value for the part type then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
wt.doc.WTPart#setPartType

getPartType

public static String getPartType(WTPart part)
Deprecated.  

Get the string representation of the partType of the specified WTPart object that is appropriate to be used in a rule specification.

See Also:
wt.doc.WTPart#getPartType

setSource

public static void setSource(WTPart part,
                             Map data)
                      throws WTException,
                             WTPropertyVetoException
Deprecated.  

Set the source of the specified WTPart object based on the provided rule specification (data). If the rule specification does not provide a value for the source then do nothing to the object.

Throws:
WTException
WTPropertyVetoException
See Also:
wt.doc.WTPart#setSource

getSource

public static String getSource(WTPart part)
Deprecated.  

Get the string representation of the source of the specified WTPart object that is appropriate to be used in a rule specification.

See Also:
wt.doc.WTPart#getSource

setView

public static void setView(ViewManageable vm,
                           Map data)
                    throws WTException
Deprecated.  

Set the view of the specified ViewManageable object based on the provided rule specification (data). If the rule specification does not provide a value for the view then do nothing to the object.

Throws:
WTException
See Also:
ViewManageable.setView(wt.vc.views.ViewReference)

getView

public static String getView(ViewManageable vm)
                      throws WTException
Deprecated.  

Get the string representation of the view of the specified ViewManageable object that is appropriate to be used in a rule specification.

Throws:
WTException

getValue

public static String getValue(WTDocument doc,
                              String key)
                       throws WTException
Deprecated.  

Get the string representation of value of the attribute or relationship on the WTDocument object that is specified by key.

Throws:
RuleException - if key is not supported
WTException - if an error occurs while resolving the string value

getValue

public static String getValue(WTPart part,
                              String key)
                       throws WTException
Deprecated.  

Get the string representation of value of the attribute or relationship on the wt.doc.WTPart object that is specified by key.

Throws:
RuleException - if key is not supported
WTException - if an error occurs while resolving the string value

getValue

public static String getValue(Team team,
                              String key)
                       throws WTException
Deprecated.  

Get the string representation of value of the attribute or relationship on the Team object that is specified by key.

Throws:
RuleException - if key is not supported
WTException - if an error occurs while resolving the string value

getValue

public static String getValue(LifeCycleManaged lcm,
                              String key)
                       throws WTException
Deprecated.  

Get the string representation of value of the attribute or relationship on the LifeCycleManaged object that is specified by key.

Throws:
RuleException - if key is not supported
WTException - if an error occurs while resolving the string value

copyContent

public static ContentHolder copyContent(ContentHolder copyFrom,
                                        ContentHolder copyTo)
                                 throws WTException
Deprecated.  

Copy all the content from one content holder to another (not regarding the content role. This will not do the copy unless there are NO content items for the passed ContentHolder (should be a new holder)

If the content holder to be copied to is not persistent then this method queues up a task to be performed after the the item is persisted. This task will copy the content.

Throws:
WTException
See Also:
ContentService.copyContent(ContentHolder, ContentHolder)

copyRelationships

public static Persistable copyRelationships(Persistable copyFrom,
                                            Persistable copyTo,
                                            Class linkClass,
                                            String otherRole,
                                            boolean deep)
                                     throws WTException,
                                            WTPropertyVetoException
Deprecated.  

Make a copy of all relationships of type linkClass that traverse from the copyFrom object to an object that plays the otherRole. The copy is deep or shallow depending on the value of the deep argument. The copyTo object is returned but is not persisted.

A shallow copy creates a new link object but does not copy the object at the other end of the link. Therefore, the copy and the original are linked to the same object.

A deep copy creates a new link object and makes a copy of the object at the other end of the link. Therefore, the copy and the original are not linked to the same object.

Throws:
WTException
WTPropertyVetoException

duplicateLink

private static BinaryLink duplicateLink(BinaryLink link)
                                 throws WTException
Deprecated.  

Make a duplicate copy of the specified BinaryLink object. The copy is returned and is not persisted in the database. Note: The class that the link is an instance of must implement a public method called duplicate that takes no arguments. The method is called using reflection. Note: This method may not work for the following link classes:
  • Throws:
    WTException
    See Also:
    CopyObjectToObjectLinkDelegate, CopyObjectToVersionLinkDelegate, CopyVersionToVersionLinkDelegate

  • copyObject

    private static Persistable copyObject(Persistable obj)
                                   throws WTException,
                                          WTPropertyVetoException
    Deprecated.  

    Make a copy of the object. The copy is returned and is not persisted in the database.

    Note: This method uses the rule service to make the copy. The copy is a deep or shallow copy depending on what the rule specifies.

    Throws:
    WTException
    WTPropertyVetoException