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 AbstractTypedCheck<T>

java.lang.Object
  extended by org.torweg.pulse.accesscontrol.attributes.AbstractTypedCheck<T>
Type Parameters:
T - the type the check is for
All Implemented Interfaces:
java.io.Serializable, JDOMable
Direct Known Subclasses:
RegexStringCheck

@Entity
public abstract class AbstractTypedCheck<T>
extends java.lang.Object
implements JDOMable, java.io.Serializable

is an entity representing a check against a given type.

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

Constructor Summary
AbstractTypedCheck()
           
 
Method Summary
abstract  AbstractTypedCheck<T> checkFromCommand(Command c)
          builds a new instance from the given Command.
 java.lang.Long getId()
          returns the primary key.
abstract  boolean isValid(AbstractValue<?> value)
          checks whether the given value is valid for the check.
abstract  AbstractTypedCheck<T> setCheckFromCommand(Command c)
          sets the values for the check from a given Command and returns the check with the newly set check.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.torweg.pulse.bundle.JDOMable
deserializeToJDOM
 

Constructor Detail

AbstractTypedCheck

public AbstractTypedCheck()
Method Detail

getId

public final java.lang.Long getId()
returns the primary key.

Returns:
the primary key

isValid

public abstract boolean isValid(AbstractValue<?> value)
checks whether the given value is valid for the check.

Parameters:
value - the value to check
Returns:
true, if and only if the value passed the check. Otherwise false.

checkFromCommand

public abstract AbstractTypedCheck<T> checkFromCommand(Command c)
builds a new instance from the given Command.

Parameters:
c - the command
Returns:
a new instance

setCheckFromCommand

public abstract AbstractTypedCheck<T> setCheckFromCommand(Command c)
sets the values for the check from a given Command and returns the check with the newly set check.

Parameters:
c - the command
Returns:
the initialised check with the newly set check
See Also:
setCheckFromCommand(org.torweg.pulse.service.request.Command)