public class JcrNodeProvider extends PageFlowScopeAdapter implements IUpdateableContentProvider, Serializable
Modifier and Type | Field and Description |
---|---|
protected javax.jcr.Session |
jcrSession
Reference to the active JCR session
|
protected javax.jcr.Node |
node
Reference to the JCR node being wrapped
|
protected String |
nodeId
The node id of the JCR node
|
protected String |
nodePath
The node path of the JCR node
|
fExpireWithPageFlow
Constructor and Description |
---|
JcrNodeProvider() |
Modifier and Type | Method and Description |
---|---|
javax.jcr.Session |
getJcrSession()
Returns the active JCR session
|
javax.jcr.Node |
getNode()
Returns a reference to the JCR Node.
|
String |
getNodeId()
Returns the id of the JCR node
|
String |
getNodePath()
Returns the path of the JCR node
|
Object[] |
getPropertyKeys()
Returns list of properties supported by this content provider.
|
Class<?> |
getType(Object propertyKey)
Returns java type of the given property
|
Object |
getValue(Object propertyKey)
Returns value of the given property
|
boolean |
hasProperty(Object propertyKey)
Checks if the given property is supported by this content provider
|
boolean |
isReadOnly(Object propertyKey)
Returns true if the given property is readonly.
|
void |
setJcrSession(javax.jcr.Session jcrSession)
Sets the active JCR session
|
void |
setNodeId(String id)
Sets the id of the JCR node
|
void |
setNodePath(String path)
Sets the path of the JCR Node to use.
|
void |
setValue(Object propertyKey,
Object value)
Sets new value of the given property
|
getExpireWithPageFlow, setExpireWithPageFlow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
protected transient javax.jcr.Session jcrSession
protected transient javax.jcr.Node node
protected String nodeId
protected String nodePath
public String getNodeId()
public void setNodeId(String id)
id
- the uuid of the JCR node to usepublic void setNodePath(String path)
path
- the path of the JCR node to usepublic String getNodePath()
public javax.jcr.Session getJcrSession()
public void setJcrSession(javax.jcr.Session jcrSession)
jcrSession
- the JCR session to usepublic javax.jcr.Node getNode()
public Object[] getPropertyKeys()
IContentProvider
Object[0]
,
never null.getPropertyKeys
in interface IContentProvider
String
or Integer
public boolean hasProperty(Object propertyKey)
IContentProvider
hasProperty
in interface IContentProvider
propertyKey
- property key of type String
or Integer
true
if property is supportedpublic Class<?> getType(Object propertyKey) throws PropertyNotFoundException
IContentProvider
getType
in interface IContentProvider
propertyKey
- the property key of type String
or Integer
Class
PropertyNotFoundException
- if property is not supportedpublic Object getValue(Object propertyKey) throws ELException, PropertyNotFoundException
IContentProvider
getValue
in interface IContentProvider
propertyKey
- the property key of type String
or Integer
null
PropertyNotFoundException
- if property is not supportedELException
public boolean isReadOnly(Object propertyKey) throws ELException, PropertyNotFoundException
IUpdateableContentProvider
Returns true if the given property is readonly. If it is readonly, IUpdateableContentProvider.setValue(Object, Object)
will
definitely fail.
isReadOnly
in interface IUpdateableContentProvider
propertyKey
- property key of type String
or Integer
PropertyNotFoundException
ELException
public void setValue(Object propertyKey, Object value) throws ELException, PropertyNotFoundException
IUpdateableContentProvider
Sets new value of the given property
setValue
in interface IUpdateableContentProvider
propertyKey
- property key of type String
or Integer
value
- new property valuePropertyNotFoundException
- if property is not foundELException