com.crystaldecisions.sdk.occa.infostore
Interface IInfoStore


public interface IInfoStore

IInfoStore represents the BusinessObjects Enterprise InfoStore service. The InfoStore service provides access to the contents of the BusinessObjects Enterprise repository, in which objects (or references to objects), such as reports and folders, are stored. The InfoStore service is used to store, remove, schedule and move objects in the repository.

Note: This object is serializable and can be used in environments that support fail-over. To ensure the object can be recreated in the event of an application server failure, use a session variable to persist the object across pages. The object can then be retrieved from the session variable from any server in the cluster.


Method Summary
 void commit(IInfoObjects objects)
          

Commits to the CMS any changes that are made to InfoObject collections.

 void commit(IInfoObjects objects, boolean atomic)
          

Commits to the CMS any changes that are made to InfoObject collections.

 ICommitResult commit(IInfoObjects objects, boolean atomic, CommitMode mode)
          

Commits to the CMS any changes that are made to InfoObject collections using the commit mode specified.

 ICommitResult commit(IInfoObjects objects, boolean atomic, CommitMode mode, java.lang.String renamePattern)
           
 ICMSQuery createCMSQuery(java.lang.String initQuery)
           Creates an ICMSQuery object that represents a CMS query string, but provides advanced functionality to retrieve large results in 'pages', and the ability to manage the lifetime of the query's result cache on the CMS.
 ICMSQuery createCMSQuery(java.lang.String initQuery, boolean maintainTopN)
           Creates an ICMSQuery object that represents a CMS query string, but provides advanced functionality to retrieve large results in 'pages', and the ability to manage the lifetime of the query's result cache on the CMS.
 void deliverToInbox(IInfoObjects objects)
          

Delivers the objects to inboxes of specified principals.

 IInfoObjects find(int propertySet, SearchPattern searchPattern, SortType sortType)
          

Searches through the repository with the specified pattern.

 int getBatchExpiryTimeSeconds()
          Gets the batch expiry time that will be used for commits
 IFolder getMyFavoritesFolder()
          

Retrieves the user's favorite folder.

 IInbox getMyInbox()
          

Retrieves the user's inbox folder.

 ICategory getMyPersonalCategory()
          

Retrieves the users' personal category in the system.

 IPagingQuery getPagingQuery()
          Deprecated. Since 4.0. CMS now supports paged queries, use ICMSQuery instead.
 IPageResult getPagingQuery(java.lang.String uri, PagingQueryOptions options)
          Executes the specified URI query, and returns a page result object.
 IPluginMgr getPluginMgr()
          

Returns the PluginManager object that is being used by the InfoStore.

 int getSessionFolderID()
           
 IStatelessPageInfo getStatelessPageInfo(java.lang.String uri, PagingQueryOptions options)
          Retrieves a subsequent page's info passing in the page index representing the page desired.
 IStreamingQuery getStreamingQuery(java.lang.String query)
          Getting streaming query support to stream the query result out
 ICategoryPager getTopCategories()
          

Retrieves a pager for all categories in the system.

 ICategoryPager getTopCategories(int propertySet, SearchPattern searchPattern, SortType sortType)
          

Retrieves a pager for categories in the system.

 IFolderPager getTopFolders()
          

Retrieves a pager for the top level folders

 IFolderPager getTopFolders(int propertySet, SearchPattern searchPattern, SortType sortType)
          

Retrieves a pager for top folders in the system.

 IInfoObjects newInfoObjectCollection()
          

Creates a new, empty InfoObjects collection.

 IProperties newPropertyCollection()
          

Creates a new, empty, property bag.

 IInfoObjects query(ICMSQuery query)
           
 IInfoObjects query(java.lang.String query)
          

Executes a query against the CMS.

 IInfoObjects[] query(java.lang.String[] queries)
          

Executes queries against the CMS.

 void schedule(IInfoObjects objects)
          

Creates runnable instances for every object in the collection.

 void sendTo(IInfoObjects objects)
          

Sends the objects to the destination specified.

 void setBatchExpiryTimeSeconds(int batchExpiryTimeSeconds)
          Use for setting the batch expiry time for commits.
 

Method Detail

commit

void commit(IInfoObjects objects)
            throws SDKException

Commits to the CMS any changes that are made to InfoObject collections. This is a non-batch commit. If there are any errors, they will be batched together and thrown as an exception. The CommitMode.STRICT mode is used for this commit.

Parameters:
objects - The InfoObjects collection for which changes are to be committed.
Throws:
SDKException - This is thrown if the Commit is unsuccessful.

commit

void commit(IInfoObjects objects,
            boolean atomic)
            throws SDKException

Commits to the CMS any changes that are made to InfoObject collections. If an error occurs during an atomic commit, all changes made will be rolled back. If there are any errors, they will be batched together and thrown as an exception. The CommitMode.STRICT mode is used for this commit.

