uk.org.ogsadai.client.toolkit.activity.misc
Class NotificationType

java.lang.Object
  extended byuk.org.ogsadai.client.toolkit.activity.misc.NotificationType

public final class NotificationType
extends java.lang.Object

An enumerated notification type - notify on commencement, completion or do not notify.

Author:
The OGSA-DAI Project Team

Field Summary
static NotificationType COMMENCED
          Notify on commencement of processing.
private static java.lang.String COMMENCED_STRING
          The string used to represent COMMENCED type.
static NotificationType COMPLETE
          Notify on completion of processing.
private static java.lang.String COMPLETE_STRING
          The string used to represent COMPLETE type.
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  java.lang.String mType
          The current type.
static NotificationType NONE
          Do not notify.
private static java.lang.String NONE_STRING
          The string used to represent NONE type.
 
Constructor Summary
private NotificationType(java.lang.String type)
          Create a NotificationType of the specified type.
 
Method Summary
 java.lang.String getAsString()
          Return the notification type as a string - either none, commenced or complete.
 boolean isCommenced()
          Is the current notification type notification on commencement of processing?
 boolean isComplete()
          Is the current notification type notification on completion of processing?
 boolean isNone()
          Is the current notification type no notification?
 void setCommenced()
          Set the notification type to be notification on commencement of processing.
 void setComplete()
          Set the notification type to be notification on completion of processing.
 void setNone()
          Set the notification type to be no notification.
 void setType(java.lang.String type)
          Set the notification type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

NONE_STRING

private static final java.lang.String NONE_STRING
The string used to represent NONE type.

See Also:
Constant Field Values

COMMENCED_STRING

private static final java.lang.String COMMENCED_STRING
The string used to represent COMMENCED type.

See Also:
Constant Field Values

COMPLETE_STRING

private static final java.lang.String COMPLETE_STRING
The string used to represent COMPLETE type.

See Also:
Constant Field Values

NONE

public static final NotificationType NONE
Do not notify.


COMMENCED

public static final NotificationType COMMENCED
Notify on commencement of processing.


COMPLETE

public static final NotificationType COMPLETE
Notify on completion of processing.


mType

private java.lang.String mType
The current type.

Constructor Detail

NotificationType

private NotificationType(java.lang.String type)
Create a NotificationType of the specified type.

Parameters:
type - One of NotificationType.NONE_STRING for no notification, NotificationType.COMMENCED_STRING for notification on commencement of processing or NotificationType.COMPLETE_STRING for notification on completion of processing.
Throws:
java.lang.IllegalArgumentException - if type is not one of the three above.
Method Detail

setType

public void setType(java.lang.String type)
Set the notification type.

Parameters:
type - One of NotificationType.NONE_STRING for no notification, NotificationType.COMMENCED_STRING for notification on commencement of processing or NotificationType.COMPLETE_STRING for notification on completion of processing.
Throws:
java.lang.IllegalArgumentException - if type is not one of the three above.

setNone

public void setNone()
Set the notification type to be no notification.


setCommenced

public void setCommenced()
Set the notification type to be notification on commencement of processing.


setComplete

public void setComplete()
Set the notification type to be notification on completion of processing.


isNone

public boolean isNone()
Is the current notification type no notification?

Returns:
true if type is NONE_STRING.

isCommenced

public boolean isCommenced()
Is the current notification type notification on commencement of processing?

Returns:
true if type is COMMENCED_STRING.

isComplete

public boolean isComplete()
Is the current notification type notification on completion of processing?

Returns:
true if type is COMPLETE_STRING.

getAsString

public java.lang.String getAsString()
Return the notification type as a string - either none, commenced or complete.

Returns:
string