org.mule.transport.jcr
Class JcrConnector

java.lang.Object
  extended by org.mule.transport.AbstractConnector
      extended by org.mule.transport.jcr.JcrConnector
All Implemented Interfaces:
EventListener, javax.resource.spi.work.WorkListener, org.mule.api.lifecycle.Disposable, org.mule.api.lifecycle.Initialisable, org.mule.api.lifecycle.Lifecycle, org.mule.api.lifecycle.LifecycleStateEnabled, org.mule.api.lifecycle.Startable, org.mule.api.lifecycle.Stoppable, org.mule.api.NameableObject, org.mule.api.NamedObject, org.mule.api.transport.Connectable, org.mule.api.transport.Connector

public final class JcrConnector
extends org.mule.transport.AbstractConnector

JcrConnector is a transport that connects to JCR 1.0 (aka JSR 170) repositories.

Author:
David Dossot (david@dossot.net)

Field Summary
static String JCR_ALWAYS_CREATE_CHILD_NODE_PROPERTY
          Property that forces the creation of a child node under the node target by the endpoint URI, instead of trying first to locate an existing one.
static String JCR_CONTENT_PAYLOAD_TYPE_PROPERTY
          Property that defines the type of payload that a JCR MuleMessage will contain.
static String JCR_DEEP_PROPERTY
          Property that defines if events coming from deeper than the specified endpoint path must be listened to.
static String JCR_EVENT_TYPES_PROPERTY
          Property that defines a combination of repository events that will only be listened to.
static String JCR_ITEM_PATH
          Property that defines a the full unique path of a particular item (node or property).
static String JCR_NO_LOCAL_PROPERTY
          Property that defines if local events must be ignored.
static String JCR_NODE_RELPATH_PROPERTY
          Property that defines a relative path to append after the endpoint item path.
static String JCR_NODE_TYPE_NAME_LIST_PROPERTY
          Property that defines a list of node types that will only be listened to for changes.
static String JCR_NODE_TYPE_NAME_PROPERTY
          Property that defines a particular node type name.
static String JCR_NODE_UUID_PROPERTY
          Property that forces the lookup of a particular node by UUID.
static String JCR_PROPERTY_REL_PATH_PROPERTY
          Property that defines a relative path to append at the end of the target item path.
static String JCR_QUERY_LANGUAGE_PROPERTY
          Property that defines a repository search query language.
static String JCR_QUERY_STATEMENT_PROPERTY
          Property that defines a repository search query statement.
static String JCR_UUID_LIST_PROPERTY
          Property that defines a list of node UUIDs that will only be listened to for changes.
static String PROTOCOL
           
 
Fields inherited from class org.mule.transport.AbstractConnector
createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, dispatcherFactory, dispatcherPoolFactory, dispatchers, initialStateStopped, lifecycleManager, logger, muleContext, muleMessageFactory, name, numberOfConcurrentTransactedReceivers, PROPERTY_POLLING_FREQUENCY, receivers, requesterFactory, requesters, serviceDescriptor, serviceOverrides, sessionHandler, startOnConnect
 
Fields inherited from interface org.mule.api.transport.Connector
INT_VALUE_NOT_SET
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
JcrConnector(org.mule.api.MuleContext muleContext)
           
 
Method Summary
 void doConnect()
           
 void doDisconnect()
           
 void doDispose()
           
 void doInitialise()
           
 void doStart()
           
 void doStop()
           
 String getContentPayloadType()
           
 Integer getEventTypes()
           
 NodeTypeHandlerManager getNodeTypeHandlerManager()
           
 OutputStream getOutputStream(org.mule.api.endpoint.OutboundEndpoint endpoint, org.mule.api.MuleEvent event)
          Will get the output stream for this type of transport.
 String getPassword()
           
 String getProtocol()
           
 javax.jcr.Repository getRepository()
           
 String getUsername()
           
 String getWorkspaceName()
           
 Boolean isDeep()
           
 Boolean isNoLocal()
           
 javax.jcr.Session newSession()
           
 void setContentPayloadType(String contentPayloadType)
           
 void setCustomNodeTypeHandlers(List<Class<? extends NodeTypeHandler>> customNodeTypeHandlers)
          Sets an optional list of NodeTypeHandlers class names.
 void setDeep(Boolean deep)
           
 void setEventTypes(Integer eventTypes)
           
 void setNodeTypeNames(String nodeTypeNames)
           
 void setNoLocal(Boolean noLocal)
           
 void setPassword(String password)
           
 void setRepository(javax.jcr.Repository repository)
           
 void setUsername(String username)
           
 void setUuids(String uuids)
           
 void setWorkspaceName(String workspaceName)
           
 void terminateSession(javax.jcr.Session session)
           
 javax.jcr.Session validateSession(javax.jcr.Session session)
           
 
