public class JCRValueProviderImpl extends Object implements JCRValueProvider
Constructor and Description |
---|
JCRValueProviderImpl(javax.jcr.Node jcrNode)
Creates a lazy loading jcr value provider instance without useStringPool and with protected jcr properties included
|
JCRValueProviderImpl(javax.jcr.Node jcrNode,
boolean lazyLoading)
Creates a jcr value provider instance without useStringPool and with protected jcr properties included
|
JCRValueProviderImpl(javax.jcr.Node jcrNode,
boolean lazyLoading,
boolean useStringPool)
Creates a jcr value provider instance with protected jcr properties included
|
JCRValueProviderImpl(javax.jcr.Node jcrNode,
boolean lazyLoading,
boolean useStringPool,
boolean includeProtectedProperties)
if
lazyLoading is false, we'll actively fill all the properties of the jcr node in the properties map
and fetch the canonical path |
Modifier and Type | Method and Description |
---|---|
void |
detach()
Method for detaching the jcr node.
|
void |
flush()
Flushes all fetched data kept in instance variables
|
Boolean |
getBoolean(String propertyName)
Returns the boolean value of a node property
|
Boolean[] |
getBooleans(String propertyName)
Returns boolean array of the boolean values of a node property
|
String |
getCanonicalPath()
The canonical path can be a different location then
ValueProvider.getPath() because the latter might give some virtual / mirrored
path of the value provider |
Calendar |
getDate(String propertyName)
Returns the Calendar value of a node property.
|
Calendar[] |
getDates(String propertyName)
Returns Calendar array of the Calendar values of a node property.
|
String |
getDisplayName() |
Double |
getDouble(String propertyName)
Returns the double value of a node property.
|
Double[] |
getDoubles(String propertyName)
Returns double array of the long values of a node property.
|
String |
getIdentifier()
We return the uuid of the jcr node.
|
javax.jcr.Node |
getJcrNode()
returns the
Node that was used to create this value provider with or null when the
node is already detached |
String |
getLocalizedName() |
Long |
getLong(String propertyName)
Returns the long value of a node property.
|
Long[] |
getLongs(String propertyName)
Returns long array of the long values of a node property.
|
String |
getName() |
javax.jcr.Node |
getParentJcrNode()
returns the parent
Node of this value provider or null when the node is detached. |
String |
getPath() |
Map<String,Object> |
getProperties()
Returns all combined properties that are of type String, boolean, int, long, double or Calendar in a Map.
|
PropertyMap |
getPropertyMap()
Returns all combined properties that are of type String, boolean, int, long, double or Calendar in a PropertyMap.
|
String |
getString(String propertyName)
Returns the string value of a node property
|
String[] |
getStrings(String propertyName)
Returns String array of string values of a node property
|
boolean |
hasProperty(String propertyName)
Method returning true when the jcr node has the property
|
boolean |
isDetached()
Test whether the jcr node is detached or not
|
boolean |
isNodeType(String nodeType) |
public JCRValueProviderImpl(javax.jcr.Node jcrNode)
public JCRValueProviderImpl(javax.jcr.Node jcrNode, boolean lazyLoading)
public JCRValueProviderImpl(javax.jcr.Node jcrNode, boolean lazyLoading, boolean useStringPool)
public JCRValueProviderImpl(javax.jcr.Node jcrNode, boolean lazyLoading, boolean useStringPool, boolean includeProtectedProperties)
lazyLoading
is false, we'll actively fill all the properties of the jcr node in the properties map
and fetch the canonical pathjcrNode
- lazyLoading
- useStringPool
- whether String properties should be fetched from string pool to reduce memory usageincludeProtectedProperties
- when false
, protected jcr properties won't be includedpublic javax.jcr.Node getJcrNode()
JCRValueProvider
Node
that was used to create this value provider with or null
when the
node is already detachedgetJcrNode
in interface JCRValueProvider
public javax.jcr.Node getParentJcrNode()
JCRValueProvider
Node
of this value provider or null
when the node is detached.
If the node is the jcr rootNode, null
will be returnedgetParentJcrNode
in interface JCRValueProvider
null
if the node is null or there is no parentpublic void detach()
JCRValueProvider
detach
in interface JCRValueProvider
public boolean isDetached()
JCRValueProvider
isDetached
in interface JCRValueProvider
public String getName()
getName
in interface ValueProvider
public String getDisplayName()
getDisplayName
in interface JCRValueProvider
HippoNode.getDisplayName()
public String getLocalizedName()
getLocalizedName
in interface JCRValueProvider
HippoNode#getLocalizedName()
public String getPath()
getPath
in interface ValueProvider
public String getCanonicalPath()
ValueProvider
ValueProvider.getPath()
because the latter might give some virtual / mirrored
path of the value providergetCanonicalPath
in interface ValueProvider
public String getIdentifier()
getIdentifier
in interface ValueProvider
public boolean isNodeType(String nodeType)
isNodeType
in interface JCRValueProvider
public boolean hasProperty(String propertyName)
ValueProvider
hasProperty
in interface ValueProvider
public String getString(String propertyName)
ValueProvider
getString
in interface ValueProvider
public String[] getStrings(String propertyName)
ValueProvider
getStrings
in interface ValueProvider
public Double getDouble(String propertyName)
ValueProvider
getDouble
in interface ValueProvider
public Double[] getDoubles(String propertyName)
ValueProvider
getDoubles
in interface ValueProvider
public Long getLong(String propertyName)
ValueProvider
getLong
in interface ValueProvider
public Long[] getLongs(String propertyName)
ValueProvider
getLongs
in interface ValueProvider
public Calendar getDate(String propertyName)
ValueProvider
getDate
in interface ValueProvider
public Calendar[] getDates(String propertyName)
ValueProvider
getDates
in interface ValueProvider
public Boolean getBoolean(String propertyName)
ValueProvider
getBoolean
in interface ValueProvider
public Boolean[] getBooleans(String propertyName)
ValueProvider
getBooleans
in interface ValueProvider
public Map<String,Object> getProperties()
ValueProvider
getProperties
in interface ValueProvider
public PropertyMap getPropertyMap()
ValueProvider
getPropertyMap
in interface ValueProvider
public void flush()
JCRValueProvider
flush
in interface JCRValueProvider
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.