| |
|
| java.lang.Object org.apache.derby.database.UserUtility
UserUtility | abstract public class UserUtility (Code) | | This utility class provides static methods for managing user authorization in a Cloudscape database.
This class can only be used within an SQL-J statement, a Java procedure or a server side Java method.
This class can be accessed using the class alias USERUTILITY in SQL-J statements.
|
Method Summary | |
final public static void | add(String userName, String permission) Add a user's authorization permission to the database.
Only users with FULL_ACCESS_PERMISSION may use this.
Parameters: userName - the user's name. | final public static void | drop(String userName) Drop a user's authorization permission from the database.
Only users with FULL_ACCESS_PERMISSION may use this.
Parameters: userName - the user's name. | final public static String | getPermission(String userName) Return a user's authorization permission in a database.
Users with FULL_ACCESS_PERMISSION or READ_ACCESS_PERMISSION
may use this.
Parameters: userName - the user's name. | final public static void | set(String userName, String permission) Set the authorization permission for a user in the database.
Only users with FULL_ACCESS_PERMISSION may use this.
Parameters: userName - the user's name. |
FULL_ACCESS_PERMISSION | final public static String FULL_ACCESS_PERMISSION(Code) | | Enumeration value for full access permission ("FULL_ACCESS_PERMISSION").
|
READ_ACCESS_PERMISSION | final public static String READ_ACCESS_PERMISSION(Code) | | Enumeration value for read access permission ("READ_ACCESS_PERMISSION").
|
add | final public static void add(String userName, String permission) throws SQLException(Code) | | Add a user's authorization permission to the database.
Only users with FULL_ACCESS_PERMISSION may use this.
Parameters: userName - the user's name. A valid possibly delimitedSQL identifier. Parameters: permission - READ_ACCESS_PERMISSION or FULL_ACCESS_PERMISSION. exception: SQLException - thrown if this fails. |
drop | final public static void drop(String userName) throws SQLException(Code) | | Drop a user's authorization permission from the database.
Only users with FULL_ACCESS_PERMISSION may use this.
Parameters: userName - the user's name. A valid possibly delimitedSQL identifier. exception: SQLException - thrown if this fails or the userbeing dropped does not exist. |
getPermission | final public static String getPermission(String userName) throws SQLException(Code) | | Return a user's authorization permission in a database.
Users with FULL_ACCESS_PERMISSION or READ_ACCESS_PERMISSION
may use this.
Parameters: userName - the user's name. A valid possibly delimitedSQL identifier. FULL_ACCESS_PERMISSION if the user is in "derby.database.fullAccessUsers",READ_ACCESS_PERMISSION if the user is in "derby.database.readOnlyAccessUsers",or null if the user is not in either list. exception: SQLException - thrown if this fails. |
set | final public static void set(String userName, String permission) throws SQLException(Code) | | Set the authorization permission for a user in the database.
Only users with FULL_ACCESS_PERMISSION may use this.
Parameters: userName - the user's name. A valid possibly delimitedSQL identifier. Parameters: permission - READ_ACCESS_PERMISSION or FULL_ACCESS_PERMISSION. exception: SQLException - thrown if this fails. |
|
|
|