Methods inherited from class org.mule.transport.AbstractConnector
clearDispatchers, clearRequesters, configureDispatcherPool, connect, createDispatcherMessageProcessor, createMuleMessageFactory, createReceiver, createScheduler, destroyReceiver, disconnect, dispose, disposeReceivers, disposeWorkManagers, doUnregisterListener, fireNotification, getConnectEventId, getConnectionDescription, getDefaultExchangePattern, getDefaultInboundTransformers, getDefaultOutboundTransformers, getDefaultResponseTransformers, getDispatcherFactory, getDispatcherPoolFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getInboundExchangePatterns, getLifecycleState, getMaxDispatchersActive, getMaxRequestersActive, getMaxTotalDispatchers, getMuleContext, getMuleMessageFactory, getName, getNumberOfConcurrentTransactedReceivers, getOutboundExchangePatterns, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getRequesterFactory, getRequesterThreadingProfile, getRequesterWorkManager, getRetryPolicyTemplate, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getSupportedProtocols, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, initWorkManagers, isConnected, isConnecting, isCreateMultipleTransactedReceivers, isDisposed, isEnableMessageEvents, isInitialised, isInitialStateStopped, isResponseEnabled, isStarted, isStarting, isStopped, isStopping, isValidateConnections, lookupReceiver, registerListener, registerSupportedMetaProtocol, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, request, request, setConnected, setConnecting, setCreateMultipleTransactedReceivers, setDispatcherFactory, setDispatcherPoolFactory, setDispatcherPoolMaxWait, setDispatcherPoolWhenExhaustedAction, setDispatcherThreadingProfile, setDynamicNotification, setInitialStateStopped, setMaxDispatchersActive, setMaxRequestersActive, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setRequesterFactory, setRequesterPoolMaxWait, setRequesterPoolWhenExhaustedAction, setRequesterThreadingProfile, setRetryPolicyTemplate, setServiceOverrides, setSessionHandler, setSupportedProtocols, setupDispatchReturn, setupRequestReturn, setValidateConnections, shutdownScheduler, start, startAfterConnect, stop, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, updateCachedNotificationHandler, validateConnection, workAccepted, workCompleted, workRejected, workStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOCOL

public static final String PROTOCOL
See Also:
Constant Field Values

JCR_DEEP_PROPERTY

public static final String JCR_DEEP_PROPERTY
Property that defines if events coming from deeper than the specified endpoint path must be listened to.

See Also:
Constant Field Values

JCR_UUID_LIST_PROPERTY

public static final String JCR_UUID_LIST_PROPERTY
Property that defines a list of node UUIDs that will only be listened to for changes.

See Also:
Constant Field Values

JCR_EVENT_TYPES_PROPERTY

public static final String JCR_EVENT_TYPES_PROPERTY
Property that defines a combination of repository events that will only be listened to.

See Also:
Constant Field Values

JCR_NODE_TYPE_NAME_LIST_PROPERTY

public static final String JCR_NODE_TYPE_NAME_LIST_PROPERTY
Property that defines a list of node types that will only be listened to for changes.

See Also:
Constant Field Values

JCR_CONTENT_PAYLOAD_TYPE_PROPERTY

public static final String JCR_CONTENT_PAYLOAD_TYPE_PROPERTY
Property that defines the type of payload that a JCR MuleMessage will contain.

See Also:
Constant Field Values

JCR_NO_LOCAL_PROPERTY

public static final String JCR_NO_LOCAL_PROPERTY
Property that defines if local events must be ignored.

See Also:
Constant Field Values

JCR_PROPERTY_REL_PATH_PROPERTY

public static final String JCR_PROPERTY_REL_PATH_PROPERTY
Property that defines a relative path to append at the end of the target item path.

See Also:
Constant Field Values

JCR_NODE_RELPATH_PROPERTY

public static final String JCR_NODE_RELPATH_PROPERTY
Property that defines a relative path to append after the endpoint item path.

See Also:
Constant Field Values

JCR_ALWAYS_CREATE_CHILD_NODE_PROPERTY

public static final String JCR_ALWAYS_CREATE_CHILD_NODE_PROPERTY
Property that forces the creation of a child node under the node target by the endpoint URI, instead of trying first to locate an existing one.

See Also:
Constant Field Values

JCR_NODE_TYPE_NAME_PROPERTY

public static final String JCR_NODE_TYPE_NAME_PROPERTY
Property that defines a particular node type name.

See Also:
Constant Field Values

JCR_NODE_UUID_PROPERTY

