Package org.apache.fulcrum.intake.model
Class Group
java.lang.Object
org.apache.fulcrum.intake.model.Group
- All Implemented Interfaces:
Serializable,org.apache.avalon.framework.logger.LogEnabled
public class Group
extends Object
implements Serializable, org.apache.avalon.framework.logger.LogEnabled
Holds a group of Fields
- Version:
- $Id$
- Author:
- John McNally, Henning P. Schmiedehausen, Quinton McCombs
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterUnmarshal(jakarta.xml.bind.Unmarshaller um, Object parent) JAXB / Jakarta callback to set the parent objectvoidA xhtml valid hidden input field that notifies intake of the group's presence.voidenableLogging(org.apache.avalon.framework.logger.Logger logger) Enable Avalon LoggingField<?> Get the FieldGet the parent AppData for this groupDefault object to map this group to.String[]Gets a list of the names of the fields stored in this object.Get the list of Fields.getGID()Get the part of the key used to specify the group.A xhtml valid hidden input field that notifies intake of the group's presence.Return the name given to this group.Concatenation of gid and oid.getObjects(org.apache.fulcrum.parser.ValueParser pp) DescribegetObjectsmethod here.getOID()Get the part of the key that distinguishes a group from others of the same name.intGet the number of Group objects that will be pooled.voidgetProperties(Object obj) Calls getter methods on objects that are known to Intake so that field values in forms can be initialized from the values contained in the intake tool.Initializes the Group with parameters from RunData corresponding to key.init(Retrievable obj) Initializes the group with properties from an object.init(org.apache.fulcrum.parser.ValueParser pp) Initializes the default Group using parameters.booleanPerforms an AND between all the fields in this group.voidRemoves references to this group and its fields from the query parametersvoidTo be used in the event this group is used within multiple forms within the same template.protected voidSet a collection of fields for this groupvoidsetProperties(Object obj) Calls a setter methods on obj, for fields which have been set.voidsetValidProperties(Object obj) Calls a setter methods on obj, for fields which pass validity tests.toString()Creates a string representation of this input group.
-
Field Details
-
EMPTY
- See Also:
-
NEW
- See Also:
-
-
Constructor Details
-
Group
public Group()Default constructor
-
-
Method Details
-
enableLogging
public void enableLogging(org.apache.avalon.framework.logger.Logger logger) Enable Avalon Logging- Specified by:
enableLoggingin interfaceorg.apache.avalon.framework.logger.LogEnabled
-
init
Initializes the default Group using parameters.- Parameters:
pp- aValueParservalue- Returns:
- this Group
- Throws:
IntakeException- if at least one field could not be initialized
-
init
Initializes the Group with parameters from RunData corresponding to key.- Parameters:
key- the group idpp- aValueParservalue- Returns:
- this Group
- Throws:
IntakeException- if at least one field could not be initialized
-
init
Initializes the group with properties from an object.- Parameters:
obj- aPersistentvalue- Returns:
- a
Groupvalue
-
getFieldNames
Gets a list of the names of the fields stored in this object.- Returns:
- A String array containing the list of names.
-
getIntakeGroupName
Return the name given to this group. The long name is to avoid conflicts with the get(String key) method.- Returns:
- a
Stringvalue
-
getPoolCapacity
public int getPoolCapacity()Get the number of Group objects that will be pooled.- Returns:
- an
intvalue
-
getGID
Get the part of the key used to specify the group. This is specified in the key attribute in the xml file.- Returns:
- a
Stringvalue
-
getOID
Get the part of the key that distinguishes a group from others of the same name.- Returns:
- a
Stringvalue
-
getObjectKey
Concatenation of gid and oid.- Returns:
- a
Stringvalue
-
getDefaultMapToObject
Default object to map this group to.- Returns:
- a
Stringvalue
-
getObjects
DescribegetObjectsmethod here.- Parameters:
pp- aValueParservalue- Returns:
- an
ArrayListvalue - Throws:
IntakeException- if an error occurs
-
get
Get the Field- Parameters:
fieldName- the name of the field- Returns:
- the named field
- Throws:
IntakeException- indicates the field could not be found.
-
getFields
Get the list of Fields.- Returns:
- list of Fields
-
setFields
Set a collection of fields for this group- Parameters:
inputFields- the fields to set
-
isAllValid
public boolean isAllValid()Performs an AND between all the fields in this group.- Returns:
- a
booleanvalue
-
setProperties
Calls a setter methods on obj, for fields which have been set.- Parameters:
obj- Object to be set with the values from the group.- Throws:
IntakeException- indicates that a failure occurred while executing the setter methods of the mapped object.
-
setValidProperties
Calls a setter methods on obj, for fields which pass validity tests. In most cases one should call Intake.isAllValid() and then if that test passes call setProperties. Use this method when some data is known to be invalid, but you still want to set the object properties that are valid.- Parameters:
obj- the object to set the properties for
-
getProperties
Calls getter methods on objects that are known to Intake so that field values in forms can be initialized from the values contained in the intake tool.- Parameters:
obj- Object that will be used to as a source of data for setting the values of the fields within the group.- Throws:
IntakeException- indicates that a failure occurred while executing the setter methods of the mapped object.
-
removeFromRequest
public void removeFromRequest()Removes references to this group and its fields from the query parameters -
resetDeclared
public void resetDeclared()To be used in the event this group is used within multiple forms within the same template. -
getHtmlFormInput
A xhtml valid hidden input field that notifies intake of the group's presence.- Returns:
- a
Stringvalue
-
appendHtmlFormInput
A xhtml valid hidden input field that notifies intake of the group's presence.- Parameters:
sb- the string builder to append the HTML to
-
toString
Creates a string representation of this input group. This is an xml representation. -
getAppData
Get the parent AppData for this group- Returns:
- the parent
-
afterUnmarshal
JAXB / Jakarta callback to set the parent object- Parameters:
um- the Unmarshallerparent- the parent object (an AppData object)
-