public class NodeRepositoryFileDataTransformer extends Object implements ITransformer<NodeRepositoryFileData>
Constructor and Description |
---|
NodeRepositoryFileDataTransformer() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(String contentType,
Class<? extends IRepositoryFileData> clazz)
Returns
true if this transformer can read data for files with the given content type and return the
data in the given form. |
boolean |
canWrite(Class<? extends IRepositoryFileData> clazz)
Returns
true if this transformer can write data of the form clazz . |
void |
createContentNode(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
NodeRepositoryFileData data,
javax.jcr.Node fileNode)
Creates a JCR node subtree representing the given
content . |
protected void |
createOrUpdateContentNode(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
NodeRepositoryFileData data,
javax.jcr.Node fileNode) |
NodeRepositoryFileData |
fromContentNode(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
javax.jcr.Node fileNode)
Transforms a JCR node subtree into an
IRepositoryFileData . |
String |
getContentType()
Returns the content type string for this transformer.
|
protected void |
internalCreateOrUpdate(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
javax.jcr.Node jcrParentNode,
DataNode dataNode) |
protected DataNode |
internalRead(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
javax.jcr.Node jcrNode,
DataNode parentDataNode) |
void |
updateContentNode(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
NodeRepositoryFileData data,
javax.jcr.Node fileNode)
Updates a JCR node subtree representing the given
content . |
protected void createOrUpdateContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, NodeRepositoryFileData data, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void createContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, NodeRepositoryFileData data, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
ITransformer
content
.createContentNode
in interface ITransformer<NodeRepositoryFileData>
session
- JCR sessionpentahoJcrConstants
- constantsdata
- data to createfileNode
- node of type pho_nt:pentahoFile or pho_nt:pentahoLinkedFilejavax.jcr.RepositoryException
- if anything goes wrongprotected void internalCreateOrUpdate(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.Node jcrParentNode, DataNode dataNode) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public NodeRepositoryFileData fromContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
ITransformer
IRepositoryFileData
.fromContentNode
in interface ITransformer<NodeRepositoryFileData>
session
- JCR sessionpentahoJcrConstants
- constantsfileNode
- node of type pho_nt:pentahoFile or pho_nt:pentahoLinkedFileIRepositoryFileData
instancejavax.jcr.RepositoryException
- if anything goes wrongprotected DataNode internalRead(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.Node jcrNode, DataNode parentDataNode) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public boolean canRead(String contentType, Class<? extends IRepositoryFileData> clazz)
true
if this transformer can read data for files with the given content type and return the
data in the given form.canRead
in interface ITransformer<NodeRepositoryFileData>
contentType
- content type to checkclazz
- class to checktrue
if this transformer can read data for files with the given content type and return the
data in the given formpublic boolean canWrite(Class<? extends IRepositoryFileData> clazz)
true
if this transformer can write data of the form clazz
.canWrite
in interface ITransformer<NodeRepositoryFileData>
clazz
- class to checktrue
if this transformer can write data of the form clazz
public String getContentType()
getContentType
in interface ITransformer<NodeRepositoryFileData>
public void updateContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, NodeRepositoryFileData data, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
ITransformer
content
.updateContentNode
in interface ITransformer<NodeRepositoryFileData>
session
- JCR sessionpentahoJcrConstants
- constantsdata
- data to updatefileNode
- node of type pho_nt:pentahoFile or pho_nt:pentahoLinkedFilejavax.jcr.RepositoryException
- if anything goes wrongCopyright © 2017 Hitachi Vantara. All rights reserved.