|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserManager
This interface handles the management of users and groups. The implementation of this interface can be changed to affect both Managed Reporting and ReportCaster simultaneously, rather than just ReportCaster, which is the out-of-the-box functionality. In the current implementation, UserManager only updates the ReportCaster Repository. In Managed Reporting and ReportCasters combined implementations, attempts to call this API will update only the ReportCaster Repository. This means that users will be in the ReportCaster Repository, but they will not be valid users because they were not added to Managed Reporting as well. The results of many of these methods is based upon the context that is created during authentication and initialization. For example, if an instance of UserManager is created, a method call such as objectname.getGroupList() will return the groups associated withthe authenticated user. If the user is an administrator, all groups in the repository are returned. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Copyright (c) 2004 Information Builders, Inc. All Rights Reserved. + + + + Information Builders offers sample API programs as a heuristic device. + + They are not intended, as is, for production use. Licensed users are + + welcome to alter and extend these samples and deploy them in other + + environments, or alternate configurations, as they see fit. + + Information Builders will support the documented functionality of + + its API classes and methods. However, Information Builders is not + + responsible for functionality or behavior of products built with + + its API unless the documented behavior of its discrete classes and + + methods is different than the actual results. + + + + Redistributions of IBI source code and documentation must be within + + the scope of the Information Builders Software License Agreement. + + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ CasterManagedConnectionFactory managedConnectionFactory = new CasterManagedConnectionFactory(); managedConnectionFactory.setServerName(host);//the name of the server running the distribution server managedConnectionFactory.setPortNumber(port);//the port the distribution server is listening CasterConnectionFactory connectionFactory = (CasterConnectionFactory)managedConnectionFactory.createConnectionFactory(); ConnectionSpec credential = new PasswordCredential(user, password.toCharArray()); //This can be any of the credential objects. It is assumed here the user String has been assigned earlier // and that password, also assigned earlier, is a String that needs to be converted to a character Array. CasterConnection connectionObject = ((CasterConnection)connectionFactory.getConnection(credential)); UserManager manager = connectionObject.getUserManager();
Field Summary | |
---|---|
static int |
DELETE_USER_DELETE_SCHEDULE
One of three constants indicating the deleteType where
the user is deleted along with the all schedules owned by the user. |
static int |
DELETE_USER_ONLY
One of three constants indicating the deleteType where
only the user is deleted. |
static int |
DELETE_USER_SET_SCHEDULE_INACTIVE
One of three constants indicating the deleteType where
the user is deleted and all the schedules owned by the user are set to inactive. |
Method Summary | |
---|---|
void |
addExecId(ExecId execId)
|
void |
addGroup(Group group)
Adds group information, as encapsulated in the specified Group object,
to the underlying repository. |
void |
addUser(User user)
Adds the properties of a specified ReportCaster user, as contained in the passed User object, to the underlying database or repository. |
void |
addUserInToGroup(java.lang.String groupName,
java.lang.String userName)
Adds a userName to an existing group in the
underlying repository, as identified by its group name. |
int |
deleteExecId(ExecId execId)
|
int |
deleteGroup(java.lang.String groupName)
Deletes group information, as encapsulated in the specified Group object,
from the underlying repository. |
int |
deleteUser(java.lang.String userName,
int deleteType)
Deletes the specified user, identified by the passed username, from the underlying database or repository using one of the three provided deletion methods. |
int |
deleteUserFromGroup(java.lang.String groupName,
java.lang.String userName)
Deletes a user as identified by its ReportCaster userName from the specified groupName. |
ExecId[] |
getExecIdListByServerByOwner(java.lang.String serverName,
User owner,
java.lang.String type)
|
Group |
getGroup(java.lang.String groupName)
Retrieves a Group object as identified by its
groupName from the underlying database orrepository. |
Group[] |
getGroupList()
Retrieves an array of Group objects representing a list of all groups to which the current user belongs. |
Group[] |
getGroupListByUserName(java.lang.String userName)
|
java.lang.String[] |
getGroupNameListByUser(java.lang.String userName)
Retrieves a string array representing a list of all group names where a specific ReportCaster user belongs to or is a member of these group names. |
User |
getUserByName(java.lang.String userName)
Retrieves a User object based upon the specified
ReportCaster username . |
User[] |
getUserList()
Retrieves an array of User objects. |
User[] |
getUserList(java.lang.String capability)
|
java.lang.String[] |
getUserNameListByGroup(java.lang.String groupName)
Obtains a string array of usernames that belong to a specified Group as
identified by its groupName . |
java.lang.String[] |
getUserNameListByGroup(java.lang.String groupName,
java.lang.String capability)
|
boolean |
isExecId(ExecId execId)
|
java.lang.String |
testExecIdCredential(ExecId execId)
|
void |
updateExecId(ExecId execId)
|
void |
updateGroup(Group group)
After modifying properties contained in the Group object (except for the group name), updates the corresponding group data in the underlying repository. |
void |
updateGroupWithUser(Group group,
java.lang.String[] userNameList)
Updates a given Group with a String Array of user names
representing the list of usernames belonging to the group. |
void |
updateUser(User user)
Updates a user's property information in the underlying repository. |
void |
updateUserInfoProperties(User user)
Allows an authenticated user to change limited properties belonging to him in the underlying repository. |
Field Detail |
---|
static final int DELETE_USER_ONLY
deleteType
where
only the user is deleted.
deleteUser(String userName, int deleteType)
,
Constant Field Valuesstatic final int DELETE_USER_SET_SCHEDULE_INACTIVE
deleteType
where
the user is deleted and all the schedules owned by the user are set to inactive.
deleteUser(String userName, int deleteType)
,
Constant Field Valuesstatic final int DELETE_USER_DELETE_SCHEDULE
deleteType
where
the user is deleted along with the all schedules owned by the user.
deleteUser(String userName, int deleteType)
,
Constant Field ValuesMethod Detail |
---|
User getUserByName(java.lang.String userName) throws CasterException
User
object based upon the specified
ReportCaster username
.
userName
- ReportCaster username of User.
User
CasterException
- If a database access error occurs or
userName
doesn't exist or there is no permission to access this
method.User[] getUserList() throws CasterException
User
objects. This method is accessible only
by an administrator, and lists all the users in the system.
User[]
) of Users.
CasterException
- If a database access error occurs or there is
no permission to access this method.User[] getUserList(java.lang.String capability) throws CasterException
CasterException
java.lang.String[] getUserNameListByGroup(java.lang.String groupName) throws CasterException
Group
as
identified by its groupName
. This method is only accessible by the
Administrator.
groupName
- name which uniquely identifies the group.
String[]
) of usernames. NULL if
groupName
doesn't exist.
CasterException
- If a database access error occurs or
groupName
is invalid or there is no permission to access this
method.java.lang.String[] getUserNameListByGroup(java.lang.String groupName, java.lang.String capability) throws CasterException
CasterException
void addUser(User user) throws CasterException
user
- object representing the user that is being added.
CasterException
- if a database access error occurs or there is
no permission to access this method.int deleteUser(java.lang.String userName, int deleteType) throws CasterException
userName
- the unique ReportCaster user name.deleteType
- one of three deletion methods as a integer.
CasterException
- if a database access error occurs or
userName
doesn't exist or there is no permission to access this
method.void updateUserInfoProperties(User user) throws CasterException
User.getDescription()
), Address (see
User.getAddress()
), and Password.(see
User.getAddress()
.
This method is accessible by the Administrator and the calling user.
user
- object representing the user that is being added.
CasterException
- If a database access error occurs or
user
is NULL or user
object doesn't exist in the
underlying database or there is no permission to access this method.void updateUser(User user) throws CasterException
User.getName()
),
which uniquely identifies the user in the database.
This method is only accessible by the Administrator.
user
- Accepts a user object containing properties
encapsulating the user that is being updated.
CasterException
- If a database access error occurs or
user
is NULL or
user
doesn't exist in the underlying database or
there is no permission to access this method.Group getGroup(java.lang.String groupName) throws CasterException
Group
object as identified by its
groupName
from the underlying database orrepository. The
specified groupName
uniquely identifes a
Group
in the database.
This method is only accessible by the Administrator.
groupName
- Unique name string identifying the group.
Group
object encapsulating the specified group name.
CasterException
- if a database access error occurs or
groupName
doesn't exist or
there is no permission to access this method.Group[] getGroupList() throws CasterException
Group[]
).
CasterException
- If a database access error occurs or
there is no permission to access this method.Group[] getGroupListByUserName(java.lang.String userName) throws CasterException
CasterException
java.lang.String[] getGroupNameListByUser(java.lang.String userName) throws CasterException
userName
- username as a String.
CasterException
- If a database access error occurs or
there is no permission to access this method.void addGroup(Group group) throws CasterException
Group
object,
to the underlying repository.
This method is only accessible by the Administrator.
group
- object representing the group that is being added.
CasterException
- If a database access error occurs or
there is no permission to access this method.int deleteGroup(java.lang.String groupName) throws CasterException
Group
object,
from the underlying repository.
This method is only accessible by the Administrator.
groupName
- unique name of group.
CasterException
- If a database access error occurs or
there is no permission to access this method.void updateGroupWithUser(Group group, java.lang.String[] userNameList) throws CasterException
Group
with a String Array of user names
representing the list of usernames belonging to the group. This new list
of user names replaces the existing list of user names.
This method is only accessible by the Administrator.
group
- object representing the group that is being added.userNameList
- usernameList as a String name.
CasterException
- If a database access error occurs or
group
is NULL or
Group
doesn't exist in the underlying database or
there is no permission to access this method.void updateGroup(Group group) throws CasterException
group
- Group
object representing the group that is being modified.
CasterException
- If a database access error occurs or
group
is NULL or
Group
doesn't exist in the underlying database or
there is no permission to access this method.void addUserInToGroup(java.lang.String groupName, java.lang.String userName) throws CasterException
userName
to an existing group in the
underlying repository, as identified by its group name.
This method is only accessible by the Administrator.
groupName
- unique name of the
group as a string.userName
- as a String.
CasterException
- If a database access error occurs or
groupName
is invalid or
userName
is invalid or there is no permission to access this
method.int deleteUserFromGroup(java.lang.String groupName, java.lang.String userName) throws CasterException
groupName
- unique name of group as
a String.userName
- unique name of user as
String.
CasterException
- If a database access error occurs or there is
no permission to access this method.ExecId[] getExecIdListByServerByOwner(java.lang.String serverName, User owner, java.lang.String type) throws CasterException
CasterException
void addExecId(ExecId execId) throws CasterException
CasterException
java.lang.String testExecIdCredential(ExecId execId) throws CasterException
CasterException
void updateExecId(ExecId execId) throws CasterException
CasterException
int deleteExecId(ExecId execId) throws CasterException
CasterException
boolean isExecId(ExecId execId) throws CasterException
CasterException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |