T
- type which this transformer reads and writespublic interface ITransformer<T extends org.pentaho.platform.api.repository2.unified.IRepositoryFileData>
IRepositoryFileData
implementations.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,
T data,
javax.jcr.Node fileNode)
Creates a JCR node subtree representing the given
content . |
T |
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.
|
void |
updateContentNode(javax.jcr.Session session,
PentahoJcrConstants pentahoJcrConstants,
T data,
javax.jcr.Node fileNode)
Updates a JCR node subtree representing the given
content . |
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.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 formboolean canWrite(Class<? extends org.pentaho.platform.api.repository2.unified.IRepositoryFileData> clazz)
true
if this transformer can write data of the form clazz
.clazz
- class to checktrue
if this transformer can write data of the form clazz
String getContentType()
T fromContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
IRepositoryFileData
.session
- JCR sessionpentahoJcrConstants
- constantsescapeHelper
- escape helperfileNode
- node of type pho_nt:pentahoFile or pho_nt:pentahoLinkedFileIRepositoryFileData
instancejavax.jcr.RepositoryException
- if anything goes wrongvoid createContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, T data, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
content
.session
- JCR sessionpentahoJcrConstants
- constantsescapeHelper
- escape helperdata
- data to createfileNode
- node of type pho_nt:pentahoFile or pho_nt:pentahoLinkedFilejavax.jcr.RepositoryException
- if anything goes wrongvoid updateContentNode(javax.jcr.Session session, PentahoJcrConstants pentahoJcrConstants, T data, javax.jcr.Node fileNode) throws javax.jcr.RepositoryException
content
.session
- JCR sessionpentahoJcrConstants
- constantsescapeHelper
- escape helperdata
- 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.