Class JcrNodeProvider
java.lang.Object
com.webmethods.caf.faces.bean.PageFlowScopeAdapter
com.webmethods.caf.jcr.faces.data.JcrNodeProvider
- All Implemented Interfaces:
IPageFlowScopeAdapter
,IContentProvider
,IUpdateableContentProvider
,Serializable
public class JcrNodeProvider
extends PageFlowScopeAdapter
implements IUpdateableContentProvider, Serializable
IUpdatableContentProvider implementation that wraps a JCR Node for codeless
manipulation of a JCR node.
- Since:
- 8.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected javax.jcr.Session
Reference to the active JCR sessionprotected javax.jcr.Node
Reference to the JCR node being wrappedprotected String
The node id of the JCR nodeprotected String
The node path of the JCR nodeFields inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
fExpireWithPageFlow
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.jcr.Session
Returns the active JCR sessionjavax.jcr.Node
getNode()
Returns a reference to the JCR Node.Returns the id of the JCR nodeReturns the path of the JCR nodeObject[]
Returns list of properties supported by this content provider.Class<?>
Returns java type of the given propertyReturns value of the given propertyboolean
hasProperty
(Object propertyKey) Checks if the given property is supported by this content providerboolean
isReadOnly
(Object propertyKey) Returns true if the given property is readonly.void
setJcrSession
(javax.jcr.Session jcrSession) Sets the active JCR sessionvoid
Sets the id of the JCR nodevoid
setNodePath
(String path) Sets the path of the JCR Node to use.void
Sets new value of the given propertyMethods inherited from class com.webmethods.caf.faces.bean.PageFlowScopeAdapter
getExpireWithPageFlow, setExpireWithPageFlow
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
toString
-
Field Details
-
jcrSession
protected transient javax.jcr.Session jcrSessionReference to the active JCR session -
node
protected transient javax.jcr.Node nodeReference to the JCR node being wrapped -
nodeId
The node id of the JCR node -
nodePath
The node path of the JCR node
-
-
Constructor Details
-
JcrNodeProvider
public JcrNodeProvider()
-
-
Method Details
-
getNodeId
Returns the id of the JCR node- Returns:
- the UUID of the JCR node
-
setNodeId
Sets the id of the JCR node- Parameters:
id
- the uuid of the JCR node to use
-
setNodePath
Sets the path of the JCR Node to use. NOTE: if an Id is supplied, the path is not used.- Parameters:
path
- the path of the JCR node to use
-
getNodePath
Returns the path of the JCR node- Returns:
- the path of the JCR node being used
-
getJcrSession
public javax.jcr.Session getJcrSession()Returns the active JCR session- Returns:
- the JCR Session
-
setJcrSession
public void setJcrSession(javax.jcr.Session jcrSession) Sets the active JCR session- Parameters:
jcrSession
- the JCR session to use
-
getNode
public javax.jcr.Node getNode()Returns a reference to the JCR Node.- Returns:
- the JCR Node
-
getPropertyKeys
Description copied from interface:IContentProvider
Returns list of properties supported by this content provider. Can returnObject[0]
, never null.- Specified by:
getPropertyKeys
in interfaceIContentProvider
- Returns:
- array of property keys which is typically of type
String
orInteger
-
hasProperty
Description copied from interface:IContentProvider
Checks if the given property is supported by this content provider- Specified by:
hasProperty
in interfaceIContentProvider
- Parameters:
propertyKey
- property key of typeString
orInteger
- Returns:
true
if property is supported
-
getType
Description copied from interface:IContentProvider
Returns java type of the given property- Specified by:
getType
in interfaceIContentProvider
- Parameters:
propertyKey
- the property key of typeString
orInteger
- Returns:
- property java
Class
- Throws:
PropertyNotFoundException
- if property is not supported
-
getValue
Description copied from interface:IContentProvider
Returns value of the given property- Specified by:
getValue
in interfaceIContentProvider
- Parameters:
propertyKey
- the property key of typeString
orInteger
- Returns:
- value of the property, can be
null
- Throws:
PropertyNotFoundException
- if property is not supportedELException
-
isReadOnly
Description copied from interface:IUpdateableContentProvider
Returns true if the given property is readonly. If it is readonly,
IUpdateableContentProvider.setValue(Object, Object)
will definitely fail.- Specified by:
isReadOnly
in interfaceIUpdateableContentProvider
- Parameters:
propertyKey
- property key of typeString
orInteger
- Returns:
- true if the property is readonly
- Throws:
PropertyNotFoundException
ELException
-
setValue
public void setValue(Object propertyKey, Object value) throws ELException, PropertyNotFoundException Description copied from interface:IUpdateableContentProvider
Sets new value of the given property
- Specified by:
setValue
in interfaceIUpdateableContentProvider
- Parameters:
propertyKey
- property key of typeString
orInteger
value
- new property value- Throws:
PropertyNotFoundException
- if property is not foundELException
-