com.ibm.as400.access

Class RootPermission

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable


    public class RootPermission
    extends UserPermission

    The RootPermission class represents the permissions for the specified user of an object contained in the root directory structure.

    An object on the root directory structure can set the data authority or the object authority. The data authority can be set to one of the following values: *none, *RWX, RW, *RX, *WX, *R, *W, *X, *EXCLUDE, or *AUTL. Use getDataAuthority() to display the current values and the setDataAuthority() to set the data authority to one of the valid values. Use commit() from the Permission class to send the changes to the system.

    The object authority can be set to one or more of the following values: alter, existence, management, or reference. Use the appropriate set methods (setAlter(), setExistence(), setManagement(), or setReference()) to turn the value on or off. After all the values are set, use the commit() method from the Permissions class to send the changes to the system.

    See Also:
    Serialized Form
    • Constructor Detail

      • RootPermission

        public RootPermission(java.lang.String userProfileName)
        Constructs a RootPermission object. This is the permission of the specified user.
        Parameters:
        userProfileName - The name of the user profile.
    • Method Detail

      • getDataAuthority

        public java.lang.String getDataAuthority()
        Returns the data authority of the user.
        Returns:
        The data authority of the user. The possible values are:
        • *RWX The user has object operational, read, add, update, delete, and execute authorities to the object.
        • *RW The user has object operational, read, add, delete authorities to the object.
        • *RX The user has object operational, read, and execute authorities to the object.
        • *WX The user has object operational, add, update, delete, and execute authorities to the object.
        • *R The user has object operational and read authorities to the object.
        • *W The user has object operational, add, update, delete authorities to the object.
        • *X The user has object operational and execute authorities to the object.
        • *EXCLUDE The user cannot access the object.
        • *AUTL The public authorities to the object comes from the public authority on the authorization list that secures the object. The value can be returned only if there an authorization list that secures the object and the authorized user is *PUBLIC.
        • *NONE The user has no authority to the object.
        See Also:
        setDataAuthority(String)
      • isAlter

        public boolean isAlter()
        Indicates if the user has the object authority of alter.
        Returns:
        true if the user has the object authority of alter; false otherwise.
      • isExistence

        public boolean isExistence()
        Indicates if the user has the object authority of existence.
        Returns:
        true if the user has the object authority of existence; false otherwise.
      • isManagement

        public boolean isManagement()
        Indicates if the user has the object authority of management.
        Returns:
        true if the user has the object authority of management; false otherwise.
      • isReference

        public boolean isReference()
        Indicates if the user has the object authority of reference.
        Returns:
        true if the user has the object authority of reference; false otherwise.
      • setAlter

        public void setAlter(boolean authority)
        Sets the alter object authority.
        Parameters:
        authority - true to set the object authority of alter on; false to set the object authority of alter off.
        See Also:
        isAlter()
      • setDataAuthority

        public void setDataAuthority(java.lang.String authority)
        Sets the data authority of the user.
        Parameters:
        authority - The data authority of the user.

        Valid values are:

        • *RWX The user has object operational, read, add, update, delete, and execute authorities to the object.
        • *RW The user has object operational, read, add, delete authorities to the object.
        • *RX The user has object operational, read, and execute authorities to the object.
        • *WX The user has object operational, add, update, delete, and execute authorities to the object.
        • *R The user has object operational and read authorities to the object.
        • *W The user has object operational, add, update, delete authorities to the object.
        • *X The user has object operational and execute authorities to the object.
        • *EXCLUDE The user cannot access the object.
        • *AUTL The public authorities to the object comes from the public authority on the authorization list that secures the object. The value can be returned only if there an authorization list that secures the object and the authorized user is *PUBLIC.
        • *NONE The user has no authority to the object.
      • setExistence

        public void setExistence(boolean authority)
        Sets the existence object authority.
        Parameters:
        authority - true to set the object authority of existence on; false to set the object authority of existence off.
        See Also:
        isExistence()
      • setManagement

        public void setManagement(boolean authority)
        Sets the management object authority.
        Parameters:
        authority - true to set the object authority of management on; false to set the object authority of management off.
        See Also:
        isManagement()
      • setReference

        public void setReference(boolean authority)
        Sets the reference object authority.
        Parameters:
        authority - true to set the object authority of reference on; false to set the object authority of reference off.
        See Also:
        isReference()