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