All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.modeshape.jcr.api.observation.Event Maven / Gradle / Ivy

package org.modeshape.jcr.api.observation;

/**
 * Extension of the {@link javax.jcr.observation.Event} interface allowing custom ModeShape events.
 *
 * @author Horia Chiorean
 */
public interface Event extends javax.jcr.observation.Event {

    /**
     * Interface which contains the constants for sequencing events.
     */
    public interface Sequencing {
        /**
         * Constant under which the path of the node which triggered the sequencing, in the case of an {@link Event.Sequencing#NODE_SEQUENCED}
         * event, will be found in the event info map
         */
        String SEQUENCED_NODE_PATH = "sequencedNodePath";
        /**
         * Constant under which the id of the node which triggered the sequencing, in the case of an {@link Event.Sequencing#NODE_SEQUENCED}
         * event, will be found in the event info map
         */
        String SEQUENCED_NODE_ID = "sequencedNodeId";

        /**
         * Constant under which the sequencer id (as configured) is set in the event info map.
         */
        String SEQUENCER_NAME = "sequencerName";

        /**
         * Constant under which the user id (username) of the user which triggered the sequencing is set in the event info map.
         */
        String USER_ID = "userId";

        /**
         * Constant under which the path resolved by the sequencer at the beginning of the sequencing process is set in the
         * event info map.
         */
        String SELECTED_PATH = "selectedPath";

        /**
         * Constant under which the configured output path of the sequencer is set in the event info map.
         */
        String OUTPUT_PATH = "outputPath";

        /**
         * Constant under which the {@link Throwable} object, in case of an {@link Event.Sequencing#NODE_SEQUENCING_FAILURE} event, will be
         * found in the event info map.
         */
        String SEQUENCING_FAILURE_CAUSE = "sequencingFailureCause";

        /**
         * Generated on persist when a node is successfully sequenced.
         * 
    *
  • {@link #getPath} returns the absolute path of the node that was added due to sequencing.
  • *
  • {@link #getIdentifier} returns the identifier of the node that was sequenced.
  • *
  • {@link #getInfo} returns an Map object, which under the {@link org.modeshape.jcr.api.observation.Event.Sequencing#SEQUENCED_NODE_PATH} key has the * absolute path of the Node which triggered the sequencing and under the {@link org.modeshape.jcr.api.observation.Event.Sequencing#SEQUENCED_NODE_ID} key has the identifier * of the node which triggered the sequencing *
  • *
*/ int NODE_SEQUENCED = 0x80; /** * Generated when the sequencing of an input node fails. * *
    *
  • {@link #getPath} returns the absolute path of the input node that triggered the sequencing.
  • *
  • {@link #getIdentifier} returns the identifier of the input node that triggered the sequencing
  • *
  • {@link #getInfo} returns an Map object, which under the {@link org.modeshape.jcr.api.observation.Event.Sequencing#SEQUENCING_FAILURE_CAUSE} key * contains the {@link Throwable} instance which caused the failure. *
  • *
*/ int NODE_SEQUENCING_FAILURE = 0x100; /** * Convenience event code for listeners which want to listen both for {@link #NODE_SEQUENCED} and {@link #NODE_SEQUENCING_FAILURE} * events. */ int ALL = NODE_SEQUENCED | NODE_SEQUENCING_FAILURE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy