com.ivata.mask.group
Interface Group

All Known Subinterfaces:
Mask
All Known Implementing Classes:
GroupImpl, MaskImpl

public interface Group

Instances of this interface define a group of masks which share common field definitions and other characteristics.

Since:
ivata masks 0.1 (2004-02-26)
Author:
Colin MacLeod colin.macleod@ivata.com

Method Summary
 java.util.Set getAllExcludedFieldNames()
           Get the field identifiers of all fields which have been excluded from this and its parents.
 java.util.List getAllFirstFieldNames()
           Get the field identifiers of all fields which should appear at the start of the group/mask, including those defined by its parent.
 java.util.List getAllLastFieldNames()
           Get the field identifiers of all fields which should appear at the end of the group/mask, including those defined by its parent.
 java.util.Set getExcludedFieldNames()
           Get the field ids which have been explicitly excluded from this group.
 Field getField(java.lang.String name)
           Default field definitions.
 java.util.List getFilters()
          Get all of the filters applied to this group, as a List of Filter instances.
 java.util.List getFirstFieldNames()
           Get the ids of all fields which should appear at the start of masks in this group.
 java.util.Set getIncludedFieldNames()
          By explicitly including fields in a mask, you can override fields excluded by one of its parents.
 java.util.List getLastFieldNames()
           Get the ids of all fields which should appear at the end of masks in this group.
 java.lang.String getName()
          Get the identifier of this group.
 Group getParent()
           Get the parent of this group, if any.
 boolean isDisplayOnly()
           If true, only the values in this mask will be displayed.
 boolean isParentFirstFieldNamesReplaced()
           When first field identifiers are defined for a group, normally these are appended to the list of all parent group first field identifiers, i.e.
 boolean isParentLastFieldNamesReplaced()
           When last field identifiers are defined for a group, normally these are appended to the list of all parent group last field identifiers, i.e.
 

Method Detail

getAllExcludedFieldNames

public java.util.Set getAllExcludedFieldNames()

Get the field identifiers of all fields which have been excluded from this and its parents.

Note: This will list fields which were explicitly excluded, even if a parent class included them before.

Returns:
list of all excluded field ids, as a List of String instances.
See Also:
getExcludedFieldNames()

getAllFirstFieldNames

public java.util.List getAllFirstFieldNames()

Get the field identifiers of all fields which should appear at the start of the group/mask, including those defined by its parent.

Returns:
list of all first field ids, as a List of String instances.
See Also:
getFirstFieldNames()

getAllLastFieldNames

public java.util.List getAllLastFieldNames()

Get the field identifiers of all fields which should appear at the end of the group/mask, including those defined by its parent.

Returns:
list of all last field ids, as a List of String instances.
See Also:
getFirstFieldNames()

getExcludedFieldNames

public java.util.Set getExcludedFieldNames()

Get the field ids which have been explicitly excluded from this group.

Returns:
the field ids which have been explicitly excluded from this group (not including those excluded by parent groups).

getField

public Field getField(java.lang.String name)

Default field definitions. These can be altered/overridden.

Parameters:
name - name of the field to be returned.
Returns:
read-only copy of the fields.

getFilters

public java.util.List getFilters()
Get all of the filters applied to this group, as a List of Filter instances.

Returns:
all filters as a list.

getFirstFieldNames

public java.util.List getFirstFieldNames()

Get the ids of all fields which should appear at the start of masks in this group. For an input mask this usually means the fields will appear at the top of the page; for a list the fields will appear at the left of the list.

Note that all these fields do not need to be present in all masks of this group (some value objects may not have all the fields listed). Those fields which are listed and present in the value object will appear at the start, in the order given.

Returns:
list containing string identifiers of fields which should appear first in the mask.

getIncludedFieldNames

public java.util.Set getIncludedFieldNames()
By explicitly including fields in a mask, you can override fields excluded by one of its parents.

Returns:
fields explicitly included (overridden) in this mask.

getLastFieldNames

public java.util.List getLastFieldNames()

Get the ids of all fields which should appear at the end of masks in this group. For an input mask this usually means the fields will appear at the bottom of the page; for a list the fields will appear at the right of the list.

Note that all these fields do not need to be present in all masks of this group (some value objects may not have all the fields listed). Those fields which are listed and present in the value object will appear at the end, in the order given.

Returns:
list containing string identifiers of fields which should appear last in the mask.

getName

public java.lang.String getName()
Get the identifier of this group. This identifier is unique within the system, for groups (but not necessarily for their subclasses).

Returns:
unique identifier of this group.

getParent

public Group getParent()

Get the parent of this group, if any.

Each group or mask can define a parent, from which it can inherit field definitions and group/mask properties.

Returns:
parent of this group, or null if this is a top-level group.

isDisplayOnly

public boolean isDisplayOnly()

If true, only the values in this mask will be displayed. Otherwise, input fields are displayed.

Returns:
whether or not the mask should only display field values.

isParentFirstFieldNamesReplaced

public boolean isParentFirstFieldNamesReplaced()

When first field identifiers are defined for a group, normally these are appended to the list of all parent group first field identifiers, i.e. the list returned by calling getFirstFieldNames on the parent group.

This is the standard, default behavior when this method returns false. However, if this method returns true, then the first field identifiers in this group override (replace) the list returned by the group's parents.

Returns:
true if this group replaces the list of first field ids defined by parent groups, otherwise false if this group's list will be appended to that of its parents.
See Also:
getFirstFieldNames()

isParentLastFieldNamesReplaced

public boolean isParentLastFieldNamesReplaced()

When last field identifiers are defined for a group, normally these are appended to the list of all parent group last field identifiers, i.e. the list returned by calling getLastFieldNames on the parent group.

This is the standard, default behavior when this method returns false. However, if this method returns true, then the last field identifiers in this group override (replace) the list returned by the group's parents.

Returns:
true if this group replaces the list of last field ids defined by parent groups, otherwise false if this group's list will be appended to that of its parents.
See Also:
getLastFieldNames()


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