Parameters:
objects - The InfoObjects collection for which changes are to be committed.
atomic - True for batch commit, false for non-batch commit.
Throws:
SDKException - This is thrown if the Commit is unsuccessful.

commit

ICommitResult commit(IInfoObjects objects,
                     boolean atomic,
                     CommitMode mode)

Commits to the CMS any changes that are made to InfoObject collections using the commit mode specified. Any exceptions that may be thrown will be contained in the ICommitResult that is returned.

Parameters:
objects - The InfoObjects collection for which changes are to be committed.
atomic - True for batch commit, false for non-batch commit.
mode - CommitMode specifies the commit mode to be used.
Returns:
An ICommitResult that contains information on any errors or warnings that occurred during the commit.

commit

ICommitResult commit(IInfoObjects objects,
                     boolean atomic,
                     CommitMode mode,
                     java.lang.String renamePattern)

newInfoObjectCollection

IInfoObjects newInfoObjectCollection()

Creates a new, empty InfoObjects collection.

Returns:
The newly created InfoObjects collection as an IInfoObjects object.

newPropertyCollection

IProperties newPropertyCollection()

Creates a new, empty, property bag.

Returns:
The newly created property bag as an IProperties object.

getPluginMgr

IPluginMgr getPluginMgr()

Returns the PluginManager object that is being used by the InfoStore.

Returns:
The IPluginManager object being used by the InfoStore.

query

IInfoObjects query(java.lang.String query)
                   throws SDKException

Executes a query against the CMS. Given an SQL query string, the method will return a collection with the matching InfoObjects objects.

Parameters:
query - The SQL-style query string used to request a collection of objects.
Returns:
The IInfoObjects object that matches the query.
Throws:
SDKException - This exception is thrown if the query fails.

query

IInfoObjects query(ICMSQuery query)
                   throws SDKException
Throws:
SDKException

query

IInfoObjects[] query(java.lang.String[] queries)
                     throws SDKException

Executes queries against the CMS. Given an array of SQL query strings, the method will return collections with the matching InfoObjects objects.

Parameters:
query - The array of SQL-style query strings used to request collections of objects.
Returns:
The array of IInfoObjects objects that match each query.
Throws:
SDKException - This exception is thrown if the query fails.

schedule

void schedule(IInfoObjects objects)
              throws SDKException

Creates runnable instances for every object in the collection.

