Class JCRRichText
- java.lang.Object
-
- org.ametys.plugins.repository.metadata.jcr.JCRResource
-
- org.ametys.plugins.repository.metadata.jcr.JCRRichText
-
- All Implemented Interfaces:
ModifiableResource,ModifiableRichText,Resource,RichText
@Deprecated public class JCRRichText extends JCRResource implements ModifiableRichText
Deprecated.Use org.ametys.cms.data.RichText insteadJCR implementation of aRichText, based on the ametys:richText nodetype.
-
-
Field Summary
Fields Modifier and Type Field Description private static String_ANNOTATIONS_NODE_NAMEDeprecated.The annotations node name.private AmetysObjectResolver_resolverDeprecated.private Node_rootDataNodeDeprecated.
-
Constructor Summary
Constructors Constructor Description JCRRichText(Node node, AmetysObjectResolver resolver)Deprecated.Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAnnotation(String name, String value)Deprecated.Add a value to a semantic annotationvoidaddAnnotation(String name, String[] values)Deprecated.Add values to a semantic annotationModifiableFoldergetAdditionalDataFolder()Deprecated.Returns the Folder holding additional data.
Its internal organization is application dependant.String[]getAnnotationNames()Deprecated.Get the content annotation names.protected ModifiableCompositeMetadatagetAnnotationsNode(boolean createNew)Deprecated.Get the annotations container node.String[]getAnnotationValues(String name)Deprecated.Get the values of a given annotation.voidremoveAnnotation(String name)Deprecated.Remove a given semantic annotationvoidremoveAnnotations()Deprecated.Return all semantic annotations-
Methods inherited from class org.ametys.plugins.repository.metadata.jcr.JCRResource
_checkLock, getEncoding, getInputStream, getLastModified, getLength, getMimeType, getNode, getOutputStream, rename, setEncoding, setInputStream, setLastModified, setMimeType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableResource
getOutputStream, rename, setEncoding, setInputStream, setLastModified, setMimeType
-
Methods inherited from interface org.ametys.plugins.repository.metadata.Resource
getEncoding, getInputStream, getLastModified, getLength, getMimeType
-
-
-
-
Field Detail
-
_ANNOTATIONS_NODE_NAME
private static final String _ANNOTATIONS_NODE_NAME
Deprecated.The annotations node name.- See Also:
- Constant Field Values
-
_rootDataNode
private Node _rootDataNode
Deprecated.
-
_resolver
private AmetysObjectResolver _resolver
Deprecated.
-
-
Constructor Detail
-
JCRRichText
public JCRRichText(Node node, AmetysObjectResolver resolver) throws AmetysRepositoryException
Deprecated.Constructor- Parameters:
node- the JCR Node backing thisJCRRichTextresolver- The resolver, used to resolve object collections.- Throws:
AmetysRepositoryException- if an error occurs
-
-
Method Detail
-
getAdditionalDataFolder
public ModifiableFolder getAdditionalDataFolder()
Deprecated.Description copied from interface:ModifiableRichTextReturns the Folder holding additional data.
Its internal organization is application dependant.- Specified by:
getAdditionalDataFolderin interfaceModifiableRichText- Specified by:
getAdditionalDataFolderin interfaceRichText- Returns:
- the Folder holding additional data
-
getAnnotationNames
public String[] getAnnotationNames() throws AmetysRepositoryException
Deprecated.Description copied from interface:RichTextGet the content annotation names.- Specified by:
getAnnotationNamesin interfaceRichText- Returns:
- the annotation names.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getAnnotationValues
public String[] getAnnotationValues(String name) throws AmetysRepositoryException
Deprecated.Description copied from interface:RichTextGet the values of a given annotation.- Specified by:
getAnnotationValuesin interfaceRichText- Parameters:
name- The name of the annotation.- Returns:
- The annotation values.
- Throws:
AmetysRepositoryException- if an error occurs.
-
addAnnotation
public void addAnnotation(String name, String value) throws AmetysRepositoryException
Deprecated.Description copied from interface:ModifiableRichTextAdd a value to a semantic annotation- Specified by:
addAnnotationin interfaceModifiableRichText- Parameters:
name- The name of the annotationvalue- The value to append- Throws:
AmetysRepositoryException- if an error occurs.
-
addAnnotation
public void addAnnotation(String name, String[] values) throws AmetysRepositoryException
Deprecated.Description copied from interface:ModifiableRichTextAdd values to a semantic annotation- Specified by:
addAnnotationin interfaceModifiableRichText- Parameters:
name- The name of the annotationvalues- The values to append- Throws:
AmetysRepositoryException- if an error occurs.
-
removeAnnotations
public void removeAnnotations() throws AmetysRepositoryException
Deprecated.Description copied from interface:ModifiableRichTextReturn all semantic annotations- Specified by:
removeAnnotationsin interfaceModifiableRichText- Throws:
AmetysRepositoryException- if an error occurs.
-
removeAnnotation
public void removeAnnotation(String name) throws AmetysRepositoryException
Deprecated.Description copied from interface:ModifiableRichTextRemove a given semantic annotation- Specified by:
removeAnnotationin interfaceModifiableRichText- Parameters:
name- The name of the semantic association to remove- Throws:
AmetysRepositoryException- if an error occurs.
-
getAnnotationsNode
protected ModifiableCompositeMetadata getAnnotationsNode(boolean createNew) throws UnknownMetadataException, AmetysRepositoryException
Deprecated.Get the annotations container node.- Parameters:
createNew-trueto create the node if it doesn't exist,falseotherwise.- Returns:
- The annotation container node.
- Throws:
UnknownMetadataException- If the node doesn't exist and createNew is false.AmetysRepositoryException- If a repository error occurs.
-
-