|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.locomotive.loco.perm.UserPerm
Maintains users' permissions in the database.
Constructor Summary | |
UserPerm()
|
Method Summary | |
static void |
deletePermissions(int[] userids,
java.sql.Connection conn)
Deletes many users' permissions from the database. |
static void |
deletePermissions(int userid,
java.sql.Connection conn)
Deletes a user's permissions in the database. |
static PermissionSet[] |
getPermissions(java.sql.Connection conn,
int[] userids)
Gets a bunch of users' permissions from the database. |
static PermissionSet |
getPermissions(int userid,
java.sql.Connection conn)
Gets a user's permissions from the database. |
static void |
setPermissions(int userid,
PermissionSet perms,
java.sql.Connection conn)
Deprecated. - the userid should be in the perms, so we don't need it here |
static void |
setPermissions(PermissionSet[] perms,
java.sql.Connection conn)
Lets you insert multiple permissions for of the users associated with each of the perms' userid. |
static void |
setPermissions(PermissionSet perms,
java.sql.Connection conn)
Sets the users's permissions in the database |
static java.util.Vector |
usersWhoHave(java.sql.Connection conn,
java.lang.String permName)
Returns a Vector of userids, which represent the users who have the permission with the specified name. |
static java.util.Vector |
usersWhoHaveAll(java.sql.Connection conn,
PermissionSet pset)
Returns a Vector of userids, which represent the users who have ALL of the permisssions in the specified permission set. |
static java.util.Vector |
usersWhoHaveAny(java.sql.Connection conn,
PermissionSet pset)
Returns a Vector of userids, which represent the users who have any of the permissions in the specified permission set. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public UserPerm()
Method Detail |
public static void setPermissions(PermissionSet perms, java.sql.Connection conn) throws java.sql.SQLException
perms
- the user's permission setconn
- the database connection to usepublic static void setPermissions(int userid, PermissionSet perms, java.sql.Connection conn) throws java.sql.SQLException
userid
- userid of userperms
- PermissionSet containing the user's permissionsconn
- database connection objectpublic static PermissionSet getPermissions(int userid, java.sql.Connection conn) throws java.sql.SQLException
userid
- userid of userconn
- database connection objectpublic static void deletePermissions(int userid, java.sql.Connection conn) throws java.sql.SQLException
userid
- userid of userconn
- database connection objectpublic static void deletePermissions(int[] userids, java.sql.Connection conn) throws java.sql.SQLException
userids
- userid of users to delete the permissions fromconn
- database connection objectpublic static void setPermissions(PermissionSet[] perms, java.sql.Connection conn) throws java.sql.SQLException
perms
- the permissions that correspond to the useridsconn
- the db connection to usepublic static PermissionSet[] getPermissions(java.sql.Connection conn, int[] userids) throws java.sql.SQLException
userids
- the userids for the users whose permissions we'll getconn
- the database connection we'll usepublic static java.util.Vector usersWhoHave(java.sql.Connection conn, java.lang.String permName) throws java.sql.SQLException
public static java.util.Vector usersWhoHaveAny(java.sql.Connection conn, PermissionSet pset) throws java.sql.SQLException
public static java.util.Vector usersWhoHaveAll(java.sql.Connection conn, PermissionSet pset) throws java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |