com.sdm.quasar.client.jsf.binding
Interface ValueResolver


public interface ValueResolver

The ValueResolver defines the data binding to an object that is not resolved by JSF (e.g. a data manager). It encapsulates the access to a value referenced by a keyword.

Author:
Martin Haft

Method Summary
 boolean canModifyValue(java.lang.String keyword)
           
 java.lang.Object getValue(java.lang.String keyword)
          Resolves the keyword to its referenced value.
 java.lang.Class getValueType(java.lang.String keyword)
           
 boolean hasValue(java.lang.String keyword)
          Checks, if this ValueResolver can resolve the given keyword.
 void setValue(java.lang.String keyword, java.lang.Object value)
          Sets a new value for the referenced keyword
 

Method Detail

hasValue

public boolean hasValue(java.lang.String keyword)
Checks, if this ValueResolver can resolve the given keyword.

Parameters:
keyword - the keyword to be resolved
Returns:
true, iff the keyword can be resolved

getValueType

public java.lang.Class getValueType(java.lang.String keyword)
Parameters:
keyword - the keyword to be resolve
Returns:
the class of the resolved value
Throws:
java.lang.RuntimeException - if the keyword can not be resolved by this. Use #canResolve(String) to check.

getValue

public java.lang.Object getValue(java.lang.String keyword)
Resolves the keyword to its referenced value.

Parameters:
keyword - the keyword to be resolve
Returns:
the resolved object
Throws:
java.lang.RuntimeException - if the keyword can not be resolved by this. Use #canResolve(String) to check.

canModifyValue

public boolean canModifyValue(java.lang.String keyword)
Parameters:
keyword - the keyword to be resolve
Returns:
true, if the value, referenced by the keyword, can be modified

setValue

public void setValue(java.lang.String keyword,
                     java.lang.Object value)
Sets a new value for the referenced keyword

Parameters:
keyword - the keyword to be resolve
value - the new value
Throws:
java.lang.RuntimeException - if the keyword can not be resolved by this or the value can not be modified. Use #canResolve(String) or canModifyValue(String) to check.