Class SubscriptionContentProvider
java.lang.Object
com.webmethods.caf.faces.data.pubsub.SubscriptionContentProvider
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PubSubContentProvider
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Get the principal Id which to subscribe or unsubscribe.protected abstract String
Get the principal type for the current principal Id.Get an array of principal Ids for the current subscription Id.Get the current subscription Id for this content provider.Get the current subscription name for this content provider.Get the the subscription object Id for the current subscription Id.boolean
Determines if current principal is already subscribed to the current subscription Id.void
Set the current subscription Id for this content provider.void
setSubscriptionName
(String name) Set the current subscription name for this content provider.Subscribes current principal to the source identified by the current subscription Id.void
Unsubscribes the current principal from the source identified by the current subscription Id.
-
Field Details
-
PRINCIPAL_TYPE_USER
- See Also:
-
PRINCIPAL_TYPE_GROUP
- See Also:
-
PRINCIPAL_TYPE_ROLE
- See Also:
-
m_subscriptionID
-
m_subscriptionName
-
-
Constructor Details
-
SubscriptionContentProvider
public SubscriptionContentProvider()
-
-
Method Details
-
getPrincipalID
Get the principal Id which to subscribe or unsubscribe.
Used by methodssubscribe()
,unsubscribe()
,isSubscribed()
, andgetSubscriptionObjectID()
- Returns:
- A principal Id.
-
getPrincipalType
Get the principal type for the current principal Id.
Used by methodssubscribe()
,unsubscribe()
, {@link #isSubscribed()()}, andgetSubscriptionObjectID()
Principal type can bePRINCIPAL_TYPE_USER
,PRINCIPAL_TYPE_ROLE
, orPRINCIPAL_TYPE_GROUP
. Default value isPRINCIPAL_TYPE_USER
.- Returns:
- The principal type for the current principal Id.
-
subscribe
Subscribes current principal to the source identified by the current subscription Id.- Returns:
- The id of the subscription.
- Throws:
ContentProviderException
-
unsubscribe
Unsubscribes the current principal from the source identified by the current subscription Id.- Throws:
ContentProviderException
-
isSubscribed
Determines if current principal is already subscribed to the current subscription Id.- Returns:
- True if user is subscribed. Otherwise false.
- Throws:
ContentProviderException
-
getSubscriptionObjectID
Get the the subscription object Id for the current subscription Id. The current principal must be subscribed to this Id to get a valid Id.- Returns:
- The user subscription object Id.
- Throws:
ContentProviderException
-
getSubscribers
Get an array of principal Ids for the current subscription Id.- Returns:
- An array IPrincipalProvider IDs, currently subscribed to this resource
- Throws:
ContentProviderException
-
getSubscriptionID
Get the current subscription Id for this content provider.- Returns:
- The source Id.
-
setSubscriptionID
Set the current subscription Id for this content provider.- Parameters:
id
- The source Id.
-
getSubscriptionName
Get the current subscription name for this content provider.- Returns:
- The current subscription name.
-
setSubscriptionName
Set the current subscription name for this content provider.- Parameters:
name
- The current subscription name.
-