Class JCRResource
java.lang.Object
org.ametys.plugins.repository.metadata.jcr.JCRResource
- All Implemented Interfaces:
ModifiableResource
,Resource
- Direct Known Subclasses:
JCRBinaryMetadata
,JCRRichText
Deprecated.
Use org.ametys.cms.data.Resource instead
Java binding of a nt:resource JCR Node
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Deprecated.Check if the node is lockedDeprecated.Returns the encoding if the data stream, if it is a character stream.Deprecated.Returns the data stream.Deprecated.Returns the last modification date.long
Deprecated.Returns the length of the data stream.Deprecated.Returns the data mime-type.javax.jcr.Node
getNode()
Deprecated.Retrieves the underlying node.Deprecated.Returns an OuputStream to write the data stream.void
Deprecated.Rename the current metadatavoid
setEncoding
(String encoding) Deprecated.Set the encoding if the data stream, if it is a character stream.void
setInputStream
(InputStream stream) Deprecated.Set the data stream.void
setLastModified
(Date lastModifiedDate) Deprecated.Set the last modification date.void
setMimeType
(String mimeType) Deprecated.Set the mime type.
-
Constructor Details
-
JCRResource
Deprecated.Constructor- Parameters:
node
- the nt:resource Node
-
-
Method Details
-
getNode
Deprecated.Retrieves the underlying node.- Returns:
- the underlying node.
-
rename
Deprecated.Description copied from interface:ModifiableResource
Rename the current metadata- Specified by:
rename
in interfaceModifiableResource
- Parameters:
newName
- the new name- Throws:
AmetysRepositoryException
- if an error occurs.
-
getEncoding
Deprecated.Description copied from interface:Resource
Returns the encoding if the data stream, if it is a character stream.- Specified by:
getEncoding
in interfaceResource
- Returns:
- the encoding if the data stream or
null
if not available. - Throws:
AmetysRepositoryException
- if an error occurs.
-
getInputStream
Deprecated.Description copied from interface:Resource
Returns the data stream.- Specified by:
getInputStream
in interfaceResource
- Returns:
- the data stream.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLastModified
Deprecated.Description copied from interface:Resource
Returns the last modification date.- Specified by:
getLastModified
in interfaceResource
- Returns:
- the last modification date.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLength
Deprecated.Description copied from interface:Resource
Returns the length of the data stream.- Specified by:
getLength
in interfaceResource
- Returns:
- the length of the data stream.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getMimeType
Deprecated.Description copied from interface:Resource
Returns the data mime-type.- Specified by:
getMimeType
in interfaceResource
- Returns:
- the data mime-type.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setEncoding
Deprecated.Description copied from interface:ModifiableResource
Set the encoding if the data stream, if it is a character stream.- Specified by:
setEncoding
in interfaceModifiableResource
- Parameters:
encoding
- the encoding of the data stream.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setInputStream
Deprecated.Description copied from interface:ModifiableResource
Set the data stream.- Specified by:
setInputStream
in interfaceModifiableResource
- Parameters:
stream
- the data stream.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setLastModified
Deprecated.Description copied from interface:ModifiableResource
Set the last modification date.- Specified by:
setLastModified
in interfaceModifiableResource
- Parameters:
lastModifiedDate
- the last modification date.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setMimeType
Deprecated.Description copied from interface:ModifiableResource
Set the mime type.- Specified by:
setMimeType
in interfaceModifiableResource
- Parameters:
mimeType
- the mime type of the data.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getOutputStream
Deprecated.Description copied from interface:ModifiableResource
Returns an OuputStream to write the data stream.- Specified by:
getOutputStream
in interfaceModifiableResource
- Returns:
- an OuputStream to write the data stream.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
_checkLock
Deprecated.Check if the node is locked- Throws:
javax.jcr.RepositoryException
- if an error occurred
-