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_NAME
Deprecated.The annotations node name.private boolean
_lockAlreadyChecked
Deprecated.private AmetysObjectResolver
_resolver
Deprecated.private Node
_rootDataNode
Deprecated.
-
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 void
addAnnotation(String name, String value)
Deprecated.Add a value to a semantic annotationvoid
addAnnotation(String name, String[] values)
Deprecated.Add values to a semantic annotationModifiableFolder
getAdditionalDataFolder()
Deprecated.Returns the Folder holding additional data.
Its internal organization is application dependant.String[]
getAnnotationNames()
Deprecated.Get the content annotation names.protected ModifiableCompositeMetadata
getAnnotationsNode(boolean createNew)
Deprecated.Get the annotations container node.String[]
getAnnotationValues(String name)
Deprecated.Get the values of a given annotation.void
removeAnnotation(String name)
Deprecated.Remove a given semantic annotationvoid
removeAnnotations()
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.
-
_lockAlreadyChecked
private boolean _lockAlreadyChecked
Deprecated.
-
-
Constructor Detail
-
JCRRichText
public JCRRichText(Node node, AmetysObjectResolver resolver) throws AmetysRepositoryException
Deprecated.Constructor- Parameters:
node
- the JCR Node backing thisJCRRichText
resolver
- The resolver, used to resolve object collections.- Throws:
AmetysRepositoryException
- if an error occurs
-
-
Method Detail
-
getAdditionalDataFolder
public ModifiableFolder getAdditionalDataFolder()
Deprecated.Description copied from interface:ModifiableRichText
Returns the Folder holding additional data.
Its internal organization is application dependant.- Specified by:
getAdditionalDataFolder
in interfaceModifiableRichText
- Specified by:
getAdditionalDataFolder
in interfaceRichText
- Returns:
- the Folder holding additional data
-
getAnnotationNames
public String[] getAnnotationNames() throws AmetysRepositoryException
Deprecated.Description copied from interface:RichText
Get the content annotation names.- Specified by:
getAnnotationNames
in interfaceRichText
- Returns:
- the annotation names.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getAnnotationValues
public String[] getAnnotationValues(String name) throws AmetysRepositoryException
Deprecated.Description copied from interface:RichText
Get the values of a given annotation.- Specified by:
getAnnotationValues
in 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:ModifiableRichText
Add a value to a semantic annotation- Specified by:
addAnnotation
in 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:ModifiableRichText
Add values to a semantic annotation- Specified by:
addAnnotation
in 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:ModifiableRichText
Return all semantic annotations- Specified by:
removeAnnotations
in interfaceModifiableRichText
- Throws:
AmetysRepositoryException
- if an error occurs.
-
removeAnnotation
public void removeAnnotation(String name) throws AmetysRepositoryException
Deprecated.Description copied from interface:ModifiableRichText
Remove a given semantic annotation- Specified by:
removeAnnotation
in 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
-true
to create the node if it doesn't exist,false
otherwise.- Returns:
- The annotation container node.
- Throws:
UnknownMetadataException
- If the node doesn't exist and createNew is false.AmetysRepositoryException
- If a repository error occurs.
-
-