at.spardat.xma.mdl.simple
Interface ISimpleWMClient

All Superinterfaces:
IAtomic, ISimpleWM, IWModelClient
All Known Implementing Classes:
SimpleWMClient

public interface ISimpleWMClient
extends ISimpleWM, IWModelClient

This class defines the behaviour of a SimpleWM at the client side of XMA. The primary enrichment compared to ISimpleWM is the ability to set and query a formatter, see IFmt and to check if the value of this is valid with respect to the formatter.


Method Summary
 at.spardat.enterprise.fmt.IFmt getFmt()
          Returns a clone of the associated Formatter or null if none is associated.
 java.lang.String getFormattedString()
          Provides a string that results from applying the formatter to the internally stored value.
 boolean isMandatory()
          Returns the MANDATORY-property of the associated formatter.
 boolean isValidateIfUneditable()
          Returns if this widget is validated in the editable=false state, too.
 boolean isValueValid()
          Determines if the value contained in this Model is a valid one in terms of the associated formatter.
 void setFmt(at.spardat.enterprise.fmt.IFmt formatter)
          Sets a new Formatter.
 void setMandatory(boolean what)
          If there is a formatter attached, this method clones the old formatter, changes the MANDATORY-property of the formatter to the provided value, and sets the formatter.
 void setValidateIfUneditable(boolean what)
          If this is set to true then the widget is validated in the editable=false state, too.
 
Methods inherited from interface at.spardat.xma.mdl.simple.ISimpleWM
clear, set, set, set, set, set, set, set, set, set, set, set, set, set, set
 
Methods inherited from interface at.spardat.xma.mdl.IAtomic
getEncodedValue, getType, hasValue, isTrue, toBigDecimal, toByte, toBYTE, toDate, toDouble, toDOUBLE, toFloat, toFLOAT, toInt, toINTEGER, toLong, toLONG, toShort, toSHORT, toString, toString
 
Methods inherited from interface at.spardat.xma.mdl.IWModelClient
getUIDelegate, isEditable, isEnabled, setEditable, setEnabled
 

Method Detail

isValueValid

public boolean isValueValid()
Determines if the value contained in this Model is a valid one in terms of the associated formatter. Note the formatter usually restricts the allowed value range of the type. Since formatters are only executing at the client side, it may be the case that the server provides values which are obeying the type, but are conflicting with the formatter.

Returns:
true if the contained value conflicts with the formatter.

getFmt

public at.spardat.enterprise.fmt.IFmt getFmt()
Returns a clone of the associated Formatter or null if none is associated.

Returns:
the attached formatter

setFmt

public void setFmt(at.spardat.enterprise.fmt.IFmt formatter)
Sets a new Formatter.

Parameters:
formatter - to be set. It must be compatible to the type set in the superclass. For type T_STRING, any formatter may be set. For the other types, the type of the formatter must be compatible with the type specified in the superclass. For instance, if the type is T_BCD, only instances of ABcdFmt are allowed.
Throws:
java.lang.IllegalArgumentException - if the provided formatter is not type compatible

getFormattedString

public java.lang.String getFormattedString()
Provides a string that results from applying the formatter to the internally stored value.


isMandatory

public boolean isMandatory()
Returns the MANDATORY-property of the associated formatter. Returns false, if there is no formatter associated.


setMandatory

public void setMandatory(boolean what)
If there is a formatter attached, this method clones the old formatter, changes the MANDATORY-property of the formatter to the provided value, and sets the formatter. If there is no formatter attached, this method does nothing.


setValidateIfUneditable

public void setValidateIfUneditable(boolean what)
If this is set to true then the widget is validated in the editable=false state, too. Normally widgets in the editable=false state are not validated. So this property defaults to false, if not set otherwise.

Parameters:
what -
Since:
version_number

isValidateIfUneditable

public boolean isValidateIfUneditable()
Returns if this widget is validated in the editable=false state, too. Normally widgets in the editable=false state are not validated. So this property defaults to false, if not set otherwise.

Returns:
the validateUneditable property
Since:
version_number