ibi.broker.api.data.user
Class Group

java.lang.Object
  extended by ibi.broker.api.data.user.Group
All Implemented Interfaces:
java.io.Serializable

public class Group
extends java.lang.Object
implements java.io.Serializable

 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>");       
        }
}

See Also:
Serialized Form

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

Group

public Group()
Method Detail

setName

public void setName(java.lang.String name)
Sets the name of the Group. This field accepts a maximum of 48 characters.

Parameters:
name - A String representing the name of the group.

getName

public java.lang.String getName()
Returns the name of the Group. This returns a String with a maximum of 48 characters.

Returns:
A String representing the name of the group.

setDescription

public void setDescription(java.lang.String description)
Sets the description of the ReportCaster Group. This accepts a String with a maximum of 90 characters.

Parameters:
description - A String describing the group.

getDescription

public java.lang.String getDescription()
Obtains the description of the ReportCaster Group. This returns a String with a maximum of 90 characters.

Returns:
Returns a String describing the group.

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)

getUserList

public java.lang.String[] getUserList()

setUserList

public void setUserList(java.lang.String[] userList)

validate

public void validate(java.lang.String parentName)
              throws CasterException
Assists in validating arguments

Parameters:
parentName - represented parent of this object.
Throws:
CasterException


Copyright © 2006 Information Builders, Incorporated.