wt.content
Class ContentServiceFwd

java.lang.Object
  extended bywt.content.ContentServiceFwd
All Implemented Interfaces:
ContentService, RemoteAccess, Serializable

public class ContentServiceFwd
extends Object
implements RemoteAccess, ContentService, Serializable

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

Extendable: false

See Also:
ContentHelper, 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
 
Fields inherited from interface wt.content.ContentService
FILE_SET, NONE, UNKNOWN, URL
 
Constructor Summary
ContentServiceFwd()
           
 
Method Summary
 ContentHolder contentUpdate(ContentHolder holder, TransactionContainer txnCntr)
          This method adds, removes, and updates content based on a ContentHolder and a TransactionContainer object.
 ContentHolder contentUpdateDownload(ContentHolder holder, TransactionContainer txnCntr)
          Deprecated.  
 ContentHolder contentUpdateUpload(ContentHolder holder, TransactionContainer txnCntr)
          Deprecated.  
 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.
 void copyContentItemsNoRoleCheck(WTKeyedMap holderToItemMap)
          Make a copy of the ContentItem objects for the corresponding ContentHolder objects.
 ApplicationData get3DThumbnail(ContentHolder contentHolder)
          Get an associated Thumbnail content item for the passed ContentHolder.
 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.
 QueryResult getDataFormats()
          Deprecated.  
 DataFormat getFormatByName(String formatName)
          Get a DataFormat object based on the formatName

Supported API: false
 Vector getFormatNames()
          Returns a Vector of the FormatNames in the system from DataFormat class that are applicable for ApplicationData objects.
 HttpContentOperation getHttpContentOperationStatuses(HttpContentOperation operation)
          Deprecated.  
private static Manager getManager()
           
 ContentItem getPrimary(FormatContentHolder holder)
          Deprecated.  
 ContentItem getPrimaryContent(ObjectReference formatContentHolderRef)
          Get the primary ContentItem for the passed reference to a ContentHolder.
 ApplicationData getThumbnail(ContentHolder contentHolder)
          Get an associated Thumbnail content item for the passed ContentHolder.
 HttpContentOperation prepareForDownload(ContentHolder holder, Vector contentV)
          Deprecated.  
 HttpContentOperation prepareForFullDownload(ContentHolder holder)
          Deprecated.  
 HttpContentOperation prepareForFullUpload(ContentHolder holder)
          Deprecated.  
 HttpContentOperation prepareForUpload(ContentHolder holder)
          Deprecated.  
 HttpContentOperation prepareForUpload(ContentHolder holder, Vector contentV)
          Deprecated.  
 ApplicationData updateAppData(ContentHolder holder, ApplicationData appData)
          This method updates an ApplicationData without changing the timestamp.
 HttpContentOperation waitForStatus(HttpContentOperation op)
          Deprecated.  
 HttpOperationItem waitForStatus(HttpOperationItem opItem)
          Deprecated.  
 
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

ContentServiceFwd

public ContentServiceFwd()
Method Detail

getManager

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

prepareForUpload

public HttpContentOperation prepareForUpload(ContentHolder holder)
                                      throws WTException,
                                             PropertyVetoException
Deprecated.  

Sets up an HttpContentOperation object for a content upload given a particular ContentHolder. When the upload is initiated with this object, it will allow the definition of new content from a generated html page.

Supported API: false

Specified by:
prepareForUpload in interface ContentService
Parameters:
holder -
Returns:
HttpContentOperation
Throws:
WTException
PropertyVetoException

prepareForFullUpload

public HttpContentOperation prepareForFullUpload(ContentHolder holder)
                                          throws WTException,
                                                 PropertyVetoException
Deprecated.  

Sets up an HttpContentOperation object for a content upload given a particular ContentHolder. This will initiate an upload of all content associated with the given ContentHolder.

Supported API: false

Specified by:
prepareForFullUpload in interface ContentService
Parameters:
holder -
Returns:
HttpContentOperation
Throws:
WTException
PropertyVetoException

prepareForUpload

public HttpContentOperation prepareForUpload(ContentHolder holder,
                                             Vector contentV)
                                      throws WTException,
                                             PropertyVetoException
Deprecated.  

Sets up an HttpContentOperation object for a content upload given a particular ContentHolder. This method will set up for an upload of all the content in the passed Vector.

Supported API: false

Specified by:
prepareForUpload in interface ContentService
Parameters:
holder -
contentV -
Returns:
HttpContentOperation
Throws:
WTException
PropertyVetoException

prepareForFullDownload

public HttpContentOperation prepareForFullDownload(ContentHolder holder)
                                            throws WTException,
                                                   PropertyVetoException
Deprecated.  

Sets up a HttpContentOperation object for a download. This will set up for a download of all the content associated with this ContentHolder

Supported API: false

Specified by:
prepareForFullDownload in interface ContentService
Parameters:
holder -
Returns:
HttpContentOperation
Throws:
WTException
PropertyVetoException

prepareForDownload

public HttpContentOperation prepareForDownload(ContentHolder holder,
                                               Vector contentV)
                                        throws WTException,
                                               PropertyVetoException
Deprecated.  

Sets up a HttpContentOperation object for a download. This will download the content for every ApplicationData object in the passed vector.

Supported API: false

Specified by:
prepareForDownload in interface ContentService
Parameters:
holder -
contentV -
Returns:
HttpContentOperation
Throws:
WTException
PropertyVetoException

waitForStatus

public HttpContentOperation waitForStatus(HttpContentOperation op)
                                   throws PropertyVetoException,
                                          ContentException,
                                          InterruptedException,
                                          WTException
Deprecated.  

Wait for the given HttpContentOperation object to move to a "done" status. Uses time-out values found in the wt.properties file. This would typically be done after calling a ContentHelper.doUpload( HttpContentOperation op ) from the client.

Supported API: false

Specified by:
waitForStatus in interface ContentService
Parameters:
op -
Returns:
HttpContentOperation
Throws:
PropertyVetoException
ContentException
InterruptedException
WTException
See Also:
HttpOperationStatus

waitForStatus

public HttpOperationItem waitForStatus(HttpOperationItem opItem)
                                throws PropertyVetoException,
                                       ContentException,
                                       InterruptedException,
                                       WTException
Deprecated.  

Wait for the given HttpOperationitem object to move to a "done" status. Uses time-out values found in the wt.properties file. This would typically be done for downloading mutliple ApplicationData objects consecutively. This would typically be done after calling a ContentHelper.doDownload( HttpContentItem opItem ) from the client.

Supported API: false

Specified by:
waitForStatus in interface ContentService
Parameters:
opItem -
Returns:
HttpOperationItem
Throws:
PropertyVetoException
ContentException
InterruptedException
WTException
See Also:
HttpOperationStatus

getFormatNames

public Vector getFormatNames()
                      throws WTException
Returns a Vector of the FormatNames in the system from DataFormat class that are applicable for ApplicationData objects.

Supported API: false

Specified by:
getFormatNames in interface ContentService
Returns:
Vector
Throws:
WTException

getContents

public 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: false

Specified by:
getContents in interface ContentService
Parameters:
holder -
Returns:
ContentHolder
Throws:
WTException
PropertyVetoException

getHttpContentOperationStatuses

public HttpContentOperation getHttpContentOperationStatuses(HttpContentOperation operation)
                                                     throws WTException,
                                                            PropertyVetoException
Deprecated.  

Set the cookie in an HttpContentOperation object to contain statuses of the individual pieces of content associated with this content operation.

Supported API: false

Specified by:
getHttpContentOperationStatuses in interface ContentService
Parameters:
operation -
Returns:
HttpContentOperation
Throws:
WTException
PropertyVetoException

getDataFormat

public DataFormat getDataFormat(String idStr)
                         throws WTException
Get a DataFormat object based on a stringified object identifier. This is used for Icon handling.

Supported API: false

Specified by:
getDataFormat in interface ContentService
Parameters:
idStr -
Returns:
DataFormat
Throws:
WTException
See Also:
ObjectIdentifier

getFormatByName

public DataFormat getFormatByName(String formatName)
                           throws WTException
Get a DataFormat object based on the formatName

Supported API: false

Specified by:
getFormatByName in interface ContentService
Parameters:
formatName -
Returns:
DataFormat
Throws:
WTException

getDataFormats

public QueryResult getDataFormats()
                           throws WTException
Deprecated.  

Get all the DataFormat objects defined in the system

Supported API: false

Specified by:
getDataFormats in interface ContentService
Returns:
QueryResult
Throws:
WTException

contentUpdate

public ContentHolder contentUpdate(ContentHolder holder,
                                   TransactionContainer txnCntr)
                            throws WTException,
                                   PropertyVetoException
This method adds, removes, and updates content based on a ContentHolder and a TransactionContainer object.

Supported API: false

Specified by:
contentUpdate in interface ContentService
Parameters:
holder -
txnCntr -
Returns:
ContentHolder
Throws:
WTException
PropertyVetoException
See Also:
TransactionContainer

contentUpdateUpload

public ContentHolder contentUpdateUpload(ContentHolder holder,
                                         TransactionContainer txnCntr)
                                  throws WTException,
                                         PropertyVetoException
Deprecated.  

This method adds, removes, and updates content based on a ContentHolder and a TransactionContainer object. It also sets up an HttpContentOperation object for a corresponding upload of the marked ApplicationData objects.

Supported API: false

Specified by:
contentUpdateUpload in interface ContentService
Parameters:
holder -
txnCntr -
Returns:
ContentHolder
Throws:
WTException
PropertyVetoException
See Also:
TransactionContainer, HttpContentOperation, ApplicationData

