Package wt.content
Interface ContentService
The ContentManager interface identifies the set of methods that clients
use to manage classes that implement the ContentHolder interface. While
the methods declared by this interface execute on the server, they are
accessable to client application through the ContentHelper class. Usage
is
obj = ContentHelper.service.someContentServiceMethod( someArgs );
Supported API: true
Extendable: false
obj = ContentHelper.service.someContentServiceMethod( someArgs );
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncopyContent(ContentHolder copyFrom, ContentHolder copyTo) Copy all the content from one content holder to another (not regarding the content role.voidcopyContent(WTKeyedMap old2newMapping) Copy all the content from one content holder to another (not regarding the content role.copyContentItem(ContentHolder holder, ContentItem item) Make an exact copy of the ContentItem for the passed holder.getContents(HashMap holders) Set the cookie in an every ContentHolder object in HashMap to contain all ContentItems associated with it.getContents(ContentHolder holder) Set the cookie in an ContentHolder object to contain all ContentItems associated with it.getContentsByRole(ContentHolder holder, ContentRoleType role) Query for all the associated ContentItems that have the passed Role for the ContentHolder.getContentsByRole(WTSet holderSet, ContentRoleType role) Query for all the associated ContentItems that have the passed Role for the ContentHolder.getDataFormat(String idStr) Get a DataFormat object based on a stringified object identifier.getFormatByName(String formatName) Get a DataFormat object based on the formatName
Supported API: trueReturns a Vector of the FormatNames in the system from DataFormat class that are applicable for ApplicationData objects.updateAppData(ContentHolder holder, ApplicationData appData) Deprecated.
-
Method Details
-
getFormatNames
Returns a Vector of the FormatNames in the system from DataFormat class that are applicable for ApplicationData objects.
Supported API: true- Returns:
- Vector
- Throws:
WTException
-
getContents
Set the cookie in an ContentHolder object to contain all ContentItems associated with it. This need to be called only once and refreshing can be done as needed.
Supported API: true- Parameters:
holder-- Returns:
- ContentHolder
- Throws:
WTExceptionPropertyVetoException
-
getDataFormat
Get a DataFormat object based on a stringified object identifier. This is used for Icon handling.
Supported API: true- Parameters:
idStr-- Returns:
- DataFormat
- Throws:
WTException- See Also:
-
getFormatByName
Get a DataFormat object based on the formatName
Supported API: true- Parameters:
formatName-- Returns:
- DataFormat
- Throws:
WTException
-
updateAppData
ApplicationData updateAppData(ContentHolder holder, ApplicationData appData) throws WTException, PropertyVetoException Deprecated.This method updates an ApplicationData without changing the timestamp. Meant to only be used after the download of content on a checkout. (i.e to update the Path and the Checksum of the AppData) This API is deprecated. Use updateAppData(ContentHolder, ApplicationData, boolean) instead
Supported API: true- Parameters:
holder-appData-- Returns:
- ApplicationData
- Throws:
WTExceptionPropertyVetoException
-
copyContent
ContentHolder copyContent(ContentHolder copyFrom, ContentHolder copyTo) throws WTException, PropertyVetoException 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)
This method returns the ContentHolder with the cookie populated (so the ContentHelper methods will work after a call to it)
NOTE - this shares the actual file streams. The files are not actually duplicated
Supported API: true- Parameters:
copyFrom-copyTo-- Returns:
- ContentHolder
- Throws:
WTExceptionPropertyVetoException
-
copyContentItem
ContentItem copyContentItem(ContentHolder holder, ContentItem item) throws WTException, PropertyVetoException Make an exact copy of the ContentItem for the passed holder. This includes the role, so an exception will be thrown if you try to copy a primary and a primary already exists for the passed ContentHolder.
The passed ContentItem should be queried from another ContentHolder. This method returns the newly created ContentItem
NOTE - this shares the actual file streams. The files are not actually duplicated
Supported API: true- Parameters:
holder-item-- Returns:
- ContentItem
- Throws:
WTExceptionPropertyVetoException
-
getContentsByRole
Query for all the associated ContentItems that have the passed Role for the ContentHolder.
Supported API: true- Parameters:
holder-role-- Returns:
- QueryResult
- Throws:
WTException
-
getContents
Set the cookie in an every ContentHolder object in HashMap to contain all ContentItems associated with it. This need to be called only once and refreshing can be done as needed.
Supported API: true- Parameters:
holders-- Returns:
- HashMap
- Throws:
WTExceptionPropertyVetoException
-
copyContent
Copy all the content from one content holder to another (not regarding the content role. The keys in the input map are the original ContentHolder objects while the values are the new copy of ContentHolder objects. NOTE - this shares the actual file streams. The files are not actually duplicated
Supported API: true- Parameters:
old2newMapping-- Throws:
WTExceptionPropertyVetoException
-
getContentsByRole
Query for all the associated ContentItems that have the passed Role for the ContentHolder.
Supported API: true- Parameters:
holderSet-role-- Returns:
- WTKeyedMap
- Throws:
WTException
-