control
Class OperationConfig

java.lang.Object
  extended by control.OperationConfig

public class OperationConfig
extends java.lang.Object

Class used to configurate the possible operations to be used in the application. New operations added should be referenced and added to the list in this class.

Author:
Kjell-Inge Skogstad and Trond Řivind Eriksen

Constructor Summary
OperationConfig()
          Constructor creating a list of possible operations.
 
Method Summary
 void addOperation(control.OperationConfig.Item operation)
          Method to be used for adding operation to the list.
 java.lang.Class getOperation(java.lang.String description)
          Method used by the application to retrieve the class which implements the operation.
 java.lang.String getOperationDescription(java.lang.Class c)
          Method used by the application to retrieve the description of a operation given by its implementation class.
 java.util.ArrayList getOperationDescriptions()
          Method used by the application to get a list of the operations available.
 boolean isEqual(Operation op1, Operation op2)
          Method for testing if two operations are equal (of the same type).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationConfig

public OperationConfig()
Constructor creating a list of possible operations.

Method Detail

addOperation

public void addOperation(control.OperationConfig.Item operation)
Method to be used for adding operation to the list.

Parameters:
operation - The operation

getOperationDescriptions

public java.util.ArrayList getOperationDescriptions()
Method used by the application to get a list of the operations available. This list only contains the textual description of the operation.

Returns:
Descriptions of the operations

getOperation

public java.lang.Class getOperation(java.lang.String description)
Method used by the application to retrieve the class which implements the operation.

Parameters:
description - The operation description
Returns:
The operation class

getOperationDescription

public java.lang.String getOperationDescription(java.lang.Class c)
Method used by the application to retrieve the description of a operation given by its implementation class.

Parameters:
c - The class
Returns:
The description

isEqual

public boolean isEqual(Operation op1,
                       Operation op2)
Method for testing if two operations are equal (of the same type).

Parameters:
op1 - Operation 1
op2 - Operation 2
Returns:
True if equal