Package org.apache.camel.component.jcr
Class JcrEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.jcr.JcrEndpoint
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="1.3.0",
scheme="jcr",
title="JCR",
syntax="jcr:host/base",
alternativeSyntax="jcr:username:password@host/base",
category={DATABASE,CMS},
headersClass=JcrConstants.class)
public class JcrEndpoint
extends org.apache.camel.support.DefaultEndpoint
Read and write nodes to/from a JCR compliant content repository.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.Producerprotected voiddoStart()protected StringgetBase()Get the base node when accessing the repositoryprotected javax.jcr.CredentialsGet theCredentialsfor establishing the JCR repository connectionGets the destination name which was configured from the endpoint uri.inteventTypes(a combination of one or more event types encoded as a bit mask value such as javax.jcr.observation.Event.NODE_ADDED, javax.jcr.observation.Event.NODE_REMOVED, etc.).getHost()When a comma separatednodeTypeNamelist string is set, only events whose associated parent node has one of the node types (or a subtype of one of the node types) in this list will be received.protected javax.jcr.RepositoryGet theRepositorylongInterval in milliseconds to wait before each session live checking The default value is 60000 ms.longInterval in milliseconds to wait before the first session live checking.getUuids()When a comma separated uuid list string is set, only events whose associated parent node has one of the identifiers in the comma separated uuid list will be received.The workspace to access.booleanisDeep()WhenisDeepis true, events whose associated parent node is atabsPathor within its subgraph are received.booleanIfnoLocalistrue, then events generated by the session through which the listener was registered are ignored.voidvoidsetDeep(boolean deep) voidsetEventTypes(int eventTypes) voidName of theRepositoryto lookup from the Camel registry to be used.voidsetNodeTypeNames(String nodeTypeNames) voidsetNoLocal(boolean noLocal) voidsetPassword(String password) Password for loginvoidsetSessionLiveCheckInterval(long sessionLiveCheckInterval) voidsetSessionLiveCheckIntervalOnStart(long sessionLiveCheckIntervalOnStart) voidsetUsername(String username) Username for loginvoidvoidsetWorkspaceName(String workspaceName) Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStop, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isRemote, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
JcrEndpoint
-
-
Method Details
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Throws:
Exception
-
createProducer
- Throws:
Exception
-
doStart
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
getHost
-
setHost
Name of theRepositoryto lookup from the Camel registry to be used. -
getRepository
protected javax.jcr.Repository getRepository()Get theRepository- Returns:
- the repository
-
getCredentials
protected javax.jcr.Credentials getCredentials()Get theCredentialsfor establishing the JCR repository connection- Returns:
- the credentials
-
getBase
Get the base node when accessing the repository- Returns:
- the base node
-
setBase
-
getUsername
-
setUsername
Username for login -
getPassword
-
setPassword
Password for login -
getEventTypes
public int getEventTypes()eventTypes(a combination of one or more event types encoded as a bit mask value such as javax.jcr.observation.Event.NODE_ADDED, javax.jcr.observation.Event.NODE_REMOVED, etc.).- Returns:
- eventTypes
-
setEventTypes
public void setEventTypes(int eventTypes) -
isDeep
public boolean isDeep()WhenisDeepis true, events whose associated parent node is atabsPathor within its subgraph are received.- Returns:
- deep
-
setDeep
public void setDeep(boolean deep) -
getUuids
When a comma separated uuid list string is set, only events whose associated parent node has one of the identifiers in the comma separated uuid list will be received.- Returns:
- comma separated uuid list string
-
setUuids
-
getNodeTypeNames
When a comma separatednodeTypeNamelist string is set, only events whose associated parent node has one of the node types (or a subtype of one of the node types) in this list will be received. -
setNodeTypeNames
-
isNoLocal
public boolean isNoLocal()IfnoLocalistrue, then events generated by the session through which the listener was registered are ignored. Otherwise, they are not ignored.- Returns:
- noLocal
-
setNoLocal
public void setNoLocal(boolean noLocal) -
getSessionLiveCheckIntervalOnStart
public long getSessionLiveCheckIntervalOnStart()Interval in milliseconds to wait before the first session live checking. The default value is 3000 ms.- Returns:
- sessionLiveCheckIntervalOnStart
-
setSessionLiveCheckIntervalOnStart
public void setSessionLiveCheckIntervalOnStart(long sessionLiveCheckIntervalOnStart) -
getSessionLiveCheckInterval
public long getSessionLiveCheckInterval()Interval in milliseconds to wait before each session live checking The default value is 60000 ms. -
setSessionLiveCheckInterval
public void setSessionLiveCheckInterval(long sessionLiveCheckInterval) -
getWorkspaceName
The workspace to access. If it's not specified then the default one will be used -
setWorkspaceName
-
getEndpointConfiguredDestinationName
Gets the destination name which was configured from the endpoint uri.- Returns:
- the destination name resolved from the endpoint uri
-