planetj.dataengine.operation
Class OperationManager

java.lang.Object
  |
  +--planetj.dataengine.AbstractTableManager
        |
        +--planetj.dataengine.operation.OperationManager
All Implemented Interfaces:
IOperation

public class OperationManager
extends AbstractTableManager
implements IOperation

Manages instances of Operations. Provides data access methods and data generation methods.

Author:
PlanetJ Corporation

Field Summary
 
Fields inherited from interface planetj.dataengine.operation.IOperation
ALLOW_DELETES, ALLOW_DETAILS, ALLOW_INSERTS, ALLOW_UPDATES, APPLICABLE_CODE_ONLY, APPLICABLE_ONLY_FOR_DISPLAY, APPLICABLE_ONLY_FOR_SQL, APPLICATION_ID, AUTHORIZE_EXECUTE_OPERATION, AUTO_RUN_ID, AUTO_RUN_STATUS, CACHE_LEVEL, CONNECTION_ALIAS, CURRENT_FIELD, CURRENT_REQUEST, CURRENT_RESPONSE, CURRENT_ROW, CURRENT_ROW_COLLECTION, CURRENT_SERVLET, CURRENT_USER, DEPENDS_ON_ID, DESCRIPTION, DETAILS_JSP_FILE, DISPLAY_COLUMNS, DISPLAY_ORDER, ENCRYPTION_ID, EXECUTION_MODE, EXECUTION_MODE_NO, EXECUTION_MODE_YES, INSTRUCTIONS, JSP_FILE, LABEL, OPERATION_CLASS, OPERATION_CODE, OPERATION_DISPLAY_MODE, OPERATION_DISPLAY_MODE_FULL, OPERATION_DISPLAY_MODE_SKINNY, OPERATION_ID, OPERATION_SET, OPERATION_SQL, OPERATION_TABLE_NAME, OUTPUT_ALIAS, OWNER_ID, PARAMETERS_JSP_FILE, PARENT_ID, PERFORMACE_STATISTICS_ID, PROPERTIES, ROW_CLASS, ROW_COLLECTION_CLASS, ROW_COUNT, SECURITY_ID, SECURITY_TYPE, SET_NAME, THEME_ID, TITLE, TYPE, TYPE_ASSOCIATED_JAVA_OPERATION, TYPE_ASSOCIATED_JOIN, TYPE_ASSOCIATION_1_TO_1, TYPE_ASSOCIATION_1_TO_MANY, TYPE_AUTHENTICATION, TYPE_AUTO_POPULATE, TYPE_AUTORUN_BATCH_PROCESS, TYPE_AUTORUN_EMAIL, TYPE_BLOB_DOWNLOAD, TYPE_EMAIL, TYPE_EXECUTION_GROUP, TYPE_FILE_UPLOAD, TYPE_HTML_CODE, TYPE_HTML_REFERENCE, TYPE_HTML_REFERENCE_ASSOCIATION, TYPE_JAVA_OPERATION, TYPE_JSP_REFERENCE, TYPE_POSSIBLE_VALUES, TYPE_POSSIBLE_VALUES_SEARCH, TYPE_POSSIBLE_VALUES_SELECTOR, TYPE_REFERER_AUTHORIZATION_OPERATION, TYPE_SQL, TYPE_UNKNOWN, TYPE_USER_AUTHENTICATION_LIST_OPERATION, TYPE_USER_AUTHORIZATION_LIST_OPERATION, TYPE_USER_AUTHORIZATION_OPERATION, TYPE_VIEW_SELECTED_ASSOCIATION, USAGE_ID
 
