ModeShape Distribution 3.2.0.Final

org.modeshape.jcr.federation
Class NoExtraPropertiesStorage

java.lang.Object
  extended by org.modeshape.jcr.federation.NoExtraPropertiesStorage
All Implemented Interfaces:
ExtraPropertiesStore

public class NoExtraPropertiesStorage
extends Object
implements ExtraPropertiesStore

An ExtraPropertiesStore implementation that throws an exception whenever trying to store or update extra properties.


Field Summary
protected static Map<Name,Property> NO_PROPERTIES_MAP
           
 
Fields inherited from interface org.modeshape.jcr.federation.spi.ExtraPropertiesStore
NO_PROPERTIES
 
Constructor Summary
NoExtraPropertiesStorage(Connector connector)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_PROPERTIES_MAP

protected static final Map<Name,Property> NO_PROPERTIES_MAP
Constructor Detail

NoExtraPropertiesStorage

public NoExtraPropertiesStorage(Connector connector)
Method Detail

getProperties

public Map<Name,Property> getProperties(String id)
Description copied from interface: ExtraPropertiesStore
Retrieve the extra properties that were stored for the node with the supplied ID.

Specified by:
getProperties in interface ExtraPropertiesStore
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

public boolean removeProperties(String id)
Description copied from interface: ExtraPropertiesStore
Remove all of the extra properties that were stored for the node with the supplied ID.

Specified by:
removeProperties in interface ExtraPropertiesStore
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

storeProperties

public void storeProperties(String id,
                            Map<Name,Property> properties)
Description copied from interface: ExtraPropertiesStore
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.

Specified by:
storeProperties in interface ExtraPropertiesStore
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

public void updateProperties(String id,
                             Map<Name,Property> properties)
Description copied from interface: ExtraPropertiesStore
Update the supplied extra properties for the node with the supplied ID.

Specified by:
updateProperties in interface ExtraPropertiesStore
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

ModeShape Distribution 3.2.0.Final

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