| Modifier and Type | Field and Description | 
|---|---|
private static String | 
__ATTACHMENT_CONTENT_IDENTIFIER  | 
private static String | 
__RICH_TEXT_ENCODING  | 
private static String | 
__RICH_TEXT_MIME_TYPE  | 
protected Map<String,NamedResource> | 
_addedAttachments
the files contained in the rich text 
 | 
protected Map<String,List<String>> | 
_annotations
the rich text's annotations 
 | 
protected Map<String,NamedResource> | 
_attachments
the files contained in the rich text 
 | 
protected RepositoryData | 
_folderData
The resource's repository data 
 | 
protected Collection<String> | 
_removedAttachments
the files contained in the rich text 
 | 
_buffer, _encoding, _lastModificationDate, _mimeType, _repositoryData, _tmpFile| Constructor and Description | 
|---|
RichText()
Default constructor 
 | 
RichText(RepositoryData richTextData,
        RepositoryData folderData)
Constructor to use when reading the rich text from the repository 
 | 
| Modifier and Type | Method and Description | 
|---|---|
private NamedResource | 
_getAttachmentFromFolderData(String filename)  | 
private List<NamedResource> | 
_getAttachmentsFromFolderData()  | 
void | 
addAnnotations(String name,
              String... values)
Add annotations to the rich text 
 | 
void | 
addAttachment(NamedResource attachment)
Adds an attachment to the rich text 
 | 
Collection<NamedResource> | 
getAddedAttachments()
Retrieves the attachments that have been added to the rich text 
 | 
Map<String,List<String>> | 
getAllAnnotations()
Retrieves the rich text's annotations 
 | 
List<String> | 
getAnnotations(String name)
Retrieves the rich text's annotations of the given name 
 | 
NamedResource | 
getAttachment(String filename)
Retrieves the rich text's attachment with the given name, or  
null if there is no such attachment | 
Collection<String> | 
getAttachmentNames()
Retrieves the names of the rich text's attachments 
 | 
Collection<NamedResource> | 
getAttachments()
Retrieves the rich text's attachments 
 | 
String | 
getEncoding()
Retrieves the encoding of the resource's data 
 | 
String | 
getMimeType()
Retrieves the mime type of the resource's data 
 | 
Collection<String> | 
getRemovedAttachments()
Retrieves the names of the removed attachments of the rich text 
 | 
boolean | 
hasAttachment(String filename)
Checks if the rich text has an attachment with the given name 
 | 
void | 
removeAllAnnotations()
Removes all rich text's annotations 
 | 
void | 
removeAnnotations(String name)
Removes the rich text's annotations of the given name 
 | 
void | 
removeAttachment(String filename)
Remove an attachment from the rich text 
 | 
void | 
removeAttachments()
Remove all the attachments from the rich text 
 | 
void | 
setEncoding(String encoding)
Sets the encoding of the resource's data 
 | 
void | 
setMimeType(String mimeType)
Sets the mime type of the resource's data 
 | 
closeOutputStream, getInputStream, getLastModificationDate, getLength, getOutputStream, setInputStream, setLastModificationDateprivate static final String __ATTACHMENT_CONTENT_IDENTIFIER
private static final String __RICH_TEXT_MIME_TYPE
private static final String __RICH_TEXT_ENCODING
protected Map<String,List<String>> _annotations
protected RepositoryData _folderData
protected Map<String,NamedResource> _attachments
protected Map<String,NamedResource> _addedAttachments
protected Collection<String> _removedAttachments
public RichText()
public RichText(RepositoryData richTextData, RepositoryData folderData)
richTextData - the repository data containing the rich text's datafolderData - the repository data containing the folder's datapublic String getMimeType()
ResourcegetMimeType in class Resourcepublic void setMimeType(String mimeType)
ResourcesetMimeType in class ResourcemimeType - the mime type to setpublic String getEncoding()
ResourcegetEncoding in class Resourcepublic void setEncoding(String encoding)
ResourcesetEncoding in class Resourceencoding - the encoding to setpublic Map<String,List<String>> getAllAnnotations()
public List<String> getAnnotations(String name)
name - the name of the annotations to retrievepublic void addAnnotations(String name, String... values)
name - the name of the annotations to addvalues - annotations to addpublic void removeAllAnnotations()
public void removeAnnotations(String name)
name - the name of the annotations to removepublic Collection<String> getAttachmentNames()
public Collection<NamedResource> getAttachments()
private List<NamedResource> _getAttachmentsFromFolderData()
public Collection<NamedResource> getAddedAttachments()
public Collection<String> getRemovedAttachments()
public boolean hasAttachment(String filename)
filename - the name of the attachmenttrue if the rich text has an attachment with the given name, false otherwisepublic NamedResource getAttachment(String filename)
null if there is no such attachmentfilename - the name of the attachment to retrieveprivate NamedResource _getAttachmentFromFolderData(String filename)
public void addAttachment(NamedResource attachment)
attachment - the attachment to addpublic void removeAttachment(String filename)
filename - the name of the attachment to removepublic void removeAttachments()