Skip navigation links


com.essbase.eas.essbase.server
Class CalcScriptPrimitives

java.lang.Object
  extended by com.essbase.eas.essbase.server.CalcScriptPrimitives


public final class CalcScriptPrimitives
extends java.lang.Object

This class provides the primitive operations for an Essbase Calc Script object. In the current implementation, no instances of this class should ever be instantiated.

Methods that need to be implemented

  1. run()
Version:
1.00, 08/13/2000
Author:
Brian Litofsky
See Also:
EssSession, EssSessionMessage

Method Summary
static boolean copy(EssSession destSession, java.lang.String destApp, java.lang.String destDatabase, java.lang.String destCalc, java.lang.String srcApp, java.lang.String srcDatabase, java.lang.String srcCalc)
          copies an caclulation within an individual server.
static boolean create(ISession session, java.lang.String appName, java.lang.String dbName, java.lang.String newName, java.lang.String calc)
          creates calc script.
static boolean delete(ISession session, java.lang.String appName, java.lang.String dbName, java.lang.String calcName)
          deletes a calc script
static java.lang.String ensureCompatibleLocaleHeader(EssSession session, java.lang.String content)
           
static boolean execute(EssSession session, java.lang.String appName, java.lang.String dbName, java.lang.String calcName, java.lang.String destDb)
          executes a calc script that is stored on the server.
static boolean executeString(EssSession session, java.lang.String appName, java.lang.String dbName, java.lang.String calc)
          executes an anonymous calc script passed to the server
static boolean get(EssSession session, java.lang.String appName, java.lang.String dbName, java.lang.String objName, java.lang.String localName, boolean lock)
          gets a calc script
static java.util.List<java.lang.String> getList(ISession session, java.lang.String application, java.lang.String database)
          Creates a list of calc script that belong to a specific server.
static int lock(EssSession session, java.lang.String appName, java.lang.String dbName, java.lang.String calcName)
          locks a calc script.
static boolean put(EssSession session, java.lang.String appName, java.lang.String dbName, java.lang.String objName, java.lang.String localName, boolean lock)
          puts a calc script
static boolean rename(EssSession session, java.lang.String appName, java.lang.String dbName, java.lang.String newCalcName, java.lang.String oldCalcName)
          renames a calc script.
static boolean unlock(EssSession session, java.lang.String appName, java.lang.String dbName, java.lang.String calcName)
          unlocks a calc script.
static boolean update(ISession session, java.lang.String appName, java.lang.String dbName, java.lang.String calcName, java.lang.String calc)
          updates a calc script.
static int verify(EssSession session, java.lang.String appName, java.lang.String dbName, java.lang.String calcScript)
          verifies a calc script as a string using EssCalc
static int verifyFile(EssSession session, java.lang.String appName, java.lang.String dbName, java.lang.String calcName)
          verifies a calc script.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

getList

public static java.util.List<java.lang.String> getList(ISession session,
                                                       java.lang.String application,
                                                       java.lang.String database)
Creates a list of calc script that belong to a specific server. Creates the list for a specific application and database.
Parameters:
session - object for this Essbase session.
application - to restrict request within.
database - to restrict request within
Returns:
a list collection containing strings with the calc script names.

copy

public static boolean copy(EssSession destSession,
                           java.lang.String destApp,
                           java.lang.String destDatabase,
                           java.lang.String destCalc,
                           java.lang.String srcApp,
                           java.lang.String srcDatabase,
                           java.lang.String srcCalc)
copies an caclulation within an individual server.

Should we throw an exception here?

Parameters:
session - - session object server.
destApp - - application name for the copy.
destDatabase - - database name for the copy.
destCalc - - Calc name for the copy.
srcApp - - application to be copied.
srcDatabase - - database to be copied.
srcCalc - - Calc name to be copied.
Returns:
true if the database is successfully copied. What do we do about messages if the call fails?

create

public static boolean create(ISession session,
                             java.lang.String appName,
                             java.lang.String dbName,
                             java.lang.String newName,
                             java.lang.String calc)
creates calc script.
Parameters:
session - - session object for this command.
appName - - application to create database in.
dbName - - database name that calc script belongs to.
newName - - name for the created calc.
calc - - contents of the calculation
Returns:
true if the creation succeeds.What do we do about messages if the call fails?

update

public static boolean update(ISession session,
                             java.lang.String appName,
                             java.lang.String dbName,
                             java.lang.String calcName,
                             java.lang.String calc)
