com.tensegrity.palojava.http.handlers
Class HttpCellHandler

java.lang.Object
  extended by com.tensegrity.palojava.http.handlers.HttpHandler
      extended by com.tensegrity.palojava.http.handlers.HttpCellHandler

public class HttpCellHandler
extends HttpHandler

This HttpHandler is used for dealing with requests concerning palo Cells.

Version:
$Id$
Author:
ArndHouben

Constructor Summary
HttpCellHandler(HttpClient client)
          Creates a new HttpCellHandler instance.
 
Method Summary
 java.lang.String getValue(java.lang.String dbName, java.lang.String cubeName, java.lang.String[] dims, java.lang.String[] elPath)
          Receives the value at the given cube cell.
 java.lang.String[] getValues(java.lang.String dbName, java.lang.String cubeName, java.lang.String[] dims, java.lang.String[][] elPaths)
          Receives the values of multiple given cube cells.
 boolean setData(java.lang.String dbName, java.lang.String cubeName, java.lang.String[] dims, java.lang.String[] elNames, double value, int splashMode)
          Sets the double value of the given cube cell.
 boolean setData(java.lang.String dbName, java.lang.String cubeName, java.lang.String[] dims, java.lang.String[] elNames, java.lang.String value, int splashMode)
          Sets the String value of the given cube cell.
 boolean setDataBulk(java.lang.String dbName, java.lang.String cubeName, java.lang.String[] dims, java.lang.String[][] elNames, java.lang.Object[] values, int splashMode)
          Sets the values of multiple cube cells.
 
Methods inherited from class com.tensegrity.palojava.http.handlers.HttpHandler
setSID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpCellHandler

public HttpCellHandler(HttpClient client)
Creates a new HttpCellHandler instance. Requires a HttpClient for delegating all requests to the connected palo server.

Parameters:
client - the connection to the palo server
Method Detail

getValue

public final java.lang.String getValue(java.lang.String dbName,
                                       java.lang.String cubeName,
                                       java.lang.String[] dims,
                                       java.lang.String[] elPath)
                                throws java.io.IOException
Receives the value at the given cube cell. The cell is determined by the element names which has to be specified in the same order as their dimensions are.

Parameters:
dbName - a valid database name
cubeName - a valid cube name
dims - the dimension names of the cube
elPath - the element names which determines the cube cell
Returns:
the value of the cube cell
Throws:
java.io.IOException - if an I/O exception occurs

getValues

public final java.lang.String[] getValues(java.lang.String dbName,
                                          java.lang.String cubeName,
                                          java.lang.String[] dims,
                                          java.lang.String[][] elPaths)
                                   throws java.io.IOException
Receives the values of multiple given cube cells. Each cell is determined by the element names which specify a path within a cube.

Parameters:
dbName - a valid database name
cubeName - a valid cube name
dims - the dimension names of the cube
elPath - the element names which determines the cube cell
Returns:
the values of the cube cells
Throws:
java.io.IOException - if an I/O exception occurs

setData

public final boolean setData(java.lang.String dbName,
                             java.lang.String cubeName,
                             java.lang.String[] dims,
                             java.lang.String[] elNames,
                             java.lang.String value,
                             int splashMode)
                      throws java.io.IOException
Sets the String value of the given cube cell. The cell is determined by the element names which has to be specified in the same order as their dimensions are. In case of consolidated elements the splash mode determines how the value is distributed among its children.

Parameters:
dbName - a valid database name
cubeName - a valid cube name
dims - the dimension names of the cube
elNames - the element names which determines the cube cell
value - the new cell String value
splashMode - the splash mode, please refer to IConnection
Returns:
true if setting was successful, false otherwise
Throws:
java.io.IOException - if an I/O exception occurs

setData

public final boolean setData(java.lang.String dbName,
                             java.lang.String cubeName,
                             java.lang.String[] dims,
                             java.lang.String[] elNames,
                             double value,
                             int splashMode)
                      throws java.io.IOException
Sets the double value of the given cube cell. The cell is determined by the element names which has to be specified in the same order as their dimensions are. In case of consolidated elements the splash mode determines how the value is distributed among its children.

Parameters:
dbName - a valid database name
cubeName - a valid cube name
dims - the dimension names of the cube
elNames - the element names which determines the cube cell
value - the new cell String value
splashMode - the splash mode, please refer to IConnection
Returns:
true if setting was successful, false otherwise
Throws:
java.io.IOException - if an I/O exception occurs

setDataBulk

public final boolean setDataBulk(java.lang.String dbName,
                                 java.lang.String cubeName,
                                 java.lang.String[] dims,
                                 java.lang.String[][] elNames,
                                 java.lang.Object[] values,
                                 int splashMode)
                          throws java.io.IOException
Sets the values of multiple cube cells.

Parameters:
dbName - a valid database name
cubeName - a valid cube name
dims - the dimension names of the cube
elNames - 2 dimensional array of element names which determines the cube cells
values - the new cell values
splashMode - the splash mode, please refer to IConnection
Returns:
true if setting was successful, false otherwise
Throws:
java.io.IOException - if an I/O exception occurs