wt.content
Interface ContentService


public 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

See Also:
ContentHelper

Method Summary
 ContentHolder copyContent(ContentHolder copyFrom, ContentHolder copyTo)
          Copy all the content from one content holder to another (not regarding the content role.
 void copyContent(WTKeyedMap old2newMapping)
          Copy all the content from one content holder to another (not regarding the content role.
 ContentItem copyContentItem(ContentHolder holder, ContentItem item)
          Make an exact copy of the ContentItem for the passed holder.
 ContentHolder getContents(ContentHolder holder)
          Set the cookie in an ContentHolder object to contain all ContentItems associated with it.
 HashMap getContents(HashMap holders)
          Set the cookie in an every ContentHolder object in HashMap to contain all ContentItems associated with it.
 QueryResult getContentsByRole(ContentHolder holder, ContentRoleType role)
          Query for all the associated ContentItems that have the passed Role for the ContentHolder.
 WTKeyedMap getContentsByRole(WTSet holderSet, ContentRoleType role)
          Query for all the associated ContentItems that have the passed Role for the ContentHolder.
 DataFormat getDataFormat(String idStr)
          Get a DataFormat object based on a stringified object identifier.
 DataFormat getFormatByName(String formatName)
          Get a DataFormat object based on the formatName

Supported API: true
 Vector getFormatNames()
          Returns a Vector of the FormatNames in the system from DataFormat class that are applicable for ApplicationData objects.
 ApplicationData updateAppData(ContentHolder holder, ApplicationData appData)
          Deprecated.  
 

Method Detail

getFormatNames

Vector getFormatNames()
                      throws WTException
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

ContentHolder getContents(ContentHolder holder)
                          throws WTException,
                                 PropertyVetoException
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:
WTException
PropertyVetoException

getDataFormat

DataFormat getDataFormat(String idStr)
                         throws WTException
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:
ObjectIdentifier

getFormatByName

DataFormat getFormatByName(String formatName)
                           throws WTException
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:
WTException
PropertyVetoException

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:
WTException
PropertyVetoException

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:
WTException
PropertyVetoException

getContentsByRole

QueryResult getContentsByRole(ContentHolder holder,
                              ContentRoleType role)
                              throws WTException
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

HashMap getContents(HashMap holders)
                    throws WTException,
                           PropertyVetoException
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:
WTException
PropertyVetoException

copyContent

void copyContent(WTKeyedMap old2newMapping)
                 throws WTException,
                        PropertyVetoException
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:
WTException
PropertyVetoException

getContentsByRole

WTKeyedMap getContentsByRole(WTSet holderSet,
                             ContentRoleType role)
                             throws WTException
Query for all the associated ContentItems that have the passed Role for the ContentHolder.

Supported API: true

Parameters:
holderSet -
role -
Returns:
WTKeyedMap
Throws:
WTException