Note: To retrieve scheduling information for each object in the collection use {linkplain com.crystaldecisions.sdk.occa.infostore.IInfoObject#getSchedulingInfo getSchedulingInfo}

Parameters:
objects - An IInfoObjects interface that represents IInfoObject objects to be scheduled.
Throws:
SDKException - This exception is thrown if the process fails.

sendTo

void sendTo(IInfoObjects objects)
            throws SDKException

Sends the objects to the destination specified.

Parameters:
objects - An IInfoObjects interface that represents a collection of IInfoObject objects to be sent.
Throws:
SDKException - This exception is thrown if the process fails.

deliverToInbox

void deliverToInbox(IInfoObjects objects)
                    throws SDKException

Delivers the objects to inboxes of specified principals.

Parameters:
objects - An IInfoObjects interface that represents a collection of IInfoObject objects to be delivered.
Throws:
SDKException - This exception is thrown if the process fails.

getSessionFolderID

int getSessionFolderID()
                       throws SDKException
Throws:
SDKException

getPagingQuery

IPageResult getPagingQuery(java.lang.String uri,
                           PagingQueryOptions options)
                           throws SDKException
Executes the specified URI query, and returns a page result object. The result object contains a list of page URIs (Strings) as well as information about how many objects and pages were returned.

The uri parameter must contain a query that follows the URI path query conventions. Here are some examples:

An Enterprise (SQL-like) query:

query://{SELECT SI_ID, SI_NAME FROM CI_INFOOBJECTS WHERE SI_PARENTID=456 ORDER BY SI_NAME ASC}

A path query:

path://InfoObjects/Root Folder/My Reports/*

A CUID query:

cuid://<ASHnC0S_Pw5LhKFbZ.iA_j4,ARQfpQ0vnA1Nl6KrJDMSmVs>

For more information, see the BusinessObjects Enterprise Java SDK Developer Guide.

Parameters:
uri - the URI containing the query to perform
options - the options to use when indexing the initial query
Returns:
a result listing URIs depends on PagingQueryOptions set.
Throws:
SDKException - if the URI is invalid and can not be parsed
See Also:
IStatelessPageInfo, IPageResult, PagingQueryOptions

getStatelessPageInfo

IStatelessPageInfo getStatelessPageInfo(java.lang.String uri,
                                        PagingQueryOptions options)
                                        throws SDKException
Retrieves a subsequent page's info passing in the page index representing the page desired. The SQL on the returned page info can then be used to retrieve that object's set of pages.

Parameters:
pagingQuery - A String representing one of the page URIs returned from a previous getStatelessPagingQuery call
options - A StatelessPagingQueryOptions representing the options to use while building this page's info
Returns:
an IStatelessPageInfo containing the SQL needed to execute to retrieve that page's set of info objects
Throws:
SDKException - if the uri is invalid and can not be parsed
See Also:
IStatelessPageInfo, IStatelessPageResult, StatelessPagingQueryOptions

getPagingQuery

@Deprecated
IPagingQuery getPagingQuery()
                            throws SDKException
Deprecated. Since 4.0. CMS now supports paged queries, use ICMSQuery instead.

Get a new paging query object.

Returns:
IPagingQuer object
Throws:
SDKException

find

IInfoObjects find(int propertySet,
                  SearchPattern searchPattern,
                  SortType sortType)
                  throws SDKException

Searches through the repository with the specified pattern.

Parameters:
propertySet - The IInfoObject.propertySet to get from the repository.
searchPattern - The SearchPattern to use to find an object.
sortType - The SortType to sort the list of objects retrieved from the repository.
Throws:
SDKException

getTopFolders

IFolderPager getTopFolders()
                           throws SDKException

Retrieves a pager for the top level folders

Returns:
The IFolderPager object.
Throws:
SDKException

getTopFolders

IFolderPager getTopFolders(int propertySet,
                           SearchPattern searchPattern,
                           SortType sortType)
                           throws SDKException

Retrieves a pager for top folders in the system.

Parameters:
propertySet - The IInfoObject.propertySet to get from the repository.
searchPattern - The SearchPattern to use to find an object.
sortType - The SortType to sort the list of objects retrieved from the repository.
Returns:
The IFolderPager collection.
Throws:
SDKException

getMyFavoritesFolder

IFolder getMyFavoritesFolder()
                             throws SDKException

Retrieves the user's favorite folder.

Returns:
The IFolder which is the user's favorite folder
Throws:
SDKException

getTopCategories

ICategoryPager getTopCategories()
                                throws SDKException

Retrieves a pager for all categories in the system.

Returns:
The ICategoryPager object.
Throws:
SDKException

getTopCategories

ICategoryPager getTopCategories(int propertySet,
                                SearchPattern searchPattern,
                                SortType sortType)
                                throws SDKException

Retrieves a pager for categories in the system.

Parameters:
propertySet - The IInfoObject.propertySet to get from the repository.
searchPattern - The SearchPattern to use to find an object.
sortType - The SortType to sort the list of objects retrieved from the repository.
Returns:
The ICategoryPager collection.
Throws:
SDKException

getMyPersonalCategory

ICategory getMyPersonalCategory()
                                throws SDKException

Retrieves the users' personal category in the system.

Returns:
The ICategories collection.
Throws:
SDKException

getMyInbox

IInbox getMyInbox()
                  throws SDKException

Retrieves the user's inbox folder.

Returns:
The IFolder which is the user's faviourite folder
Throws:
SDKException

getStreamingQuery

IStreamingQuery getStreamingQuery(java.lang.String query)
                                  throws SDKException
Getting streaming query support to stream the query result out

Parameters:
query - InfoStore query string
Returns:
IStreamingQuery interface for returning the query results in batches
Throws:
SDKException

createCMSQuery

ICMSQuery createCMSQuery(java.lang.String initQuery)
                         throws SDKException

Creates an ICMSQuery object that represents a CMS query string, but provides advanced functionality to retrieve large results in 'pages', and the ability to manage the lifetime of the query's result cache on the CMS.

Parameters:
initQuery - The CMS query to build ICMSQuery off of
Returns:
A new ICMSQuery object
Throws:
SDKException

createCMSQuery

ICMSQuery createCMSQuery(java.lang.String initQuery,
                         boolean maintainTopN)
                         throws SDKException

Creates an ICMSQuery object that represents a CMS query string, but provides advanced functionality to retrieve large results in 'pages', and the ability to manage the lifetime of the query's result cache on the CMS.

Parameters:
initQuery - The CMS query to build ICMSQuery off of
maintainTopN - The TOP M-N specification in initQuery will be maintained regardless of paging specifications
Returns:
A new ICMSQuery object
Throws:
SDKException

getBatchExpiryTimeSeconds

int getBatchExpiryTimeSeconds()
Gets the batch expiry time that will be used for commits

Returns:
the batch expiry time in seconds. This is the amount of time the CMS will watch without receiving a batch before deleting the batch.
Throws:
SDKException

setBatchExpiryTimeSeconds

void setBatchExpiryTimeSeconds(int batchExpiryTimeSeconds)
Use for setting the batch expiry time for commits.

Parameters:
batchExpiryTimeSeconds - - The amount of time the CMS should wait before timing out the commit batches. If you are getting the "Invalid batch id" error from the CMS then send up the batches faster (default is 10 seconds) or increase the batch timeout. Having a batch on the server means database resources are locked until done. So do not use this parameter for client applications that would typically have an unlimited number of concurrent callers. A value less than or equal to zero mean the CMS will use the default time.