Class JcrEndpoint

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, 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})
    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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)  
      org.apache.camel.Producer createProducer()  
      protected void doStart()  
      protected String getBase()
      Get the base node when accessing the repository
      protected javax.jcr.Credentials getCredentials()
      Get the Credentials for establishing the JCR repository connection
      String getEndpointConfiguredDestinationName()
      Gets the destination name which was configured from the endpoint uri.
      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.).
      String getHost()  
      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.
      String getPassword()  
      protected javax.jcr.Repository getRepository()
      Get the Repository
      long getSessionLiveCheckInterval()
      Interval in milliseconds to wait before each session live checking The default value is 60000 ms.
      long getSessionLiveCheckIntervalOnStart()
      Interval in milliseconds to wait before the first session live checking.
      String getUsername()  
      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.
      String getWorkspaceName()
      The workspace to access.
      boolean isDeep()
      When isDeep is true, events whose associated parent node is at absPath or within its subgraph are received.
      boolean isNoLocal()
      If noLocal is true, then events generated by the session through which the listener was registered are ignored.
      void setBase​(String base)  
      void setDeep​(boolean deep)  
      void setEventTypes​(int eventTypes)  
      void setHost​(String host)
      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 setUuids​(String uuids)  
      void setWorkspaceName​(String workspaceName)  
      • Methods inherited from class org.apache.camel.support.DefaultEndpoint

        configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from interface org.apache.camel.Endpoint

        getEndpointBaseUri, 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 Detail

    • Method Detail

      • 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.DefaultEndpoint
        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