Class JCRResource
- java.lang.Object
-
- org.ametys.plugins.repository.metadata.jcr.JCRResource
-
- All Implemented Interfaces:
ModifiableResource
,Resource
- Direct Known Subclasses:
JCRBinaryMetadata
,JCRRichText
@Deprecated public class JCRResource extends Object implements ModifiableResource
Deprecated.Use org.ametys.cms.data.Resource insteadJava binding of a nt:resource JCR Node
-
-
Constructor Summary
Constructors Constructor Description JCRResource(Node node)
Deprecated.Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
_checkLock()
Deprecated.Check if the node is lockedString
getEncoding()
Deprecated.Returns the encoding if the data stream, if it is a character stream.InputStream
getInputStream()
Deprecated.Returns the data stream.Date
getLastModified()
Deprecated.Returns the last modification date.long
getLength()
Deprecated.Returns the length of the data stream.String
getMimeType()
Deprecated.Returns the data mime-type.Node
getNode()
Deprecated.Retrieves the underlying node.OutputStream
getOutputStream()
Deprecated.Returns an OuputStream to write the data stream.void
rename(String newName)
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 Detail
-
JCRResource
public JCRResource(Node node)
Deprecated.Constructor- Parameters:
node
- the nt:resource Node
-
-
Method Detail
-
getNode
public Node getNode()
Deprecated.Retrieves the underlying node.- Returns:
- the underlying node.
-
rename
public void rename(String newName) throws AmetysRepositoryException
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
public String getEncoding() throws AmetysRepositoryException
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
public InputStream getInputStream() throws AmetysRepositoryException
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
public Date getLastModified() throws AmetysRepositoryException
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
public long getLength() throws AmetysRepositoryException
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
public String getMimeType() throws AmetysRepositoryException
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
public void setEncoding(String encoding) throws AmetysRepositoryException
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
public void setInputStream(InputStream stream) throws AmetysRepositoryException
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
public void setLastModified(Date lastModifiedDate) throws AmetysRepositoryException
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
public void setMimeType(String mimeType) throws AmetysRepositoryException
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
public OutputStream getOutputStream() throws AmetysRepositoryException
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
protected void _checkLock() throws RepositoryException
Deprecated.Check if the node is locked- Throws:
RepositoryException
- if an error occurred
-
-