com.webmethods.caf.faces.data.pubsub
Class PubSubContentProvider

java.lang.Object
  extended by com.webmethods.caf.faces.data.pubsub.SubscriptionContentProvider
      extended by com.webmethods.caf.faces.data.pubsub.PubSubContentProvider
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TaskNotificationContentProvider

public class PubSubContentProvider
extends SubscriptionContentProvider

See Also:
Serialized Form

Field Summary
protected  String m_notificationBodyView
           
protected  String m_notificationSubject
           
protected  String m_principalID
           
protected  String m_principalType
           
protected  String m_sourceID
           
 
Fields inherited from class com.webmethods.caf.faces.data.pubsub.SubscriptionContentProvider
m_subscriptionID, m_subscriptionName, PRINCIPAL_TYPE_GROUP, PRINCIPAL_TYPE_ROLE, PRINCIPAL_TYPE_USER
 
Constructor Summary
PubSubContentProvider()
           
 
Method Summary
 String getNotificationBodyView()
          Name of view file which is used to render notification body.
 String getNotificationSubject()
          Notification subject to use when publishing new notification.
 String getPrincipalID()
          Get the principal Id which to subscribe or unsubscribe.
 String getPrincipalType()
          Get the principal type for the current principal Id.
 void publish()
          Publish new notification for source object.
 void setNotificationBodyView(String bodyView)
          Name of view file which is used to render notification body.
 void setNotificationSubject(String subject)
          Notification subject to use when publishing new notification
 void setPrincipalID(String userID)
          Get the principal Id which to subscribe or unsubscribe.
 void setPrincipalType(String principalType)
          Set the principal type for the current principal Id.
 
Methods inherited from class com.webmethods.caf.faces.data.pubsub.SubscriptionContentProvider
getSubscribers, getSubscriptionID, getSubscriptionName, getSubscriptionObjectID, isSubscribed, setSubscriptionID, setSubscriptionName, subscribe, unsubscribe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_notificationSubject

protected String m_notificationSubject

m_notificationBodyView

protected String m_notificationBodyView

m_sourceID

protected String m_sourceID

m_principalID

protected String m_principalID

m_principalType

protected String m_principalType
Constructor Detail

PubSubContentProvider

public PubSubContentProvider()
Method Detail

getPrincipalID

public String getPrincipalID()
Get the principal Id which to subscribe or unsubscribe.

Used by methods SubscriptionContentProvider.subscribe(), SubscriptionContentProvider.unsubscribe(), SubscriptionContentProvider.isSubscribed(), and SubscriptionContentProvider.getSubscriptionObjectID()

Specified by:
getPrincipalID in class SubscriptionContentProvider
Returns:
A principal Id.

getPrincipalType

public String getPrincipalType()
Get the principal type for the current principal Id.

Used by methods SubscriptionContentProvider.subscribe(), SubscriptionContentProvider.unsubscribe(), SubscriptionContentProvider.isSubscribed(), and SubscriptionContentProvider.getSubscriptionObjectID()



Principal type can be SubscriptionContentProvider.PRINCIPAL_TYPE_USER, SubscriptionContentProvider.PRINCIPAL_TYPE_ROLE, or SubscriptionContentProvider.PRINCIPAL_TYPE_GROUP.

Specified by:
getPrincipalType in class SubscriptionContentProvider
Returns:
The principal type for the current principal Id.

setPrincipalType

public void setPrincipalType(String principalType)
Set the principal type for the current principal Id.

Used by methods SubscriptionContentProvider.subscribe(), SubscriptionContentProvider.unsubscribe(), SubscriptionContentProvider.isSubscribed(), and SubscriptionContentProvider.getSubscriptionObjectID()



Principal type can be SubscriptionContentProvider.PRINCIPAL_TYPE_USER, SubscriptionContentProvider.PRINCIPAL_TYPE_ROLE, or SubscriptionContentProvider.PRINCIPAL_TYPE_GROUP.

Parameters:
principalType - The principal type for the current principal Id.

setPrincipalID

public void setPrincipalID(String userID)
Get the principal Id which to subscribe or unsubscribe.

Parameters:
userID - A principal Id. May not be null.

getNotificationSubject

public String getNotificationSubject()
Notification subject to use when publishing new notification.

Returns:
The notification subject.

setNotificationSubject

public void setNotificationSubject(String subject)
Notification subject to use when publishing new notification

Parameters:
subject - The notification subject.

getNotificationBodyView

public String getNotificationBodyView()
Name of view file which is used to render notification body.

Returns:
The view file. IE. /default.view

setNotificationBodyView

public void setNotificationBodyView(String bodyView)
Name of view file which is used to render notification body.

Parameters:
bodyView - The view file. IE. /default.view

publish

public void publish()
             throws ContentProviderException
Publish new notification for source object. Every user subscribed to this source will be notified via email.

Throws:
ContentProviderException