ibi.broker.api.cci
Interface UserManager

All Known Implementing Classes:
UserManagerClientSF

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();
 

Version:
5.3

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

DELETE_USER_ONLY

static final int DELETE_USER_ONLY
One of three constants indicating the deleteType where only the user is deleted.

See Also:
deleteUser(String userName, int deleteType), Constant Field Values

DELETE_USER_SET_SCHEDULE_INACTIVE

static final 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.

See Also:
deleteUser(String userName, int deleteType), Constant Field Values

DELETE_USER_DELETE_SCHEDULE

static final 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.

See Also:
deleteUser(String userName, int deleteType), Constant Field Values
Method Detail

getUserByName

User getUserByName(java.lang.String userName)
                   throws CasterException
Retrieves a User object based upon the specified ReportCaster username.

Parameters:
userName - ReportCaster username of User.
Returns:
User
Throws:
CasterException - If a database access error occurs or userName doesn't exist or there is no permission to access this method.

getUserList

User[] getUserList()
                   throws CasterException
Retrieves an array of User objects. This method is accessible only by an administrator, and lists all the users in the system.

Returns:
An array (User[]) of Users.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getUserList

User[] getUserList(java.lang.String capability)
                   throws CasterException
Throws:
CasterException

getUserNameListByGroup

java.lang.String[] getUserNameListByGroup(java.lang.String groupName)
                                          throws CasterException
Obtains a string array of usernames that belong to a specified Group as identified by its groupName. This method is only accessible by the Administrator.

Parameters:
groupName - name which uniquely identifies the group.
Returns:
String array (String[] ) of usernames. NULL if groupName doesn't exist.
Throws:
CasterException - If a database access error occurs or groupName is invalid or there is no permission to access this method.

getUserNameListByGroup

java.lang.String[] getUserNameListByGroup(java.lang.String groupName,
                                          java.lang.String capability)
                                          throws CasterException
Throws:
CasterException

addUser

void addUser(User user)
             throws CasterException
Adds the properties of a specified ReportCaster user, as contained in the passed User object, to the underlying database or repository. This method is only accessible by the Administrator.

Parameters:
user - object representing the user that is being added.
Throws:
CasterException - if a database access error occurs or there is no permission to access this method.

deleteUser

int deleteUser(java.lang.String userName,
               int deleteType)
               throws CasterException
Deletes the specified user, identified by the passed username, from the underlying database or repository using one of the three provided deletion methods. The deletion types are represented by one of three constants: DELETE_USER_ONLY, DELETE_USER_DELETE_SCHEDULE,or DELETE_USER_SET_SCHEDULE_INACTIVE This method is only accessible by the Administrator.

Parameters:
userName - the unique ReportCaster user name.
deleteType - one of three deletion methods as a integer.
Throws:
CasterException - if a database access error occurs or userName doesn't exist or there is no permission to access this method.

updateUserInfoProperties

void updateUserInfoProperties(User user)
                              throws CasterException
Allows an authenticated user to change limited properties belonging to him in the underlying repository. The properties contained in the User object that can be changed by this method are: Description (see User.getDescription()), Address (see User.getAddress()), and Password.(see User.getAddress(). This method is accessible by the Administrator and the calling user.

Parameters:
user - object representing the user that is being added.
Throws:
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.

updateUser

void updateUser(User user)
                throws CasterException
Updates a user's property information in the underlying repository. All properties can be modified except Name (see User.getName()), which uniquely identifies the user in the database. This method is only accessible by the Administrator.

Parameters:
user - Accepts a user object containing properties encapsulating the user that is being updated.
Throws:
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.

getGroup

Group getGroup(java.lang.String groupName)
               throws CasterException
Retrieves a 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.

Parameters:
groupName - Unique name string identifying the group.
Returns:
Group object encapsulating the specified group name.
Throws:
CasterException - if a database access error occurs or groupName doesn't exist or there is no permission to access this method.

getGroupList

Group[] getGroupList()
                     throws CasterException
Retrieves an array of Group objects representing a list of all groups to which the current user belongs. This method is only accessible by the Administrator.

Returns:
Array of groups(Group[]).
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getGroupListByUserName

Group[] getGroupListByUserName(java.lang.String userName)
                               throws CasterException
Throws:
CasterException

getGroupNameListByUser

java.lang.String[] getGroupNameListByUser(java.lang.String userName)
                                          throws CasterException
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. This method is only accessible by the Administrator.

Parameters:
userName - username as a String.
Returns:
a String Array representing the group names. If no group exist for this user it returns NULL.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

addGroup

void addGroup(Group group)
              throws CasterException
Adds group information, as encapsulated in the specified Group object, to the underlying repository. This method is only accessible by the Administrator.

Parameters:
group - object representing the group that is being added.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

deleteGroup

int deleteGroup(java.lang.String groupName)
                throws CasterException
Deletes group information, as encapsulated in the specified Group object, from the underlying repository. This method is only accessible by the Administrator.

Parameters:
groupName - unique name of group.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

updateGroupWithUser

void updateGroupWithUser(Group group,
                         java.lang.String[] userNameList)
                         throws CasterException
Updates a given 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.

Parameters:
group - object representing the group that is being added.
userNameList - usernameList as a String name.
Throws:
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.

updateGroup

void updateGroup(Group group)
                 throws CasterException
After modifying properties contained in the Group object (except for the group name), updates the corresponding group data in the underlying repository. This method is only accessible by the Administrator.

Parameters:
group - Group object representing the group that is being modified.
Throws:
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.

addUserInToGroup

void addUserInToGroup(java.lang.String groupName,
                      java.lang.String userName)
                      throws CasterException
Adds a userName to an existing group in the underlying repository, as identified by its group name. This method is only accessible by the Administrator.

Parameters:
groupName - unique name of the group as a string.
userName - as a String.
Throws:
CasterException - If a database access error occurs or groupName is invalid or userName is invalid or there is no permission to access this method.

deleteUserFromGroup

int deleteUserFromGroup(java.lang.String groupName,
                        java.lang.String userName)
                        throws CasterException
Deletes a user as identified by its ReportCaster userName from the specified groupName. This method is only accessible by the Administrator.

Parameters:
groupName - unique name of group as a String.
userName - unique name of user as String.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getExecIdListByServerByOwner

ExecId[] getExecIdListByServerByOwner(java.lang.String serverName,
                                      User owner,
                                      java.lang.String type)
                                      throws CasterException
Throws:
CasterException

addExecId

void addExecId(ExecId execId)
               throws CasterException
Throws:
CasterException

testExecIdCredential

java.lang.String testExecIdCredential(ExecId execId)
                                      throws CasterException
Throws:
CasterException

updateExecId

void updateExecId(ExecId execId)
                  throws CasterException
Throws:
CasterException

deleteExecId

int deleteExecId(ExecId execId)
                 throws CasterException
Throws:
CasterException

isExecId

boolean isExecId(ExecId execId)
                 throws CasterException
Throws:
CasterException


Copyright © 2006 Information Builders, Incorporated.