wt.content
Class ContentHelper

java.lang.Object
  extended by wt.content.ContentHelper
All Implemented Interfaces:
Externalizable, Serializable

public class ContentHelper
extends Object
implements Externalizable

Used by clients to access the ContentService and defines some client side helper methods to manipulate content, status objects, and initiate uploads and downloads. Usage is ... ContentHelper.service.contentServiceMethod( args ); Also defines some client side helper methods

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
static ContentService service
          

Supported API: true
 
Method Summary
static Vector getAggregateMembers(wt.content.Aggregate agg)
          Get the list of ContentItem's for the passed Aggregate.
static Vector getApplicationData(ContentHolder holder)
          Get the list of ApplicationData objects out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) This will NOT return the primary for a FormatContentHolder

Supported API: true
static Vector getApplicationDataExcludeRoles(ContentHolder holder, String excludeRoles)
          Get the list of ApplicationData objects out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) This will NOT return the primary for a FormatContentHolder.
static Vector getContentList(ContentHolder holder)
          Get the list of ContentItem out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) Note this will NOT return the primary content for a FormatContentHolder.
static Vector getContentListAll(ContentHolder holder)
          Get the list of ContentItem out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) Note this will return the primary content for a FormatContentHolder, as well as any other attached content.
static Vector getContentListExcludeRoles(ContentHolder holder, String excludeRoles)
          Get the list of ContentItem out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) Note this will NOT return the primary content for a FormatContentHolder.
static URL getDownloadURL(ContentHolder holder, ApplicationData appData)
          Generates a URL that can be used in download from the server.
static URL getDownloadURL(ContentHolder holder, ApplicationData appData, boolean replicatedContent)
          Generates a URL that can be used in download from the server.
static URL getDownloadURL(ContentHolder holder, ApplicationData appData, boolean replicatedContent, String fileName)
          Generates a URL that can be used in download from the server.
static URL getDownloadURL(ContentHolder holder, ApplicationData appData, boolean replicatedContent, String fileName, boolean forceDownload)
          Generates a URL that can be used in download from the server.
static ContentItem getPrimary(FormatContentHolder holder)
          Returns the primary ContentItem for a FormatContentHolder, if it exists.
static URL getUploadURL(ContentHolder holder)
          Generates a URL that can be used in an upload post.
static Vector getURLData(ContentHolder holder)
          Get the list of URLData objects out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) This will NOT return the Primary for a FormatConentHolder.
static boolean needToGetContent(ContentHolder holder)
          This will return true if the passed ContentHolder has already been passed to the server to get it's content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

service

public static final ContentService service


Supported API: true

Method Detail

getContentList

public static Vector getContentList(ContentHolder holder)
                             throws WTException
Get the list of ContentItem out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) Note this will NOT return the primary content for a FormatContentHolder.

Supported API: true

Parameters:
holder -
Returns:
Vector
Throws:
WTException

getURLData

public static Vector getURLData(ContentHolder holder)
                         throws WTException
Get the list of URLData objects out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) This will NOT return the Primary for a FormatConentHolder.

Supported API: true

Parameters:
holder -
Returns:
Vector
Throws:
WTException

getApplicationData

public static Vector getApplicationData(ContentHolder holder)
                                 throws WTException
Get the list of ApplicationData objects out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) This will NOT return the primary for a FormatContentHolder

Supported API: true

Parameters:
holder -
Returns:
Vector
Throws:
WTException

needToGetContent

public static boolean needToGetContent(ContentHolder holder)
This will return true if the passed ContentHolder has already been passed to the server to get it's content.

Supported API: true

Parameters:
holder -
Returns:
boolean

getPrimary

public static ContentItem getPrimary(FormatContentHolder holder)
Returns the primary ContentItem for a FormatContentHolder, if it exists. A call to ContentHelper.service.getContents should be used to populate the content information inside of the FormatContentHolder prior to calling this method.

Supported API: true

Parameters:
holder -
Returns:
ContentItem

getUploadURL

public static URL getUploadURL(ContentHolder holder)
                        throws WTException
