com.ibm.as400.access

Class ValidationListAttributeInfo



  • public class ValidationListAttributeInfo
    extends Object
    Encapsulates all attribute information assigned to an entry in a validation list. Each validation list entry may contain one or more attributes.
    Author:
    Thomas Johnson (tom.johnson@kingland.com), Kingland Systems Corporation
    • Constructor Detail

      • ValidationListAttributeInfo

        public ValidationListAttributeInfo()
        Constructs a ValidationListAttributeInfo.
      • ValidationListAttributeInfo

        public ValidationListAttributeInfo(ValidationListAttribute[] attributes)
        Constructs a ValidationListAttributeInfo with the given attributes.
        Parameters:
        attributes - ValidationListAttribute[]

    • Method Detail

      • getAttributes

        public ValidationListAttribute[] getAttributes()
        Returns the attributes assigned to the receiver.
        Returns:
        ValidationListAttribute[]
      • getByteLength

        public int getByteLength()
        Returns the total length of the corresponding structure when this object is written to IBM i bytes for use by the validation list APIs.
        Returns:
        int
      • getByteLengthForNativeCall

        public int getByteLengthForNativeCall()
        Returns the total length of the corresponding structure when this object is written to IBM i bytes for use by the validation list APIs.
        Returns:
        int
      • setAttributes

        public void setAttributes(ValidationListAttribute[] attributes)
        Sets the attributes assigned to the receiver.
        Parameters:
        attributes - ValidationListAttribute[]
      • setAttributesData

        public void setAttributesData(byte[] buffer,
                             int offset)
        Sets the data for assigned attributes from the IBM i bytes in the specified buffer.

        This method is called when finding an entry with specific attributes. The attribute identifiers are provided as input to the API, and a buffer is returned with the corresponding attribute values. It is expected that this object was also used to specify the attributes to retrieve. That way, the contents and order of attribute values in the buffer should exactly match those assigned to this object.

        Refer to documentation for the QSYFDVLE Security API for a complete description of parameters.

        Parameters:
        buffer - byte[]
        offset - int
      • toBytes

        public byte[] toBytes()
        Returns the byte array resulting from converting this object to a structure usable by the system APIs.
        Returns:
        byte[]
      • toBytes

        public int toBytes(byte[] buffer,
                  int offset)
        Converts this object to a structure usable by the system APIs.

        The IBM i bytes are inserted into the buffer starting at the given offset. The total number of bytes inserted is returned.

        Parameters:
        buffer - byte[]
        offset - int
        Returns:
        int