|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.domain.DomainObject
com.arsdigita.domain.ObservableDomainObject
com.arsdigita.kernel.ACSObject
com.arsdigita.notification.BaseSubscription
The abstract BaseSubscription class provides the ability for Users to sign up for email notifications. Subclasses will specify the object to which the notifications apply and messages that should be sent along with the notifications. The default implementation provides instant notifications. Subclasses should override sendNotification() to alter this behavior. This is abstracted out from Subscription to allow for greated reusability (that is, it no longer assumes it's dealing with a Post).
Field Summary | |
protected static String |
ALERT_BLURB
|
protected static String |
REPLY_BLURB
|
protected static String |
SEPARATOR
A separator to use between the body and signature of an alert. |
Fields inherited from class com.arsdigita.kernel.ACSObject |
BASE_DATA_OBJECT_TYPE, CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE, versionId |
Constructor Summary | |
BaseSubscription(DataObject dataObj)
|
|
BaseSubscription(OID oid)
|
|
BaseSubscription(String objectType)
Constructor. |
Method Summary | |
Group |
getGroup()
returns the Group of people who are subscribed |
abstract String |
getHeader(ThreadedMessage post)
Returns a header for forum alerts with the following standard information: |
String |
getSignature(ThreadedMessage post)
Returns the signature to be appended to the alert. |
boolean |
isSubscribed(Party party)
|
void |
sendNotification(ThreadedMessage post)
This method will send immediate notifications to subscribed users with the header and signature specified by getHeader() and getSignature. |
protected void |
setGroup(Group group)
|
void |
setGroupName(String name)
|
protected void |
setupSubscriptionGroup()
|
void |
subscribe(Party party)
|
void |
unsubscribe(Party party)
|
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 |
protected static final String SEPARATOR
protected static final String ALERT_BLURB
protected static final String REPLY_BLURB
Constructor Detail |
public BaseSubscription(String objectType)
public BaseSubscription(DataObject dataObj)
public BaseSubscription(OID oid) throws DataObjectNotFoundException
Method Detail |
protected void setupSubscriptionGroup()
public Group getGroup()
protected void setGroup(Group group)
public void setGroupName(String name)
public final void subscribe(Party party)
public final void unsubscribe(Party party)
public final boolean isSubscribed(Party party)
public void sendNotification(ThreadedMessage post)
public abstract String getHeader(ThreadedMessage post)
public String getSignature(ThreadedMessage post)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |