org.mule.transport.jcr.handlers
Interface NodeTypeHandler


public interface NodeTypeHandler

Defines a handler that extracts the necessary information from a MuleMessage in order to store content in a JCR container while trying to comply to the constraint of the desired node type.

Author:
David Dossot (david@dossot.net)

Method Summary
 javax.jcr.Node createNode(javax.jcr.Session session, javax.jcr.Node targetNode, String nodeRelPath, org.mule.api.MuleMessage message)
          Handles the creation of a new node.
 String getNodeTypeName()
          The node type name that will be used to register to the manager.
 void initialize(NodeTypeHandlerManager manager)
          Called once, when the handler is created.
 void updateContent(javax.jcr.Session session, javax.jcr.Node node, org.mule.api.MuleMessage message)
          Handles a node content update.
 

Method Detail

initialize

void initialize(NodeTypeHandlerManager manager)
Called once, when the handler is created.

Parameters:
nodeTypeManager -

getNodeTypeName

String getNodeTypeName()
The node type name that will be used to register to the manager. It does not necessarily map with an actual JCR node name.

Returns:

createNode

javax.jcr.Node createNode(javax.jcr.Session session,
                          javax.jcr.Node targetNode,
                          String nodeRelPath,
                          org.mule.api.MuleMessage message)
                          throws javax.jcr.RepositoryException,
                                 IOException
Handles the creation of a new node.

Parameters:
session -
targetNode -
nodeRelPath -
message -
Returns:
Throws:
javax.jcr.RepositoryException
IOException

updateContent

void updateContent(javax.jcr.Session session,
                   javax.jcr.Node node,
                   org.mule.api.MuleMessage message)
                   throws javax.jcr.RepositoryException,
                          IOException
Handles a node content update.

Parameters:
session -
node -
message -
Throws:
javax.jcr.RepositoryException
IOException


Copyright © 2011. All Rights Reserved.