ibi.broker.api.cci
Interface LibraryContentManager


public interface LibraryContentManager

This interface provides the means of
 managing the Category, Content, and 
 Version objects that are created as a result of the
 ReportCaster Distribution Server sending reports to the Report Library. Once reports are scheduled for
 distribution to the library, you can access or delete content, category, and version objects 
 from the underlying report library database.
 Objects can be accessed in several ways such as by using contentId, versionId or category methods.
 
 The sample code below shows the instantiation of a LibraryContentManager object.
 
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++      
 +  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.       +      
 +                                                                          +      
 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++   

 CasterManagedConnectionFactory managedConnectionFactory = new CasterManagedConnectionFactory();
 managedConnectionFactory.setServerName(host);//the name of the server running the distribution server
 managedConnectionFactory.setPortNumber(port);//the port the distribution server is listening
 CasterConnectionFactory connectionFactory = (CasterConnectionFactory)managedConnectionFactory.createConnectionFactory();
 ConnectionSpec credential = new PasswordCredential(user, password.toCharArray());
    //This can be any of the credential objects. It is assumed here the user String has been assigned earlier
   // and that password, also assigned earlier, is a String that needs to be converted to a character Array.
 CasterConnection connectionObject = ((CasterConnection)connectionFactory.getConnection(credential));
 LibraryContentManager manager = connectionObject.getLibraryContentManager();
 


Method Summary
 void addWatchItem(WatchItem watchItem)
           
 void deleteContent(java.lang.String contentId)
          Deletes the content description and all associated report versions from the ReportCaster Repository.
 void deleteContentByScheduleId(java.lang.String scheduleId, java.lang.String burstValue)
           
 void deleteVersion(java.lang.String versionId)
          Deletes the version of this report from the underlying report library database.
 void deleteWatchItem(WatchItem watchItem)
           
 Category[] getAccessibleCategoryInfoList(java.lang.String owner)
          Returns a Category list which can be accessible by the user owner.
 Category[] getAccessibleCategoryInfoList(java.lang.String owner, java.lang.String domainId, java.lang.String reportId)
           
 Category[] getAccessibleCategoryInfoListByCaller()
          Retrieves an array of Category objects that are accessible to the authenticated user.
 Content getAccessibleContentInfo(java.lang.String contentId)
          Retrieves a Content object as identified by the contentId.
 Content[] getAccessibleContentInfoList(java.lang.String owner, Category category)
          Retrieves value of the designated category as a Content[] object without versionList.
 Content[] getAccessibleContentInfoList(java.lang.String owner, Category category, boolean isVersionList)
           
 Content[] getAccessibleContentInfoList(java.lang.String domainId, java.lang.String reportId)
          Retrieves value of the designated report as a Content[] object without versionList.
 Content[] getAccessibleContentInfoList(java.lang.String domainId, java.lang.String reportId, boolean isVersionList)
           
 Content[] getAccessibleContentInfoList(java.lang.String domainId, java.lang.String reportId, java.lang.String categoryName, boolean isVersionList)
           
 Content[] getAccessibleContentInfoListByCaller(Category category)
          Retrieves an array of all Content objects accessible by the authenticated user and associated with the given Category.
 java.lang.String[] getAccessibleReportList(java.lang.String domainId, java.lang.String folderId)
          Returns all accessible Standard Report and My Report file names in ReportLibrary with the given Managed Reporting Domain HREF and Folder HREF for the authenticated user.
 java.io.InputStream getAccessibleVersion(java.lang.String versionId)
          Returns an InputStream containing the report identified by the versionId.
 Version getAccessibleVersionInfo(java.lang.String versionId)
          Retrieves a Version object as identified by the versionId.
 Category[] getCategoryInfoList()
          Retrieves an array of Category objects.
 Category[] getCategoryInfoListByOwner(java.lang.String owner)
          Retrieves an array of Category objects associated with a given ReportCaster user.
 Content getContent(java.lang.String contentId)
          Retrieves the Content object as identified by the contentId key field.
 java.lang.String getContentId(java.lang.String owner, java.lang.String contentDescription)
          Obtains the content identifier associated with a designated owner and a given content description string.
 Content[] getContentInfoList(Category category)
          Retrieves an array of Content objects associated with the given Category.
 Content[] getContentInfoList(Category category, boolean isVersionList)
           
 Content[] getContentInfoListByCaller(Category category)
          Retrieves an array of Content objects identified with the given Category and owned by the current authenticated user.
 Content[] getContentInfoListByOwner(java.lang.String owner, Category category)
          Retrieves an array of Content objects owned by the specified ReportCaster userid within the specified Category.
 Content getLatestAccessibleContent(Schedule schedule)
          Obtains the Content object that has latest version data and is accessible to the authenticated user and associated with the given Schedule object.
 java.lang.String[] getOwnerList()
          Returns a list of library report owners.
 Version getVersion(java.lang.String versionId)
          Retrieves the Version object as identified by the versionId key field.
 Content[] getWatchContentInfoList(java.lang.String user)
           
 WatchItem[] getWatchList(java.lang.String userId, java.lang.String contentId)
           
 java.lang.String[] getWatchOwnerList()
           
 boolean isContentAccessible(java.lang.String userId, java.lang.String contentId)
          Returns the IDs for which a schedule is accessible.
 

