All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.QSYSPermission

java.lang.Object
   |
   +----com.ibm.as400.access.UserPermission
           |
           +----com.ibm.as400.access.QSYSPermission

public class QSYSPermission
extends UserPermission

The QSYSPermission class represents the permissions for the specified user of an object in the traditional AS/400 library structure stored in QSYS.LIB.

A object stored in QSYS.LIB can set its authorities by setting a single object authority value or by setting the individual object and data authorities.

Use getObjectAuthority() to display the current object authority or setObjectAuthority() to set the current object authority using a single value. Valid values are: *ALL, *AUTL, *CHANGE, *EXCLUDE, and *USE.

The detailed object authority can be set to one or more of the following values: alter, exist, management, operational, reference. Use the appropriate set methods (setAlter(), setExistence(), setManamagement(), setOperational(), or setReference()) to set the value on or off. After all values are set, use the commit() method from the Permission class to send the changes to the AS/400.

The data authority can be set to one or more of the following values: add, delete, execute, read, or update. Use the appropriate set methods (setAdd(), setDelete(), setExecute(), setRead(), or setUpdate()) to set the value on or off. After all the values are set, use the commit() method from the Permission class to send the changes to the AS/400.

The single authority actually represents a combination of the detailed object authorities and the data authorities. Selecting a single authority will automatically turn on the appropriate detailed authorities. Likewise, selecting various detailed authotiries will change the appropriate single authority values.

For more information on object authority commands, refer AS/400 CL commands GRTOBJAUT (Grant object authority) and EDTOBJAUT (Edit object authority).


Constructor Index

 o QSYSPermission(String)
Constructs a QSYSPermission object.

Method Index

 o getObjectAuthority()
Returns the object authority of the user specified as a single value.
 o isAdd()
Indicates if the user has the data authority of add.
 o isAlter()
Indicates if the user has the object authority of alter.
 o isDelete()
Indicates if the user has the data authority of delete.
 o isExecute()
Indicates if the user has the data authority of execute.
 o isExistence()
Indicates if the user has the object authority of existence.
 o isManagement()
Indicates if the user has the object authority of management.
 o isOperational()
Indicates if the user has the object authority of operational.
 o isRead()
Indicates if the user has the data authority of read.
 o isReference()
Indicates if the user has the object authority of reference.
 o isUpdate()
Indicates if the user has the data authority of update.
 o setAdd(boolean)
Sets the add data authority.
 o setAlter(boolean)
Sets the alter object authority.
 o setDelete(boolean)
Sets the delete data authority.
 o setExecute(boolean)
Sets the execute data authority.
 o setExistence(boolean)
Sets the existence object authority.
 o setManagement(boolean)
Sets the management object authority.
 o setObjectAuthority(String)
Sets the object authority of the user using a single value.
 o setOperational(boolean)
Sets the operational object authority.
 o setRead(boolean)
Sets the read data authority.
 o setReference(boolean)
Sets the reference object authority.
 o setUpdate(boolean)
Sets the update data authority.

Constructors

 o QSYSPermission
 public QSYSPermission(String userProfileName)
Constructs a QSYSPermission object. This is the permission of the specified user.

Parameters:
userProfileName - The name of the user profile.

Methods

 o getObjectAuthority
 public String getObjectAuthority()
Returns the object authority of the user specified as a single value.

Returns:
The object authority of the user specified as a single value. The possible values are:
  • *ALL The user can perform all operations on the object except for those limited to the owner or controlled by authorization list management authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user can also change ownership of the object.
  • *AUTL The public authority of the authorization list securing the object will be used. This is valid only if *PUBLIC is the user specified.
  • *CHANGE The user can perform all operations on the object except those limited to the owner or controlled by object existence authority and object management authority.
  • *EXCLUDE The user cannot access the object.
  • *USE The user has object operational authority, read authority, and execute authority.
See Also:
setObjectAuthority
 o isAdd
 public boolean isAdd()
Indicates if the user has the data authority of add.

Returns:
true if the user has the data authority of add; false otherwise.
 o 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.
 o isDelete
 public boolean isDelete()
Indicates if the user has the data authority of delete.

Returns:
true if the user has the data authority of delete; false otherwise.
 o isExecute
 public boolean isExecute()
Indicates if the user has the data authority of execute.

Returns:
true if the user has the data authority of execute; false otherwise.
 o 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.
 o 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.
 o isOperational
 public boolean isOperational()
Indicates if the user has the object authority of operational.

Returns:
true if the user has the object authority of operational; false otherwise.
 o isRead
 public boolean isRead()
Indicates if the user has the data authority of read.

Returns:
true if the user has the data authority of read; false otherwise.
 o 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.
 o isUpdate
 public boolean isUpdate()
Indicates if the user has the data authority of update.

Returns:
true if the user has the data authority of update; false otherwise.
 o setAdd
 public synchronized void setAdd(boolean authority)
Sets the add data authority.

Parameters:
authority - true to set the data authority of add on; false to set the data authority of add off.
 o setAlter
 public synchronized 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.
 o setDelete
 public synchronized void setDelete(boolean authority)
Sets the delete data authority.

Parameters:
authority - true to set the data authority of delete on; false to set the data authority of delete off.
 o setExecute
 public synchronized void setExecute(boolean authority)
Sets the execute data authority.

Parameters:
authority - true to set the data authority of execute on; false to set the data authority of execute off.
 o setExistence
 public synchronized 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.
 o setManagement
 public synchronized 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.
 o setObjectAuthority
 public synchronized void setObjectAuthority(String authority)
Sets the object authority of the user using a single value.

Parameters:
authority - The object authority of the user.

Valid values are:

  • *ALL The user can perform all operations on the object except for those limited to the owner or controlled by authorization list management authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user can also change ownership of the object.
  • *AUTL The public authority of the authorization list securing the object will be used. This is valid only if *PUBLIC is the user specified.
  • *CHANGE The user can perform all operations on the object except those limited to the owner or controlled by object existence authority and object management authority.
  • *EXCLUDE The user cannot access the object.
  • *USE The user has object operational authority, read authority, and execute authority.
 o setOperational
 public synchronized void setOperational(boolean authority)
Sets the operational object authority.

Parameters:
authority - true to set the object authority of operational on; false to set the object authority of operational off.
 o setRead
 public synchronized void setRead(boolean authority)
Sets the read data authority.

Parameters:
authority - true to set the data authority of read on; false to set the data authority of read off.
 o setReference
 public synchronized 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.
 o setUpdate
 public synchronized void setUpdate(boolean authority)
Sets the update data authority.

Parameters:
authority - true to set the data authority of update on; false to set the data authority of update off.

All Packages  Class Hierarchy  This Package  Previous  Next  Index