org.modeshape.jcr.spi.federation

## Interface ExtraPropertiesStore

- All Known Implementing Classes:
    Connectors.LocalDocumentStoreExtraProperties, NoExtraPropertiesStorage

      public interface ExtraPropertiesStore

  Store for extra properties, which a `Connector` implementation can use to store and retrieve "extra" properties on a node that cannot be persisted in the external system. Generally, a connector should store as much as possible in the external system. However, not all systems are capable of persisting any and all properties that a JCR client may put on a node. In such cases, the connector can store these "extra" properties (that it does not persist) in this properties store.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Map<Name,Property>` | `NO_PROPERTIES`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<Name,Property>` | `getProperties(String id)` Retrieve the extra properties that were stored for the node with the supplied ID.
    `boolean` | `removeProperties(String id)` Remove all of the extra properties that were stored for the node with the supplied ID.
    `void` | `storeProperties(String id, Map<Name,Property> properties)` Store the supplied extra properties for the node with the supplied ID.
    `void` | `updateProperties(String id, Map<Name,Property> properties)` Update the supplied extra properties for the node with the supplied ID.

- - ### Field Detail

    - #### NO_PROPERTIES

          static final Map<Name,Property> NO_PROPERTIES

  - ### Method Detail

    - #### storeProperties

          void storeProperties(String id,
                             Map<Name,Property> properties)

      Store the supplied extra properties for the node with the supplied ID. This will overwrite any properties that were previously stored for the node with the specified ID.
      Parameters:
        `id` - the identifier for the node; may not be null
        `properties` - the extra properties for the node that should be stored in this storage area, keyed by their name

    - #### updateProperties

          void updateProperties(String id,
                              Map<Name,Property> properties)

      Update the supplied extra properties for the node with the supplied ID.
      Parameters:
        `id` - the identifier for the node; may not be null
        `properties` - the extra properties for the node that should be stored in this storage area, keyed by their name; any entry that contains a null Property will define a property that should be removed

    - #### getProperties

          Map<Name,Property> getProperties(String id)

      Retrieve the extra properties that were stored for the node with the supplied ID.
      Parameters:
        `id` - the identifier for the node; may not be null
      Returns:
        the map of properties keyed by their name; may be empty, but never null

    - #### removeProperties

          boolean removeProperties(String id)

      Remove all of the extra properties that were stored for the node with the supplied ID.
      Parameters:
        `id` - the identifier for the node; may not be null
      Returns:
        true if there were properties stored for the node and now removed, or false if there were no extra properties stored for the node with the supplied key

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