Method Detail

deleteVersion

void deleteVersion(java.lang.String versionId)
                   throws CasterException
Deletes the version of this report from the underlying report library database. For the Report Library, a version is a specific instance of a report that is grouped in a container called content. This deletion operation takes the versionId, which is the primary key field used to identify report versions in the report library database. However, the authenticated user must have access to this report version or a CasterException is thrown. The deleteVersion method can only be used by the administrator and the owner.

Parameters:
versionId - The unique identifier of the report version in the repository.
Throws:
CasterException - if a database access error occurs, or Version with versionId doesn't exist, or there is no permission to access this version.

deleteContent

void deleteContent(java.lang.String contentId)
                   throws CasterException
Deletes the content description and all associated report versions from the ReportCaster Repository. For the Report Library, content is a descriptive container that contains versions of a particular report. By default, the name of the container is determined at schedule time, and the Report Library uses the schedule name specified in the scheduler. This deletion operation accepts the contentId, which is the primary key field used to identify content objects in the Report Library database. The authenticated user must have access to this content or a CasterException is thrown. The deleteContent method can only be used by the administrator and the owner.

Parameters:
contentId - The unique identifier of the content in the repository.
Throws:
CasterException - If a database access error occurs or Content with contentId doesn't exist or there is no permission to access this content.

deleteContentByScheduleId

void deleteContentByScheduleId(java.lang.String scheduleId,
                               java.lang.String burstValue)
                               throws CasterException
Throws:
CasterException

getVersion

Version getVersion(java.lang.String versionId)
                   throws CasterException
Retrieves the Version object as identified by the versionId key field. Since only information about this version is needed, the actual report associated with this version is not retrieved. However, the authenticated user must have access to this report version otherwise there will be a CasterException thrown. The getVersionId method can only be used by the administrator and the owner.

Parameters:
versionId - The unique identifier of this version.
Returns:
Version object only containng information about the version.
Throws:
CasterException - if a database access error occurs or Version with versionId doesn't exist or there is no permission to access this version.

getContent

Content getContent(java.lang.String contentId)
                   throws CasterException
Retrieves the Content object as identified by the contentId key field. Because only information about this content is needed, the actual report associated with this content is not retrieved. However the authenticated user must have access to this content otherwise there will be a CasterException thrown. This method can only be used by the administrator and the owner.

Parameters:
contentId - The unique identifier of the content.
Returns:
A Content object only containing information about the Content.
Throws:
CasterException - If a database access error occurs or Content with contentId doesn't exist or there is no permission to access this content.

getContentInfoList

Content[] getContentInfoList(Category category)
                             throws CasterException
Retrieves an array of Content objects associated with the given Category. Because only information about this content is needed, the actual report associated with this content is not retrieved. This method can only be used by the administrator and the owner.

Parameters:
category - Reference to the Category object
Returns:
An array of Content objects (Content[])only containing information about the content.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getContentInfoList

Content[] getContentInfoList(Category category,
                             boolean isVersionList)
                             throws CasterException
Throws:
CasterException

getContentInfoListByCaller

Content[] getContentInfoListByCaller(Category category)
                                     throws CasterException
Retrieves an array of Content objects identified with the given Category and owned by the current authenticated user. Because only information about this content is needed, the actual report associated with this content is not retrieved. This method can only be used by the administrator.

Parameters:
category - Reference to the Category object
Returns:
An array of Content objects (content[]) containing only information about the content.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getContentInfoListByOwner

Content[] getContentInfoListByOwner(java.lang.String owner,
                                    Category category)
                                    throws CasterException
