com.essbase.api.datasource
Interface IEssOlapServer

All Superinterfaces:
IEssAppComponent, IEssBaseObject, IEssExtendedObject, IEssProperties, IEssServer, IEssSubstitutionVariables

public interface IEssOlapServer
extends IEssServer, IEssExtendedObject, IEssProperties, IEssAppComponent, IEssSubstitutionVariables

The IEssOlapServer interface is the OLAP server.


Nested Class Summary
static interface IEssOlapServer.IEssOlapConnectionInfo
          The IEssOlapConnectionInfo interface provides OLAP agent/server connection information.
 
Nested classes inherited from class com.essbase.api.domain.IEssServer
IEssServer.EEssServerType
 
Nested classes inherited from class com.essbase.api.base.IEssProperties
IEssProperties.EEssPropertyMode
 
Nested classes inherited from class com.essbase.api.domain.IEssAppComponent
IEssAppComponent.EEssAppComponentType
 
Field Summary
static int PROP_DESCRIPTION
           
static int PROP_NAME
           
static int PROP_REMOTE_START_COMMAND
           
static int s_countProperties
           
static IEssValueAny.EEssDataType[] s_propDataTypes
           
static IEssProperties.EEssPropertyMode[] s_propModes
           
static java.lang.String[] s_propNames
           
 
Method Summary
 void clearActive()
          Clears the current active application and database for this instance of the IEssOLAPServer object.
 void connect()
          Opens a connection to the olap agent.
 void connect(boolean useEdsAtOlapSvrNode)
          Opens a connection to the olap agent.
 void connect(boolean useConnPool, boolean connPerOp)
          Opens a connection to the olap agent.
 void convertApplicationToUnicode(java.lang.String appName)
          Converts application to unicode.
 void copyOlapFileObject(java.lang.String appName, java.lang.String cubeName, int objType, java.lang.String objName, java.lang.String destAppName, java.lang.String destCubeName, java.lang.String destObjName)
          Copies an olap file object.
 void copyOlapFileObjectFromServer(java.lang.String appName, java.lang.String cubeName, int objType, java.lang.String objName, java.lang.String clientFileName, boolean lock)
          Copies an object from the olap server to a client file and optionally locks the server object to prevent updates by others.
 void copyOlapFileObjectToServer(java.lang.String appName, java.lang.String cubeName, int objType, java.lang.String objName, java.lang.String clientFileName, boolean unlock)
          Copies an object from a client file to the olap server, and optionally unlocks the server object to allow updates by others.
 IEssOlapApplication createApplication(java.lang.String appName)
          Creates a new application and starts it.
 IEssOlapApplication createApplication(java.lang.String appName, short storageType)
          Creates a new application with the given storage type and starts it.
 IEssOlapApplication createApplication(java.lang.String appName, java.lang.String appType)
          Creates a new application and starts it.
 IEssOlapApplication createApplication(java.lang.String appName, java.lang.String desc, int maxLroFileSize, boolean loadable, boolean autoLoad, boolean allowCommands, boolean allowConnects, boolean allowUpdates, boolean enableSecurity, int lockTimeOutPeriod, IEssCube.EEssCubeAccess minCubeAccess)
          Creates a new application setting all the specified properties and starts it.
 void createOlapFileObject(java.lang.String appName, java.lang.String cubeName, int objType, java.lang.String objName)
          Creates a new olap file object.
 void delete()
          Deletes this server from the domain.
 void deleteLogFile()
          Deletes the agent log file (essbase.log).
 void deleteOlapFileObject(java.lang.String appName, java.lang.String cubeName, int objType, java.lang.String objName)
          Delte an existing olap file object.
 void disconnect()
          Closes the connection to the olap agent.
 java.lang.String[] getActive()
          Gets the names of the current active application and cube for this instance of the IEssOlapServer object.
 IEssOlapApplication getApplication(java.lang.String appName)
          Gets the specified application.
 IEssIterator getApplications()
          Gets the list of applications which are accessible to the caller.
 IEssIterator getConnections()
          Gets the list of user connections to the olap agent/server.
 java.lang.String getDescription()
          Gets the olap server description.
 int getLogSize(boolean agentLog, java.lang.String appName)
          Gets the size of the Agent log file (ESSBASE.LOG), or of the Server log file (APPNAME.LOG).
 java.lang.String getName()
          Gets the olap server name/IP address.
 IEssOlapFileObject getOlapFileObject(java.lang.String appName, java.lang.String cubeName, int objType, java.lang.String objName)
          Gets information about a specified olap store file object.
 IEssIterator getOlapFileObjects(java.lang.String appName, java.lang.String cubeName, int objType)
          Gets all the olap store file objects of the types specified.
 java.lang.String getOlapServerVersion()
          Gets the full version number of the connected Essbase olap server, in the form release.version.revision.
 IEssIterator getRequests(java.lang.String userName, java.lang.String appName, java.lang.String cubeName)
          Gets all the requests at the olap server for the matching userName, appName or cubeName.
 java.lang.String getStartCommand()
          Gets the command to start this olap server.
 boolean isConnected()
          Checks if a connection is open to the olap agent.
 boolean isUnicodeEnabled()
          Checks if server is unicode enabled.
 void killLastRequest()
          Kills the last request if it is still running.
 void lockOlapFileObject(java.lang.String appName, java.lang.String cubeName, int objType, java.lang.String objName)
          Locks an object on the server to prevent other users from updating it.
 void refreshPropertyValues()
          Refreshes the property values.
 void renameOlapFileObject(java.lang.String appName, java.lang.String cubeName, int objType, java.lang.String objName, java.lang.String newObjName)
          Renames an existing olap file object.
 void setActive(java.lang.String appName, java.lang.String cubeName)
          Sets the active application and cube for this instance of the IEssOlapServer object.
 void setDescription(java.lang.String desc)
          Sets the olap server description.
 void setStartCommand(java.lang.String startCmd)
          Sets the command to start this olap server.
 void setUnicodeEnabled(boolean enabled)
          Sets the server unicode enabled.
 void start()
          Starts the OLAP agent if it is not already running.
 void start(java.lang.String osUserName, java.lang.String osUserPassword, java.lang.String osDomainName)
          Starts the OLAP agent if it is not already running.
 void stop()
          Stops the Essbase OLAP Agent.
 void unlockOlapFileObject(java.lang.String appName, java.lang.String cubeName, int objType, java.lang.String objName)
          Unlocks a locked object on the server.
 void updatePropertyValues()
          Updates the property values.
 void writeToLogFile(boolean agentLog, java.lang.String message)
          Writes a message to the agent log file (essbase.log) or to the server log file (appname.log).
 
