com.ibm.as400.access

Class SystemValueGroup

  • All Implemented Interfaces:
    Serializable


    public class SystemValueGroup
    extends Object
    implements Serializable
    The SystemValueGroup class represents a user-defined collection of system values and network attributes. It is not as much a container for SystemValue objects as it is a factory for generating collections of SystemValues having certain attributes.
    See Also:
    SystemValue, SystemValueList, Serialized Form
    • Constructor Detail

      • SystemValueGroup

        public SystemValueGroup()
        Constructs a SystemValueGroup object. The system property must be set before attempting a connection.
        See Also:
        setSystem(com.ibm.as400.access.AS400)
      • SystemValueGroup

        public SystemValueGroup(AS400 system,
                        String groupName,
                        String groupDescription)
        Constructs a SystemValueGroup object. The group of system value names is initialized to be empty.
        Parameters:
        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.
      • SystemValueGroup

        public SystemValueGroup(AS400 system,
                        String groupName,
                        String groupDescription,
                        String[] names)
        Constructs a SystemValueGroup object. The group of system value names is initialized to contain the system value names in names.
        Parameters:
        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.
      • SystemValueGroup

        public SystemValueGroup(AS400 system,
                        String groupName,
                        String groupDescription,
                        int group)
        Constructs a SystemValueGroup object. The group of system value names is initialized to contain all of the system value names in the system-defined group groupIndicator. For example, specifying SystemValueList.GROUP_ALL for groupIndicator would result in this group of system value names being initialized to contain all system value and network attribute names.

        Note: This constructor now makes a connection to the system in order to retrieve the IBM i release level of the system.

        Parameters:
        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.
        See Also:
        SystemValueList, SystemValueList.GROUP_ALL

    • Method Detail

      • addPropertyChangeListener

        public void addPropertyChangeListener(PropertyChangeListener listener)
        Adds a PropertyChangeListener. The specified PropertyChangeListener's propertyChange method will be called each time the value of any bound property is changed. The PropertyChangeListener object is added to a list of PropertyChangeListeners managed by this SystemValueGroup. It can be removed with removePropertyChangeListener.
        Parameters:
        listener - The listener object.
      • addVetoableChangeListener

        public void addVetoableChangeListener(VetoableChangeListener listener)
        Adds a VetoableChangeListener. The specified VetoableChangeListener's vetoableChange method will be called each time the value of any constrained property is changed.
        Parameters:
        listener - The listener object.
      • contains

        public boolean contains(String name)
        Determines if a system value name is part of this group.
        Parameters:
        name - The system value name in question.
        Returns:
        Returns true if the system value is part of this group; false otherwise.
        See Also:
        add(java.lang.String), getNames(), remove(java.lang.String)
      • getSystem

        public AS400 getSystem()
        Returns the system object representing the system on which the system value group exists.
        Returns:
        The system object representing the system on which the system value group exists. If the system has not been set, null is returned.
      • remove

        public boolean remove(String name)
        Removes a system value name from this group.
        Parameters:
        name - The system value name to be removed from this group.
        Returns:
        Returns true if the system value was successfully removed; false otherwise.
        See Also:
        add(java.lang.String), contains(java.lang.String), getNames()
      • removePropertyChangeListener

        public void removePropertyChangeListener(PropertyChangeListener listener)
        Removes the PropertyChangeListener. If the PropertyChangeListener is not on the list, nothing is done.
        Parameters:
        listener - The listener object.
      • removeVetoableChangeListener

        public void removeVetoableChangeListener(VetoableChangeListener listener)
        Removes the VetoableChangeListener. If the VetoableChangeListener is not on the list, nothing is done.
        Parameters:
        listener - The listener object.
      • setGroupDescription

        public void setGroupDescription(String groupDescription)
                                 throws PropertyVetoException
        Sets the user-defined group description for any SystemValue objects generated by this group.
        Parameters:
        groupDescription - The group description.
        Throws:
        PropertyVetoException - If any of the registered listeners vetos the property change.
        See Also:
        getGroupDescription()
      • setGroupName

        public void setGroupName(String groupName)
                          throws PropertyVetoException
        Sets the user-defined group name for any SystemValue objects generated by this group.
        Parameters:
        groupName - The group name.
        Throws:
        PropertyVetoException - If any of the registered listeners vetos the property change.
        See Also:
        getGroupName()
      • setSystem

        public void setSystem(AS400 system)
                       throws PropertyVetoException
        Sets the system object representing the system on which the system value group exists.
        Parameters:
        system - The system object representing the system on which the system value group exists.
        Throws:
        PropertyVetoException - If any of the registered listeners vetos the property change.
      • toString

        public String toString()
        Returns a String representation of this object.
        Overrides:
        toString in class Object
        Returns:
        A String representing this SystemValueGroup object.