info.magnolia.dam.providers.jcr
Class JcrBuilder

java.lang.Object
  extended by info.magnolia.dam.providers.jcr.JcrBuilder
Direct Known Subclasses:
JcrAssetMetadataBuilder, JcrNodeAssetBuilder

public class JcrBuilder
extends Object

Utility class defining common methods used by Internal builder.


Constructor Summary
JcrBuilder()
           
 
Method Summary
protected  HashMap<String,Object> getAssetNodeProperties(javax.jcr.Node source)
          Return in a HashMap all AssetNode properties.
protected  String getAssetNodePropertyString(javax.jcr.Node source, String propertyName, String defaultValue)
          Retrieve a String representing the desired property from the AssetNode.
protected  javax.jcr.Node getContentNode(javax.jcr.Node source)
          Retrieve the AssetNode.jcr:content child Node.
protected  long getContentNodePropertyLong(javax.jcr.Node source, String propertyName, String defaultValue)
          Retrieve a long representing the desired property from the AssetNode.jcr:content child Node.
protected  String getContentNodePropertyString(javax.jcr.Node source, String propertyName, String defaultValue)
          Retrieve a String representing the desired property from the AssetNode.jcr:content child Node.
protected  Calendar getLastModified(javax.jcr.Node source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JcrBuilder

public JcrBuilder()
Method Detail

getAssetNodePropertyString

protected String getAssetNodePropertyString(javax.jcr.Node source,
                                            String propertyName,
                                            String defaultValue)
Retrieve a String representing the desired property from the AssetNode.

Returns:
Property value as String or default value if not found or in case of Exception.

getContentNodePropertyString

protected String getContentNodePropertyString(javax.jcr.Node source,
                                              String propertyName,
                                              String defaultValue)
Retrieve a String representing the desired property from the AssetNode.jcr:content child Node.

Returns:
Property value as String or default value if not found or in case of Exception.

getContentNodePropertyLong

protected long getContentNodePropertyLong(javax.jcr.Node source,
                                          String propertyName,
                                          String defaultValue)
Retrieve a long representing the desired property from the AssetNode.jcr:content child Node.

Returns:
Property value as long or default value if not found or in case of Exception.

getContentNode

protected javax.jcr.Node getContentNode(javax.jcr.Node source)
                                 throws javax.jcr.RepositoryException
Retrieve the AssetNode.jcr:content child Node.

Throws:
javax.jcr.RepositoryException

getLastModified

protected Calendar getLastModified(javax.jcr.Node source)

getAssetNodeProperties

protected HashMap<String,Object> getAssetNodeProperties(javax.jcr.Node source)
                                                 throws javax.jcr.RepositoryException
Return in a HashMap all AssetNode properties. Do not filter.

Throws:
javax.jcr.RepositoryException


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.