org.palo.api.subsets.io
Class SubsetIOHandler

java.lang.Object
  extended by org.palo.api.subsets.impl.SubsetStorageHandlerImpl
      extended by org.palo.api.subsets.io.SubsetIOHandler
All Implemented Interfaces:
SubsetStorageHandler

public class SubsetIOHandler
extends SubsetStorageHandlerImpl

- API INTERNAL -

This class handles the raw access to the palo server subset cubes and hierarchys.

Version:
$Id: SubsetIOHandler.html,v 1.5 2009/07/09 11:01:46 ArndHouben Exp $

Constructor Summary
SubsetIOHandler(Database database)
           
 
Method Summary
 boolean canRead(int type)
          Checks if current user is allowed to read any Subset2s of given type.
 boolean canWrite(int type)
          Checks if current user is allowed to write any Subset2s of given type.
 void convert(Subset[] legacySubsets, int type, boolean remove)
          Tries to convert the given legacy subsets into new Subset2s of given type.
static boolean isSubsetDimension(Dimension dimension)
           
static boolean isSubsetHierarchy(Hierarchy hierarchy)
          Returns true if this hierarchy is a palo server native subset hierarchy, false otherwise.
 void reset()
          Resets this storage handler.
static boolean supportsNewSubsets(Database database)
          Returns true if new subsets, i.e.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubsetIOHandler

public SubsetIOHandler(Database database)
Method Detail

isSubsetHierarchy

public static final boolean isSubsetHierarchy(Hierarchy hierarchy)
Returns true if this hierarchy is a palo server native subset hierarchy, false otherwise.

Parameters:
hierarchy -
Returns:

isSubsetDimension

public static final boolean isSubsetDimension(Dimension dimension)

supportsNewSubsets

public static final boolean supportsNewSubsets(Database database)
Returns true if new subsets, i.e. Subset2, are supported by the given database

Parameters:
database -
Returns:

canRead

public final boolean canRead(int type)
Description copied from interface: SubsetStorageHandler
Checks if current user is allowed to read any Subset2s of given type. The subset type must be one of the predefined subset type constants.

Parameters:
type - a valid subset type constant
Returns:
true if user is allowed to read subsets of given type, false otherwise

canWrite

public final boolean canWrite(int type)
Description copied from interface: SubsetStorageHandler
Checks if current user is allowed to write any Subset2s of given type. The subset type must be one of the predefined subset type constants.

Parameters:
type - a valid subset type constant
Returns:
true if user is allowed to write subsets of given type, false otherwise

reset

public final void reset()
Description copied from interface: SubsetStorageHandler
Resets this storage handler. This will clear all internal used caches too.


convert

public final void convert(Subset[] legacySubsets,
                          int type,
                          boolean remove)
Description copied from interface: SubsetStorageHandler
Tries to convert the given legacy subsets into new Subset2s of given type.