ibi.broker.api.data.libraryaccess
Class AccessElement

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

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

The AccessElement class allows you to add members to an Access List, either as individual users or as a group. AccessElement also allows you to create and set burst values for report output.

ReportCaster's burst feature allows you to break a report into sections to be distributed separately instead of distributing an entire report. Bursting enables relevant sections of a report to be accessible by specified Access List members. Each report section is saved as a separate file. The code example below shows an implementation of the AccessElement class. It is taken from the coding samples packaged with the product in the * samples directory.


 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +  Copyright (c) 2005 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.       +
 +                                                                          +
 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 import ibi.broker.api.cci.CasterConnection;
 import ibi.broker.api.cci.LibraryAccessManager;
 import ibi.broker.api.data.libraryaccess.AccessElement;
 import ibi.broker.api.data.libraryaccess.LibraryAccessBook;
 
 public class AL_AccessElement 
 {
        public AL_AccessElement(String[] arg) throws Exception
        {
        String accessBookName = arg[0];
        String memberName = arg[1];
        String burstValue = arg[2];
                
        // Create manager
        CasterConnection casterConnection = Util.createCasterConnection();
        LibraryAccessManager manager = casterConnection.getLibraryAccessManager();
                
        // Create Access Element
        AccessElement element = new AccessElement();
                
        // Populate Access Element
        element.setMemberName(memberName);
        element.setBurstValue(burstValue);
                 
        manager.addAccessElement(accessBookName, element);
                
        // Print result
        LibraryAccessBook book = manager.getLibraryAccessBook(accessBookName);
        System.out.println("name = " + book.getName());
        System.out.println("description = " + book.getDescription());
        System.out.println("Owner = " + book.getOwner());
        AccessElement[] elementList = book.getAccessElementList();
        for(int i = 0; i < elementList.length; i++)
             System.out.println("memberType = " + elementList[i].getMemberType() + 
                                "  memberName = " + elementList[i].getMemberName() +
                                "  burstValue = " + elementList[i].getBurstValue());
        }
        
        
        public static void main(String[] arg)
        {
                AL_AccessElement sampl = null;
                if(arg.length < 3) {
                         menu();
                         return;
                }
                try
                {
                System.out.println("\n******* " +                               *       *       AL_AccessElement.class.getName() + " *****************");
                        sampl = new AL_AccessElement(arg);
                        System.out.println(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 " + AL_AccessElement.class.getName() *                          + " <accessBookName> <memberName> <burstValue>");
        
        
        }
 
 }
 

Version:
5.3.4
See Also:
Serialized Form

Field Summary
static java.lang.String TYPE_GROUP
          G is a String constant that indicates a GROUP member type.
static java.lang.String TYPE_USER
          U is a String constant that indicates a USER member type.
 
Constructor Summary
AccessElement()
           
 
Method Summary
 java.lang.String getBurstValue()
          Returns the burst value for a scheduled job.
 java.lang.String getMemberName()
          Returns members (clientIds) associated with a Library Access List.
 java.lang.String getMemberType()
          Returns the type associated with a member.
 void setBurstValue(java.lang.String burstValue)
          Specifies the burst value for a scheduled job.
 void setMemberName(java.lang.String clientId)
          Specifies the members (clientIds) associated with a Library Access List.This value may be an individual ReportCaster user, or a group.
 void setMemberType(java.lang.String userType)
          Specifies the type for a member.
 void validate(java.lang.String parentName)
          Verifies that an AccessElement String is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_USER

public static final java.lang.String TYPE_USER
U is a String constant that indicates a USER member type. This member type is used for an individual user.

See Also:
setMemberType(java.lang.String), Constant Field Values

TYPE_GROUP

public static final java.lang.String TYPE_GROUP
G is a String constant that indicates a GROUP member type. This member type is used for a named group of users.

See Also:
setMemberType(java.lang.String), Constant Field Values
Constructor Detail

AccessElement

public AccessElement()
Method Detail

getBurstValue

public java.lang.String getBurstValue()
Returns the burst value for a scheduled job. The burst value is the sort field that filters the scheduled job output. If no burst value is specified, a * value is returned.

Returns:
The burst value.

setBurstValue

public void setBurstValue(java.lang.String burstValue)
Specifies the burst value for a scheduled job. The burst value is used to filter output and must be a sort field in the report.

Parameters:
burstValue - The burst value.

getMemberName

public java.lang.String getMemberName()
Returns members (clientIds) associated with a Library Access List.

Returns:
Members of an Access List using clientID.

setMemberName

public void setMemberName(java.lang.String clientId)
Specifies the members (clientIds) associated with a Library Access List.This value may be an individual ReportCaster user, or a group.

Parameters:
clientId - Members of an Access List using clientID

getMemberType

public java.lang.String getMemberType()
Returns the type associated with a member. The returned value is a String constant, either U for a user or G for a group.

Returns:
The memberType.

setMemberType

public void setMemberType(java.lang.String userType)
Specifies the type for a member. The value is a String constant, either U for a user or G for a group.

Parameters:
userType - The member type.

validate

public void validate(java.lang.String parentName)
              throws CasterException
Verifies that an AccessElement String is valid. Invalid Strings may include missing values for member type or member name, invalid member types (types other than U or G), member names that exceed maxLen, or burst values that exceed maxLen.

Parameters:
parentName - The String to be validated.
Throws:
CasterException - If String is invalid.


Copyright © 2006 Information Builders, Incorporated.