contentUpdateDownload

public ContentHolder contentUpdateDownload(ContentHolder holder,
                                           TransactionContainer txnCntr)
                                    throws WTException,
                                           PropertyVetoException
Deprecated.  

TThis method adds, removes, and updates content based on a ContentHolder and a TransactionContainer object. It also sets up an HttpContentOperation object for a corresponding download of the marked ApplicationData objects.

Supported API: false

Specified by:
contentUpdateDownload in interface ContentService
Parameters:
holder -
txnCntr -
Returns:
ContentHolder
Throws:
WTException
PropertyVetoException
See Also:
TransactionContainer, HttpContentOperation, ApplicationData

updateAppData

public ApplicationData updateAppData(ContentHolder holder,
                                     ApplicationData appData)
                              throws WTException,
                                     PropertyVetoException
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)

Supported API: false

Specified by:
updateAppData in interface ContentService
Parameters:
holder -
appData -
Returns:
ApplicationData
Throws:
WTException
PropertyVetoException

getPrimary

public ContentItem getPrimary(FormatContentHolder holder)
                       throws WTException,
                              PropertyVetoException
Deprecated.  

Get the primary ContentItem for the passed FormatContentHolder. This method does not appear to work at this time so it is deprecated at release 6.0 in favor of ContentHelper.getPrimary.

Supported API: false

Specified by:
getPrimary in interface ContentService
Parameters:
holder -
Returns:
ContentItem
Throws:
WTException
PropertyVetoException

copyContent

public 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: false

Specified by:
copyContent in interface ContentService
Parameters:
copyFrom -
copyTo -
Returns:
ContentHolder
Throws:
WTException
PropertyVetoException

copyContentItem

public 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: false

Specified by:
copyContentItem in interface ContentService
Parameters:
holder -
item -
Returns:
ContentItem
Throws:
WTException
PropertyVetoException

getContentsByRole

public QueryResult getContentsByRole(ContentHolder holder,
                                     ContentRoleType role)
                              throws WTException
Query for all the associated ContentItems that have the passed Role for the ContentHolder.

Supported API: false

Specified by:
getContentsByRole in interface ContentService
Parameters:
holder -
role -
Returns:
QueryResult
Throws:
WTException

getThumbnail

public ApplicationData getThumbnail(ContentHolder contentHolder)
                             throws WTException
Get an associated Thumbnail content item for the passed ContentHolder. If no thumbnail found, returns null. If more than one thumbnail found, returns only one and throws a ContentException to indicate multiple thumbnails were found.

Supported API: false

Specified by:
getThumbnail in interface ContentService
Parameters:
contentHolder -
Returns:
ApplicationData
Throws:
WTException

getContents

public 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: false

Specified by:
getContents in interface ContentService
Parameters:
holders -
Returns:
HashMap
Throws:
WTException
PropertyVetoException

get3DThumbnail

public ApplicationData get3DThumbnail(ContentHolder contentHolder)
                               throws WTException
Get an associated Thumbnail content item for the passed ContentHolder. If no thumbnail found, returns null. If more than one thumbnail found, returns only one and throws a ContentException to indicate multiple thumbnails were found.

Supported API: false

Specified by:
get3DThumbnail in interface ContentService
Parameters:
contentHolder -
Returns:
ApplicationData
Throws:
WTException

getPrimaryContent

public ContentItem getPrimaryContent(ObjectReference formatContentHolderRef)
                              throws WTException
Get the primary ContentItem for the passed reference to a ContentHolder. This method eliminates the need to inflate formatContentHolderRef for performance reasons.

Supported API: false

Specified by:
getPrimaryContent in interface ContentService
Parameters:
formatContentHolderRef -
Returns:
ContentItem
Throws:
WTException

getContentsByRole

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

Supported API: false

Specified by:
getContentsByRole in interface ContentService
Parameters:
holderSet -
role -
Returns:
WTKeyedMap
Throws:
WTException

copyContent

public 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: false

Specified by:
copyContent in interface ContentService
Parameters:
old2newMapping -
Throws:
WTException
PropertyVetoException

copyContentItemsNoRoleCheck

public void copyContentItemsNoRoleCheck(WTKeyedMap holderToItemMap)
                                 throws WTException,
                                        PropertyVetoException
Make a copy of the ContentItem objects for the corresponding ContentHolder objects.

This method does not check for Content Role and does not enforce uniqueness of content with RIMARY role.

NOTE - this shares the actual file streams. The files are not actually duplicated

Supported API: false

Specified by:
copyContentItemsNoRoleCheck in interface ContentService
Parameters:
holderToItemMap - A map between recipient ContentHolder objects and WTSet instances filled with ContentItem objects to be copied.

Throws:
WTException
PropertyVetoException