ibi.broker.api.data.library
Class Category

java.lang.Object
  extended by ibi.broker.api.data.content.ContentObject
      extended by ibi.broker.api.data.library.Category
All Implemented Interfaces:
java.io.Serializable

public class Category
extends ibi.broker.api.data.content.ContentObject
implements java.io.Serializable

 The Category class provides a means of categorizing, storing  
 and manipulating report library reports. In addition to Category, 
 the other classes involved in the hierarchical organization of 
 report library content are Content and Version 
 whereby Category exists at the top of the hierarchy as the root(i.e., the parent), followed by 
 Content, and then finally nested below that the actual Versions.
 The code example below shows an implementation of the Category class.
 It is taken from the coding samples packaged with the product in the samples directory.

 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +  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 void showLibrary() throws CasterException {
       //category: top level
       Category[] categories = contentManager.getAccessibleCategoryInfoListByCaller();
       if(categories.length == 0){
           System.out.println("Empty library.");
           return;
       }
       System.out.println("Library--");
       for(int i=0; i < categories.length; i++) {
           Category c = categories[i];
           printCategoryInfo(c);
           //Content: second level. Organized by schedule and burst value.
           Content[] contents = contentManager.getAccessibleContentInfoListByCaller(c);
           if(contents.length==0)
           {
               System.out.println("Empty category");
               continue;
           }
           for(int j=0; j < contents.length; j++) {
               printContentInfo(contents[j]);
               //use getAccessibleContentInfo to get version list.
               Content c1 =contentManager.getAccessibleContentInfo(contents[j].getId());
               Version[] versions = c1.getVersionList();
               if(versions== null ||versions.length == 0){
                   System.out.println("Empty content");
                   continue;
               }
               for(int k=0; k < versions.length; k++)
                   printVersionInfo(versions[k]);
           }
       }
   }
 

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ibi.broker.api.data.content.ContentObject
id
 
Constructor Summary
Category()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Content[] getContentList()
          Obtains an Array of report library Content objects that are nested into this category.As the category is the parent of content in the hierarchical scheme, the content list provides access to the actual content for a given instance of category.
 java.lang.String getName()
          Obtains the name of the category under which report library content and their related version objects will be organized.
 int hashCode()
           
 boolean isCategory()
          Assigns a Boolean flag indicating whether or not this category has a category name that the user has specified on the user interface when creating a new schedule for generating the reports into the library.
 boolean isMre()
          Assigns a Boolean flag indicating whether or not the library report content under this category exists in Managed Reporting.
 void setCategory(boolean isCategory)
          Obtains a Boolean flag indicating whether or not this category has a category name that the user has specified on the user interface when creating a new schedule for generating the reports into the library.
 void setContentList(Content[] contentList)
          Assigns an Array of report library Content objects that are nested into this category.As the category is the parent of content in the hierarchical scheme, the content list provides access to the actual content for a given instance of category.
 void setMre(boolean isMre)
          Obtains a Boolean flag indicating whether or not the library report content under this category exists in Managed Reporting.
 void setName(java.lang.String name)
          Assigns the name of the category under which report library content and their related version objects will be organized.
 void validate(java.lang.String parentName)
          Assists in validating arguments
 
Methods inherited from class ibi.broker.api.data.content.ContentObject
getId, setId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Category

public Category()
Method Detail

setName

public void setName(java.lang.String name)
Assigns the name of the category under which report library content and their related version objects will be organized. This name field allows for a description of the category and has a maximum size of 90 characters.

Parameters:
name - The descriptive name of the category.
See Also:
getName()

getName

public java.lang.String getName()
Obtains the name of the category under which report library content and their related version objects will be organized. This name field allows for a description of the category and has a maximum size of 90 characters.

Returns:
The descriptive name as a String
See Also:
setName(String)

getContentList

public Content[] getContentList()
Obtains an Array of report library Content objects that are nested into this category.As the category is the parent of content in the hierarchical scheme, the content list provides access to the actual content for a given instance of category. Each member of the Content Array is a container of version objects representing a report that was run and then distributed to this category. The actual reports are contained within the Version objects.

Returns:
An array of content objects
See Also:
setContentList(Content[])

setContentList

public void setContentList(Content[] contentList)
Assigns an Array of report library Content objects that are nested into this category.As the category is the parent of content in the hierarchical scheme, the content list provides access to the actual content for a given instance of category. Each member of the Content Array is a container of version objects representing a report that was run and then distributed to this category. The actual reports are contained within the Version objects.

Parameters:
contentList - an array of Content objects
See Also:
getContentList()

isCategory

public boolean isCategory()
Assigns a Boolean flag indicating whether or not this category has a category name that the user has specified on the user interface when creating a new schedule for generating the reports into the library.

Returns:
The flag indicating whether or not the category name is from the user input as a Boolean.
See Also:
setCategory(boolean)

setCategory

public void setCategory(boolean isCategory)
Obtains a Boolean flag indicating whether or not this category has a category name that the user has specified on the user interface when creating a new schedule for generating the reports into the library.

Parameters:
isCategory - Boolean flag indicating whether or not category name is from the user input
See Also:
isCategory

isMre

public boolean isMre()
Assigns a Boolean flag indicating whether or not the library report content under this category exists in Managed Reporting. If the flag returns TRUE, the report content exists within a Managed Reporting distribution and this category belong to the MRE domain. If the flag returns FALSE, the report isn't associated with a Managed Reporting distribution and thus this category does not belong to the MRE domain.

Returns:
The flag indicating whether or not category belongs to MRE domain as a Boolean.
See Also:
setMre(boolean)

setMre

public void setMre(boolean isMre)
Obtains a Boolean flag indicating whether or not the library report content under this category exists in Managed Reporting. If the flag returns TRUE, the report content exists within a Managed Reporting distribution and this category belong to the MRE domain. If the flag returns FALSE, the report is not associated with a Managed Reporting distribution and thus this category does not belong to the MRE domain.

Parameters:
isMre - Boolean flag indicating whether or not category belongs to MRE domain.
See Also:
isMre

validate

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class ibi.broker.api.data.content.ContentObject

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class ibi.broker.api.data.content.ContentObject


Copyright © 2006 Information Builders, Incorporated.