pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.accesscontrol.attributes
Class AbstractValue<T>

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.accesscontrol.attributes.AbstractValue<T>
Type Parameters:
T - the type of the value
All Implemented Interfaces:
java.io.Serializable, JDOMable
Direct Known Subclasses:
BooleanValue, SectionValue, SelectionValue, StringValue

@Entity
public abstract class AbstractValue<T>
extends AbstractBasicEntity
implements JDOMable

represents the tripel of an AbstractAttribute, a User and the value <T>.

Version:
$Revision: 1481 $
Author:
Thomas Weber, Daniel Dietz
See Also:
Serialized Form

Constructor Summary
AbstractValue()
           
 
Method Summary
abstract  org.jdom.Element deserializeToJDOM()
          returns an Element representing the value.
abstract  AbstractAttribute<T> getAttribute()
          returns the attribute the value is associated with.
 User getUser()
          returns the user the value is associated with.
abstract  T getValue()
          returns the value the value is associated with.
abstract  void setAttribute(AbstractAttribute<T> a)
          sets the attribute the value is associated with.
 void setUser(User u)
          sets the user the value is associated with.
abstract  void setValue(T v)
          sets the value the value is associated with.
abstract  java.lang.String toString()
          attributes must return a suitable String representation.
abstract  void updateFromCommand(Command c)
          updates the values from a given Command.
 
Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractValue

public AbstractValue()
Method Detail

getAttribute

public abstract AbstractAttribute<T> getAttribute()
returns the attribute the value is associated with.

Returns:
the attribute

setAttribute

public abstract void setAttribute(AbstractAttribute<T> a)
sets the attribute the value is associated with.

Parameters:
a - the attribute to set

getUser

public final User getUser()
returns the user the value is associated with.

Returns:
the user

setUser

public final void setUser(User u)
sets the user the value is associated with.

Parameters:
u - the user to set

getValue

public abstract T getValue()
returns the value the value is associated with.

Returns:
the value

setValue

public abstract void setValue(T v)
sets the value the value is associated with.

Parameters:
v - the value to set

deserializeToJDOM

public abstract org.jdom.Element deserializeToJDOM()
returns an Element representing the value.

Specified by:
deserializeToJDOM in interface JDOMable
Returns:
an Element representing the value

updateFromCommand

public abstract void updateFromCommand(Command c)
updates the values from a given Command.

Parameters:
c - the Command

toString

public abstract java.lang.String toString()
attributes must return a suitable String representation.

Overrides:
toString in class java.lang.Object
Returns:
a String representation