|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represents an Image component.
A ImageComponent is a ContentComponent and
cannot be stored as a separate entity in the repository.
A ImageComponent 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.
ContentComponent| Field Summary | |
static java.lang.String |
COPYRIGHT
Copyright statement |
| Method Summary | |
java.lang.String |
getAltText()
Returns the alternate text for the image. |
java.lang.String |
getBorder()
Returns the border attribute of the image. |
java.lang.String |
getHeight()
Returns the height of the image. |
byte[] |
getImage()
Returns the contents of the image file contained within this component as a byte array. |
java.lang.String |
getImageFileName()
Returns the filename of the image file contained within this component. |
java.lang.String |
getNameTag()
Returns the HTML tag name of the image. |
java.lang.String |
getWidth()
Returns the width of the image. |
void |
removeImage()
Removes the image file contained within this component. |
void |
setAltText(java.lang.String p_altText)
Sets the alternate text of the image. |
void |
setBorder(java.lang.String p_border)
Sets the image border. |
void |
setHeight(java.lang.String p_height)
Sets the image height. |
void |
setImage(java.lang.String imageFileName,
byte[] image)
Sets the image file contained within this component. |
void |
setNameTag(java.lang.String p_name)
Sets the HTML tag name of the image. |
void |
setWidth(java.lang.String p_width)
Sets the width of the image. |
| Methods inherited from interface com.ibm.workplace.wcm.api.ContentComponent |
getContainer, getName |
| Field Detail |
public static final java.lang.String COPYRIGHT
| Method Detail |
public byte[] getImage()
throws AuthorizationException,
PropertyRetrievalException
Returns an empty byte array if an image file has not been specified or the byte content could not be retrieved.
AuthorizationException - if the user does not have access to
the image
PropertyRetrievalException - if the image cannot be retrieved
public java.lang.String getImageFileName()
throws AuthorizationException,
PropertyRetrievalException
Returns null if an image file has not been set.
AuthorizationException - if the user does not have access
to the image
PropertyRetrievalException - if the image cannot be retrieved
public void setImage(java.lang.String imageFileName,
byte[] image)
throws OperationFailedException
This method does not accept null arguments. Passing a
null argument into this method will result in a
NullPointerException.
imageFileName - the filename of the image fileimage - the content of the image file as a byte array
java.lang.NullPointerException - if either of the arguments imageFileName or
image are null
OperationFailedException - if the image file could not be set
public void removeImage()
throws OperationFailedException
OperationFailedException - if the image file could not be removedpublic java.lang.String getBorder()
Returns null if a border value has not been set or the border value has specifically been set to null.
public void setBorder(java.lang.String p_border)
throws OperationFailedException
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".
p_border - the image border
OperationFailedException - if the string argument cannot be converted to
an integer or the border could not be set to the specified valuepublic java.lang.String getAltText()
Returns null if alternate text has not been set or the alternate text value has specifically been set to null.
public void setAltText(java.lang.String p_altText)
If a null argument is passed in to this method
getAltText() will return null.
p_altText - the alternate textpublic java.lang.String getNameTag()
public void setNameTag(java.lang.String p_name)
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
getNameTag() will return null.
p_name - the HTML tag name of the imagepublic java.lang.String getWidth()
Returns null if the width has not been set or the width value has specifically been set to null.
public void setWidth(java.lang.String p_width)
throws OperationFailedException
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.
p_width - the image width.
OperationFailedException - if the string argument cannot be converted to
an integer or the width could not be set to the specified valuepublic java.lang.String getHeight()
Returns null if the height has not been set or the height has specifically been set to null.
public void setHeight(java.lang.String p_height)
throws OperationFailedException
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.
p_height - the image height
OperationFailedException - if the string argument cannot be converted to
an integer or the height could not be set to the specified value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||