Methods inherited from interface com.essbase.api.domain.IEssServer
getServerType
 
Methods inherited from interface com.essbase.api.base.IEssExtendedObject
clearClientCache, getParent, getParentBase, isClientCachingEnabled, setClientCachingEnabled
 
Methods inherited from interface com.essbase.api.base.IEssProperties
getCountProperties, getPropertyDataType, getPropertyDataType, getPropertyDataTypes, getPropertyId, getPropertyMode, getPropertyMode, getPropertyModes, getPropertyName, getPropertyNames, getPropertyValueAny, getPropertyValueAny, setPropertyValueAny, setPropertyValueAny
 
Methods inherited from interface com.essbase.api.domain.IEssAppComponent
getAppComponentType
 
Methods inherited from interface com.essbase.api.datasource.IEssSubstitutionVariables
createSubstitutionVariable, deleteSubstitutionVariable, getSubstitutionVariables, getSubstitutionVariableValue
 

Field Detail

PROP_NAME

public static final int PROP_NAME
See Also:
Constant Field Values

PROP_DESCRIPTION

public static final int PROP_DESCRIPTION
See Also:
Constant Field Values

PROP_REMOTE_START_COMMAND

public static final int PROP_REMOTE_START_COMMAND
See Also:
Constant Field Values

s_countProperties

