public abstract class SubscriptionContentProvider extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected String |
m_subscriptionID |
protected String |
m_subscriptionName |
static String |
PRINCIPAL_TYPE_GROUP |
static String |
PRINCIPAL_TYPE_ROLE |
static String |
PRINCIPAL_TYPE_USER |
Constructor and Description |
---|
SubscriptionContentProvider() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
getPrincipalID()
Get the principal Id which to subscribe or unsubscribe.
|
protected abstract String |
getPrincipalType()
Get the principal type for the current principal Id.
|
IPrincipalProvider[] |
getSubscribers()
Get an array of principal Ids for the current subscription Id.
|
String |
getSubscriptionID()
Get the current subscription Id for this content provider.
|
String |
getSubscriptionName()
Get the current subscription name for this content provider.
|
String |
getSubscriptionObjectID()
Get the the subscription object Id for the current subscription Id.
|
boolean |
isSubscribed()
Determines if current principal is already subscribed to the current subscription Id.
|
void |
setSubscriptionID(String id)
Set the current subscription Id for this content provider.
|
void |
setSubscriptionName(String name)
Set the current subscription name for this content provider.
|
String |
subscribe()
Subscribes current principal to the source identified by the current subscription Id.
|
void |
unsubscribe()
Unsubscribes the current principal from the source identified by the current subscription Id.
|
public static final String PRINCIPAL_TYPE_USER
public static final String PRINCIPAL_TYPE_GROUP
public static final String PRINCIPAL_TYPE_ROLE
protected String m_subscriptionID
protected String m_subscriptionName
protected abstract String getPrincipalID()
subscribe()
, unsubscribe()
, isSubscribed()
, and getSubscriptionObjectID()
protected abstract String getPrincipalType()
subscribe()
, unsubscribe()
, isSubscribed()()
, and getSubscriptionObjectID()
PRINCIPAL_TYPE_USER
,
PRINCIPAL_TYPE_ROLE
, or PRINCIPAL_TYPE_GROUP
.
Default value is PRINCIPAL_TYPE_USER
.public String subscribe() throws ContentProviderException
ContentProviderException
public void unsubscribe() throws ContentProviderException
ContentProviderException
public boolean isSubscribed() throws ContentProviderException
ContentProviderException
public String getSubscriptionObjectID() throws ContentProviderException
ContentProviderException
public IPrincipalProvider[] getSubscribers() throws ContentProviderException
ContentProviderException
public String getSubscriptionID()
public void setSubscriptionID(String id)
id
- The source Id.public String getSubscriptionName()
public void setSubscriptionName(String name)
name
- The current subscription name.