wt.enterprise
Class EnterpriseServiceFwd

java.lang.Object
  extended bywt.enterprise.EnterpriseServiceFwd
All Implemented Interfaces:
EnterpriseService, RemoteAccess, Serializable

public class EnterpriseServiceFwd
extends Object
implements RemoteAccess, EnterpriseService, Serializable

This service supports one RevisionControlled object being made from another RevisionControlled object (or made into if you look at it the other way) and persisting the relationship; one method, saveCopy(CopyRules,RevisionControlled,RevisionControlled), uses CopyRules.



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String FC_RESOURCE
           
(package private) static boolean SERVER
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
EnterpriseServiceFwd()
           
 
Method Summary
private static Manager getManager()
           
 QueryResult getTemplates(WTContainer container, QuerySpec querySpec, OrderBy[] orderBys, boolean includeEnabledOnly, boolean lookup, boolean removeOverridden)
          Returns a QueryResult of Templateable objects.
 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.
 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.
 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.
 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, toString, wait, wait, wait
 

Field Detail

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

EnterpriseServiceFwd

public EnterpriseServiceFwd()
Method Detail

getManager

private static Manager getManager()
                           throws WTException
Returns:
Manager
Throws:
WTException

newCopy

public RevisionControlled newCopy(RevisionControlled object)
                           throws WTException
Copy the object, but do not persist it. Serves as a begining step to initialize all of the business attributes.

Supported API: false

Specified by:
newCopy in interface EnterpriseService
Parameters:
object - The original object to copy.
Returns:
RevisionControlled
Throws:
WTException

saveCopy

public RevisionControlled saveCopy(RevisionControlled original,
                                   RevisionControlled copy)
                            throws WTException
Used after the client has called newCopy and set any attributes on the object that it wants to change. Persists the object and creates any of the post persistance processing such as copying content or creating relationships. Uses the rules in the properties.

Supported API: false

Specified by:
saveCopy in interface EnterpriseService
Parameters:
original - The original object that was copied.
copy - The new copy that needs to be persisted..
Returns:
RevisionControlled
Throws:
WTException

saveCopy

public RevisionControlled saveCopy(CopyRules rules,
                                   RevisionControlled original,
                                   RevisionControlled copy)
                            throws WTException
Used after the client has called newCopy and set any attributes on the object that it wants to change. Persists the object and creates any of the post persistance processing such as copying content or creating relationships. Uses the rules passed in as an argument and not the ones in the properties.

Supported API: false

Specified by:
saveCopy in interface EnterpriseService
Parameters:
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..
Returns:
RevisionControlled
Throws:
WTException

navigateMadeFrom

public RevisionControlled navigateMadeFrom(RevisionControlled object)
                                    throws WTException
Return the object that this object was made from (copied).

Supported API: false

Specified by:
navigateMadeFrom in interface EnterpriseService
Parameters:
object - Object to find what it was copied from.
Returns:
RevisionControlled
Throws:
WTException

navigateMadeInto

public QueryResult navigateMadeInto(RevisionControlled object)
                             throws WTException
Return a query result of the objects that were made from (copied from) this version of the object.

Supported API: false

Specified by:
navigateMadeInto in interface EnterpriseService
Parameters:
object - Object to find what was copied from it.
Returns:
QueryResult
Throws:
WTException

presentMadeInto

public SortedEnumeration presentMadeInto(RevisionControlled object,
                                         Vector displayAttributes,
                                         String sortPreference,
                                         Locale locale)
                                  throws WTException
Return a sorted enumeration of the objects that were made from (copied from) this version of this object. Presentable version of results.

Supported API: false

Specified by:
presentMadeInto in interface EnterpriseService
Parameters:
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.
Returns:
SortedEnumeration
Throws:
WTException

newMultiObjectCopy

public CopyObjectInfo[] newMultiObjectCopy(RevisionControlled[] originalObjects)
                                    throws WTException
Copy the objects, but do not persist them. Serves as a begining step to initialize all of the business attributes.

Supported API: false

Specified by:
newMultiObjectCopy in interface EnterpriseService
Parameters:
originalObjects - The original objects to copy.
Returns:
CopyObjectInfo[]
Throws:
WTException

saveMultiObjectCopy

public CopyObjectInfo[] saveMultiObjectCopy(CopyObjectInfo[] copyInformation)
                                     throws WTException
Used after the client has called newMultiObjectCopy and set any attributes on the objects that it wants to change. Persists the objects and creates any of the post persistance processing such as copying content or creating relationships. Uses the rules in the properties.

Supported API: false

Specified by:
saveMultiObjectCopy in interface EnterpriseService
Parameters:
copyInformation - Contains original, copy and rules for each object.
Returns:
CopyObjectInfo[]
Throws:
WTException

saveMultiObjectCopy

public CopyObjectInfo[] saveMultiObjectCopy(CopyMultiRules copyMultiRules,
                                            CopyObjectInfo[] copyInformation)
                                     throws WTException
Used after the client has called newMultiObjectCopy and set any attributes on the objects that it wants to change. Persists the objects and creates any of the post persistance processing such as copying content or creating relationships. Uses the rules in the properties.

Supported API: false

Specified by:
saveMultiObjectCopy in interface EnterpriseService
Parameters:
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.
Returns:
CopyObjectInfo[]
Throws:
WTException

getTemplates

public QueryResult getTemplates(WTContainer container,
                                QuerySpec querySpec,
                                OrderBy[] orderBys,
                                boolean includeEnabledOnly,
                                boolean lookup,
                                boolean removeOverridden)
                         throws WTException
Returns a QueryResult of 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.

Supported API: false

Specified by:
getTemplates in interface EnterpriseService
Parameters:
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.
Returns:
QueryResult
Throws:
WTException

templatesExist

public boolean templatesExist(WTContainer container,
                              Class templateClass,
                              boolean enabledOnly,
                              boolean lookup)
                       throws WTException
Returns true if Templateable objects exist; otherwise returns false. Templates are searched for in the given container and, if lookup is true, up the container hierarchy.

Supported API: false

Specified by:
templatesExist in interface EnterpriseService
Parameters:
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.
Returns:
boolean
Throws:
WTException