com.ibm.workplace.wcm.api
Interface LibraryImageComponent
- All Superinterfaces:
- DigitalAsset, Document, Editable, EditableItem, EditableLibraryComponent, Hierarchical, Item, LibraryComponent, Localized, RenditionCapability, Resource, WCMApiObject, WorkflowedDocument
public interface LibraryImageComponent
- extends EditableLibraryComponent, DigitalAsset, Resource, RenditionCapability
Represents an Image component that exists in the Component Library.
A ImageComponent
is a ContentComponent
and
cannot be stored as a separate entity in the repository.
A LibraryImageComponent
can contain one image. The contents of the
image file are dealt with as raw byte content. This interface provides methods
to manipulate the image file and the attributes to use when displaying the image.
note: since v6.0.0
, a LibraryComponent
is
referred to as a "Component" in the Authoring UI.
- See Also:
LibraryComponent
Methods inherited from interface com.ibm.workplace.wcm.api.Editable |
addAuthors, addCategoryIds, addContributorAccessMembers, addDeleteAccessMembers, addEditAccessMembers, addEditorAccessMembers, addHistoryLogEntry, addLiveAccessMembers, addManagerAccessMembers, addMembersForAccess, addOwners, addReadAccessMembers, addUserAccessMembers, isChanged, removeAuthors, removeCategoryIds, removeContributorAccessMembers, removeDeleteAccessMembers, removeEditAccessMembers, removeEditorAccessMembers, removeLiveAccessMembers, removeManagerAccessMembers, removeMembersForAccess, removeOwners, removeReadAccessMembers, removeUserAccessMembers, setContributorAccessInheritance, setDescriptionTextProviderKey, setDescriptionTextProviderName, setEditorAccessInheritance, setInheritance, setKeywords, setManagerAccessInheritance, setPropagation, setTitleTextProviderKey, setTitleTextProviderName, setUserAccessInheritance |
Methods inherited from interface com.ibm.workplace.wcm.api.Document |
getAuthors, getCategoryIds, getContributorAccessMembers, getCreator, getDeleteAccessMembers, getDescription, getDescriptionTextProviderKey, getDescriptionTextProviderName, getEditAccessMembers, getEditorAccessMembers, getHistoryLog, getId, getInheritedContributorAccessMembers, getInheritedEditorAccessMembers, getInheritedManagerAccessMembers, getInheritedUserAccessMembers, getKeywords, getLastModifier, getLiveAccessMembers, getManagerAccessMembers, getMembersForAccess, getMembersForInheritedAccess, getOwnerLibrary, getOwners, getProject, getReadAccessMembers, getSourceWorkspace, getTitle, getTitleTextProviderKey, getTitleTextProviderName, getUserAccessMembers, getVersionCatalog, getVersionStrategy, hasDeleteAccess, hasDeleteAccess, hasEditAccess, hasEditAccess, hasLiveAccess, hasLiveAccess, hasProfile, hasProject, hasReadAccess, hasReadAccess, isContributorAccessInherited, isEditorAccessInherited, isInherited, isManagerAccessInherited, isNew, isPropagated, isUserAccessInherited, isWorkflowed |
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.Resource |
getBytes, getInputStream, getMimeType, getResourceName, getResourceURL, getSize, removeResource, setDeliverableOverCachingNetworkSupport, setResource, setResource, supportsDeliveryOverCachingNetwork |
getImage
byte[] getImage()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- Deprecated. use getImageStream() instead
- Returns the contents of the image file contained within this component
as a byte array.
Returns an empty byte array if an image file has not been specified or
the byte content could not be retrieved.
- Returns:
- the image file content as a byte array
- Throws:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the user does not have access to
the image
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- if the image cannot be retrieved or is externally managed
getImageStream
java.io.InputStream getImageStream()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- Deprecated. use
Resource.getInputStream()
- Returns the contents of the image file contained within this component
as a input stream
Returns an empty byte array if an image file has not been specified or
the byte content could not be retrieved.
- Returns:
- the image file content as a input stream
- Throws:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the user does not have access to
the image
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- if the image cannot be retrieved or is externally managed
getImageFileName
java.lang.String getImageFileName()
throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- Deprecated. use
Resource.getResourceName()
- Returns the filename of the image file contained within this
component.
Returns null if an image file has not been set.
- Returns:
- the filename of the image
- Throws:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the user does not have access
to the image
com.ibm.workplace.wcm.api.exceptions.PropertyRetrievalException
- if the image cannot be retrieved
setImage
void setImage(java.lang.String imageFileName,
byte[] image)
throws com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- Deprecated. use
Resource.setResource(String, byte[])
- Sets the image 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:
imageFileName
- the filename of the image fileimage
- the content of the image file as a byte array
- Throws:
java.lang.NullPointerException
- if either of the arguments imageFileName or
image are null
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if the image file could not be set
setImage
void setImage(java.lang.String imageFileName,
java.io.File image)
throws com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- Deprecated. use
Resource.setResource(String, File)
- Sets the image 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:
imageFileName
- the filename of the image fileimage
- the content of the image file as a file
- Throws:
java.lang.NullPointerException
- if either of the arguments imageFileName or
image are null
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if the image file could not be set
removeImage
void removeImage()
throws com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- Deprecated. use
Resource.removeResource()
- Removes the image file contained within this component.
- Throws:
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if an error occurred removing the file.
getBorder
java.lang.String getBorder()
- Returns the border attribute of the image.
Returns
null
if a border value has not been set, otherwise
the border attribute will be returned.
- Returns:
- the border
setBorder
void setBorder(java.lang.String border)
throws com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- Sets the image border.
If the string argument passed in to this method cannot be converted to an
integer, an exception is thrown.
This method will automatically convert a null argument to the
string "0".
- Parameters:
border
- the image border
- Throws:
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if the string argument cannot be converted to
an integer or the border could not be set to the specified value
getAltText
java.lang.String getAltText()
- Returns the alternate text for the image.
Returns null if alternate text has not been set or the alternate
text value has specifically been set to null.
- Returns:
- the alternate text
setAltText
void setAltText(java.lang.String altText)
- Sets the alternate text of the image.
If a null argument is passed in to this method
getAltText()
will return null.
- Parameters:
altText
- the alternate text
getHTMLNameTag
java.lang.String getHTMLNameTag()
- Returns the HTML tag name of the image.
Returns null if the HTML tag name has not been specified or the
HTML tag name has specifically been set to null.
- Returns:
- the name in the image tag
setHTMLNameTag
void setHTMLNameTag(java.lang.String name)
- Sets the HTML tag name of the image.
Set the HTML tag name of the image to refer to the image using
JavaScript™.
If a null argument is passed in to this method
getHTMLNameTag()
will return null.
- Parameters:
name
- the HTML tag name of the image
getWidth
java.lang.String getWidth()
- Returns the width of the image. This is the width of the image
when it is displayed.
Returns null if the width has not been set or the
width value has specifically been set to null.
- Returns:
- the image width
setWidth
void setWidth(java.lang.String width)
throws com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- Sets the width of the image. This is the width of the image when it is
displayed.
If the string argument passed in to this method cannot be converted to an
integer, an exception is thrown.
If a null argument is passed in to this method
getWidth()
will return null.
- Parameters:
width
- the image width.
- Throws:
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if the string argument cannot be converted to
an integer or the width could not be set to the specified value
getHeight
java.lang.String getHeight()
- Returns the height of the image. This is the height of the image when
it is displayed.
Returns null if the height has not been set or the
height has specifically been set to null.
- Returns:
- the height
setHeight
void setHeight(java.lang.String height)
throws com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- Sets the image height. This is the height of the image when it is displayed.
If the string argument passed in to this method cannot be converted to an
integer, an exception is thrown.
If a null argument is passed in to this method
getHeight()
will return null.
- Parameters:
height
- the image height
- Throws:
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if the string argument cannot be converted to
an integer or the height could not be set to the specified value