|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.content.ContentHelper
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
Field Summary | |
static String |
APP_DATA_KEY
|
private static String |
CLASSNAME
|
private static boolean |
DEBUG
|
static String |
DOWNLOAD_METHOD
|
static long |
EXTERNALIZATION_VERSION_UID
|
static String |
HOLDER_KEY
|
private static String |
HTTP_CLASS
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
static ContentService |
service
Supported API: true |
static String |
UPLOAD_METHOD
|
Constructor Summary | |
ContentHelper()
|
Method Summary | |
static void |
doDownload(ContentHolder holder,
ApplicationData appData,
AppletContext context)
Deprecated. |
static void |
doDownload(HttpContentOperation op,
HttpOperationItem opItem,
AppletContext context)
Deprecated. |
static void |
doUpload(HttpContentOperation operation,
AppletContext context)
Deprecated. |
static void |
followURL(URLData url,
AppletContext context)
follows a URL link for a given URLData object in a new window Supported API: false |
static Vector |
getAggregateFiles(Aggregate agg)
Deprecated. |
static Vector |
getAggregateMembers(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,
String fileName)
Generates a URL that can be used in download from the server. |
private static Vector |
getExcludeRoles(String excludeRoles)
|
static HttpContentOperation |
getOperation(ContentHolder holder)
Deprecated. |
static ContentItem |
getPrimary(FormatContentHolder holder)
Returns the primary ContentItem for a FormatContentHolder, if it exists. |
static Vector |
getStatusList(HttpContentOperation operation)
Deprecated. |
static URL |
getUploadURL(ContentHolder holder)
Generates a URL that can be used in an upload post. |
static URL |
getUploadURL(ObjectIdentifier an_oid)
Supported API: false |
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. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(ContentHelper thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final ContentService service
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static boolean DEBUG
public static final String UPLOAD_METHOD
public static final String DOWNLOAD_METHOD
private static final String HTTP_CLASS
public static final String HOLDER_KEY
public static final String APP_DATA_KEY
Constructor Detail |
public ContentHelper()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(ContentHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public static Vector getContentList(ContentHolder holder) throws WTException
holder
-
WTException
public static Vector getURLData(ContentHolder holder) throws WTException
holder
-
WTException
public static Vector getApplicationData(ContentHolder holder) throws WTException
holder
-
WTException
public static Vector getStatusList(HttpContentOperation operation) throws WTException
operation
-
WTException
public static void doUpload(HttpContentOperation operation, AppletContext context) throws WTException
operation
- context
-
WTException
public static void doDownload(HttpContentOperation op, HttpOperationItem opItem, AppletContext context) throws WTException, InterruptedException
op
- opItem
- context
-
WTException
InterruptedException
public static void doDownload(ContentHolder holder, ApplicationData appData, AppletContext context) throws WTException, InterruptedException
holder
- appData
- context
-
WTException
InterruptedException
public static void followURL(URLData url, AppletContext context) throws WTException, MalformedURLException
url
- context
-
WTException
MalformedURLException
public static boolean needToGetContent(ContentHolder holder)
holder
-
public static HttpContentOperation getOperation(ContentHolder holder) throws WTException
holder
-
WTException
public static ContentItem getPrimary(FormatContentHolder holder)
holder
-
public static Vector getAggregateFiles(Aggregate agg) throws WTException
agg
-
WTException
public static URL getUploadURL(ContentHolder holder) throws WTException
holder
-
WTException
public static URL getUploadURL(ObjectIdentifier an_oid) throws WTException
an_oid
-
WTException
public static URL getDownloadURL(ContentHolder holder, ApplicationData appData) throws WTException
holder
- appData
-
WTException
public static Vector getAggregateMembers(Aggregate agg) throws WTException
agg
-
WTException
public static Vector getContentListAll(ContentHolder holder) throws WTException
holder
-
WTException
public static Vector getApplicationDataExcludeRoles(ContentHolder holder, String excludeRoles) throws WTException
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.
WTException
public static Vector getContentListExcludeRoles(ContentHolder holder, String excludeRoles) throws WTException
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.
WTException
public static URL getDownloadURL(ContentHolder holder, ApplicationData appData, boolean replicatedContent) throws WTException
holder
- appData
- replicatedContent
-
WTException
public static URL getDownloadURL(ContentHolder holder, ApplicationData appData, String fileName) throws WTException
holder
- appData
-
WTException
public static URL getDownloadURL(ContentHolder holder, ApplicationData appData, boolean replicatedContent, String fileName) throws WTException
holder
- appData
- replicatedContent
- fileName
-
WTException
private static Vector getExcludeRoles(String excludeRoles)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |