|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.service.cmr.repository.ContentData
public class ContentData
The compound property representing content
| Constructor Summary | |
|---|---|
protected |
ContentData(ContentData original)
Copy constructor for derived class |
|
ContentData(java.lang.String contentUrl,
java.lang.String mimetype,
long size,
java.lang.String encoding)
Create a content data using the default locale. |
|
ContentData(java.lang.String contentUrl,
java.lang.String mimetype,
long size,
java.lang.String encoding,
java.util.Locale locale)
Create a compound set of data representing a single instance of content. |
| Method Summary | |
|---|---|
static ContentData |
createContentProperty(java.lang.String contentPropertyStr)
Construct a content property from a string |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getContentUrl()
|
java.lang.String |
getEncoding()
Gets the content's encoding. |
java.lang.String |
getInfoUrl()
|
java.util.Locale |
getLocale()
Get the content's locale. |
java.lang.String |
getMimetype()
Gets content's mimetype. |
long |
getSize()
Get the content's size |
static boolean |
hasContent(ContentData contentData)
Helper method to determine if the data represents any physical content or not. |
int |
hashCode()
|
static ContentData |
setEncoding(ContentData existing,
java.lang.String encoding)
Constructs a new instance using the existing one as a template, but replacing the encoding. |
static ContentData |
setMimetype(ContentData existing,
java.lang.String mimetype)
Constructs a new instance using the existing one as a template, but replacing the mimetype |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ContentData(ContentData original)
original - the object to copy
public ContentData(java.lang.String contentUrl,
java.lang.String mimetype,
long size,
java.lang.String encoding)
default locale.
ContentData.ContentData(String, String, long, String, Locale)
public ContentData(java.lang.String contentUrl,
java.lang.String mimetype,
long size,
java.lang.String encoding,
java.util.Locale locale)
In order to ensure data integrity, the mimetype
must be set if the content URL is set.
contentUrl - the content URL. If this value is non-null, then the
mimetype must be supplied.mimetype - the content mimetype. This is mandatory if the contentUrl is specified.size - the content size.encoding - the content encoding. This is mandatory if the contentUrl is specified.locale - the locale of the content (may be null). If null, the
default locale will be used.| Method Detail |
|---|
public static ContentData createContentProperty(java.lang.String contentPropertyStr)
contentPropertyStr - the string representing the content details
public static ContentData setMimetype(ContentData existing,
java.lang.String mimetype)
existing - an existing set of content data, null to use default valuesmimetype - the mimetype to set
public static ContentData setEncoding(ContentData existing,
java.lang.String encoding)
existing - an existing set of content data, null to use default valuesencoding - the encoding to set
public static boolean hasContent(ContentData contentData)
contentData - the content to check (may be null)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectcontentUrl=xxx|mimetype=xxx|size=xxx|encoding=xxx|locale=xxxpublic java.lang.String getInfoUrl()
contentUrl=xxx|mimetype=xxx|size=xxx|encoding=xxx|locale=xxxpublic java.lang.String getContentUrl()
ContentIOExceptionpublic java.lang.String getMimetype()
public long getSize()
public java.lang.String getEncoding()
public java.util.Locale getLocale()
public int hashCode()
hashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||