public class SystemValueGroup
extends java.lang.Object
implements java.io.Serializable
SystemValue
,
SystemValueList
,
Serialized FormConstructor and Description |
---|
SystemValueGroup()
Constructs a SystemValueGroup object.
|
SystemValueGroup(AS400 system,
java.lang.String groupName,
java.lang.String groupDescription)
Constructs a SystemValueGroup object.
|
SystemValueGroup(AS400 system,
java.lang.String groupName,
java.lang.String groupDescription,
int group)
Constructs a SystemValueGroup object.
|
SystemValueGroup(AS400 system,
java.lang.String groupName,
java.lang.String groupDescription,
java.lang.String[] names)
Constructs a SystemValueGroup object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String name)
Adds a system value name to this group.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener.
|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
Adds a VetoableChangeListener.
|
boolean |
contains(java.lang.String name)
Determines if a system value name is part of this group.
|
java.lang.String |
getGroupDescription()
Returns the user-defined description for this group.
|
java.lang.String |
getGroupName()
Returns the user-defined name for this group.
|
java.lang.String[] |
getNames()
Returns the system value names that are currently part of this group.
|
AS400 |
getSystem()
Returns the system object representing the system on which the system value group exists.
|
java.util.Vector |
getSystemValues()
Returns newly-generated SystemValue objects representing the system values in this group.
|
static void |
refresh(java.util.Vector systemValues)
Retrieves new values for the SystemValue objects in the Vector.
|
boolean |
remove(java.lang.String name)
Removes a system value name from this group.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the PropertyChangeListener.
|
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
Removes the VetoableChangeListener.
|
void |
setGroupDescription(java.lang.String groupDescription)
Sets the user-defined group description for any SystemValue objects generated by this group.
|
void |
setGroupName(java.lang.String groupName)
Sets the user-defined group name for any SystemValue objects generated by this group.
|
void |
setSystem(AS400 system)
Sets the system object representing the system on which the system value group exists.
|
java.lang.String |
toString()
Returns a String representation of this object.
|
public SystemValueGroup()
public SystemValueGroup(AS400 system, java.lang.String groupName, java.lang.String groupDescription)
system
- The system that this group of system value names references.groupName
- The user-defined group name to be used.groupDescription
- The user-defined group description to be used.public SystemValueGroup(AS400 system, java.lang.String groupName, java.lang.String groupDescription, java.lang.String[] names)
system
- The system that this group of system value names references.groupName
- The user-defined group name to be used.groupDescription
- The user-defined group description to be used.names
- The array of system value names to be initially added to this group.public SystemValueGroup(AS400 system, java.lang.String groupName, java.lang.String groupDescription, int group)
Note: This constructor now makes a connection to the system in order to retrieve the IBM i release level of the system.
system
- The system that this group of system values references.groupName
- The user-defined group name to be used.groupDescription
- The user-defined group description to be used.group
- The system value group constant indicating the set of system value names to be initially added to this group. Valid constants are defined in the SystemValueList class.SystemValueList
,
SystemValueList.GROUP_ALL
public void add(java.lang.String name)
name
- The system value name to be added to this group.contains(java.lang.String)
,
getNames()
,
remove(java.lang.String)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener object.public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The listener object.public boolean contains(java.lang.String name)
name
- The system value name in question.add(java.lang.String)
,
getNames()
,
remove(java.lang.String)
public java.lang.String getGroupDescription()
setGroupDescription(java.lang.String)
public java.lang.String getGroupName()
setGroupName(java.lang.String)
public java.lang.String[] getNames()
add(java.lang.String)
,
contains(java.lang.String)
,
remove(java.lang.String)
public AS400 getSystem()
public java.util.Vector getSystemValues() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
If any value in this group is not supported by this group's system, its corresponding SystemValue object will not be returned in the Vector. Therefore, the number of SystemValue objects in the returned Vector may not be the same as the number of system value names represented by this group.
To refresh the values in a Vector of SystemValues, use the refresh() method.
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the object does not exist on the system.refresh(java.util.Vector)
public static void refresh(java.util.Vector systemValues) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
systemValues
- The group of SystemValue objects to be refreshed.AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the object does not exist on the system.SystemValue.clear()
public boolean remove(java.lang.String name)
name
- The system value name to be removed from this group.add(java.lang.String)
,
contains(java.lang.String)
,
getNames()
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The listener object.public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
listener
- The listener object.public void setGroupDescription(java.lang.String groupDescription) throws java.beans.PropertyVetoException
groupDescription
- The group description.java.beans.PropertyVetoException
- If any of the registered listeners vetos the property change.getGroupDescription()
public void setGroupName(java.lang.String groupName) throws java.beans.PropertyVetoException
groupName
- The group name.java.beans.PropertyVetoException
- If any of the registered listeners vetos the property change.getGroupName()
public void setSystem(AS400 system) throws java.beans.PropertyVetoException
system
- The system object representing the system on which the system value group exists.java.beans.PropertyVetoException
- If any of the registered listeners vetos the property change.public java.lang.String toString()
toString
in class java.lang.Object