org.tigris.scarab.om
Class NotificationStatus

java.lang.Object
  extended byorg.apache.torque.om.BaseObject
      extended byorg.tigris.scarab.om.BaseNotificationStatus
          extended byorg.tigris.scarab.om.NotificationStatus
All Implemented Interfaces:
java.lang.Comparable, org.apache.torque.om.Persistent, org.apache.fulcrum.intake.Retrievable, java.io.Serializable

public class NotificationStatus
extends BaseNotificationStatus
implements org.apache.torque.om.Persistent, java.lang.Comparable

This class holds the information for every notification generated in the system (stored in NOTIFICATION_STATUS table)

See Also:
Serialized Form

Field Summary
static java.lang.Integer DEFERRED
           
static java.lang.Integer FAIL
           
static java.lang.Integer MARK_DELETED
           
static java.lang.Integer SCHEDULED
           
static java.lang.Integer SENT
           
static java.lang.Integer WAIT
           
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
NotificationStatus()
           
NotificationStatus(ScarabUser receiver, Activity activity)
          Create a new NotificationStatus entry.
 
Method Summary
 int compareTo(java.lang.Object o2)
          Compare two Notification objects, following this criteria: IssueId User Activity type Timestamp
 void delete()
           
 java.lang.String getActivityCreationDate(ScarabLocalizationTool l10nTool)
          Formats the creationDate of the notification's activity
 ActivityType getActivityType()
           
 ScarabUser getCreator()
          Get the creator of this entry
 java.lang.Long getIssueId()
           
 ScarabUser getReceiver()
          get the Receiver for this entry
 java.lang.String getStatusLabel()
          Transform the database representation of the status (INTEGER) into a readable label (String) TODO: Should this return a localized string (receiving parameter l10nTool?)
 void markDeleted()
           
 void setActivityId(java.lang.Long id)
          NOT ONLY sets the activityId; it also updates the depending values.
 
Methods inherited from class org.tigris.scarab.om.BaseNotificationStatus
copy, copyInto, getActivity, getActivity, getActivityId, getByName, getByPeerName, getByPosition, getChangeDate, getComment, getCreationDate, getCreatorId, getFieldNames, getPeer, getPrimaryKey, getQueryKey, getReceiverId, getScarabUser, getScarabUser, getStatus, isCacheOnSave, save, save, save, setActivity, setActivityKey, setChangeDate, setComment, setCreationDate, setCreatorId, setPrimaryKey, setPrimaryKey, setPrimaryKey, setQueryKey, setReceiverId, setScarabUser, setScarabUserKey, setStatus, toString
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, equals, getLog, hashCode, isModified, isNew, resetModified, setModified, setNew, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.torque.om.Persistent
getPrimaryKey, isModified, isNew, save, save, save, setModified, setNew, setPrimaryKey, setPrimaryKey
 

Field Detail

WAIT

public static final java.lang.Integer WAIT

SCHEDULED

public static final java.lang.Integer SCHEDULED

DEFERRED

public static final java.lang.Integer DEFERRED

FAIL

public static final java.lang.Integer FAIL

SENT

public static final java.lang.Integer SENT

MARK_DELETED

public static final java.lang.Integer MARK_DELETED
Constructor Detail

NotificationStatus

public NotificationStatus()
                   throws org.apache.torque.TorqueException

NotificationStatus

public NotificationStatus(ScarabUser receiver,
                          Activity activity)
                   throws ScarabException
Create a new NotificationStatus entry.

Parameters:
receiver -
activity -
Throws:
org.apache.torque.TorqueException
ScarabException
Method Detail

getIssueId

public java.lang.Long getIssueId()

getActivityType

public ActivityType getActivityType()

setActivityId

public void setActivityId(java.lang.Long id)
NOT ONLY sets the activityId; it also updates the depending values.

Overrides:
setActivityId in class BaseNotificationStatus
Parameters:
id - new value

getStatusLabel

public java.lang.String getStatusLabel()
Transform the database representation of the status (INTEGER) into a readable label (String) TODO: Should this return a localized string (receiving parameter l10nTool?)

Returns:

getActivityCreationDate

public java.lang.String getActivityCreationDate(ScarabLocalizationTool l10nTool)
Formats the creationDate of the notification's activity

Parameters:
l10nTool -
Returns:

getCreator

public ScarabUser getCreator()
                      throws org.apache.torque.TorqueException
Get the creator of this entry

Returns:
Throws:
org.apache.torque.TorqueException

getReceiver

public ScarabUser getReceiver()
                       throws org.apache.torque.TorqueException
get the Receiver for this entry

Returns:
Throws:
org.apache.torque.TorqueException

delete

public void delete()
            throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

markDeleted

public void markDeleted()
                 throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

compareTo

public int compareTo(java.lang.Object o2)
Compare two Notification objects, following this criteria:

Specified by:
compareTo in interface java.lang.Comparable


Copyright © 2000-2004 Tigris.org. All Rights Reserved.