Package wt.content

Interface ContentService


@RemoteInterface 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:
  • Method Details

    • 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

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

      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

      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