public static final int s_countProperties
See Also:
Constant Field Values

s_propNames

public static final java.lang.String[] s_propNames

s_propDataTypes

public static final IEssValueAny.EEssDataType[] s_propDataTypes

s_propModes

public static final IEssProperties.EEssPropertyMode[] s_propModes
Method Detail

getName

public java.lang.String getName()
                         throws EssException
Gets the olap server name/IP address.

Specified by:
getName in interface IEssExtendedObject
Returns:
The olap server name.
Throws:
EssException - if an error occurs.

getDescription

public java.lang.String getDescription()
                                throws EssException
Gets the olap server description.

Returns:
The olap server description.
Throws:
EssException - if an error occurs.

setDescription

public void setDescription(java.lang.String desc)
                    throws EssException
Sets the olap server description. The change will become effective after you invoke updatePropertyValues().

Parameters:
desc - The olap server description.
Throws:
EssException - if an error occurs.

getStartCommand

public java.lang.String getStartCommand()
                                 throws EssException
Gets the command to start this olap server.

Returns:
The startup command.
Throws:
EssException - if an error occurs.

setStartCommand

public void setStartCommand(java.lang.String startCmd)
                     throws EssException
Sets the command to start this olap server. The change will become effective after you invoke updatePropertyValues().

Parameters:
startCmd - The startup command.
Throws:
EssException - if an error occurs.

refreshPropertyValues

public void refreshPropertyValues()
                           throws EssException
Refreshes the property values. The JAPI cache for this object is refreshed with the latest values from the server, so that all the getXXX() methods will return the latest values.

Specified by:
refreshPropertyValues in interface IEssProperties
Throws:
EssException - if an error occurs.

updatePropertyValues

public void updatePropertyValues()
                          throws EssException
Updates the property values. The changes made to this object via setXXX() methods will become effective only after you invoke updatePropertyValues().

Specified by:
updatePropertyValues in interface IEssProperties
Throws:
EssException - if an error occurs.

connect

public void connect()
             throws EssException
Opens a connection to the olap agent.

Throws:
EssException - if an error occurs.

connect

public void connect(boolean useConnPool,
                    boolean connPerOp)
             throws EssException
Opens a connection to the olap agent. This method allows you to use a connection pool if available and the rest of the connect methods don't use a connection pool.

Parameters:
useConnPool - true to use connection pool if available.
connPerOp - true for connection per operation. false for connection per session. NOTE: Only false is supported currently, and true is for future use.
Throws:
EssException - if an error occurs.

connect

public void connect(boolean useEdsAtOlapSvrNode)
             throws EssException
Opens a connection to the olap agent.

Parameters:
useEdsAtOlapSvrNode - If true, the deployment server at the node where this olap server resides is used to traffic the requests between the JAPI client and the olap server. If false, the enterprise server that authenticated the user is used to traffic the requests.
Throws:
EssException - if an error occurs.

disconnect

public void disconnect()
                throws EssException
Closes the connection to the olap agent. If connection pool is used to obtain the connection, the connection is returned back to the pool.

Throws:
EssException - if an error occurs.

isConnected

public boolean isConnected()
                    throws EssException
Checks if a connection is open to the olap agent.

Returns:
true if a connection if open.
Throws:
EssException - if an error occurs.

getOlapServerVersion

public java.lang.String getOlapServerVersion()
                                      throws EssException
Gets the full version number of the connected Essbase olap server, in the form release.version.revision.

Returns:
The version number.
Throws:
EssException - if an error occurs.

getApplications

public IEssIterator getApplications()
                             throws EssException
Gets the list of applications which are accessible to the caller.

Returns:
The applications (each of type IEssOlapApplication).
Throws:
EssException - if an error occurs.

getApplication

public IEssOlapApplication getApplication(java.lang.String appName)
                                   throws EssException
Gets the specified application.

Parameters:
appName - The application name.
Returns:
The application.
Throws:
EssException - if an error occurs.

createApplication

public IEssOlapApplication createApplication(java.lang.String appName)
                                      throws EssException
Creates a new application and starts it.

Parameters:
appName - The application name.
Returns:
IEssApplication The new application.
Throws:
EssException - if an error occurs.

createApplication

public IEssOlapApplication createApplication(java.lang.String appName,
                                             java.lang.String appType)
                                      throws EssException
Creates a new application and starts it.

Parameters:
appName - The application name.
appType - The application type ("native" or "utf8").
Returns:
IEssApplication The new application.
Throws:
EssException - if an error occurs.

createApplication

public IEssOlapApplication createApplication(java.lang.String appName,
                                             java.lang.String desc,
                                             int maxLroFileSize,
                                             boolean loadable,
                                             boolean autoLoad,
                                             boolean allowCommands,
                                             boolean allowConnects,
                                             boolean allowUpdates,
                                             boolean enableSecurity,
                                             int lockTimeOutPeriod,
                                             IEssCube.EEssCubeAccess minCubeAccess)
                                      throws EssException
Creates a new application setting all the specified properties and starts it.

Parameters:
desc - The description.
maxLroFileSize - The maximum file size (in bytes).
loadable - true if application is loadable.
autoLoad - true if the application will be automatically loaded.
allowCommands - true if the application is accepting user commands.
allowConnects - true if users can connect.
allowUpdates - true if the application is accepting user update commands.
enableSecurity - true security is enabled.
lockTimeOutPeriod - The time out period (in minutes).
minCubeAccess - The minimum cube access.
Returns:
IEssApplication The new application.
Throws:
EssException - if an error occurs.

createApplication

public IEssOlapApplication createApplication(java.lang.String appName,
                                             short storageType)
                                      throws EssException
Creates a new application with the given storage type and starts it.

Parameters:
appName - The application name.
storageType - The application storagetype - Only valid value in this version is 4 which creates an ASO (Aggregate Storage Option) type application.
Returns:
IEssApplication The new application.
Throws:
EssException - if an error occurs.

convertApplicationToUnicode

public void convertApplicationToUnicode(java.lang.String appName)
                                 throws EssException
Converts application to unicode.

Parameters:
appName - The application name.
Throws:
EssException - if an error occurs.

setUnicodeEnabled

public void setUnicodeEnabled(boolean enabled)
                       throws EssException
Sets the server unicode enabled.

Parameters:
enabled - true to unicode enable the server.
Throws:
EssException - if an error occurs.

isUnicodeEnabled

public boolean isUnicodeEnabled()
                         throws EssException
Checks if server is unicode enabled.

Returns:
true if server is unicode enabled.
Throws:
EssException - if an error occurs.

getConnections

public IEssIterator getConnections()
                            throws EssException
Gets the list of user connections to the olap agent/server.

Returns:
The user connections (each of type IEssOlapConnectionInfo).
Throws:
EssException - if an error occurs.

getActive

public java.lang.String[] getActive()
                             throws EssException
Gets the names of the current active application and cube for this instance of the IEssOlapServer object.

Returns:
The app/cube name pair (String[0] - appName, String[1] - cubeName). null if no active application/cube.
Throws:
EssException - if an error occurs.

setActive

public void setActive(java.lang.String appName,
                      java.lang.String cubeName)
               throws EssException
Sets the active application and cube for this instance of the IEssOlapServer object.

Parameters:
appName - The application name.
cubeName - The cube name.
Throws:
EssException - if an error occurs.

clearActive

public void clearActive()
                 throws EssException
Clears the current active application and database for this instance of the IEssOLAPServer object.

Throws:
EssException - if an error occurs.

start

public void start()
           throws EssException
Starts the OLAP agent if it is not already running.

Throws:
EssException - if an error occurs.

start

public void start(java.lang.String osUserName,
                  java.lang.String osUserPassword,
                  java.lang.String osDomainName)
           throws EssException
Starts the OLAP agent if it is not already running.

Parameters:
osUserName - The OS user name on the destination host.
osUserPassword - The OS user password.
osDomainName - The OS domain name.
Throws:
EssException - if an error occurs.

stop

public void stop()
          throws EssException
Stops the Essbase OLAP Agent. This function sends a request to the Essbase Agent (ESSBASE.EXE) to shut itself down. The Agent then goes through its normal shutdown procedure, including committing data, stopping all applications and databases, and logging users off before stopping. Only users with Supervisor privilege can shut down the Agent. This function can be called at any time, however, it is normally called to shut down an Agent process which was started in the background.

Throws:
EssException - if an error occurs.

getLogSize

public int getLogSize(boolean agentLog,
                      java.lang.String appName)
               throws EssException
Gets the size of the Agent log file (ESSBASE.LOG), or of the Server log file (APPNAME.LOG).

Parameters:
agentLog - If true, the size of the Agent log file (ESSBASE.LOG) is returned. If false, the size of the Server log file (APPNAME.LOG) is returned.
appName - The application name.
Returns:
The size of the log file.
Throws:
EssException - if an error occurs.

writeToLogFile

public void writeToLogFile(boolean agentLog,
                           java.lang.String message)
                    throws EssException
Writes a message to the agent log file (essbase.log) or to the server log file (appname.log).

Parameters:
agentLog - If true, message is written to the agent log file, essbase.log. If false, message is written to the server log file, appname.log. If false, make sure that an application is active by invoking setActive(), before invoking this method.
message - The message to be logged to the agent log file (essbase.log), or to the server log file (appname.log).
Throws:
EssException - if an error occurs.

deleteLogFile

public void deleteLogFile()
                   throws EssException
Deletes the agent log file (essbase.log).

Throws:
EssException - if an error occurs.

getRequests

public IEssIterator getRequests(java.lang.String userName,
                                java.lang.String appName,
                                java.lang.String cubeName)
                         throws EssException
Gets all the requests at the olap server for the matching userName, appName or cubeName. If any of these parameters is null, it is not used for filtering.

Parameters:
userName - The user name filter. If null, all users are considered.
appName - The application name filter. If null, all applications are considered.
cubeName - The cube name filter. If null, all cubes are considered.
Returns:
The requests (each of type IEssOlapRequest).
Throws:
EssException - if an error occurs.

getOlapFileObjects

public IEssIterator getOlapFileObjects(java.lang.String appName,
                                       java.lang.String cubeName,
                                       int objType)
                                throws EssException
Gets all the olap store file objects of the types specified.

Parameters:
appName - The application name.
cubeName - The cube name. null to use the application directory.
objType - The object types. Values from IEssOlapFileObject.TYPE_*.
Returns:
The OLAP store file objects (each of type IEssOlapFileObject).
Throws:
EssException - if an error occurs.

getOlapFileObject

public IEssOlapFileObject getOlapFileObject(java.lang.String appName,
                                            java.lang.String cubeName,
                                            int objType,
                                            java.lang.String objName)
                                     throws EssException
Gets information about a specified olap store file object.

Parameters:
appName - The application name.
cubeName - The cube name. null to use the application directory.
objType - The object type. Value from IEssOlapFileObject.TYPE_*.
objName - The object name.
Returns:
The olap file object information.
Throws:
EssException - if an error occurs.

copyOlapFileObjectFromServer

public void copyOlapFileObjectFromServer(java.lang.String appName,
                                         java.lang.String cubeName,
                                         int objType,
                                         java.lang.String objName,
                                         java.lang.String clientFileName,
                                         boolean lock)
                                  throws EssException
Copies an object from the olap server to a client file and optionally locks the server object to prevent updates by others. Example: copyOlapFileObjectFromServer(IEssOlapFileObject.TYPE_TEXT, "Act1", "C:/temp/act1.txt", false);

Parameters:
appName - The application name.
cubeName - The cube name. null to use the application directory.
objType - The object type. Value from IEssOlapFileObject.TYPE_*.
objName - The object name.
clientFileName - The full path of destination file in the client.
lock - Flag to control object locking. If true, the server object is locked to prevent updates by other users.
Throws:
EssException - if an error occurs.