Retrieves an array of Content objects owned by the specified ReportCaster userid within the specified Category. Because only information about this content is needed, the actual report associated with this content is not retrieved. This method can only be used by the administrator and the owner.

Parameters:
category - Category object that is parent to the returned Content.
Returns:
An array of content objects (Content[]).
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getCategoryInfoList

Category[] getCategoryInfoList()
                               throws CasterException
Retrieves an array of Category objects. Because no user or owner is designated either implicitly or explicitly, this method will retrieve all categories in the system. Because only information about this report category is needed, the actual report associated with this Content is not retrieved. This method can only be used by the administrator and the owner.

Returns:
An array of category objects (Category[]).
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getCategoryInfoListByOwner

Category[] getCategoryInfoListByOwner(java.lang.String owner)
                                      throws CasterException
Retrieves an array of Category objects associated with a given ReportCaster user. Only those categories accessible by the designated user are listed. Because only information about this report category is needed, the actual reports associated with the Categories are not retrieved. This method can only be used by the administrator.

Parameters:
owner - ReportCaster username of the user who can view the categories.
Returns:
An array of category objects (Category[]).
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getAccessibleCategoryInfoList

Category[] getAccessibleCategoryInfoList(java.lang.String owner)
                                         throws CasterException
Returns a Category list which can be accessible by the user owner.

Parameters:
owner - name of the owner.
Returns:
A Category list which can be accessible by the user owner.
Throws:
CasterException - if a database access error occurs or no permission to access this function.

getAccessibleCategoryInfoList

Category[] getAccessibleCategoryInfoList(java.lang.String owner,
                                         java.lang.String domainId,
                                         java.lang.String reportId)
                                         throws CasterException
Throws:
CasterException

getOwnerList

java.lang.String[] getOwnerList()
                                throws CasterException
Returns a list of library report owners. The library report owner is the user who creates the schedule to store the report into the ReportLibrary.

Returns:
A list of library report owners.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getWatchOwnerList

java.lang.String[] getWatchOwnerList()
                                     throws CasterException
Throws:
CasterException

getAccessibleVersion

java.io.InputStream getAccessibleVersion(java.lang.String versionId)
                                         throws CasterException
Returns an InputStream containing the report identified by the versionId. However, the authenticated user must have access to this report version otherwise there will be a CasterException thrown. This method is accessible only to the authenticated user.

Parameters:
versionId - Unique identifier for the version.
Returns:
An InputStream containing the report identified by the versionId.
Throws:
CasterException - If a database access error occurs or Version with versionId doesn't exist or there is no permission to access this version from the Report Library.

getAccessibleVersionInfo

Version getAccessibleVersionInfo(java.lang.String versionId)
                                 throws CasterException
Retrieves a Version object as identified by the versionId. As each version ID is unique, this method obtains only the designated version of content from the Report Library data source. However, the authenticated user must have access to this report version or a CasterException is thrown. Because only information about this report version is needed, the actual report is not accessible using the object returned by this method. This method is accessible only to the authenticated user.

Parameters:
versionId - Unique identifier for the version.
Returns:
Version object without access to the actual report.
Throws:
CasterException - If a database access error occurs or Version with versionId doesn't exist or there is no permission to access this version from the Report Library.

getAccessibleContentInfo

Content getAccessibleContentInfo(java.lang.String contentId)
                                 throws CasterException
Retrieves a Content object as identified by the contentId. As each content ID is unique, this method obtains only designated content from the Report Library data source. However, the authenticated user must have access to this report version or a CasterException is thrown. Because only information about this report content is needed, the actual report is not accessible using the object returned by this method. This method is accessible only to the authenticated user.

Parameters:
contentId - Unique identifier for the content.
Returns:
Content object without access to the actual reports.
Throws:
CasterException - If a database access error occurs or Content with contentId doesn't exist or there is no permission to access this content from the Report Library.

getAccessibleContentInfoListByCaller

Content[] getAccessibleContentInfoListByCaller(Category category)
                                               throws CasterException
Retrieves an array of all Content objects accessible by the authenticated user and associated with the given Category. Because only information about this report content is designated via this method, the actual report is not accessible via the object returned by this method. This method is accessible only to the authenticated user.

Parameters:
category - A Category object containing references to the content.
Returns:
An array of Content objects.
Throws:
CasterException - If a database access error occurs or there is no permission to access this category from the Report Library.

