Package wt.content
Class ContentHelper
java.lang.Object
wt.content.ContentHelper
- All Implemented Interfaces:
Externalizable,Serializable
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
Supported API: true
Extendable: false
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic VectorGet the list of ContentItem's for the passed Aggregate.static VectorgetApplicationData(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: truestatic VectorgetApplicationDataExcludeRoles(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 VectorgetContentList(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 VectorgetContentListAll(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 VectorgetContentListExcludeRoles(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 URLgetDownloadURL(ContentHolder holder, ApplicationData appData) Generates a URL that can be used in download from the server.static URLgetDownloadURL(ContentHolder holder, ApplicationData appData, boolean replicatedContent) Generates a URL that can be used in download from the server.static URLgetDownloadURL(ContentHolder holder, ApplicationData appData, boolean replicatedContent, String fileName) Generates a URL that can be used in download from the server.static URLgetDownloadURL(ContentHolder holder, ApplicationData appData, boolean replicatedContent, String fileName, boolean forceDownload) Generates a URL that can be used in download from the server.static ContentItemgetPrimary(FormatContentHolder holder) Returns the primary ContentItem for a FormatContentHolder, if it exists.static URLgetUploadURL(ContentHolder holder) Generates a URL that can be used in an upload post.static VectorgetURLData(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 URLgetViewContentURL(ApplicationData appData, ContentHolder holder) Generates a URL that can be used in a AppletContext.showDocument() call from an applet.static WTKeyedMapgetViewContentURL(WTValuedMap appDataToHolderMap) Generates a URL that can be used in a AppletContext.showDocument() call from an applet.static booleanneedToGetContent(ContentHolder holder) This will return true if the passed ContentHolder has already been passed to the server to get it's content.
-
Field Details
-
service
Supported API: true
-
-
Method Details
-
getContentList
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
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
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
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
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
Generates a URL that can be used in an upload post.
Supported API: true- Parameters:
holder-- Returns:
- URL
- Throws:
WTException
-
getDownloadURL
Generates a URL that can be used in download from the server.
Supported API: true- Parameters:
holder-appData-- Returns:
- URL
- Throws:
WTException
-
getAggregateMembers
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
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
-
getViewContentURL
public static URL getViewContentURL(ApplicationData appData, ContentHolder holder) throws WTException Generates a URL that can be used in a AppletContext.showDocument() call from an applet. This will initiate a download of the given ApplicationData object.
Supported API: true- Parameters:
appData- The ApplicationDataholder- ContentHolder corresponding to the ApplicationData- Returns:
- URL
- Throws:
WTException
-
getViewContentURL
Generates a URL that can be used in a AppletContext.showDocument() call from an applet. This will initiate a download of the given ApplicationData object.
Supported API: true- Parameters:
appDataToHolderMap- WTValuedMap of ApplicationData to ContentHolder- Returns:
- WTKeyedMap which is map of ApplicationData to URL
- Throws:
WTException
-