|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibi.broker.api.data.user.User
public class User
Allows the creation and manipulation of ReportCaster Users for the purpose of
authentication and authorization. The User class is used in conjunction
with other ReportCaster User Administration classes
including UserManager. In the case of installations with Managed Reporting, the
default implementation of the UserManager interface will have to be changed for this
class to be used. The code below illustrates the usage of the User
class.
It is taken from the samples packaged with the product.
+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 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. + + + + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public class U35_Update_UserProp { public U35_Update_UserProp(String[] arg) throws Exception { // Example of arg // name passw desc xxx@ibi.com String name = arg[0]; String password = arg[1]; String description = arg[2]; String address = arg[3]; // Create userManager CasterConnection casterConnection = Util.createCasterConnection(); UserManager manager = casterConnection.getUserManager(); // Retrive user from repository User user = manager.getUserByName(name); //update properties user.setAddress(address); user.setDescription(description); user.setPassword(password); // update user manager.updateUser(user); } public static void main(String[] arg) { U35_Update_UserProp sampl = null; if(arg.length < 4) { menu(); return; } try { System.out.println("\n******* " + U35_Update_UserProp.class.getName() + " *****************"); sampl = new U35_Update_UserProp(arg); System.out.println("\n" + sampl.getClass().getName() + " OK"); } catch(Exception ce) { ce.printStackTrace(); System.out.println(sampl.getClass().getName() + " FAIL"); } } private static void menu() { System.out.println("Usage: java " + U35_Update_UserProp.class.getName() + " <name> <password> <description> <address> "); } }
Field Summary | |
---|---|
static java.lang.String |
ROLE_CASTER_ADMIN
This is one of the valid values of the property role . |
static java.lang.String |
ROLE_USER
This is one of the valid values of the property role . |
Constructor Summary | |
---|---|
User()
|
|
User(java.lang.String name)
|
Method Summary | |
---|---|
java.lang.String |
getAddress()
Returns the user's e-mail address. |
java.lang.String |
getDescription()
Returns the description of the user. |
java.lang.String |
getMrRole()
|
java.lang.String |
getName()
Returns the users login name, also known as the casterUser or ReportCaster ID. |
java.lang.String |
getPassword()
Returns the password associated with user name. |
java.lang.String |
getRole()
Returns a String constant indicating the user's ReportCaster role. |
java.lang.String[] |
getUserListForGroupAdmin()
|
boolean |
isActive()
Returns the user's status as inactive or active. |
boolean |
isLibraryCapability()
Returns the user's capability to use the library. |
boolean |
isScheduleCapability()
Returns the user's capability to Schedule report distributions. |
void |
setActive(boolean active)
Sets the user's status as inactive or active. |
void |
setAddress(java.lang.String address)
Sets the user's e-mail address. |
void |
setDescription(java.lang.String description)
Sets the description of the user. |
void |
setLibraryCapability(boolean isLibraryCapability)
Sets the user's capability to use the library. |
void |
setMrRole(java.lang.String mrRole)
|
void |
setName(java.lang.String name)
Sets the user's login name, also known as the casterUser or ReportCaster ID. |
void |
setPassword(java.lang.String password)
Sets the password associated with user name. |
void |
setRole(java.lang.String role)
Accepts a String constant representing the user's ReportCaster role. |
void |
setScheduleCapability(boolean isScheduleCapability)
Sets the user's capability to Schedule report distributions. |
void |
setUserListForGroupAdmin(java.lang.String[] userListForGroupAdmin)
|
void |
validate(java.lang.String parentName)
Assists in validating arguments |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ROLE_CASTER_ADMIN
role
.
setRole(String role)
,
Constant Field Valuespublic static final java.lang.String ROLE_USER
role
.
setRole(String role)
,
Constant Field ValuesConstructor Detail |
---|
public User()
public User(java.lang.String name)
Method Detail |
---|
public void setName(java.lang.String name)
name
- Accepts a String indicating the user's log in name.public java.lang.String getName()
public void setPassword(java.lang.String password)
password
- A String indicating the user's password.public java.lang.String getPassword()
public void setRole(java.lang.String role)
role
- A String constant indicating the user's role.public java.lang.String getRole()
public void setDescription(java.lang.String description)
description
- A String that describes the user.public java.lang.String getDescription()
public void setAddress(java.lang.String address)
address
- A String indicating the user's e-mail address.public java.lang.String getAddress()
public void setActive(boolean active)
active
- A boolean indicating whether the user is active or not.public boolean isActive()
public void setLibraryCapability(boolean isLibraryCapability)
isLibraryCapability
- Accepts a boolean indicating whether or not the user can access the library.public boolean isLibraryCapability()
public void setScheduleCapability(boolean isScheduleCapability)
isScheduleCapability
- Accepts a boolean indicating whether or not the user can schedule report
distributions.public boolean isScheduleCapability()
public java.lang.String getMrRole()
public void setMrRole(java.lang.String mrRole)
public java.lang.String[] getUserListForGroupAdmin()
public void setUserListForGroupAdmin(java.lang.String[] userListForGroupAdmin)
public void validate(java.lang.String parentName) throws CasterException
parentName
- represented parent of this object.
CasterException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |