|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.rule.impl.RuleApplierHelper
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 |
private static final String RESOURCE
public static final String XML_CONTEXT
public static final String XML_ATTR_OBJECT
public static final String XML_ATTR_SELECT
public static final String XML_CONTEXT_TARGET
public static final String XML_CONTEXT_PROJECT
public static final String XML_CONTEXT_TEAM
public static final String XML_INVOKE
public static final String XML_ATTR_IDENTITY
public static final String XML_ATTR_CLASS
public static final String XML_ATTR_METHOD
public static final String XML_LIFECYCLEMANAGED
private static final DateFormat UNIQUE_NUMBER_DATE_FORMAT
Constructor Detail |
public RuleApplierHelper()
Method Detail |
public static String createUniqueNumber()
WTDocument
or a WTPart
.
public static DomainAdministered setAdminDomain(DomainAdministered da, WTContainerRef container, Map data) throws WTException
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.
WTException
DomainAdministeredHelper.setAdminDomain(wt.admin.DomainAdministered, wt.admin.AdministrativeDomain)
public static String getAdminDomain(DomainAdministered da) throws WTException
DomainAdministered
object that is appropriate
to be used in a rule specification.
WTException
DomainAdministeredHelper.getAdminDomain(wt.admin.DomainAdministered)
public static void assignLocation(Foldered f, Map data) throws WTException
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.
WTException
FolderHelper.assignLocation(wt.folder.FolderEntry, wt.folder.Folder)
public static String getLocation(CabinetBased cb) throws WTException
CabinetBased
object that is appropriate to be
used in a rule specification.
WTException
FolderHelper.getLocation(wt.folder.CabinetBased)
public static LifeCycleManaged setLifeCycle(LifeCycleManaged lcm, Map data) throws WTException, WTPropertyVetoException
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.
RuleException
- if the specified lifecycle cannot be found
WTException
WTPropertyVetoException
LifeCycleHelper.setLifeCycle(wt.lifecycle.LifeCycleManaged, wt.lifecycle.LifeCycleTemplate)
,
LifeCycleService.reassign(wt.lifecycle.LifeCycleManaged, wt.lifecycle.LifeCycleTemplateReference)
,
LifeCycleService.getLifeCycleTemplate(wt.lifecycle.LifeCycleManaged)
public static String getLifeCycle(LifeCycleManaged lcm) throws WTException
LifeCycleManaged
object that is appropriate
to be used in a rule specification.
WTException
LifeCycleManaged.getLifeCycleName()
public static LifeCycleManaged setState(LifeCycleManaged lcm, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
LifeCycleServerHelper.setState(wt.lifecycle.LifeCycleManaged, wt.lifecycle.State)
public static String getState(LifeCycleManaged lcm) throws WTException
LifeCycleManaged
object that is appropriate
to be used in a rule specification.
WTException
LifeCycleManaged.getState()
public static String getIdentity(Identified i) throws WTException
Identified
object that is appropriate
to be used in a rule specification.
WTException
Identified.getIdentificationObject()
,
IdentificationObject.getIdentity()
public static void setDescription(WTDocument doc, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
WTDocument.setDescription(java.lang.String)
public static String getDescription(WTDocument doc)
WTDocument
object that is
appropriate to be used in a rule specification.
WTDocument.getDescription()
public static String getDescription(Team team)
Team
object that is
appropriate to be used in a rule specification.
Team.getDescription()
public static void setDepartment(WTDocument doc, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
WTDocument.setDepartment(wt.doc.DepartmentList)
public static String getDepartment(WTDocument doc)
WTDocument
object that is
appropriate to be used in a rule specification.
WTDocument.getDepartment()
public static void setTitle(WTDocument doc, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
WTDocument.setTitle(java.lang.String)
public static String getTitle(WTDocument doc)
WTDocument
object that is appropriate
to be used in a rule specification.
WTDocument.getTitle()
public static void setDocType(WTDocument doc, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
WTDocument.setDocType(wt.doc.DocumentType)
public static String getDocType(WTDocument doc)
WTDocument
object that is appropriate
to be used in a rule specification.
WTDocument.getDocType()
public static void setName(WTDocument doc, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
WTDocument.setName(java.lang.String)
public static String getName(WTDocument doc) throws WTException
WTDocument
object that is appropriate
to be used in a rule specification.
WTException
WTDocument.getName()
public static void setName(WTPart part, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
wt.doc.WTPart#setName
public static String getName(WTPart part) throws WTException
WTPart
object that is appropriate
to be used in a rule specification.
WTException
WTPart.getName()
public static String getName(Team team) throws WTException
Team
object that is appropriate
to be used in a rule specification.
WTException
Team.getName()
public static void setNumber(WTDocument doc, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
WTDocument.setNumber(java.lang.String)
public static String getNumber(WTDocument doc) throws WTException
WTDocument
object that is appropriate
to be used in a rule specification.
WTException
WTDocument.getNumber()
public static void setNumber(WTPart part, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
wt.doc.WTPart#setNumber
public static String getNumber(WTPart part) throws WTException
WTPart
object that is appropriate to be used
in a rule specification.
WTException
wt.doc.WTPart#getNumber
public static void setPartType(WTPart part, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
wt.doc.WTPart#setPartType
public static String getPartType(WTPart part)
WTPart
object that is appropriate
to be used in a rule specification.
wt.doc.WTPart#getPartType
public static void setSource(WTPart part, Map data) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
wt.doc.WTPart#setSource
public static String getSource(WTPart part)
WTPart
object that is appropriate
to be used in a rule specification.
wt.doc.WTPart#getSource
public static void setView(ViewManageable vm, Map data) throws WTException
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.
WTException
ViewManageable.setView(wt.vc.views.ViewReference)
public static String getView(ViewManageable vm) throws WTException
ViewManageable
object that is appropriate
to be used in a rule specification.
WTException
public static String getValue(WTDocument doc, String key) throws WTException
WTDocument
object
that is specified by key
.
RuleException
- if key is not supported
WTException
- if an error occurs while
resolving the string valuepublic static String getValue(WTPart part, String key) throws WTException
wt.doc.WTPart
object
that is specified by key
.
RuleException
- if key is not supported
WTException
- if an error occurs while
resolving the string valuepublic static String getValue(Team team, String key) throws WTException
Team
object
that is specified by key
.
RuleException
- if key is not supported
WTException
- if an error occurs while
resolving the string valuepublic static String getValue(LifeCycleManaged lcm, String key) throws WTException
LifeCycleManaged
object that is specified by key
.
RuleException
- if key is not supported
WTException
- if an error occurs while
resolving the string valuepublic static ContentHolder copyContent(ContentHolder copyFrom, ContentHolder copyTo) throws WTException
WTException
ContentService.copyContent(ContentHolder, ContentHolder)
public static Persistable copyRelationships(Persistable copyFrom, Persistable copyTo, Class linkClass, String otherRole, boolean deep) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
private static BinaryLink duplicateLink(BinaryLink link) throws WTException
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:
private static Persistable copyObject(Persistable obj) throws WTException, WTPropertyVetoException
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.
WTException
WTPropertyVetoException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |