com.crystaldecisions.sdk.occa.report.application
Class ConnectionDirManager

java.lang.Object
  extended by com.crystaldecisions.sdk.occa.report.application.ConnectionDirManager

public class ConnectionDirManager
extends java.lang.Object

This class defines the Connection Directory Manager. The Connection Directory Manager allows you to browse for the following:

Data sources from the RAS server are put in directory format, and grouped in a hierarchical structure for easy access. Use the open method to specify the types of data sources that you want to retrieve from the directories on your RAS server. These directory items are represented as multiple nodes in a tree structure. Use the ConnectionDirManager.getRoots() method and getChildren method to populate the tree with directory items. If the directory item is a database connection (an IConnectionDirectoryItem), you can use the getTables method to get the tables that you want to add to the report. To create a ConnectionDirManager object, use the ReportAppSession object's ReportAppSession.createService(String) method.


Constructor Summary
ConnectionDirManager()
           Constructs a Connection Directory Manager.
 
Method Summary
 void close()
           Closes and frees the Connection Directory Manager.
 DirectoryItems getChildren(IDirectoryItem parent)
           Returns the children of a specified parent node.
 java.util.Locale getLocale()
          Deprecated.  
 java.util.Locale getPreferredViewingLocale()
          Returns the locale of application user interface and error messages.
 java.util.Locale getProductLocale()
          Returns the locale of application user interface and error messages.
 DirectoryItems getRoots()
           Retrieves the root items from each data source directory on the server.
 Tables getTables(IConnectionDirectoryItem connItem)
           Returns the tables of a specified connection directory item from the server.
 void initialize(ReportAppSession appSession)
           For internal use only.
 void open(int directoryItemTypes, int options)
           Opens the Connection Directory Manager.
 void refresh(IDirectoryItem parent)
           Refreshes the children of a specified parent directory item.
 void setLocale(java.util.Locale locale)
          Deprecated.  
 void setPreferredViewingLocale(java.util.Locale preferredViewingLocale)
           
 void setProductLocale(java.util.Locale productLocale)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionDirManager

public ConnectionDirManager()

Constructs a Connection Directory Manager. The ReportAppSession object's createService method should be used to create this object.

Method Detail

close

public void close()
           throws ReportSDKException

Closes and frees the Connection Directory Manager.

Throws:
ReportSDKException

getChildren

public DirectoryItems getChildren(IDirectoryItem parent)
                           throws ReportSDKException

Returns the children of a specified parent node. This method gets the children of one of the directory items that was retrieved with the ConnectionDirManager.getRoots() method or getChildren method. If the directory item is a DirectoryItem object, then it can be passed as an argument to the getTables method, which will in turn retrieve the item's database tables. When the child nodes are retrieved, the parent item's children are updated.

Parameters:
parent - The directory item whose child nodes you want to retrieve from the server.
Returns:
A DirectoryItems object containing the children of the specified node.
Throws:
ReportSDKException

getLocale

public java.util.Locale getLocale()
Deprecated. 

Returns the language settings used by this ConnectionDirManager object.

Returns:
The Locale object containing the language settings to be used by this ConnectionDirManager object.
See Also:
ConnectionDirManager.setLocale(java.util.Locale)

getProductLocale

public java.util.Locale getProductLocale()
Returns the locale of application user interface and error messages.

Returns:
java.util.Locale the locale of the application user interface and error messages.
See Also:
ConnectionDirManager.getPreferredViewingLocale()

getPreferredViewingLocale

public java.util.Locale getPreferredViewingLocale()
Returns the locale of application user interface and error messages.

Returns:
java.util.Locale the locale of the application user interface and error messages.
See Also:
ConnectionDirManager.getProductLocale()

getRoots

public DirectoryItems getRoots()
                        throws ReportSDKException

Retrieves the root items from each data source directory on the server. This method gets the top-level nodes of the Connection Directory Manager. The returned objects are stored in the DirectoryItems collection. Once the DirectoryItem objects have been retrieved, use the getChildren method to retrieve the child nodes of each item. If the DirectoryItem is another DirectoryItem object, then it can be passed as an argument to the getTables method, which will in turn retrieve the item's database tables.

Returns:
A DirectoryItems object containing the root items from each data source directory on the server.
Throws:
ReportSDKException

getTables

public Tables getTables(IConnectionDirectoryItem connItem)
                 throws ReportSDKException

Returns the tables of a specified connection directory item from the server.

Parameters:
connItem - A directory item that represents a database connection. This item contains information about the tables and table links in the data source.
Returns:
A Tables object containing the tables of a specified connection directory item from the server.
Throws:
ReportSDKException

initialize

public void initialize(ReportAppSession appSession)
                throws ReportSDKException

For internal use only.

Throws:
ReportSDKException

open

public void open(int directoryItemTypes,
                 int options)
          throws ReportSDKException

Opens the Connection Directory Manager. To create a ConnectionDirManager object, use the ReportAppSession object's ReportAppSession.createService(String) method.

Parameters:
directoryItemTypes - The types of available data sources. Specify these types by using the settings in DirectoryItem.
options - The options used to specify how the report document should be opened. See OpenReportOptions for possible options.
Throws:
ReportSDKException

refresh

public void refresh(IDirectoryItem parent)
             throws ReportSDKException

Refreshes the children of a specified parent directory item.

Parameters:
parent - The parent of the child nodes you want to refresh.
Throws:
ReportSDKException

setLocale

public void setLocale(java.util.Locale locale)
Deprecated. 

Sets the language settings used by this ConnectionDirManager object.

Parameters:
locale - The Locale object containing the language settings to be used by this ConnectionDirManager object.
See Also:
ConnectionDirManager.getLocale()

setProductLocale

public void setProductLocale(java.util.Locale productLocale)

setPreferredViewingLocale

public void setPreferredViewingLocale(java.util.Locale preferredViewingLocale)