com.arsdigita.acs.ug
Class UserGroups
java.lang.Object
|
+--com.arsdigita.acs.ug.UserGroups
- public class UserGroups
- extends Object
Method Summary |
static void |
adminGroupAdd(Database db,
String name,
String module,
String submodule,
String url)
adds an admin group to the database. |
static void |
adminGroupAddUser(Database db,
Object user_id,
String role,
String module,
String submodule,
String mapping_id,
String mapping_ip)
adds a user to an admin group in a certain role. |
static String |
getAdminGroupId(Database db,
String module,
String submodule)
Returns a group_id for an admin group from the database, given
a module/submodule. |
static String |
getAdminUrl()
returns groups admin url directory with leading slash. |
static String |
getGroupName(Database db,
Integer groupId)
|
static String |
getUrl()
returns groups url directory with leading slash. |
static Vector |
parseURL(String s)
This procedure takes url in the form /A/B/C and returns a Vector
whose members are A, B and C. |
static String |
urlFromList(Vector v)
Given url list as described in ug_parse_url this procedure puts back
the url from the list. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserGroups
public UserGroups()
getGroupName
public static final String getGroupName(Database db,
Integer groupId)
getUrl
public static final String getUrl()
- returns groups url directory with leading slash.
(parameter: GroupsDirectory, module ug)
getAdminUrl
public static final String getAdminUrl()
- returns groups admin url directory with leading slash.
(parameters: GroupsDirectory, GroupsAdminDirectory)
parseURL
public static final Vector parseURL(String s)
- This procedure takes url in the form /A/B/C and returns a Vector
whose members are A, B and C. if the last element of this tcl list
is /, then this / will be added as the last element in the list
(e.g. /A/B/C/ will have elements A, B, C and /). if url_string is
empty, procedure will return an empty list
urlFromList
public static final String urlFromList(Vector v)
- Given url list as described in ug_parse_url this procedure puts back
the url from the list. thus, if list contains elements A, B and C,
this procedure will return A/B/C. if list contains elements A, B, C
and / than this procedure will return A/B/C/.
adminGroupAdd
public static final void adminGroupAdd(Database db,
String name,
String module,
String submodule,
String url)
throws SQLException
- adds an admin group to the database.
getAdminGroupId
public static final String getAdminGroupId(Database db,
String module,
String submodule)
throws SQLException
- Returns a group_id for an admin group from the database, given
a module/submodule.
adminGroupAddUser
public static final void adminGroupAddUser(Database db,
Object user_id,
String role,
String module,
String submodule,
String mapping_id,
String mapping_ip)
throws SQLException,
ACSException
- adds a user to an admin group in a certain role.