Generates a URL that can be used in an upload post.

Supported API: true

Parameters:
holder -
Returns:
URL
Throws:
WTException

getDownloadURL

public static URL getDownloadURL(ContentHolder holder,
                                 ApplicationData appData)
                          throws WTException
Generates a URL that can be used in download from the server.

Supported API: true

Parameters:
holder -
appData -
Returns:
URL
Throws:
WTException

getAggregateMembers

public static Vector getAggregateMembers(wt.content.Aggregate agg)
                                  throws WTException
Get the list of ContentItem's for the passed Aggregate. This should be done after a call to ContentHelper.service.getContents( ContentHolder )

Supported API: true

Parameters:
agg -
Returns:
Vector
Throws:
WTException

getContentListAll

public static Vector getContentListAll(ContentHolder holder)
                                throws WTException
Get the list of ContentItem out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) Note this will return the primary content for a FormatContentHolder, as well as any other attached content.

Supported API: true

Parameters:
holder -
Returns:
Vector
Throws:
WTException

getApplicationDataExcludeRoles

public static Vector getApplicationDataExcludeRoles(ContentHolder holder,
                                                    String excludeRoles)
                                             throws WTException
Get the list of ApplicationData objects out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) This will NOT return the primary for a FormatContentHolder. This method will also exclude any objects of the ContentRoleTypes in the role String input.

Supported API: true

Parameters:
holder -
excludeRoles - The list of roles that this method should exclude. The roles are in the external format like SECONDARY, THUMBNAIL, and THUMBNAIL3D. The roles should be in a comma delimited string. This method will convert them to the ContentRoleType objects. If a string in the list isn't converted because of an exception, that role type will not be excluded.
Returns:
Vector
Throws:
WTException

getContentListExcludeRoles

public static Vector getContentListExcludeRoles(ContentHolder holder,
                                                String excludeRoles)
                                         throws WTException
Get the list of ContentItem out of the passed ContentHolder This should be done after a call to ContentHelper.service.getContents( ContentHolder ) Note this will NOT return the primary content for a FormatContentHolder. This method will also exclude any objects of the ContentRoleTypes in the role String input.

Supported API: true

Parameters:
holder -
excludeRoles - The list of roles that this method should exclude. The roles are in the external format like SECONDARY, THUMBNAIL, and THUMBNAIL3D. The roles should be in a comma delimited string. This method will convert them to the ContentRoleType objects. If a string in the list isn't converted because of an exception, that role type will not be excluded.
Returns:
Vector
Throws:
WTException

getDownloadURL

public static URL getDownloadURL(ContentHolder holder,
                                 ApplicationData appData,
                                 boolean replicatedContent)
                          throws WTException
Generates a URL that can be used in download from the server. The URL points to the document which contains a list of possible download URLs. Based on replicatedContent input argument, URLs to replicated content can be included.

Supported API: true

Parameters:
holder -
appData -
replicatedContent -
Returns:
URL
Throws:
WTException

getDownloadURL

public static URL getDownloadURL(ContentHolder holder,
                                 ApplicationData appData,
                                 boolean replicatedContent,
                                 String fileName)
                          throws WTException
Generates a URL that can be used in download from the server. The URL points to the document which contains a list of possible download URLs. Based on replicatedContent input argument, URLs to replicated content can be included.

Supported API: true

Parameters:
holder -
appData -
replicatedContent -
fileName -
Returns:
URL
Throws:
WTException

getDownloadURL

public static URL getDownloadURL(ContentHolder holder,
                                 ApplicationData appData,
                                 boolean replicatedContent,
                                 String fileName,
                                 boolean forceDownload)
                          throws WTException
Generates a URL that can be used in download from the server. The URL points to the document which contains a list of possible download URLs. Based on replicatedContent input argument, URLs to replicated content can be included. The boolean forceDownload decides whether to open the content inline or to pop up a dialog box asking for open/save.

Supported API: true

Parameters:
holder -
appData -
replicatedContent -
fileName -
forceDownload -
Returns:
URL
Throws:
WTException