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
    Modifier
    Constructor
    Description
    protected
    JcrEndpoint(String endpointUri, JcrComponent component)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.camel.Consumer
    createConsumer(org.apache.camel.Processor processor)
     
    org.apache.camel.Producer
     
    protected void
     
    protected String
    Get the base node when accessing the repository
    protected javax.jcr.Credentials
    Get the Credentials for establishing the JCR repository connection
    Gets the destination name which was configured from the endpoint uri.
    int
    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.).
     
    When a comma separated nodeTypeName list 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.Repository
    Get the Repository
    long
    Interval in milliseconds to wait before each session live checking The default value is 60000 ms.
    long
    Interval in milliseconds to wait before the first session live checking.
     
    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.
    boolean
    When isDeep is true, events whose associated parent node is at absPath or within its subgraph are received.
    boolean
    If noLocal is true, then events generated by the session through which the listener was registered are ignored.
    void
     
    void
    setDeep(boolean deep)
     
    void
    setEventTypes(int eventTypes)
     
    void
    Name of the Repository to lookup from the Camel registry to be used.
    void
    setNodeTypeNames(String nodeTypeNames)
     
    void
    setNoLocal(boolean noLocal)
     
    void
    setPassword(String password)
    Password for login
    void
    setSessionLiveCheckInterval(long sessionLiveCheckInterval)
     
    void
    setSessionLiveCheckIntervalOnStart(long sessionLiveCheckIntervalOnStart)
     
    void
    setUsername(String username)
    Username for login
    void
     
    void
    setWorkspaceName(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, toString

    Methods 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, suspend

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.camel.ComponentAware

    getComponent

    Methods inherited from interface org.apache.camel.Endpoint

    getEndpointBaseUri, isRemote, isSingletonProducer

    Methods inherited from interface org.apache.camel.Service

    build, close, init, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Constructor Details

  • Method Details

    • createConsumer

      public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
      Throws:
      Exception
    • createProducer

      public org.apache.camel.Producer createProducer() throws Exception
      Throws:
      Exception
    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • getHost

      public String getHost()
    • setHost

      public void setHost(String host)
      Name of the Repository to lookup from the Camel registry to be used.
    • getRepository

      protected javax.jcr.Repository getRepository()
      Get the Repository
      Returns:
      the repository
    • getCredentials

      protected javax.jcr.Credentials getCredentials()
      Get the Credentials for establishing the JCR repository connection
      Returns:
      the credentials
    • getBase

      protected String getBase()
      Get the base node when accessing the repository
      Returns:
      the base node
    • setBase

      public void setBase(String base)
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
      Username for login
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
      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()
      When isDeep is true, events whose associated parent node is at absPath or within its subgraph are received.
      Returns:
      deep
    • setDeep

      public void setDeep(boolean deep)
    • getUuids

      public String 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

      public void setUuids(String uuids)
    • getNodeTypeNames

      public String getNodeTypeNames()
      When a comma separated nodeTypeName list 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

      public void setNodeTypeNames(String nodeTypeNames)
    • isNoLocal

      public boolean isNoLocal()
      If noLocal is true, 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

      public String getWorkspaceName()
      The workspace to access. If it's not specified then the default one will be used
    • setWorkspaceName

      public void setWorkspaceName(String workspaceName)
    • getEndpointConfiguredDestinationName

      public String getEndpointConfiguredDestinationName()
      Gets the destination name which was configured from the endpoint uri.
      Returns:
      the destination name resolved from the endpoint uri