@Deprecated public class JCRResource extends Object implements ModifiableResource
Modifier and Type | Field and Description |
---|---|
private boolean |
_lockAlreadyChecked
Deprecated.
|
private Node |
_node
Deprecated.
|
Constructor and Description |
---|
JCRResource(Node node)
Deprecated.
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
_checkLock()
Deprecated.
Check if the node is locked
|
String |
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 metadata
|
void |
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.
|
private boolean _lockAlreadyChecked
public JCRResource(Node node)
node
- the nt:resource Nodepublic Node getNode()
public void rename(String newName) throws AmetysRepositoryException
ModifiableResource
rename
in interface ModifiableResource
newName
- the new nameAmetysRepositoryException
- if an error occurs.public String getEncoding() throws AmetysRepositoryException
Resource
getEncoding
in interface Resource
null
if not available.AmetysRepositoryException
- if an error occurs.public InputStream getInputStream() throws AmetysRepositoryException
Resource
getInputStream
in interface Resource
AmetysRepositoryException
- if an error occurs.public Date getLastModified() throws AmetysRepositoryException
Resource
getLastModified
in interface Resource
AmetysRepositoryException
- if an error occurs.public long getLength() throws AmetysRepositoryException
Resource
getLength
in interface Resource
AmetysRepositoryException
- if an error occurs.public String getMimeType() throws AmetysRepositoryException
Resource
getMimeType
in interface Resource
AmetysRepositoryException
- if an error occurs.public void setEncoding(String encoding) throws AmetysRepositoryException
ModifiableResource
setEncoding
in interface ModifiableResource
encoding
- the encoding of the data stream.AmetysRepositoryException
- if an error occurs.public void setInputStream(InputStream stream) throws AmetysRepositoryException
ModifiableResource
setInputStream
in interface ModifiableResource
stream
- the data stream.AmetysRepositoryException
- if an error occurs.public void setLastModified(Date lastModifiedDate) throws AmetysRepositoryException
ModifiableResource
setLastModified
in interface ModifiableResource
lastModifiedDate
- the last modification date.AmetysRepositoryException
- if an error occurs.public void setMimeType(String mimeType) throws AmetysRepositoryException
ModifiableResource
setMimeType
in interface ModifiableResource
mimeType
- the mime type of the data.AmetysRepositoryException
- if an error occurs.public OutputStream getOutputStream() throws AmetysRepositoryException
ModifiableResource
getOutputStream
in interface ModifiableResource
AmetysRepositoryException
- if an error occurs.protected void _checkLock() throws RepositoryException
RepositoryException
- if an error occurred