|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represents a HTML component that exists in the Component Library.
A LibraryHTMLComponent is a LibraryComponent and
must be stored as a separate entity in the repository.
A LibraryHTMLComponent can contain HTML. This interface provides
methods to retrieve and set the HTML contained within this component.
LibraryComponent| Field Summary | |
static java.lang.String |
COPYRIGHT
Copyright statement |
| Method Summary | |
java.lang.String |
getHTML()
Returns the HTML contained in this component as a String. |
void |
setHTML(java.lang.String p_html)
Sets the HTML contained in this LibraryHTMLComponent from the
specified p_html argument. |
void |
setHTML(java.lang.String p_html,
EmbeddedImageMap p_images)
Sets the HTML contained in this LibraryHTMLComponent from the
specified p_html argument that contains embedded images. |
| Methods inherited from interface com.ibm.workplace.wcm.api.EditableLibraryComponent |
addAuthors, addDeleteAccessMembers, addEditAccessMembers, addLiveAccessMembers, addOwners, addReadAccessMembers, isChanged, removeAuthors, removeDeleteAccessMembers, removeEditAccessMembers, removeLiveAccessMembers, removeOwners, removeReadAccessMembers, setDescription, setName |
| Methods inherited from interface com.ibm.workplace.wcm.api.Document |
getAuthors, getDeleteAccessMembers, getDescription, getEditAccessMembers, getId, getLiveAccessMembers, getName, getOwners, getReadAccessMembers |
| Field Detail |
public static final java.lang.String COPYRIGHT
| Method Detail |
public java.lang.String getHTML()
String.
Returns an empty String if the HTML could not be retrieved.
public void setHTML(java.lang.String p_html)
throws OperationFailedException
LibraryHTMLComponent from the
specified p_html argument.
Note. This method replaces any existing HTML in this component. It does not append to existing HTML. Existing images will be removed, new images will be added.
p_html - the HTML
OperationFailedException - if the string argument is null or the
HTML could not be set
public void setHTML(java.lang.String p_html,
EmbeddedImageMap p_images)
throws OperationFailedException
LibraryHTMLComponent from the
specified p_html argument that contains embedded images. The URL from
the src attribute of the img tag must have a corresponding
entry in an EmbeddedImageMap object that you add
via the addImage method.
A WCM resource is created for the image when you save the workspace
The src attribute in the img tag will be
replaced by a WCM resource's url. If the same URL appears in the
HTML more than once, the same WCM resource will be used.
Note. This method replaces any existing HTML in this component. It does not append to existing HTML. Existing images will be removed, new images will be added.
Example code:
File file = new File("C:/example/image.jpg");
EmbeddedImageMap embeddedImage = new EmbeddedImageMap();
embeddedImage.addImage("c:/example/image.jpg", file);
// Set HTML
libHtmlComponent.setHTML(html, embeddedImage);
p_html - the HTMLp_images - a map of URLs to images
OperationFailedException - if the string argument is null or the
HTML could not be set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||