org.modeshape.jcr.api.observation

## Interface Event

- All Superinterfaces:
    Event
  All Known Subinterfaces:
    PropertyEvent

      public interface Event
      extends Event

  Extension of the `Event` interface allowing custom ModeShape events.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `Event.Sequencing` Interface which contains the constants for sequencing events.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ALL_EVENTS` Event code representing all the JCR events: `Event` together with all the custom ModeShape events: `Event`

    - ### Fields inherited from interface javax.jcr.observation.Event

      `NODE_ADDED, NODE_MOVED, NODE_REMOVED, PERSIST, PROPERTY_ADDED, PROPERTY_CHANGED, PROPERTY_REMOVED`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NodeType[]` | `getMixinNodeTypes()` If this `Event` is of type `NODE_ADDED`, `NODE_REMOVED` or `NODE_MOVED` then this method returns the declared mixin node types of the node at (or formerly at) the path returned by `getPath()`.
    `NodeType` | `getPrimaryNodeType()` If this `Event` is of type `NODE_ADDED`, `NODE_REMOVED` or `NODE_MOVED` then this method returns the declared primary node type of the node at (or formerly at) the path returned by `getPath()`.

    - ### Methods inherited from interface javax.jcr.observation.Event

      `getDate, getIdentifier, getInfo, getPath, getType, getUserData, getUserID`

- - ### Field Detail

    - #### ALL_EVENTS

          static final int ALL_EVENTS

      Event code representing all the JCR events: `Event` together with all the custom ModeShape events: `Event`
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getPrimaryNodeType

          NodeType getPrimaryNodeType()
                                      throws RepositoryException

      If this `Event` is of type `NODE_ADDED`, `NODE_REMOVED` or `NODE_MOVED` then this method returns the declared primary node type of the node at (or formerly at) the path returned by `getPath()`. If this `Event` is of type `PROPERTY_ADDED`, `PROPERTY_REMOVED` or `PROPERTY_CHANGED` then this method returns the declared primary node type of the parent node of the property affected.
      Returns:
        a `NodeType` object.
      Throws:
        `RepositoryException` - if an error occurs.

    - #### getMixinNodeTypes

          NodeType[] getMixinNodeTypes()
                                       throws RepositoryException

      If this `Event` is of type `NODE_ADDED`, `NODE_REMOVED` or `NODE_MOVED` then this method returns the declared mixin node types of the node at (or formerly at) the path returned by `getPath()`. If this `Event` is of type `PROPERTY_ADDED`, `PROPERTY_REMOVED` or `PROPERTY_CHANGED` then this method returns the declared mixin node types of the parent node of the property affected.
      Returns:
        an array of `NodeType` objects.
      Throws:
        `RepositoryException` - if an error occurs.

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.