{ } }
Tree PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD com.ibm.workplace.wcm.api
Interface LibraryFileComponent
- All Superinterfaces:
- DigitalAsset, Document, Editable, EditableItem, EditableLibraryComponent, Hierarchical, Item, LibraryComponent, Localized, RenditionCapability, Resource, WCMApiObject, WorkflowedDocument
public interface LibraryFileComponent- extends EditableLibraryComponent, DigitalAsset, Resource, RenditionCapability
Represents a File component that exists in the Component Library.
A LibraryFileComponent is a LibraryComponent and must be stored as a separate entity in the repository.
A LibraryFileComponent can contain one file. The contents of the file are dealt with as raw byte content. This interface provides methods to manipulate the file.
note: since v6.0.0, a LibraryComponent is referred to as a "Component" in the Authoring UI.
- See Also:
- LibraryComponent
Nested Class Summary
Nested classes/interfaces inherited from interface com.ibm.workplace.wcm.api.digitalasset.DigitalAsset DigitalAsset.ResourceManagementOption
Method Summary byte[] getFile()
Deprecated. - use getFileStream() insteadjava.lang.String getFileName()
Deprecated. use Resource.getResourceName()java.io.InputStream getFileStream()
Deprecated. use Resource.getResourceName()void removeFile()
Deprecated. use Resource.removeResource()void setFile(java.lang.String fileName, byte[] file)
Deprecated. use Resource.setResource(String, byte[])void setFile(java.lang.String fileName, java.io.File file)
Deprecated. use Resource.setResource(String, File)
Methods inherited from interface com.ibm.workplace.wcm.api.Hierarchical getParentId
Methods inherited from interface com.ibm.workplace.wcm.api.Item getCreationDate, getDescription, getIdentity, getModifiedDate, getName, getTitle
Methods inherited from interface com.ibm.portal.Localized getLocales
Methods inherited from interface com.ibm.workplace.wcm.api.EditableItem setDescription, setName, setTitle
Methods inherited from interface com.ibm.workplace.wcm.api.digitalasset.DigitalAsset getDigitalAssetID, getMetaData, getPath, getResourceManagementOption, isManagedExternally, setDigitalAssetID, setMetaData, setPath, setResourceManagementOption
Methods inherited from interface com.ibm.workplace.wcm.api.Resource getBytes, getInputStream, getMimeType, getResourceName, getResourceURL, getSize, removeResource, setDeliverableOverCachingNetworkSupport, setResource, setResource, supportsDeliveryOverCachingNetwork
Methods inherited from interface com.ibm.workplace.wcm.api.RenditionCapability createRendition, createRendition, getRendition, getRenditions, removeRendition
Method Detail getFile
byte[] getFile() throws AuthorizationException, PropertyRetrievalException
- Deprecated. - use getFileStream() instead
- Returns the contents of the file contained within this component as a byte array.
Return an empty byte array if no file has been set or the byte content could not be retrieved.
- Returns:
- the file content as a byte array
- Throws:
- AuthorizationException - if the user does not have access to the file
- PropertyRetrievalException - if the file cannot be retrieved
getFileStream
java.io.InputStream getFileStream() throws AuthorizationException, PropertyRetrievalException
- Deprecated. use Resource.getResourceName()
- Returns the contents of the file contained within this component as a input stream
Return an empty byte array if no file has been set or the byte content could not be retrieved.
- Returns:
- the file content as a input stream
- Throws:
- AuthorizationException - if the user does not have access to the file
- PropertyRetrievalException - if the file cannot be retrieved or is externally managed
getFileName
java.lang.String getFileName() throws AuthorizationException, PropertyRetrievalException
- Deprecated. use Resource.getResourceName()
- Returns the filename of the file contained within this component.
Returns null if a file or filename has not been specified.
- Returns:
- the filename
- Throws:
- AuthorizationException - if the user does not have access to the file
- PropertyRetrievalException - if the file cannot be retrieved
setFile
void setFile(java.lang.String fileName, byte[] file) throws OperationFailedException
- Deprecated. use Resource.setResource(String, byte[])
- Sets the file contained within this component.
This method does not accept null arguments. Passing a null argument into this method will result in a NullPointerException.
- Parameters:
- fileName - the name of the file
- file - the content of the file as a byte array
- Throws:
- java.lang.NullPointerException - if fileName or file is null
- OperationFailedException - if the file could not be set
setFile
void setFile(java.lang.String fileName, java.io.File file) throws OperationFailedException
- Deprecated. use Resource.setResource(String, File)
- Sets the file contained within this component.
This method does not accept null arguments. Passing a null argument into this method will result in a NullPointerException.
- Parameters:
- fileName - the name of the file
- file - the content of the file as a byte array
- Throws:
- java.lang.NullPointerException - if fileName or file is null
- OperationFailedException - if the file could not be set
removeFile
void removeFile() throws OperationFailedException
- Deprecated. use Resource.removeResource()
- Removes file contained within this component.
- Throws:
- OperationFailedException - if an error occurred removing the file.
Tree PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD