|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibi.broker.api.data.libraryaccess.AccessElement
public class AccessElement
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>"); } }
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 |
---|
public static final java.lang.String TYPE_USER
setMemberType(java.lang.String)
,
Constant Field Valuespublic static final java.lang.String TYPE_GROUP
setMemberType(java.lang.String)
,
Constant Field ValuesConstructor Detail |
---|
public AccessElement()
Method Detail |
---|
public java.lang.String getBurstValue()
*
value is returned.
public void setBurstValue(java.lang.String burstValue)
burstValue
- The burst value.public java.lang.String getMemberName()
public void setMemberName(java.lang.String clientId)
clientId
- Members of an Access List using clientIDpublic java.lang.String getMemberType()
public void setMemberType(java.lang.String userType)
userType
- The member type.public void validate(java.lang.String parentName) throws CasterException
maxLen
, or burst values
that exceed maxLen
.
parentName
- The String to be validated.
CasterException
- If String is invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |