|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Rendition
Represents a rendition for a DigitalAsset. A rendition may be any conversion/reduction/cropping/etc of a given asset into another form of the asset, including a thumbnail.
Renditions must have a non-null resource name.
Method Summary | |
---|---|
byte[] |
getBytes()
Returns the contents of the resource contained within this rendition as a byte array. |
int |
getHeight()
Get height of the rendition in pixels. |
java.io.InputStream |
getInputStream()
Returns the contents of the resource contained within this rendition as a input stream. |
java.lang.String |
getMimeType()
Returns the mime-type of the resource file. |
java.lang.String |
getProperty(java.lang.String property)
Gets the property requested |
java.lang.String |
getRenditionName()
Returns the name of this rendition. |
java.lang.String |
getResourceName()
Returns the name of the resource contained within this rendition. |
java.lang.String |
getResourceURI(boolean isServerRelative)
Returns the URI of the resource relative to either the component or the server depending on the provided boolean parameter. |
java.lang.String |
getResourceURL()
Returns the component relative URI to the resource. |
long |
getSize()
Returns the size in bytes of the file contained within this component. |
int |
getWidth()
Get width of the rendition in pixels. |
java.util.Iterator<java.lang.String> |
iterator()
Get an iterator over all meta data property names of this asset. |
java.lang.String |
removeProperty(java.lang.String property)
Removes the property. |
void |
setProperty(java.lang.String property,
java.lang.String value)
Sets the provided value to the property specified. |
Method Detail |
---|
java.lang.String getRenditionName() throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
null
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the user does not have access to the resource
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- if the resource name cannot be retrievedjava.lang.String getResourceName() throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
null
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the user does not have access to the resource
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- if the resource name cannot be retrievedbyte[] getBytes() throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the user does not have access to the file TODO: can that occur?
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- if the file cannot be retrievedjava.io.InputStream getInputStream() throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the user does not have access to the file TODO: can that occur?
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- if the file cannot be retrieved or is externally managedjava.lang.String getMimeType()
Returns null if no resource file has been set.
long getSize() throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
Returns -1 if a file has not been specified.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the user does not have access to the file
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- if the file cannot be retrievedjava.lang.String getResourceURL()
Returns null if no resource has been set.
java.lang.String getResourceURI(boolean isServerRelative)
As an example, a full URL to a resource uploaded as a rendition could look like this:
http://hostname:port/wps/wcm/myconnect/d07a7274-781d-42cc-936e-e83dd15aaa9e/desktop/image.jpeg?MOD=AJPERES&CVID=l-Ayhuw&id=1510530926202
Using the above example, a server relative URI can look like this:
/wps/wcm/myconnect/d07a7274-781d-42cc-936e-e83dd15aaa9e/desktop/image.jpeg?MOD=AJPERES&CVID=l-Ayhuw&id=1510530926202
With respect to the full URL from above, a component relative URI would look like this:
/desktop/image.jpeg
isServerRelative
- boolean value which determines if the returned URI is to be server or component relative
int getWidth()
int getHeight()
void setProperty(java.lang.String property, java.lang.String value) throws java.lang.IllegalArgumentException
null
it has the same effect
as removing the property.
property
- - the property name, not null
value
- - the property value
java.lang.IllegalArgumentException
- if property name is null
java.lang.String getProperty(java.lang.String property) throws java.lang.IllegalArgumentException
property
- - the property name, not null
java.lang.IllegalArgumentException
- if property name is null
java.lang.String removeProperty(java.lang.String property) throws java.lang.IllegalArgumentException
property
- - the property name, not null
null
if property was not found/
java.lang.IllegalArgumentException
- if property name is null
java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |