EASP API 7.7.0

net.juniper.smgt.ent.im
Interface Subscription

All Superinterfaces:
Persistent, Substitutions

public interface Subscription
extends Substitutions, Persistent

An instance of this interface represents the relationship between a Subscriber and a Service.


Method Summary
 List getAdministrativeValues()
          Returns the administrative values for all service parameters (see the introduction to the Session interface, and the SSC Administration and Operations Guide, for more detail).
 Service getService()
          Returns the Service for which this is a Subscription.
 String getServiceName()
          Returns the serviceName of the subscribed service of this subscription.
 Collection getSessions()
          Returns all the Sessions for this Subscription.
 Subscriber getSubscriber()
          Returns the Subscriber that owns this Subscription.
 String getSubscriptionName()
          Returns the subscriptionName of the subscription, or null if it is a default subscription.
 boolean isActive()
          Returns the administrative state of this Subscription.
 boolean isSuspended()
          Returns true if the user's subscription to the service is currently suspended for any reason.
 boolean setActive(boolean activeState)
          Sets the administrative state of this Subscription.
 void setSuspended(boolean suspended)
          Set suspended state of the subscription.
 
Methods inherited from interface net.juniper.smgt.ent.im.Substitutions
delSubstitution, getDefaultedVariables, getFixedVariables, getFreeVariables, getSubstitution, getSubstitutionVariableNames, hasSubstitution, putSubstitution
 
Methods inherited from interface net.juniper.smgt.ent.im.Persistent
addListener, delListener, getAttribute, getDisplayName, getId, getName, setAttribute, setAttribute, setDisplayName
 

Method Detail

getAdministrativeValues

List getAdministrativeValues()
                             throws CommunicationException,
                                    AccessControlException,
                                    SubstitutionFormatException
Returns the administrative values for all service parameters (see the introduction to the Session interface, and the SSC Administration and Operations Guide, for more detail). For each service parameter, one Substitution object will be returned. The value (i.e. the right side) of each returned Substitution may be an expression that includes variables.
   If a returned Substitution has no value, or if the value is an expression that includes variables that themselves have no value in the context of this Subscription's position on the service parameter aquisition path, then some service parameters still require values (see the SSC Administration and Operations Guide for more detail). The values that are missing in the context of this Subscription must still be supplied by Substitutions somewhere on the aquisition path, otherwise attempts to activate the Sessions of this Subscription will throw an exception.

Returns:
A List of Substitution objects. The order of the Substitutions in the List is the same as the order of the Substitutions returned by getService().getParameters(). If the parameter list is of the form [var1, var2, ..., varN] then the list of administrative values list will be of the form [var1=value1, var2=value2, ..., varN=valueN].
Throws:
CommunicationException - Thrown if there is a problem communicating with the directory.
AccessControlException - Thrown if the currently bound Manager does not have permission to get these Substitutions.
net.juniper.smgt.lib.subst.SubstitutionException - Thrown if there is an inconsistency in the type of Substitutions in the aquisition path that are bound to each other.
SubstitutionFormatException

setActive

boolean setActive(boolean activeState)
                  throws CommunicationException,
                         SessionException,
                         AccessControlException
Sets the administrative state of this Subscription. If set to active (i.e. true), then the Subscription entry in LDAP will be modified such that its "SSP Action" atrribute is equal to "Activate on Login". If set to inactive (i.e. false), then the Subscription entry in LDAP will be modified such that its "SSP Action" atrribute is equal to "Manual". If this method does not throw a CommunicationException or an AccessControlException, then the update to this Subscription's administrative state has succeeded.
   All SSP servers will notice a change to the administrative state stored in LDAP, and will attempt to activate or deactivate every Session associated with this Subscription so that its operational state matches the new administrative state.
   This method has an important and complex side-effect: If an SSP server is running locally (i.e. in the same Java virtual machine as the enterprise portal), then the enterprise portal will ask that SSP server to immediately change the operational state of the Sessions of this Subscription that that SSP server is currently managing. In other words, the local Sessions of this Subscription will be activated or deactivated synchronously, before this method returns. Non-local sessions will be still be activated or deactivated asynchronously, as it may take a while for directory replication and eventing to inform remote SSPs of the change to this Subscription's administrative state. (This behaviour may change in future SSC releases, which may introduce mechanisms for the synchronous activation and deactivation of remote Sessions).
   It is very important to recognize that this method's return value and its SessionException describe only the result of the attempt to synchronously activate or deactivate Sessions. They indicate nothing about the success or failure to achieve the primary purpose of this method, which is to modify this Subscription's administrative state. Failure to modify the administrative state is indicated by a CommunicationException or an AccessControlException; success is indicated by not throwing either of these two exceptions.

Parameters:
activeState - True if the desired administrative state for this Subscription is active, false if it is inactive.
Returns:
Since IPM 1.0.0 release, always returns false. If true, indicates that the operational state of every Session in the subset of Sessions eligible for synchronous activation or deactivation (only the local Sessions in this SSC release) was successfully and synchronously modified to match the new administrative state; false otherwise.
Throws:
CommunicationException - Thrown if there is a problem communicating with the directory.
AccessControlException - Thrown if the currently bound Manager does not have permission to alter the administrative state of this Subscription.
SessionException - This behaviour is likely to change in future SSC releases: Thrown if activeState is true and the activation of any Session (whether it is eligible for synchronous activation or not) would fail due to a service parameter having a value that is an expression containing non-run-time variables (i.e. a service parameter is missing a value). This exception may interfere with synchronous Session activation attempts, as it can be thrown before some subset of such attempts have been performed.

isActive

boolean isActive()
                 throws CommunicationException,
                        AccessControlException
Returns the administrative state of this Subscription. True means active, false means inactive.

Throws:
CommunicationException - Thrown if there is a problem communicating with the directory.
AccessControlException - Thrown if the currently bound Manager does not have permission to check the activation status of the subscription.

getService

Service getService()
                   throws CommunicationException,
                          AccessControlException
Returns the Service for which this is a Subscription.

Throws:
CommunicationException - Thrown if there is a problem communicating with the directory.
AccessControlException - Thrown if the currently bound Manager does not have permission to read the Service.

getSubscriber

Subscriber getSubscriber()
                         throws CommunicationException,
                                AccessControlException
Returns the Subscriber that owns this Subscription. This is the Subscription's parent object in the LDAP directory.

Throws:
CommunicationException - Thrown if there is a problem communicating with the directory.
AccessControlException - Thrown if the currently bound Manager does not have permission to access the Subscriber.

getSessions

Collection getSessions()
                       throws CommunicationException,
                              AccessControlException
Returns all the Sessions for this Subscription. There is one Session object per Access that is affected by this Subscription.

Returns:
A collection of the Session objects.
Throws:
CommunicationException - Thrown if there is a problem communicating with the directory.
AccessControlException - Thrown if the currently bound manager does not have permission read the Sessions.

isSuspended

boolean isSuspended()
                    throws UnexpectedException
Returns true if the user's subscription to the service is currently suspended for any reason. Subscriptions are stored in the SSP's LDAP directory as sspServiceProfile objects. Suspended subscriptions are sspServiceProfile objects in which the sspState attribute does not equal "SUBSCRIBED".

Throws:
UnexpectedException - Thrown if the subscription has invalid sspState value in the directory.

setSuspended

void setSuspended(boolean suspended)
                  throws CommunicationException,
                         AccessControlException
Set suspended state of the subscription. If set to suspended (i.e. true), then the Subscription entry in LDAP will be modified such that its "SSP State" atrribute is equal to "UNSUBSCRIBED". If set suspended to false, then the Subscription entry in LDAP will be modified such that its "SSP State" atrribute is equal to "SUBSCRIBED". Suspending a subscription will cause the corresponding active sessions be deactivated. If setting the suspended state of a subscription to false and the subscription's administrative state is active, then the corresponding sessions will be activated automatically.

Parameters:
suspended - is true then the subscription is suspended.
Throws:
CommunicationException - Thrown if there is a problem communicating with the directory
AccessControlException - Thrown if the currently bound manager does not have permission to modify attribute sspState of the subscription

getServiceName

String getServiceName()
Returns the serviceName of the subscribed service of this subscription.


getSubscriptionName

String getSubscriptionName()
Returns the subscriptionName of the subscription, or null if it is a default subscription.


EASP API 7.7.0