|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibi.broker.api.data.user.Group
public class Group
The ReportCaster Group class allows the creation and manipulation
of ReportCaster authentication and authorization groups. This Group
class is used in conjunction with other ReportCaster User Administration classes
such as UserManager. In the case of installations with Managed Reporting, the
default implementation of the UserManager interface must be changed for this
class to be applicable. In its present implementation,
this class only writes to the ReportCaster tables and doesn't update
Managed Reporting.
The code below illustrates how Group
is used. 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 U02_Add_Group
{
public U02_Add_Group(String[] arg) throws Exception
{
// Example of arg
// name desc
String name = arg[0];
String description = arg[1];
// Create userManager
CasterConnection casterConnection = Util.createCasterConnection();
UserManager manager = casterConnection.getUserManager();
// Create group object
Group group = new Group();
group.setDescription(description);
group.setName(name);
// Subscribe group
manager.addGroup(group);
}
public static void main(String[] arg)
{
U02_Add_Group sampl = null;
if(arg.length < 2) {
menu();
return;
}
try
{
System.out.println("\n******* " + U02_Add_Group.class.getName() + " *****************");
sampl = new U02_Add_Group(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 " + U02_Add_Group.class.getName() + " <name> <description>");
}
}
Constructor Summary | |
---|---|
Group()
|
Method Summary | |
---|---|
java.lang.String |
getDescription()
Obtains the description of the ReportCaster Group. |
java.lang.String |
getId()
|
java.lang.String |
getName()
Returns the name of the Group. |
java.lang.String[] |
getUserList()
|
void |
setDescription(java.lang.String description)
Sets the description of the ReportCaster Group. |
void |
setId(java.lang.String id)
|
void |
setName(java.lang.String name)
Sets the name of the Group. |
void |
setUserList(java.lang.String[] userList)
|
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 |
Constructor Detail |
---|
public Group()
Method Detail |
---|
public void setName(java.lang.String name)
name
- A String representing the name of the group.public java.lang.String getName()
public void setDescription(java.lang.String description)
description
- A String describing the group.public java.lang.String getDescription()
public java.lang.String getId()
public void setId(java.lang.String id)
public java.lang.String[] getUserList()
public void setUserList(java.lang.String[] userList)
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 |