com.arsdigita.forum
Class Subscription

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.notification.BaseSubscription
                  extended bycom.arsdigita.forum.Subscription
Direct Known Subclasses:
ForumSubscription, ThreadSubscription

public abstract class Subscription
extends com.arsdigita.notification.BaseSubscription

The abstract Subscription class provides the ability for Users to sign up for email notifications. Subclasses will specify the object to which the notifications apply. The default implementation provides instant notifications. Subclasses should override sendNotification() to alter this behavior.

Author:
Kevin Scaldeferri (kevin@arsdigita.com)

Field Summary
static String versionId
           
 
Fields inherited from class com.arsdigita.notification.BaseSubscription
ALERT_BLURB, REPLY_BLURB, SEPARATOR
 
Fields inherited from class com.arsdigita.kernel.ACSObject
BASE_DATA_OBJECT_TYPE, CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE
 
Constructor Summary
Subscription(com.arsdigita.persistence.DataObject dataObj)
           
Subscription(com.arsdigita.persistence.OID oid)
           
Subscription(String objectType)
           
 
Method Summary
 String getHeader(com.arsdigita.messaging.ThreadedMessage msg)
          Returns a header for forum alerts with the following standard information:
protected static String getReturnURLMessage(Post post)
           
 String getSignature(com.arsdigita.messaging.ThreadedMessage post)
          Returns the signature to be appended to the alert.
 
Methods inherited from class com.arsdigita.notification.BaseSubscription
getGroup, isSubscribed, sendNotification, setGroup, setGroupName, setupSubscriptionGroup, subscribe, unsubscribe
 
Methods inherited from class com.arsdigita.kernel.ACSObject
assertPrivilege, beforeSave, checkPrivilege, doCreateCheck, doWriteCheck, getBaseDataObjectType, getContainer, getDefaultDomainClass, getDisplayName, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, initialize, isContainerModified, setID, setID
 
Methods inherited from class com.arsdigita.domain.ObservableDomainObject
addObserver, getObservers
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, clear, delete, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

Subscription

public Subscription(String objectType)

Subscription

public Subscription(com.arsdigita.persistence.DataObject dataObj)

Subscription

public Subscription(com.arsdigita.persistence.OID oid)
             throws com.arsdigita.domain.DataObjectNotFoundException
Method Detail

getHeader

public String getHeader(com.arsdigita.messaging.ThreadedMessage msg)
Returns a header for forum alerts with the following standard information:
 Forum    : Name
 Subject  : Subject
 com.arsdigita.messaging.ThreadedMessageed by: User
 

Returns:
a header to insert at the top of the alert.

getSignature

public String getSignature(com.arsdigita.messaging.ThreadedMessage post)
Returns the signature to be appended to the alert. The default implementation returns a separator and a generic messages.


getReturnURLMessage

protected static String getReturnURLMessage(Post post)
Returns:
an appropriate message to direct people back to the forum, for inclusion in the signature of an alert, or an empty string if the URL cannot be determined.


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2348 UTC