at.ac.tuwien.infosys.sm4all.copal.api.event
Class UnprocessedAction

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.event.UnprocessedAction
All Implemented Interfaces:
ContextEventAction

public class UnprocessedAction
extends java.lang.Object
implements ContextEventAction

Class which defines an action that will be executed on an event. This class has one-to-many association with the BaseEvent.This class is not thread safe.

Author:
sanjin

Field Summary
static boolean REQUIREMENT_DEFAULT
          Default requirement of UnprocessedAction.
 
Constructor Summary
UnprocessedAction(DefaultAction action)
          Create instance of UnprocessedAction from specified DefaultAction.
UnprocessedAction(java.lang.String name)
          Create instance of UnprocessedAction with specified name and requirement set to REQUIREMENT_DEFAULT.
UnprocessedAction(java.lang.String name, boolean required)
          Create instance of UnprocessedAction with specified name and requirement.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this UnprocessedAction to the specified Object.
 java.lang.String getName()
          Returns the name of this ContextEventAction.
 int hashCode()
          Returns hash code for this UnprocessedAction.
 boolean isRequired()
           
 void setRequired(boolean required)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUIREMENT_DEFAULT

public static final boolean REQUIREMENT_DEFAULT
Default requirement of UnprocessedAction.

See Also:
Constant Field Values
Constructor Detail

UnprocessedAction

public UnprocessedAction(java.lang.String name,
                         boolean required)
Create instance of UnprocessedAction with specified name and requirement.

Parameters:
name - the name of the UnprocessedAction.
required - if the UnprocessedAction should be required.
Throws:
java.lang.NullPointerException - if specified name is null.
java.lang.IllegalArgumentException - if specified name is an empty or blank string.

UnprocessedAction

public UnprocessedAction(java.lang.String name)
Create instance of UnprocessedAction with specified name and requirement set to REQUIREMENT_DEFAULT. Name cannot be null or an empty or blank string.

Parameters:
name - the name of the UnprocessedAction.
Throws:
java.lang.NullPointerException - if specified name is null.
java.lang.IllegalArgumentException - if specified name is an empty or blank string.

UnprocessedAction

public UnprocessedAction(DefaultAction action)
Create instance of UnprocessedAction from specified DefaultAction. Name and required properties of the DefaultAction are copied.

Parameters:
action - the DefaultAction.
Throws:
java.lang.NullPointerException - if specified DefaultAction is null.
Method Detail

getName

public java.lang.String getName()
Description copied from interface: ContextEventAction
Returns the name of this ContextEventAction.

Specified by:
getName in interface ContextEventAction
Returns:
the name of this ContextEventAction.

setRequired

public void setRequired(boolean required)
Parameters:
required - if the UnprocessedAction should be required.

isRequired

public boolean isRequired()
Returns:
if the UnprocessedAction is required.

hashCode

public int hashCode()
Returns hash code for this UnprocessedAction. The hash code for a UnprocessedAction object is hash code of its name.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this UnprocessedAction.

equals

public boolean equals(java.lang.Object obj)
Compares this UnprocessedAction to the specified Object. The result is true if and only if the argument is not null and is UnprocessedAction object that has same name and requirement as this UnprocessedAction.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the Object to compare this UnprocessedAction against.
Returns:
true if UnprocessedActions are equal; false otherwise.


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.