|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ivata.mask.DefaultMaskFactory
This factory class is at the heart of ivata masks. Use it to read in a configuration file (in XML), and then access groups of fields via their unique identifiers.
It is called DefaultMaskFactory because the ivata
masks system actually never refers to this class directly - it uses
the interface MaskFactory, meaning you could create your own factory
implementation, if you want to.
| Constructor Summary | |
DefaultMaskFactory(FieldValueConvertorFactory fieldValueConvertorFactory)
Default constructor. |
|
DefaultMaskFactory(java.lang.String defaultInputMaskParam,
java.lang.String defaultListMaskParam,
FieldValueConvertorFactory fieldValueConvertorFactoryParam)
Construct an instance of the factory with the default mask/screens provided. |
|
| Method Summary | |
java.lang.String |
getDefaultInputMask()
Get the name of the default mask/screen used for user input. |
java.lang.String |
getDefaultListMask()
Get the name of the default mask/screen used for lists. |
Group |
getGroup(java.lang.String id)
Get a group definition referenced by its id. |
Mask |
getMask(java.lang.Class valueObjectClassParam)
This will return the default input mask for the class provided. |
Mask |
getMask(java.lang.Class valueObjectClass,
java.lang.String name)
Get a mask, identified by its class and name. |
Mask |
getMask(Field parentField,
java.lang.Class valueObjectClassParam)
This will return the default input mask for the class provided of the subclassed field. |
Mask |
getMask(Field parentField,
java.lang.Class valueObjectClass,
java.lang.String nameParam)
Get a mask, identified by its class and name. |
boolean |
isConfigured()
Discover whether or not this object has been configured. |
void |
readConfiguration(java.io.InputStream inputStream)
Get the configuration represented by the dom4j document provided. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultMaskFactory(FieldValueConvertorFactory fieldValueConvertorFactory)
Default constructor. Initializes the mask factory with "inputMask" as the default input mask, and "inputMask" as the default list mask.
fieldValueConvertorFactory - creates convertors to convert field
values in the filters.
public DefaultMaskFactory(java.lang.String defaultInputMaskParam,
java.lang.String defaultListMaskParam,
FieldValueConvertorFactory fieldValueConvertorFactoryParam)
Construct an instance of the factory with the default mask/screens provided.
defaultInputMaskParam - The name of the default mask/screen used for user input.defaultListMaskParam - The name of the default mask/screen used to list.| Method Detail |
public java.lang.String getDefaultInputMask()
Get the name of the default mask/screen used for user input.
getDefaultInputMask in interface MaskFactoryMaskFactory.getDefaultInputMask()public java.lang.String getDefaultListMask()
Get the name of the default mask/screen used for lists.
getDefaultListMask in interface MaskFactoryMaskFactory.getDefaultListMask()public Group getGroup(java.lang.String id)
Get a group definition referenced by its id.
getGroup in interface MaskFactoryid - unique identifier of the group.
null if
there is no such group.public Mask getMask(java.lang.Class valueObjectClassParam)
MaskFactory.getMask(java.lang.Class, java.lang.String).
getMask in interface MaskFactoryvalueObjectClassParam - Refer to MaskFactory.getMask(java.lang.Class, java.lang.String).
MaskFactory.getMask(java.lang.Class, java.lang.String).
public Mask getMask(java.lang.Class valueObjectClass,
java.lang.String name)
Get a mask, identified by its class and name.
getMask in interface MaskFactoryvalueObjectClass - class of value object for the mask to be returned.name - optional parameter defining multiple masks for the same value
object. May be null.
null if
there is no such mask.
public Mask getMask(Field parentField,
java.lang.Class valueObjectClassParam)
MaskFactory.getMask(java.lang.Class, java.lang.String).
getMask in interface MaskFactoryvalueObjectClassParam - Refer to MaskFactory.getMask(java.lang.Class, java.lang.String).parentField - If this mask applies to a field within another mask, (known as
a submask) this is the field to which it applies, otherwise
use the other getMask method.
MaskFactory.getMask(java.lang.Class, java.lang.String).
public Mask getMask(Field parentField,
java.lang.Class valueObjectClass,
java.lang.String nameParam)
Get a mask, identified by its class and name.
parentField - If this mask applies to a field within another mask, (known as
a submask) this is the field to which it applies, otherwise
use the other getMask method.valueObjectClass - class of value object for the mask to be returned.nameParam - describes this mask uniquely within the value object. (You
can have more than one mask for each value object.)
null if
there is no such mask.
TODO: replace NullPointerException thrown here with a mask configuration
exception.public boolean isConfigured()
Discover whether or not this object has been configured.
isConfigured in interface MaskFactorytrue if the object has been configured, otherwise
false.MaskFactory.isConfigured()
public void readConfiguration(java.io.InputStream inputStream)
throws java.io.IOException
readConfiguration in interface MaskFactoryinputStream - The input stream to read the XML from.
java.io.IOException - If there is any problem reading from the stream provided.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||