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 lockedStringgetEncoding()Deprecated.Returns the encoding if the data stream, if it is a character stream.InputStreamgetInputStream()Deprecated.Returns the data stream.DategetLastModified()Deprecated.Returns the last modification date.longgetLength()Deprecated.Returns the length of the data stream.StringgetMimeType()Deprecated.Returns the data mime-type.NodegetNode()Deprecated.Retrieves the underlying node.OutputStreamgetOutputStream()Deprecated.Returns an OuputStream to write the data stream.voidrename(String newName)Deprecated.Rename the current metadatavoidsetEncoding(String encoding)Deprecated.Set the encoding if the data stream, if it is a character stream.voidsetInputStream(InputStream stream)Deprecated.Set the data stream.voidsetLastModified(Date lastModifiedDate)Deprecated.Set the last modification date.voidsetMimeType(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:ModifiableResourceRename the current metadata- Specified by:
renamein interfaceModifiableResource- Parameters:
newName- the new name- Throws:
AmetysRepositoryException- if an error occurs.
-
getEncoding
public String getEncoding() throws AmetysRepositoryException
Deprecated.Description copied from interface:ResourceReturns the encoding if the data stream, if it is a character stream.- Specified by:
getEncodingin interfaceResource- Returns:
- the encoding if the data stream or
nullif not available. - Throws:
AmetysRepositoryException- if an error occurs.
-
getInputStream
public InputStream getInputStream() throws AmetysRepositoryException
Deprecated.Description copied from interface:ResourceReturns the data stream.- Specified by:
getInputStreamin interfaceResource- Returns:
- the data stream.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getLastModified
public Date getLastModified() throws AmetysRepositoryException
Deprecated.Description copied from interface:ResourceReturns the last modification date.- Specified by:
getLastModifiedin interfaceResource- Returns:
- the last modification date.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getLength
public long getLength() throws AmetysRepositoryException
Deprecated.Description copied from interface:ResourceReturns the length of the data stream.- Specified by:
getLengthin 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:ResourceReturns the data mime-type.- Specified by:
getMimeTypein 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:ModifiableResourceSet the encoding if the data stream, if it is a character stream.- Specified by:
setEncodingin 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:ModifiableResourceSet the data stream.- Specified by:
setInputStreamin 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:ModifiableResourceSet the last modification date.- Specified by:
setLastModifiedin 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:ModifiableResourceSet the mime type.- Specified by:
setMimeTypein 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:ModifiableResourceReturns an OuputStream to write the data stream.- Specified by:
getOutputStreamin 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
-
-