getAccessibleContentInfoList

Content[] getAccessibleContentInfoList(java.lang.String owner,
                                       Category category)
                                       throws CasterException
Retrieves value of the designated category as a Content[] object without versionList.

Parameters:
owner - The name of the owner.
category - A Category object containing references to the content.
Returns:
Content[]
Throws:
CasterException - If a database access error occurs or there is no permission to access this Content[] from the Report Library.

getAccessibleContentInfoList

Content[] getAccessibleContentInfoList(java.lang.String owner,
                                       Category category,
                                       boolean isVersionList)
                                       throws CasterException
Throws:
CasterException

getAccessibleContentInfoList

Content[] getAccessibleContentInfoList(java.lang.String domainId,
                                       java.lang.String reportId)
                                       throws CasterException
Retrieves value of the designated report as a Content[] object without versionList.

Parameters:
domainId -
reportId -
Returns:
Content[]
Throws:
CasterException - If a database access error occurs or there is no permission to access this Content[] from the Report Library.

getAccessibleContentInfoList

Content[] getAccessibleContentInfoList(java.lang.String domainId,
                                       java.lang.String reportId,
                                       boolean isVersionList)
                                       throws CasterException
Throws:
CasterException

getAccessibleContentInfoList

Content[] getAccessibleContentInfoList(java.lang.String domainId,
                                       java.lang.String reportId,
                                       java.lang.String categoryName,
                                       boolean isVersionList)
                                       throws CasterException
Throws:
CasterException

getAccessibleReportList

java.lang.String[] getAccessibleReportList(java.lang.String domainId,
                                           java.lang.String folderId)
                                           throws CasterException
Returns all accessible Standard Report and My Report file names in ReportLibrary with the given Managed Reporting Domain HREF and Folder HREF for the authenticated user.

Returns:
All accessible Standard Report and My Report file names in ReportLibrary with the given MR Domain HREF and Folder HREF for the authenticated user.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getAccessibleCategoryInfoListByCaller

Category[] getAccessibleCategoryInfoListByCaller()
                                                 throws CasterException
Retrieves an array of Category objects that are accessible to the authenticated user. Because only information about this report category is needed, the actual reports are not retrieved. This method is accessible only to the authenticated user.

Returns:
An array of Category objects that do not have access to the actual reports.
Throws:
CasterException - If a database access error occurs or there is no permission to access this method.

getContentId

java.lang.String getContentId(java.lang.String owner,
                              java.lang.String contentDescription)
                              throws CasterException
Obtains the content identifier associated with a designated owner and a given content description string. The contentId serves as the primary key ReportCaster uses to store content information in the Report Library tables. The character limit for the content description string is 90 characters. There are no permissions restrictions on this method.

Parameters:
owner - ReportCaster username of the content owner.
contentDescription - A description of the content as a String.
Returns:
contentId as a String.
Throws:
CasterException - If a database access error occurs.

getLatestAccessibleContent

Content getLatestAccessibleContent(Schedule schedule)
                                   throws CasterException
Obtains the Content object that has latest version data and is accessible to the authenticated user and associated with the given Schedule object. Because only information about the latest report version is needed, the actual report is not accessible via the object returned by this method. For a Standard Report or My Report, the Schedule object must have execId, procedureName, domainHREF and folderHREF. For WebFOCUS Server Procedure, procedureName, execId and serverName are required. If parameterList is specified in the Task object, this method will match all parameters in this parameterList. There is no order restriction for the parameters in the parameterList.

Parameters:
schedule -
Returns:
A Content object with all version information
Throws:
CasterException - If a database access error occurs.

isContentAccessible

boolean isContentAccessible(java.lang.String userId,
                            java.lang.String contentId)
                            throws CasterException
Returns the IDs for which a schedule is accessible.

Returns:
The userID and contentID that can access a schedule.
Throws:
CasterException

getWatchContentInfoList

Content[] getWatchContentInfoList(java.lang.String user)
                                  throws CasterException
Throws:
CasterException

getWatchList

WatchItem[] getWatchList(java.lang.String userId,
                         java.lang.String contentId)
                         throws CasterException
Throws:
CasterException

deleteWatchItem

void deleteWatchItem(WatchItem watchItem)
                     throws CasterException
Throws:
CasterException

addWatchItem

void addWatchItem(WatchItem watchItem)
                  throws CasterException
Throws:
CasterException


Copyright © 2006 Information Builders, Incorporated.