Method Summary
 RowCollection getAssociationOperations(String metaDataAlias, int ownerId, List columnNames)
          Get association operations for the given owner and meta data system.
 RowCollection getAssociationSQLOperations(String systemAlias, int ownerId, List columnNames)
          Deprecated. replaced by getAssociationOperations(String, int, List)
 RowCollection getAuthorizationOperations(String systemAlias, int ownerId, List columnNames)
          Get association SQLOperations for the given owner.
 RowCollection getChildren(int parentId, String metaDataAlias)
          Gets all children Operation's from the given system alias and for the given Operation id.
 String getDefaultTableName()
          Gets the default table name.
 RowCollection getDependants(int dependsOnId, String metaDataAlias)
          Gets all dependant Operation's from the given system alias and for the given Operation id.
 Operation getOperation(int id, String systemAlias)
          Get an Operation for the given id
 Operation getOperation(int id, String systemAlias, List columnNames)
          Returns A SQLOperation, based on its ID Creation date: (3/25/2002 1:48:24 PM)
 RowCollection getOperations(Application application, List columnNames, ExecutingContext executingContext)
          Gets all Operations for the given Application.
 RowCollection getPossibleValueSQLOperations(String systemAlias, int ownerId, List columnNames)
          Get possible value SQLOperations for the given owner.
 SQLOperation getSQLOperation(int pId, String pSystemAlias)
          Deprecated. replaced with getOperation(int, String)
 SQLOperation getSQLOperation(int pId, String pSystemAlias, List pColumnNames)
          Deprecated. replaced with getOperation(int, String, List)
 RowCollection getSQLOperations(Application pApplication, List pColumnNames)
          Deprecated. Temporarily deprecated to find references. WK.
 RowCollection getSQLOperations(Application application, List columnNames, ExecutingContext executingContext)
          Deprecated. replaced with getOperations(Application, List, ExecutingContext)
 RowCollection getSQLOperations(String systemAlias, int ownerId, int type, List columnNames)
          Get SQLOperations with the specified type and the given owner.
 String getTableSQLString(String libraryName, String tableName)
          Get an SQL String that can be used to create the table.
 String getTitle(int type)
          Gets a title for a set of SQLOperations depending upon the type they are.
 RowCollection getUserAuthenticationListOperations(String systemAlias, int ownerId, List columnNames)
          Get authentication SQLOperations for the given owner.
 boolean isAuthorized(int pAction, ExecutingContext pEc, Operation pOperation)
          Test to see if the given user is authorized to do the given action on the Operation.
 boolean isAuthorized(int action, IUser user, Operation operation)
          Deprecated. - replaced by isAuthorized(int action, ExecutingContext ec, Operation operation)
static void setSingleton(OperationManager singleton)
          Sets the singleton instance of the OperationManager.
static OperationManager singleton()
          Gets the singleton instance of OperationManager
 
Methods inherited from class planetj.dataengine.AbstractTableManager
appendFromClause, appendSelectClause, createTable, getLibraryName, getTable, getTableName, setTableName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAssociationSQLOperations

public RowCollection getAssociationSQLOperations(String systemAlias,
                                                 int ownerId,
                                                 List columnNames)
                                          throws CMException
Deprecated. replaced by getAssociationOperations(String, int, List)

Get association SQLOperations for the given owner.

Parameters:
ownerId - Id of the owner of the SQLOperations.
columnNames - List of the names of columns to return. If null, all are retrieved.
Returns:
SQLOperations
CMException

getChildren

public RowCollection getChildren(int parentId,
                                 String metaDataAlias)
                          throws CMException
Gets all children Operation's from the given system alias and for the given Operation id.

CMException

getDefaultTableName

public String getDefaultTableName()
Gets the default table name.

Specified by:
getDefaultTableName in class AbstractTableManager

getDependants

public RowCollection getDependants(int dependsOnId,
                                   String metaDataAlias)
                            throws CMException
Gets all dependant Operation's from the given system alias and for the given Operation id.

CMException

getOperation

public Operation getOperation(int id,
                              String systemAlias)
                       throws CMException
Get an Operation for the given id

CMException

getOperation

public Operation getOperation(int id,
                              String systemAlias,
                              List columnNames)
                       throws CMException
Returns A SQLOperation, based on its ID Creation date: (3/25/2002 1:48:24 PM)

Returns:
RowCollection of SQLOperations
CMException

getOperations

public RowCollection getOperations(Application application,
                                   List columnNames,
                                   ExecutingContext executingContext)
                            throws CMException
Gets all Operations for the given Application.

Parameters:
application - application to get operations for
columnNames - list of names of columns to retrieve
executingContext -
CMException

getPossibleValueSQLOperations

public RowCollection getPossibleValueSQLOperations(String systemAlias,
                                                   int ownerId,
                                                   List columnNames)
                                            throws CMException
Get possible value SQLOperations for the given owner.

Parameters:
ownerId - Id of the owner of the SQLOperations.
columnNames - List of the names of columns to return. If null, all are retrieved.
Returns:
SQLOperations
CMException

getSQLOperation

public SQLOperation getSQLOperation(int pId,
                                    String pSystemAlias)
                             throws CMException
Deprecated. replaced with getOperation(int, String)

