wt.enterprise
Interface EnterpriseService

All Known Implementing Classes:
EnterpriseServiceFwd, StandardEnterpriseService

public interface EnterpriseService

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: true

Extendable: false


Method Summary
 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.
 

Method Detail

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: true

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: true

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

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: true

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: true

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: true

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: true

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: true

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

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

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

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