|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ail.core.Type
com.ail.core.configure.Component
com.ail.core.configure.Group
public class Group
A Group simply provides a container to give the Configuration file
more structure. It allows parameters to be grouped into sections. For
example:
<Configuration>
...
<Group name="GroupName">
<Parameter name="myParam" value="a value"/>
<Parameter name="myOtherParam" value="another value"/>
</Group>
...
</Configuration>
Note: A group may contain subgroups.
| Field Summary |
|---|
| Fields inherited from class com.ail.core.Type |
|---|
jXPathContext, NOT_PERSISTED |
| Constructor Summary | |
|---|---|
Group()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addGroup(Group vGroup)
Add a Parameter group to this group. |
void |
addParameter(Parameter vParameter)
Add a Parameter to this group. |
Group |
findGroup(java.lang.String groupName)
Find a group using a dot seperated group name. |
Parameter |
findParameter(java.lang.String paramNameArg)
Find a nested parameter in this configuration. |
java.lang.String |
findParameterValue(java.lang.String paramName)
Find the value of a parameter. |
java.lang.String |
findParameterValue(java.lang.String paramName,
java.lang.String defaultValue)
Return the value of a parameter, or a default value if the parameter is undefined. |
java.util.List<Group> |
getGroup()
Return a list of the groups in the group as an array. |
Group |
getGroup(int index)
Fetch a specific group by it's index in the group. |
int |
getGroupCount()
Fetch a count of the number of groups in this group. |
java.util.List<Parameter> |
getParameter()
Return a list of the parameters in the group as a List. |
Parameter |
getParameter(int index)
Fetch a specific Parameter by it's index in the group. |
int |
getParameterCount()
Fetch a count of the number of properties in this group. |
void |
removeAllGroup()
Remove (delete) all the groups in this group. |
void |
removeAllParameter()
Remove (delete) all the properties in this group. |
Group |
removeGroup(int index)
Remove (delete) a specific group from this group. |
Parameter |
removeParameter(int index)
Remove (delete) a specific Parameter from this group. |
void |
setGroup(int index,
Group vGroup)
Set the group at a specified index in this group, this replaces the group currently at that index. |
void |
setGroup(java.util.List<Group> group)
Replace all the groups in the group with those in the array provided. |
void |
setParameter(java.util.List<Parameter> parameter)
Replace all the properties in the group with those in the list provided. |
void |
setParameterAt(int index,
Parameter vParameter)
Set the Parameter at a specified index in this group, this replaces the Parameter currently at that index. |
| Methods inherited from class com.ail.core.configure.Component |
|---|
getName, getNameLowerCase, setName |
| Methods inherited from class com.ail.core.Type |
|---|
addAttribute, clone, deleteLock, deleteSerialVersion, fetchJXPathContext, getAttribute, getAttribute, getAttributeCount, getForeignSystemId, getLock, getSerialVersion, getSystemId, hasLock, hasSerialVersion, hasSystemId, isPersisted, markAsNotPersisted, mergeWithDataFrom, removeAttribute, removeAttribute, setAttribute, setForeignSystemId, setLock, setSerialVersion, setSystemId, xpathGet, xpathGet, xpathIterate, xpathSet |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Group()
| Method Detail |
|---|
public void addParameter(Parameter vParameter)
throws java.lang.IndexOutOfBoundsException
vParameter - Parameter to add.
java.lang.IndexOutOfBoundsException - Group is "full"
public Parameter getParameter(int index)
throws java.lang.IndexOutOfBoundsException
index - Index of Parameter to fetch.
java.lang.IndexOutOfBoundsException - index is out of rangepublic java.util.List<Parameter> getParameter()
public int getParameterCount()
public void removeAllParameter()
public Parameter removeParameter(int index)
index - The index of the Parameter to remove.
public void setParameterAt(int index,
Parameter vParameter)
throws java.lang.IndexOutOfBoundsException
index - Index into the groupvParameter - Parameter to be added.
java.lang.IndexOutOfBoundsException - If index is out of range.public void setParameter(java.util.List<Parameter> parameter)
parameter - List of parameters
public void addGroup(Group vGroup)
throws java.lang.IndexOutOfBoundsException
vGroup - Group to add.
java.lang.IndexOutOfBoundsException - Group is "full"
public Group getGroup(int index)
throws java.lang.IndexOutOfBoundsException
index - Index of Parameter group to fetch.
java.lang.IndexOutOfBoundsException - index is out of rangepublic java.util.List<Group> getGroup()
public int getGroupCount()
public void removeAllGroup()
public Group removeGroup(int index)
index - The index of the group to remove.
public void setGroup(int index,
Group vGroup)
throws java.lang.IndexOutOfBoundsException
index - Index into the groupvGroup - Group to be added.
java.lang.IndexOutOfBoundsException - If index is out of range.public void setGroup(java.util.List<Group> group)
group - Array of groupspublic Group findGroup(java.lang.String groupName)
groupName - Dot seperated group name (e.g. one.two.three).
public Parameter findParameter(java.lang.String paramNameArg)
paramNameArg - Nested name (e.g. outter.inner.parameter).
public java.lang.String findParameterValue(java.lang.String paramName)
paramName - The parameter to return the value of.
public java.lang.String findParameterValue(java.lang.String paramName,
java.lang.String defaultValue)
paramName - The parameter to return the value of.defaultValue - The default value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||