public class JCRRichText extends JCRResource implements ModifiableRichText
RichText, based on the ametys:richText nodetype.| Modifier and Type | Field and Description |
|---|---|
private static String |
_ANNOTATIONS_NODE_NAME
The annotations node name.
|
private boolean |
_lockAlreadyChecked |
private AmetysObjectResolver |
_resolver |
private Node |
_rootDataNode |
| Constructor and Description |
|---|
JCRRichText(Node node,
AmetysObjectResolver resolver)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
private void |
_checkLock() |
void |
addAnnotation(String name,
String value)
Add a value to a semantic annotation
|
void |
addAnnotation(String name,
String[] values)
Add values to a semantic annotation
|
ModifiableFolder |
getAdditionalDataFolder()
Returns the Folder holding additional data.
Its internal organization is application dependant. |
String[] |
getAnnotationNames()
Get the content annotation names.
|
protected ModifiableCompositeMetadata |
getAnnotationsNode(boolean createNew)
Get the annotations container node.
|
String[] |
getAnnotationValues(String name)
Get the values of a given annotation.
|
void |
removeAnnotation(String name)
Remove a given semantic annotation
|
void |
removeAnnotations()
Return all semantic annotations
|
getEncoding, getInputStream, getLastModified, getLength, getMimeType, getNode, getOutputStream, rename, setEncoding, setInputStream, setLastModified, setMimeTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOutputStream, rename, setEncoding, setInputStream, setLastModified, setMimeTypegetEncoding, getInputStream, getLastModified, getLength, getMimeTypeprivate static final String _ANNOTATIONS_NODE_NAME
private Node _rootDataNode
private AmetysObjectResolver _resolver
private boolean _lockAlreadyChecked
public JCRRichText(Node node, AmetysObjectResolver resolver) throws AmetysRepositoryException
node - the JCR Node backing this JCRRichTextresolver - The resolver, used to resolve object collections.AmetysRepositoryException - if an error occurspublic ModifiableFolder getAdditionalDataFolder()
ModifiableRichTextgetAdditionalDataFolder in interface ModifiableRichTextgetAdditionalDataFolder in interface RichTextpublic String[] getAnnotationNames() throws AmetysRepositoryException
RichTextgetAnnotationNames in interface RichTextAmetysRepositoryException - if an error occurs.public String[] getAnnotationValues(String name) throws AmetysRepositoryException
RichTextgetAnnotationValues in interface RichTextname - The name of the annotation.AmetysRepositoryException - if an error occurs.public void addAnnotation(String name, String value) throws AmetysRepositoryException
ModifiableRichTextaddAnnotation in interface ModifiableRichTextname - The name of the annotationvalue - The value to appendAmetysRepositoryException - if an error occurs.public void addAnnotation(String name, String[] values) throws AmetysRepositoryException
ModifiableRichTextaddAnnotation in interface ModifiableRichTextname - The name of the annotationvalues - The values to appendAmetysRepositoryException - if an error occurs.public void removeAnnotations() throws AmetysRepositoryException
ModifiableRichTextremoveAnnotations in interface ModifiableRichTextAmetysRepositoryException - if an error occurs.public void removeAnnotation(String name) throws AmetysRepositoryException
ModifiableRichTextremoveAnnotation in interface ModifiableRichTextname - The name of the semantic association to removeAmetysRepositoryException - if an error occurs.protected ModifiableCompositeMetadata getAnnotationsNode(boolean createNew) throws UnknownMetadataException, AmetysRepositoryException
createNew - true to create the node if it doesn't exist, false otherwise.UnknownMetadataException - If the node doesn't exist and createNew is false.AmetysRepositoryException - If a repository error occurs.private void _checkLock() throws RepositoryException
RepositoryException