updates a calc script.
Parameters:
session - - session object for this command.
appName - - application to create database in.
dbName - - database name that calc script belongs to.
calcName - - name of the calc script.
calc - - contents of the calculation
Returns:
true if the creation succeeds.What do we do about messages if the call fails?

delete

public static boolean delete(ISession session,
                             java.lang.String appName,
                             java.lang.String dbName,
                             java.lang.String calcName)
deletes a calc script
Parameters:
session - - session object for this command.
appName - - name of application containing the calc to be deleted.
dbName - - name of database containing the calc to be deleted.
calcName - - name of the calc to delete
Returns:
true if the delete succeeds. What do we do about messages if the call fails?

execute

public static boolean execute(EssSession session,
                              java.lang.String appName,
                              java.lang.String dbName,
                              java.lang.String calcName,
                              java.lang.String destDb)
executes a calc script that is stored on the server.
Parameters:
session - - session object for this command.
appName - - name of application containing the calc.
dbName - - name of database containing the calc.
calcName - - name of the calc to execute. If this parameter is null, executes the default calc script.
Returns:
true if the execute succeeds

executeString

public static boolean executeString(EssSession session,
                                    java.lang.String appName,
                                    java.lang.String dbName,
                                    java.lang.String calc)
executes an anonymous calc script passed to the server
Parameters:
appName - - name of application to run the calc on.
dbName - - name of database to run the calc on.
calc - - the actual calc script.
Returns:
true if the execute succeeds

get

public static boolean get(EssSession session,
                          java.lang.String appName,
                          java.lang.String dbName,
                          java.lang.String objName,
                          java.lang.String localName,
                          boolean lock)
gets a calc script
Parameters:
session - - session object for this command.
appName - - name of application containing the calc.
dbName - - name of database containing the calc.
calcName - - name of the calc to get
localName - - name of the file to create
Returns:
true if the delete succeeds. What do we do about messages if the call fails?

put

public static boolean put(EssSession session,
                          java.lang.String appName,
                          java.lang.String dbName,
                          java.lang.String objName,
                          java.lang.String localName,
                          boolean lock)
puts a calc script
Parameters:
session - - session object for this command.
appName - - name of application containing the calc.
dbName - - name of database containing the calc.
calcName - - name of the calc to get
Returns:
true if the delete succeeds. What do we do about messages if the call fails?

lock

public static int lock(EssSession session,
                       java.lang.String appName,
                       java.lang.String dbName,
                       java.lang.String calcName)
locks a calc script.
Parameters:
session - - session object for this command.
appName - - name of application containing the script.
dbName - - name of database containing the script.
calcName - - name of the calc script.
Returns:
true if the lock succeeds.

unlock

public static boolean unlock(EssSession session,
                             java.lang.String appName,
                             java.lang.String dbName,
                             java.lang.String calcName)
unlocks a calc script.
Parameters:
session - - session object for this command.
appName - - name of application containing the script.
dbName - - name of database containing the script.
calcName - - name of the calc script.
Returns:
true if the lock succeeds.

verify

public static int verify(EssSession session,
                         java.lang.String appName,
                         java.lang.String dbName,
                         java.lang.String calcScript)
verifies a calc script as a string using EssCalc
Parameters:
session - - session object for this command.
calcScript - - calc script stirng (should not exceed 64K).
Returns:
true if the verify succeeds.

verifyFile

public static int verifyFile(EssSession session,
                             java.lang.String appName,
                             java.lang.String dbName,
                             java.lang.String calcName)
verifies a calc script.
Parameters:
session - - session object for this command.
appName - - name of application containing the script.
dbName - - name of database containing the script.
calcName - - name of the calc script.
Returns:
true if the verify succeeds.

rename

public static boolean rename(EssSession session,
                             java.lang.String appName,
                             java.lang.String dbName,
                             java.lang.String newCalcName,
                             java.lang.String oldCalcName)
renames a calc script.
Parameters:
session - - session object for this command.
appName - - name of application containing the script.
dbName - - name of database containing the script.
newCalcName - - name of the new calc script.
oldCalcName - - name of the old calc script.
Returns:
true if the rename succeeds.

ensureCompatibleLocaleHeader

public static java.lang.String ensureCompatibleLocaleHeader(EssSession session,
                                                            java.lang.String content)

Skip navigation links


Copyright © 2001, 2012, Oracle. All rights reserved.