| java.lang.Object com.ivata.mask.DefaultMaskFactory
DefaultMaskFactory | final public class DefaultMaskFactory implements MaskFactory,Serializable(Code) | |
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.
author: Colin MacLeod author: colin.macleod@ivata.com since: ivata masks 0.1 (2004-02-26) |
Method Summary | |
public String | getDefaultInputMask()
Get the name of the default mask/screen used for user input. | public String | getDefaultListMask()
Get the name of the default mask/screen used for lists. | public Group | getGroup(String id)
Get a group definition referenced by its id.
Parameters: id - unique identifier of the group. | public Mask | getMask(Class valueObjectClassParam) This will return the default input mask for the class provided. | public Mask | getMask(Class valueObjectClass, String name)
Get a mask, identified by its class and name.
Parameters: valueObjectClass - class of value object for the mask to be returned. Parameters: name - optional parameter defining multiple masks for the same valueobject. | public Mask | getMask(Field parentField, Class valueObjectClassParam)
This will return the default input mask for the class provided
of the sub-classed field. | public Mask | getMask(Field parentField, Class valueObjectClass, String nameParam)
Get a mask, identified by its class and name.
Parameters: parentField - If this mask applies to a field within another mask, (known asa submask) this is the field to which it applies, otherwiseuse the other getMask method. Parameters: valueObjectClass - class of value object for the mask to be returned. Parameters: nameParam - describes this mask uniquely within the value object. | public boolean | isConfigured()
Discover whether or not this object has been configured. | public void | readConfiguration(InputStream inputStream) Get the configuration represented by the dom4j document provided. |
DefaultMaskFactory | public DefaultMaskFactory(FieldValueConvertorFactory fieldValueConvertorFactoryParam)(Code) | |
Default constructor. Initializes the mask factory with
"inputMask" as the default input mask, and
"inputMask" as the default list mask.
Parameters: fieldValueConvertorFactoryParam - creates convertors to convertfield values in the filters. |
DefaultMaskFactory | public DefaultMaskFactory(String defaultInputMaskParam, String defaultListMaskParam, FieldValueConvertorFactory fieldValueConvertorFactoryParam)(Code) | |
Construct an instance of the factory with the default mask/screens
provided.
Parameters: defaultInputMaskParam - The name of the default mask/screen used for user input. Parameters: defaultListMaskParam - The name of the default mask/screen used to list. Parameters: fieldValueConvertorFactoryParam - creates convertors to convertfield values in the filters. |
getGroup | public Group getGroup(String id)(Code) | |
Get a group definition referenced by its id.
Parameters: id - unique identifier of the group. Group definition with the id provided, or null ifthere is no such group. |
getMask | public Mask getMask(Class valueObjectClass, String name)(Code) | |
Get a mask, identified by its class and name.
Parameters: valueObjectClass - class of value object for the mask to be returned. Parameters: name - optional parameter defining multiple masks for the same valueobject. May be null . Mask definition with the id provided, or null ifthere is no such mask. |
getMask | public Mask getMask(Field parentField, Class valueObjectClassParam)(Code) | |
This will return the default input mask for the class provided
of the sub-classed field.
Parameters: parentField - Parameters: valueObjectClassParam - |
getMask | public Mask getMask(Field parentField, Class valueObjectClass, String nameParam)(Code) | |
Get a mask, identified by its class and name.
Parameters: parentField - If this mask applies to a field within another mask, (known asa submask) this is the field to which it applies, otherwiseuse the other getMask method. Parameters: valueObjectClass - class of value object for the mask to be returned. Parameters: nameParam - describes this mask uniquely within the value object. (Youcan have more than one mask for each value object.) Mask definition with the id provided, or null ifthere is no such mask.TODO: replace NullPointerException thrown here with a mask configurationexception. |
readConfiguration | public void readConfiguration(InputStream inputStream) throws IOException(Code) | | Get the configuration represented by the dom4j document provided.
Parameters: inputStream - The input stream to read the XML from. throws: IOException - If there is any problem reading from the stream provided. |
|
|