org.openpermis.editor.policy.configuration
Class State

java.lang.Object
  extended by org.openpermis.editor.policy.configuration.State

public final class State
extends Object

State object that can temporarily be added to a context container during component creation.

See Also:
ComponentFactory
Since:
0.9.0

Constructor Summary
protected State(Class<?> key, Object value)
          Creates a state with the specified key class and value.
 
Method Summary
 void addTo(org.picocontainer.MutablePicoContainer container)
          Adds this state from the container specified.
 boolean containedIn(org.picocontainer.MutablePicoContainer container)
          Check if a state with an equivalent key is already present at the specified container.
 void removeFrom(org.picocontainer.MutablePicoContainer container)
          Removes this state from the container specified.
static State state(Class<?> key, Object value)
          Creates a state with the specified key class and value.
static State state(Object value)
          Creates a state object that uses the class of the value specified as key.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

State

protected State(Class<?> key,
                Object value)
Creates a state with the specified key class and value.

The value must be assignable to the key class.

Parameters:
key - the key class of the state object, must not be null.
value - the value of the state object, must not be null.
Since:
0.9.0
Method Detail

state

public static final State state(Class<?> key,
                                Object value)
Creates a state with the specified key class and value.

The value must be assignable to the key class.

Convenience method for static imports.

Parameters:
key - the key class of the state object, must not be null.
value - the value of the state object, must not be null.
Since:
0.9.0

state

public static final State state(Object value)
Creates a state object that uses the class of the value specified as key.

Convenience method for static imports.

Parameters:
value - the value for which to create a state object.
Since:
0.9.0

containedIn

public boolean containedIn(org.picocontainer.MutablePicoContainer container)
Check if a state with an equivalent key is already present at the specified container.

Parameters:
container - the container to search for a similar state.
Returns:
true if a similar state is already contained.
Since:
0.9.0

addTo

public void addTo(org.picocontainer.MutablePicoContainer container)
Adds this state from the container specified.

Parameters:
container - the container to add this state to.
Since:
0.9.0

removeFrom

public void removeFrom(org.picocontainer.MutablePicoContainer container)
Removes this state from the container specified.

Parameters:
container - the container to remove this state from.
Since:
0.9.0

toString

public String toString()
Overrides:
toString in class Object
Since:
0.9.0


OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG