Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
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() instead
`java.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.Editable
`addAuthors, addContributorAccessMembers, addDeleteAccessMembers, addEditAccessMembers, addEditorAccessMembers, addHistoryLogEntry, addLiveAccessMembers, addManagerAccessMembers, addMembersForAccess, addOwners, addReadAccessMembers, addUserAccessMembers, isChanged, removeAuthors, removeContributorAccessMembers, removeDeleteAccessMembers, removeEditAccessMembers, removeEditorAccessMembers, removeLiveAccessMembers, removeManagerAccessMembers, removeMembersForAccess, removeOwners, removeReadAccessMembers, removeUserAccessMembers, setContributorAccessInheritance, setDescriptionTextProviderKey, setDescriptionTextProviderName, setEditorAccessInheritance, setInheritance, setManagerAccessInheritance, setPropagation, setTitleTextProviderKey, setTitleTextProviderName, setUserAccessInheritance`

Methods inherited from interface com.ibm.workplace.wcm.api.Document
`getAuthors, getContributorAccessMembers, getCreator, getDeleteAccessMembers, getDescription, getDescriptionTextProviderKey, getDescriptionTextProviderName, getEditAccessMembers, getEditorAccessMembers, getHistoryLog, getId, getInheritedContributorAccessMembers, getInheritedEditorAccessMembers, getInheritedManagerAccessMembers, getInheritedUserAccessMembers, getLastModifier, getLiveAccessMembers, getManagerAccessMembers, getMembersForAccess, getMembersForInheritedAccess, getOwnerLibrary, getOwners, getProject, getReadAccessMembers, getSourceWorkspace, getTitle, getTitleTextProviderKey, getTitleTextProviderName, getUserAccessMembers, getVersionCatalog, getVersionStrategy, hasDeleteAccess, hasDeleteAccess, hasEditAccess, hasEditAccess, hasLiveAccess, hasLiveAccess, hasProject, hasReadAccess, hasReadAccess, isContributorAccessInherited, isEditorAccessInherited, isInherited, isManagerAccessInherited, isNew, isPropagated, isUserAccessInherited, isWorkflowed`

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.WorkflowedDocument
`addAdditionalViewers, addApprovers, approve, cancelDraftDocument, clearApprovers, createDraftDocument, decline, decline, getAdditionalViewers, getCurrentApprovers, getDateEnteredStage, getEffectiveDate, getExpiryDate, getGeneralDateOne, getGeneralDateTwo, getPendingWorkflowStatus, getPublishedDate, getPublishedId, getWorkflowId, getWorkflowStageId, getWorkflowStatus, hasApproverAccess, hasApproverAccess, hasDraft, isDraft, isDraftOfPublishedDocument, isExpired, isPublished, isWorkflowMovingBackward, nextWorkflowStage, nextWorkflowStage, nextWorkflowStage, previousWorkflowStage, previousWorkflowStage, removeAdditionalViewers, removeApprovers, restartWorkflow, setEffectiveDate, setExpiryDate, setGeneralDateOne, setGeneralDateTwo, setWorkflowId, setWorkflowId`

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.

  Returns 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

  Returns 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.

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD