|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.enterprise.StandardEnterpriseService
This implementation of EnterpriseService
registers listeners
in performStartupProcess()
and emits EnterpriseServiceEvent
s.
Use the newStandardEnterpriseService
static factory method(s),
not the StandardEnterpriseService
constructor, to construct
instances of this class. Instances must be constructed using the static
factory(s), in order to ensure proper initialization of the instance.
Supported API: false
Extendable: false
Nested Class Summary | |
private class |
StandardEnterpriseService.NameComparator
|
Field Summary | |
private static CopyRules |
ALLRULES
|
private static String |
CLASSNAME
|
private static Vector |
constraintParameter
|
private static CopyMultiRules |
MULTIRULES
|
private ReferenceFactory |
referenceFactory
|
private static String |
RESOURCE
|
private static Vector |
SERVICERULES
|
private static boolean |
VERBOSE
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardEnterpriseService()
|
Method Summary | |
protected void |
checkRenameWithVersion(Master target)
|
private void |
copyIBAValues(WTKeyedMap origToCopyMap)
|
private void |
copyRelationships(CopyRules rules,
WTObject original,
WTObject copy)
|
protected void |
dispatchVetoableEvent(String eventType,
CopyObjectInfo[] copyInformation,
CopyMultiRules rules)
Dispatch a EnterpriseServiceEvent that includes the event type and target (i.e., CopyObjectInfo). |
protected void |
dispatchVetoableEvent(String eventType,
RevisionControlled original,
RevisionControlled copy,
CopyRules rules)
Dispatch a EnterpriseServiceEvent that includes the event type and target (i.e., Copied object). |
protected void |
dispatchVetoableEvent(String eventType,
WTKeyedMap eventTarget,
Map ruleMap)
Dispatch a EnterpriseServiceEvent that includes the event type and target (i.e., Copied object). |
private void |
doCopyRelationships(CopyRules rules,
WTObject original,
WTObject copy,
Hashtable copyObjectMap)
|
private void |
doMultiCopyRelationships(CopyMultiRules rules,
WTObject original,
WTObject copy,
Hashtable copyObjectMap)
|
String |
getConceptualClassname()
Deprecated. |
private static Vector |
getServiceRules(String rules)
|
QueryResult |
getTemplates(WTContainer container,
QuerySpec querySpec,
OrderBy[] orderBys,
boolean includeEnabledOnly,
boolean lookup,
boolean removeOverridden)
Returns a QueryResult of Templateable objects. |
private void |
handleMultiRelationships(CopyMultiRules rules,
CopyObjectInfo[] items)
|
private void |
handleSingleRelationships(CopyRules rules,
WTObject original,
WTObject copy)
|
RevisionControlled |
navigateMadeFrom(RevisionControlled object)
Return the object that this object was made from (copied). |
QueryResult |
navigateMadeInto(RevisionControlled object)
Return a query result of the objects that were made from (copied from) this version of the object. |
RevisionControlled |
newCopy(RevisionControlled object)
Copy the object, but do not persist it. |
CopyObjectInfo[] |
newMultiObjectCopy(RevisionControlled[] originalObjects)
Copy the objects, but do not persist them. |
static StandardEnterpriseService |
newStandardEnterpriseService()
Default factory for the class. |
protected void |
performStartupProcess()
Perform the startup for this service. |
private void |
persistCopyObjects(Map ruleMap,
WTKeyedMap saveMap)
|
SortedEnumeration |
presentMadeInto(RevisionControlled object,
Vector displayAttributes,
String sortPreference,
Locale locale)
Return a sorted enumeration of the objects that were made from (copied from) this version of this object. |
void |
registerEvents(ManagerService manager)
Overrides the registration of all applicable enterprise service events with the service manager. |
RevisionControlled |
saveCopy(CopyRules rules,
RevisionControlled original,
RevisionControlled copy)
Used after the client has called newCopy and set any attributes on the object that it wants to change. |
RevisionControlled |
saveCopy(RevisionControlled original,
RevisionControlled copy)
Used after the client has called newCopy and set any attributes on the object that it wants to change. |
CopyObjectInfo[] |
saveMultiObjectCopy(CopyMultiRules copyMultiRules,
CopyObjectInfo[] copyInformation)
Used after the client has called newMultiObjectCopy and set any attributes on the objects that it wants to change. |
CopyObjectInfo[] |
saveMultiObjectCopy(CopyObjectInfo[] copyInformation)
Used after the client has called newMultiObjectCopy and set any attributes on the objects that it wants to change. |
private boolean |
serviceDoCopy(Class relationship)
|
boolean |
templatesExist(WTContainer container,
Class templateClass,
boolean enabledOnly,
boolean lookup)
Returns true if Templateable objects exist; otherwise returns
false. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final boolean VERBOSE
private static final CopyRules ALLRULES
private static final CopyMultiRules MULTIRULES
private static final Vector SERVICERULES
private static Vector constraintParameter
private ReferenceFactory referenceFactory
Constructor Detail |
public StandardEnterpriseService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
protected void performStartupProcess() throws ManagerException
performStartupProcess
in class StandardManager
ManagerException
protected void dispatchVetoableEvent(String eventType, CopyObjectInfo[] copyInformation, CopyMultiRules rules) throws WTException
eventType
- copyInformation
- rules
-
WTException
protected void dispatchVetoableEvent(String eventType, RevisionControlled original, RevisionControlled copy, CopyRules rules) throws WTException
eventType
- original
- The original of the copy operation.copy
- The copy created by the copy operation.rules
- The rules that the listener should use to determine if that particular part of the copy should be executed.
WTException
protected void dispatchVetoableEvent(String eventType, WTKeyedMap eventTarget, Map ruleMap) throws WTException
eventType
- eventTarget
- A map where the key is the original and the value is the object to be copied.ruleMap
- A map where the key is an ObjectReference of the original and the value is a CopyRule.
WTException
public void registerEvents(ManagerService manager)
registerEvents
in interface Manager
registerEvents
in class StandardManager
manager
- public static StandardEnterpriseService newStandardEnterpriseService() throws WTException
WTException
public RevisionControlled newCopy(RevisionControlled object) throws WTException
newCopy
in interface EnterpriseService
object
- The original object to copy.
WTException
public RevisionControlled saveCopy(RevisionControlled original, RevisionControlled copy) throws WTException
saveCopy
in interface EnterpriseService
original
- The original object that was copied.copy
- The new copy that needs to be persisted..
WTException
public RevisionControlled saveCopy(CopyRules rules, RevisionControlled original, RevisionControlled copy) throws WTException
saveCopy
in interface EnterpriseService
rules
- The rules that configure the save as. These rules will override the rules in the property file.original
- The original object that was copied.copy
- The new copy that needs to be persisted..
WTException
public RevisionControlled navigateMadeFrom(RevisionControlled object) throws WTException
navigateMadeFrom
in interface EnterpriseService
object
- Object to find what it was copied from.
WTException
public QueryResult navigateMadeInto(RevisionControlled object) throws WTException
navigateMadeInto
in interface EnterpriseService
object
- Object to find what was copied from it.
WTException
public SortedEnumeration presentMadeInto(RevisionControlled object, Vector displayAttributes, String sortPreference, Locale locale) throws WTException
presentMadeInto
in interface EnterpriseService
object
- Object to find what was copied from it.displayAttributes
- The list of attributes that the client wants to display from the results.sortPreference
- To specify the sort preference for post processing of the results.locale
- The locale of the client, used in the sorting of the results.
WTException
public CopyObjectInfo[] newMultiObjectCopy(RevisionControlled[] originalObjects) throws WTException
newMultiObjectCopy
in interface EnterpriseService
originalObjects
- The original objects to copy.
WTException
public CopyObjectInfo[] saveMultiObjectCopy(CopyObjectInfo[] copyInformation) throws WTException
saveMultiObjectCopy
in interface EnterpriseService
copyInformation
- Contains original, copy and rules for each object.
WTException
public CopyObjectInfo[] saveMultiObjectCopy(CopyMultiRules copyMultiRules, CopyObjectInfo[] copyInformation) throws WTException
saveMultiObjectCopy
in interface EnterpriseService
copyMultiRules
- The multi-rules that configure the save as. These rules will override the rules in the property file.copyInformation
- Container for original, copy and rules for each object.
WTException
public QueryResult getTemplates(WTContainer container, QuerySpec querySpec, OrderBy[] orderBys, boolean includeEnabledOnly, boolean lookup, boolean removeOverridden) throws WTException
Templateable
objects. The templates
returned are found in the given container and, if lookup is true,
up the container hierarchy. The querySpec provides the class to query
against as well as any additional query criteria.
getTemplates
in interface EnterpriseService
container
- The container to search for templates in.querySpec
- The QuerySpec (whose query class must be class assignable to Templateable) to use when searching for templates.orderBys
- If not null, an array of OrderBy statements for sorting the query result. Note: do not append these statements to the querySpec; all ordering should be done by passing OrderBy clauses in this array.includeEnabledOnly
- If true, return only enabled templates; otherwise, return latest iterations.lookup
- If true, go up the container's hierarchy when searching for templates; otherwise, find only templates in this container.removeOverridden
- If true, remove templates that have been overridden; otherwise, return all. An overridden template is a template for which there is another template of the same name in a descendent container.
WTException
public boolean templatesExist(WTContainer container, Class templateClass, boolean enabledOnly, boolean lookup) throws WTException
Templateable
objects exist; otherwise returns
false. Templates are searched for in the given container and, if
lookup is true, up the container hierarchy.
templatesExist
in interface EnterpriseService
container
- The container to search for templates in.templateClass
- The class of templates to search for. Children of this class are also searched.enabledOnly
- If true, search for only enabled templates; otherwise, search for any templates (regardless of enabled status).lookup
- If true, go up the container's hierarchy when searching for templates; otherwise, find only templates in this container.
WTException
private void copyRelationships(CopyRules rules, WTObject original, WTObject copy) throws WTException
WTException
private void doCopyRelationships(CopyRules rules, WTObject original, WTObject copy, Hashtable copyObjectMap) throws WTException
WTException
private void doMultiCopyRelationships(CopyMultiRules rules, WTObject original, WTObject copy, Hashtable copyObjectMap) throws WTException
WTException
private void handleSingleRelationships(CopyRules rules, WTObject original, WTObject copy) throws WTException
WTException
private void handleMultiRelationships(CopyMultiRules rules, CopyObjectInfo[] items) throws WTException
WTException
private void persistCopyObjects(Map ruleMap, WTKeyedMap saveMap) throws WTException
WTException
protected void checkRenameWithVersion(Master target) throws PersistenceException, WTException
PersistenceException
WTException
private static Vector getServiceRules(String rules) throws ClassNotFoundException
ClassNotFoundException
private boolean serviceDoCopy(Class relationship)
private void copyIBAValues(WTKeyedMap origToCopyMap) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |