com.ivata.mask
Interface MaskFactory

All Known Implementing Classes:
DefaultMaskFactory

public interface MaskFactory

An instance of this interface is used to generate all masks and groups in the project.

Since:
ivata masks 0.1 (2004-05-14)
Version:
$Revision: 1.5 $
Author:
Colin MacLeod colin.macleod@ivata.com
See Also:
DefaultMaskFactory

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 to list a base class.
 Group getGroup(java.lang.String id)
           Get a group definition referenced by its id.
 Mask getMask(java.lang.Class valueObjectClass)
           Get the default mask for a value object class.
 Mask getMask(java.lang.Class valueObjectClass, java.lang.String type)
           Get a mask, identified by its class and type.
 Mask getMask(Field parentField, java.lang.Class valueObjectClass)
           Get a mask, identified by its parent field, and class.
 boolean isConfigured()
           Discover whether or not this object has been configured.
 void readConfiguration(java.io.InputStream inputStream)
           Get the configuration represented by the document provided.
 

Method Detail

getDefaultInputMask

public java.lang.String getDefaultInputMask()

Get the name of the default mask/screen used for user input.

Returns:
name of the default mask/screen used for user input.

getDefaultListMask

public java.lang.String getDefaultListMask()

Get the name of the default mask/screen used to list a base class.

Returns:
name of the default mask/screen used to list a base class.

getGroup

public Group getGroup(java.lang.String id)

Get a group definition referenced by its id.

Parameters:
id - unique identifier of the group.
Returns:
Group definition with the id provided, or null if there is no such group.

getMask

public Mask getMask(java.lang.Class valueObjectClass,
                    java.lang.String type)

Get a mask, identified by its class and type.

Parameters:
valueObjectClass - class of value object for the mask to be returned.
type - optional parameter defining multiple masks for the same value object. May be null.
Returns:
Mask definition with the id provided, or null if there is no such mask.

getMask

public Mask getMask(java.lang.Class valueObjectClass)

Get the default mask for a value object class.

Parameters:
valueObjectClass - class of value object for the mask to be returned.
Returns:
Mask definition with the id provided, or null if there is no such mask.

getMask

public Mask getMask(Field parentField,
                    java.lang.Class valueObjectClass)

Get a mask, identified by its parent field, and class. This returns the input mask for the subclassed field.

Parameters:
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.
Returns:
Mask definition with the id provided, or null if there is no such mask.

isConfigured

public boolean isConfigured()

Discover whether or not this object has been configured.

Returns:
true if the object has been configured, otherwise false.

readConfiguration

public void readConfiguration(java.io.InputStream inputStream)
                       throws java.io.IOException

Get the configuration represented by the document provided.

Parameters:
inputStream - The input stream to read the XML from.
Throws:
java.io.IOException - If there is any problem reading from the stream provided.


Copyright © 2001-2005 ivata limited. All Rights Reserved.