copyOlapFileObjectToServer

public void copyOlapFileObjectToServer(java.lang.String appName,
                                       java.lang.String cubeName,
                                       int objType,
                                       java.lang.String objName,
                                       java.lang.String clientFileName,
                                       boolean unlock)
                                throws EssException
Copies an object from a client file to the olap server, and optionally unlocks the server object to allow updates by others. Example: copyOlapFileObjectToServer(IEssOlapFileObject.TYPE_TEXT, "Test", "C:/temp/test.txt", false);

Parameters:
appName - The application name.
cubeName - The cube name. null to use the application directory.
objType - The object type. Value from IEssOlapFileObject.TYPE_*.
objName - The object name.
clientFileName - The full path of source file in the client.
Throws:
EssException - if an error occurs.

lockOlapFileObject

public void lockOlapFileObject(java.lang.String appName,
                               java.lang.String cubeName,
                               int objType,
                               java.lang.String objName)
                        throws EssException
Locks an object on the server to prevent other users from updating it.

Parameters:
appName - The application name.
cubeName - The cube name. null to use the application directory.
objType - The object type. Value from IEssOlapFileObject.TYPE_*.
objName - The object name.
Throws:
EssException - if an error occurs.

unlockOlapFileObject

public void unlockOlapFileObject(java.lang.String appName,
                                 java.lang.String cubeName,
                                 int objType,
                                 java.lang.String objName)
                          throws EssException
Unlocks a locked object on the server.

Parameters:
appName - The application name.
cubeName - The cube name. null to use the application directory.
objType - The object type. Value from IEssOlapFileObject.TYPE_*.
objName - The object name.
Throws:
EssException - if an error occurs.

createOlapFileObject

public void createOlapFileObject(java.lang.String appName,
                                 java.lang.String cubeName,
                                 int objType,
                                 java.lang.String objName)
                          throws EssException
Creates a new olap file object.

Parameters:
appName - The application name.
cubeName - The cube name. null to use the application directory.
objType - The object type. Value from IEssOlapFileObject.TYPE_*.
objName - The object name.
Throws:
EssException - if an error occurs.

deleteOlapFileObject

public void deleteOlapFileObject(java.lang.String appName,
                                 java.lang.String cubeName,
                                 int objType,
                                 java.lang.String objName)
                          throws EssException
Delte an existing olap file object.

Parameters:
appName - The application name.
cubeName - The cube name. null to use the application directory.
objType - The object type. Value from IEssOlapFileObject.TYPE_*.
objName - The object name.
Throws:
EssException - if an error occurs.

renameOlapFileObject

public void renameOlapFileObject(java.lang.String appName,
                                 java.lang.String cubeName,
                                 int objType,
                                 java.lang.String objName,
                                 java.lang.String newObjName)
                          throws EssException
Renames an existing olap file object.

Parameters:
appName - The application name.
cubeName - The cube name. null to use the application directory.
objType - The object type. Value from IEssOlapFileObject.TYPE_*.
objName - The object name.
Throws:
EssException - if an error occurs.

copyOlapFileObject

public void copyOlapFileObject(java.lang.String appName,
                               java.lang.String cubeName,
                               int objType,
                               java.lang.String objName,
                               java.lang.String destAppName,
                               java.lang.String destCubeName,
                               java.lang.String destObjName)
                        throws EssException
Copies an olap file object.

Parameters:
appName - The application name.
cubeName - The cube name. null to use the application directory.
objType - The object type. Value from IEssOlapFileObject.TYPE_*.
objName - The object name.
destAppName - The destination application name.
destCubeName - The destination cube name.
destObjName - The destination object name.
Throws:
EssException - if an error occurs.

killLastRequest

public void killLastRequest()
                     throws EssException
Kills the last request if it is still running.

Throws:
EssException - if an error occurs.

delete

public void delete()
            throws EssException
Deletes this server from the domain.

Specified by:
delete in interface IEssServer
Throws:
EssException - if an error occurs.