Returns A SQLOperation, based on its ID Creation date: (3/25/2002 1:48:24 PM)

Parameters:
pSystemAlias - The alias of the system containing the table of SQLOperations
Returns:
RowCollection of SQLOperations
CMException

getSQLOperation

public SQLOperation getSQLOperation(int pId,
                                    String pSystemAlias,
                                    List pColumnNames)
                             throws CMException
Deprecated. replaced with getOperation(int, String, List)

Returns A SQLOperation, based on its ID Creation date: (3/25/2002 1:48:24 PM)

Parameters:
pSystemAlias - The alias of the system containing the table of SQLOperations
pColumnNames - The names of the columns to retrieve (if this is null all columns will be retrieved)
Returns:
RowCollection of SQLOperations
CMException

getSQLOperations

public RowCollection getSQLOperations(String systemAlias,
                                      int ownerId,
                                      int type,
                                      List columnNames)
                               throws CMException
Get SQLOperations with the specified type and the given owner.

Parameters:
ownerId - Id of the owner of the SQLOperations.
type - Type of SQLOperations to retrieve.
columnNames - List of the names of columns to return. If null, all are retrieved.
Returns:
SQLOperations
CMException

getSQLOperations

public RowCollection getSQLOperations(Application pApplication,
                                      List pColumnNames)
                               throws CMException
Deprecated. Temporarily deprecated to find references. WK.

Returns a RowCollection of SQLOperations associated with an Application

Parameters:
pColumnNames - A List containing the names of the columns which the ListViews should contain. If this is null then all columns will be displayed
Returns:
RowCollection of ListViews
CMException

getSQLOperations

public RowCollection getSQLOperations(Application application,
                                      List columnNames,
                                      ExecutingContext executingContext)
                               throws CMException
Deprecated. replaced with getOperations(Application, List, ExecutingContext)

Gets all Operations for the given Application.

Parameters:
application - application to get operations for
columnNames - list of names of columns to retrieve
executingContext -
CMException

getTableSQLString

public String getTableSQLString(String libraryName,
                                String tableName)
Get an SQL String that can be used to create the table.

Specified by:
getTableSQLString in class AbstractTableManager

getTitle

public String getTitle(int type)
Gets a title for a set of SQLOperations depending upon the type they are.

Parameters:
type - Type of SQLOperations.
Returns:
Title for SQLOperations.

isAuthorized

public boolean isAuthorized(int action,
                            IUser user,
                            Operation operation)
Deprecated. - replaced by isAuthorized(int action, ExecutingContext ec, Operation operation)

Test to see if the given user is authorized to do the given action on the Operation.

Parameters:
action - Action needing authorization to carry out.
user - User who is trying to carry out action.
operation - Operation action is to be done on.

setSingleton

public static void setSingleton(OperationManager singleton)
Sets the singleton instance of the OperationManager. This only needs to be done if the OperationManager class has been overridden. The singleton instance is not synchronized, so this method should only be invoked during initialization.


singleton

public static OperationManager singleton()
Gets the singleton instance of OperationManager


getAssociationOperations

public RowCollection getAssociationOperations(String metaDataAlias,
                                              int ownerId,
                                              List columnNames)
                                       throws CMException
Get association operations for the given owner and meta data system.

Parameters:
metaDataAlias - system alias containing the meta data files
ownerId - owner id to get association operations for
columnNames - List of the names of columns to return. If null, all are retrieved.
Returns:
a RowCollection of Operations have an association type
CMException

getAuthorizationOperations

public RowCollection getAuthorizationOperations(String systemAlias,
                                                int ownerId,
                                                List columnNames)
                                         throws CMException
Get association SQLOperations for the given owner.

Parameters:
ownerId - Id of the owner of the SQLOperations.
columnNames - List of the names of columns to return. If null, all are retrieved.
Returns:
SQLOperations
CMException

getUserAuthenticationListOperations

public RowCollection getUserAuthenticationListOperations(String systemAlias,
                                                         int ownerId,
                                                         List columnNames)
                                                  throws CMException
Get authentication SQLOperations for the given owner. This includes both SQL authentication operations and User List operations

Parameters:
ownerId - Id of the owner of the SQLOperations.
columnNames - List of the names of columns to return. If null, all are retrieved.
Returns:
SQLOperations
CMException

isAuthorized

public boolean isAuthorized(int pAction,
                            ExecutingContext pEc,
                            Operation pOperation)
Test to see if the given user is authorized to do the given action on the Operation.