public class NodeRepositoryFileDataTransformer extends Object implements ITransformer<org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData>
Constructor and Description |
---|
NodeRepositoryFileDataTransformer() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(String contentType,
Class<? extends org.pentaho.platform.api.repository2.unified.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 org.pentaho.platform.api.repository2.unified.IRepositoryFileData> clazz)
Returns
true if this transformer can write data of the form clazz . |
void |
createContentNode(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData data,
javax.jcr.Node fileNode)
Creates a JCR node subtree representing the given
content . |
protected void |
createOrUpdateContentNode(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData data,
javax.jcr.Node fileNode) |
org.pentaho.platform.api.repository2.unified.data.node.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,
org.pentaho.platform.api.repository2.unified.data.node.DataNode dataNode) |
protected org.pentaho.platform.api.repository2.unified.data.node.DataNode |
internalRead(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
javax.jcr.Node jcrNode,
org.pentaho.platform.api.repository2.unified.data.node.DataNode parentDataNode) |
void |
updateContentNode(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData data,
javax.jcr.Node fileNode)
Updates a JCR node subtree representing the given
content . |
protected void createOrUpdateContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData data, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public void createContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData data, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
ITransformer
content
.createContentNode
in interface ITransformer<org.pentaho.platform.api.repository2.unified.data.node.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, org.pentaho.platform.api.repository2.unified.data.node.DataNode dataNode) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData fromContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
ITransformer
IRepositoryFileData
.fromContentNode
in interface ITransformer<org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData>
session
- JCR sessionpentahoJcrConstants
- constantsfileNode
- node of type pho_nt:pentahoFile or pho_nt:pentahoLinkedFileIRepositoryFileData
instancejavax.jcr.RepositoryException
- if anything goes wrongprotected org.pentaho.platform.api.repository2.unified.data.node.DataNode internalRead(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.Node jcrNode, org.pentaho.platform.api.repository2.unified.data.node.DataNode parentDataNode) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public boolean canRead(String contentType, Class<? extends org.pentaho.platform.api.repository2.unified.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<org.pentaho.platform.api.repository2.unified.data.node.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 org.pentaho.platform.api.repository2.unified.IRepositoryFileData> clazz)
true
if this transformer can write data of the form clazz
.canWrite
in interface ITransformer<org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData>
clazz
- class to checktrue
if this transformer can write data of the form clazz
public String getContentType()
getContentType
in interface ITransformer<org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData>
public void updateContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData data, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
ITransformer
content
.updateContentNode
in interface ITransformer<org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData>
session
- JCR sessionpentahoJcrConstants
- constantsdata
- data to updatefileNode
- node of type pho_nt:pentahoFile or pho_nt:pentahoLinkedFilejavax.jcr.RepositoryException
- if anything goes wrongCopyright © 2019 Hitachi Vantara. All rights reserved.