public static final String JCR_NODE_UUID_PROPERTY
Property that forces the lookup of a particular node by UUID.

See Also:
Constant Field Values

JCR_QUERY_STATEMENT_PROPERTY

public static final String JCR_QUERY_STATEMENT_PROPERTY
Property that defines a repository search query statement.

See Also:
Constant Field Values

JCR_QUERY_LANGUAGE_PROPERTY

public static final String JCR_QUERY_LANGUAGE_PROPERTY
Property that defines a repository search query language.

See Also:
Constant Field Values

JCR_ITEM_PATH

public static final String JCR_ITEM_PATH
Property that defines a the full unique path of a particular item (node or property).

See Also:
Constant Field Values
Constructor Detail

JcrConnector

public JcrConnector(org.mule.api.MuleContext muleContext)
Method Detail

doInitialise

public void doInitialise()
                  throws org.mule.api.lifecycle.InitialisationException
Specified by:
doInitialise in class org.mule.transport.AbstractConnector
Throws:
org.mule.api.lifecycle.InitialisationException

doConnect

public void doConnect()
               throws Exception
Specified by:
doConnect in class org.mule.transport.AbstractConnector
Throws:
Exception

doStart

public void doStart()
             throws org.mule.api.MuleException
Specified by:
doStart in class org.mule.transport.AbstractConnector
Throws:
org.mule.api.MuleException

doStop

public void doStop()
            throws org.mule.api.MuleException
Specified by:
doStop in class org.mule.transport.AbstractConnector
Throws:
org.mule.api.MuleException

doDisconnect

public void doDisconnect()
                  throws Exception
Specified by:
doDisconnect in class org.mule.transport.AbstractConnector
Throws:
Exception

doDispose

public void doDispose()
Specified by:
doDispose in class org.mule.transport.AbstractConnector

getOutputStream

public OutputStream getOutputStream(org.mule.api.endpoint.OutboundEndpoint endpoint,
                                    org.mule.api.MuleEvent event)
                             throws org.mule.api.MuleException
Will get the output stream for this type of transport. Typically this will be called only when Streaming is being used on an outbound endpoint.

Specified by:
getOutputStream in interface org.mule.api.transport.Connector
Overrides:
getOutputStream in class org.mule.transport.AbstractConnector
Throws:
org.mule.api.MuleException

newSession

public javax.jcr.Session newSession()
                             throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

terminateSession

public void terminateSession(javax.jcr.Session session)

validateSession

public javax.jcr.Session validateSession(javax.jcr.Session session)

getProtocol

public String getProtocol()

setCustomNodeTypeHandlers

public void setCustomNodeTypeHandlers(List<Class<? extends NodeTypeHandler>> customNodeTypeHandlers)
Sets an optional list of NodeTypeHandlers class names.

Parameters:
customNodeTypeHandlers -

getNodeTypeHandlerManager

public NodeTypeHandlerManager getNodeTypeHandlerManager()
Returns:
the nodeTypeHandlerManager

getPassword

public String getPassword()
Returns:
the password

setPassword

public void setPassword(String password)
Parameters:
password - the password to set

getRepository

public javax.jcr.Repository getRepository()
Returns:
the repository

setRepository

public void setRepository(javax.jcr.Repository repository)
Parameters:
repository - the repository to set

getUsername

public String getUsername()
Returns:
the username

setUsername

public void setUsername(String username)
Parameters:
username - the username to set

getWorkspaceName

public String getWorkspaceName()
Returns:
the workspaceName

setWorkspaceName

public void setWorkspaceName(String workspaceName)
Parameters:
workspaceName - the workspaceName to set

isDeep

public Boolean isDeep()
Returns:
the deep

setDeep

public void setDeep(Boolean deep)
Parameters:
deep - the deep to set

getEventTypes

public Integer getEventTypes()
Returns:
the eventTypes

setEventTypes

public void setEventTypes(Integer eventTypes)
Parameters:
eventTypes - the eventTypes to set

setNodeTypeNames

public void setNodeTypeNames(String nodeTypeNames)
Parameters:
nodeTypeNames - the nodeTypeNames to set

isNoLocal

public Boolean isNoLocal()
Returns:
the noLocal

setNoLocal

public void setNoLocal(Boolean noLocal)
Parameters:
noLocal - the noLocal to set

setUuids

public void setUuids(String uuids)
Parameters:
uuid - the uuid to set

getContentPayloadType

public String getContentPayloadType()
Returns:
the contentPayloadType

setContentPayloadType

public void setContentPayloadType(String contentPayloadType)
Parameters:
contentPayloadType - the contentPayloadType to set


Copyright © 2011. All Rights Reserved.