Core API 4.3

net.juniper.smgt.sae.portal
Class User

java.lang.Object
  |
  +--net.juniper.smgt.sae.portal.User

public class User
extends Object

This bean represents a user currently logged in to SSP. The current value of either this bean's userIp property or its userDn property determines which logged in user this bean represents. Whenever one of these two user-identifying properties is set, the other is automatically set to null. This bean's userIp or userDn property must be set before any other properties are read.
   If the user is represented by a userIp property, it is recommended to also set the timeStamp property. The timeStamp identifies a point in time, when the IP address was assigned to the user. Using this feature is especially important, if a reference to this bean is kept inside a session for a longer time.
   The userDn property can only be used to initialize this bean to represent an interface user. In general, an interface user is a user that is logged in to SSP in response to an E-series router interface coming up (except for most authenticated PPP interfaces). Amongst interface users only, every interface user is associated with a unique LDAP distinguished name. See the SSP documentation for more information about interface users.


Constructor Summary
User()
          The default bean constructor.
 
Method Summary
 void addScheduleEntry(ScheduleEntry aSE)
          Adds a ScheuldeEntry for the Subscriber.
 String[] addSubscription(String serviceName, String userName, String password)
          Subscribes the currently logged in user to the service specified by serviceName.
 void deleteScheduleEntry(long date)
          Deprecated. Use deleteScheduleEntry(String id) instead. Convert long date to string date using String.valueOf(date).
 void deleteScheduleEntry(String id)
          Delete the ScheduleEntry for the Subscriber for the given date.
 String[] deleteSubscription(String serviceName, String userName, String password)
          Unsubscribes the currently logged in user from the service specified by serviceName.
 String[] getActiveSubscriptionNames()
          Returns the name of every service that is currently activated for this user.
 Object getAttribute(String attributeName)
          Returns the value of the named attribute from this user's entry in SSP's LDAP user directory.
 String[] getAttributeNames()
          Get the names of the LDAP attributes defined for the profile of the current user.
 Set getAuthDeniedReasons()
          Those users who connect via authenticated PPP or DHCP, and whose automatic login (based on the PPP or DHCP session information, or on a registered login) was denied due to an authorization failure, will be assigned a copy of the unauthenticated user profile, and a set of messages explaining why the automatic login was denied will be available via this method (there may be more than one reason authorization was denied).
 String getAutoSubscriptions()
          Returns subscriptions to be activated on login, set by RADIUS auth plugin.
 String[] getAvailableSubscriptionNames()
          Returns the name of every service that is currently available to this user.
 DhcpPacket getDhcpPacket()
          Return information about DHCP request.
 String[] getInterfaceAttributeNames()
          Get the names of attributes of the interface which this user is connected.
 Map getInterfaceAttributes()
          Get all attributes of the interface which this user is connected.
 String getIntfAlias()
          Returns the alias of the router interface to which this user is connected, as it is configured in the E-series router.
 String getIntfName()
          Returns the name of the router interface to which this user is connected.
 String getLoadSubscriptions()
          Returns the filter for "loaded" subscriptions, set by RADIUS auth plugin.
 String getLocationName()
          Return's the name of the user's current location.
 String getLoginDomain()
          Returns this user's login domain (e.g.
 String getLoginId()
          Returns this user's login ID (e.g.
 Date getLoginTime()
          Returns the time & date that this user logged in to SAE.
 long getLoginTimestamp()
          Returns the time that this user logged in to SAE in milliseconds since 1970-01-01T00:00:00 UTC.
 String getMacAddress()
          Returns the user's MAC address as a string (e.g.
 String getName()
          Returns this user's full name (e.g.
 String getNasIp()
          Returns the IP address of the router which this user is connected.
 int getNumConcurrentGroupSessions()
          Return the number of concurrent logins of the group of the current user profile.
 int getNumConcurrentSessions()
          Return the number of concurrent logins of the current user profile.
 String[] getPersonalSubscriptionNames()
          Returns the name of every service to which this user is personally subscribed.
 String getPublicDhcpUserName()
          Returns the user name that was passed from SSP to an E-series router, and then authenticated via RADIUS, before this user's current public IP address was granted.
 String[] getRadiusClass()
          Returns radius class attribute from authorization plug-ins.
 int getRemainingSessionTime()
          Returns the time in seconds that remain before this user will be automatically logged out from SSP.
 String[] getReplyMessages()
          Return the "reply messages" from the authorization plug-in for the current user session.
 ScheduleEntry[] getScheduleEntries()
          Get all schedule enteries for the Subscriber.
 ScheduleEntry getScheduleEntry(long date)
          Deprecated. Use getScheduleEntry(String id) instead. Convert long date to string date using String.valueOf(date).
 ScheduleEntry getScheduleEntry(String id)
          Get the ScheduleEntry for the Subscriber for the given date.
 long[] getScheduleEntryEventDates()
          Get list of dates for the Subscriber for the Subscriber's schedules.
 String[] getScheduleEntryIds()
          Get list of ids for the Subscriber for the Subscriber's schedules.
 List getScopes()
          Return a list of the DN of the user's current scopes dn sorted by scope's precedence and seperated by "\n".
 String getServiceBundle()
          Returns service bundle attribute from authorization plug-ins.
 String getSspPassword()
          Returns the password attribute from this user's profile in LDAP, exactly as it is stored in the SSP's LDAP directory (i.e.
 String[] getSubscriptionNames()
          Returns the name of every service to which this user is subscribed.
 String getUserDn()
          Returns the LDAP distinguished name with which this bean was initialized (e.g.
 String getUserIp()
          Returns the IP address with which this bean was initialized (e.g.
 String getVrName()
          Returns the name of the virtual router to which this user is connected.
 boolean isAnonymous()
          Returns true if the user is anonymous.
 boolean isInitialized()
          Returns true only if this bean has been fully initialized.
 boolean isIspServiceActive()
          Returns true only if this user currently has a service of type Service.ISP active.
 boolean isPppUser()
          Deprecated. This method has been deprecated. Returns true only if the user is connected via authenticated PPP.
 boolean isPublicDhcpUser()
          Returns true only if the user is connected via DHCP, and currently has a public IP address.
 boolean isTokenDhcpUser()
          Returns true only if the user is connected via DHCP, and currently has a 'token' IP address.
 boolean isUnauthenticated()
          Returns true only if the user is unauthenticated.
 void setSessionTimeout(int timeout)
          Set the Session Timeout for the current user session.
 void setTimeStamp(long timeStamp)
          Set the time stamp.
 void setUserDn(String userDn)
          Determines which interface user will be described or affected by all subsequent calls to this bean's methods.
 void setUserIp(String userIp)
          Determines which user will be described or affected by all subsequent calls to this bean's methods.
 String toString()
          For debugging only.
 void updatedScheduleEntry(String id, ScheduledTime aScheduleTime, Action[] aActions)
          Updates the scheduled time and actions of the ScheduleEntry for the Subscriber for the given date.
 void updatedScheduleEntryActions(long date, Action[] aActions)
          Deprecated. Use updatedScheduleEntryActions(String id, Action[] aActions) instead. Convert long date to string date using String.valueOf(date).
 void updateSessionTimeout(int timeout)
          Update the session timeout for the user session object that this bean has been initialized to provide access to.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

User

public User()
The default bean constructor.

Method Detail

setUserIp

public void setUserIp(String userIp)
               throws UnknownUserException
Determines which user will be described or affected by all subsequent calls to this bean's methods. Setting this userIp property has the side-effect of setting the userDn property to null.

Parameters:
userIp - The desired user's current IP address in string format (e.g. "192.168.3.34").
Throws:
IllegalArgumentException - If the userIp string does not contain a parseable IP address.
UnknownUserException - If the specified user is not currently logged in to SSP. In some cases, such as with some interface users (e.g. some static IP users), SSP may not know a user's IP address. In such cases, this method will throw an UnknownUserException even if a user with the specified IP is logged in to SSP. Portals that handle static IP users can redirect such users to a login JSP page whenever this exception is thrown by this method. After calling Ssp.loginUser for a static IP user, SSP will know the static IP user's IP address, and this method will no longer throw an UnknownUserException.
See Also:
Ssp.loginUser(java.lang.String, java.lang.String, java.lang.String)

setTimeStamp

public void setTimeStamp(long timeStamp)
                  throws UnknownUserException
Set the time stamp.

UnknownUserException

getUserIp

public String getUserIp()
Returns the IP address with which this bean was initialized (e.g. "192.168.3.34").

Returns:
Null, if this bean was initialized with an LDAP distinguished name instead of an IP address.
Throws:
IllegalStateException - If this bean has not been properly initialized.

setUserDn

public void setUserDn(String userDn)
               throws UnknownUserException,
                      NonUniqueUserException
Determines which interface user will be described or affected by all subsequent calls to this bean's methods. Setting this userDn property has the side-effect of setting the userIp property to null.

Parameters:
userDn - The desired interface user's LDAP distinguished name in string format (e.g. "siteName=OttawaOffice,enterpriseName=XyzCorp,ou=Ottawa,retailername=ISP3,o=Users,o=UMC").
Throws:
IllegalArgumentException - If the userDn string does not contain a parseable DN.
UnknownUserException - If an interface user with the specified DN is not currently logged in to SSP.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
3.0

getUserDn

public String getUserDn()
Returns the LDAP distinguished name with which this bean was initialized (e.g. "siteName=OttawaOffice,enterpriseName=XyzCorp,ou=Ottawa,retailername=ISP3,o=Users,o=UMC") or the LDAP distinguished name of the loaded user profile assigned to the user if this bean was initialized with an IP address.

Returns:
before 4.2: Null, if this bean was initialized with an IP address instead of an LDAP distinguished name. since 4.2: Null, if this bean was initialized with an IP address and the user specified by this bean's userIp property is no longer logged in to SSP. since 4.2: Null, if this bean was initialized with an IP address and the user specified by this bean's userIp property is logged in more than once.
Throws:
IllegalStateException - If this bean has not been properly initialized.
Since:
3.0

isInitialized

public boolean isInitialized()
Returns true only if this bean has been fully initialized. It is fully initialized if the userIp or the userDn property has been set.


getName

public String getName()
               throws UnknownUserException,
                      NonUniqueUserException
Returns this user's full name (e.g. "John Smith"). The returned name is not unique to this user. The returned name is the "common name" LDAP attribute from this user's profile in SSP's LDAP directory.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getLoginTime

public Date getLoginTime()
                  throws UnknownUserException,
                         NonUniqueUserException
Returns the time & date that this user logged in to SAE.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getLoginTimestamp

public long getLoginTimestamp()
                       throws UnknownUserException,
                              NonUniqueUserException
Returns the time that this user logged in to SAE in milliseconds since 1970-01-01T00:00:00 UTC.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
4.1

getRemainingSessionTime

public int getRemainingSessionTime()
                            throws UnknownUserException,
                                   NonUniqueUserException,
                                   IllegalStateException
Returns the time in seconds that remain before this user will be automatically logged out from SSP.

Returns:
Returns -1 if no session timeout is defined for this user.
Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
4.0

getLoginId

public String getLoginId()
                  throws UnknownUserException,
                         NonUniqueUserException
Returns this user's login ID (e.g. if the user's login name was "john@isp3.com", this method would return "john").

Returns:
Null, if this user's login name is not available. The login name is not available unless this user has performed an authenticated PPP login, or a web login that invokes the Ssp.loginUser method.
Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

getLoginDomain

public String getLoginDomain()
                      throws UnknownUserException,
                             NonUniqueUserException
Returns this user's login domain (e.g. if user's login name was "john@isp3.com", this method would return "isp3.com").

Returns:
Null, if this user's login name is not available. The login name is not available unless this user has performed an authenticated PPP login, or a web login that invokes the Ssp.loginUser method.
Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

getSspPassword

public String getSspPassword()
                      throws UnknownUserException,
                             NonUniqueUserException
Returns the password attribute from this user's profile in LDAP, exactly as it is stored in the SSP's LDAP directory (i.e. it is not necessarily in clear text; it may be in an encrypted form).

Returns:
Null, if no password attribute is specified in LDAP for this user.
Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

getLocationName

public String getLocationName()
                       throws UnknownUserException,
                              NonUniqueUserException
Return's the name of the user's current location. If localized versions of services are being used, the user's location determines which version of a given service he will get. In this version of SSP, this property is identical to the vrName property.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
See Also:
Service.setLocationName(java.lang.String), getVrName()

getScopes

public List getScopes()
               throws UnknownUserException,
                      NonUniqueUserException
Return a list of the DN of the user's current scopes dn sorted by scope's precedence and seperated by "\n". If localized versions of services are being used, the user's scopes determine which version of a given service he will get.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

getVrName

public String getVrName()
                 throws UnknownUserException,
                        NonUniqueUserException
Returns the name of the virtual router to which this user is connected. The virtual router name contains an '@' symbol and then the relevant E-series router hostname (e.g. if the user is connected to the virtual router called "aVrName" in the E-series router called "anErxHostname", then this method would return "aVrName@anErxHostname").

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

getIntfName

public String getIntfName()
                   throws UnknownUserException,
                          NonUniqueUserException
Returns the name of the router interface to which this user is connected. The interface name is formatted in the same way that it is printed on the JUNOSe CLI (e.g. "fastEthernet3/0.1").

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

getIntfAlias

public String getIntfAlias()
                    throws UnknownUserException,
                           NonUniqueUserException
Returns the alias of the router interface to which this user is connected, as it is configured in the E-series router.

Returns:
Null, if the interface has no alias.
Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
3.0

getLoadSubscriptions

public String getLoadSubscriptions()
                            throws UnknownUserException,
                                   NonUniqueUserException
Returns the filter for "loaded" subscriptions, set by RADIUS auth plugin.

UnknownUserException
NonUniqueUserException
Since:
4.1

getAutoSubscriptions

public String getAutoSubscriptions()
                            throws UnknownUserException,
                                   NonUniqueUserException
Returns subscriptions to be activated on login, set by RADIUS auth plugin.

UnknownUserException
NonUniqueUserException
Since:
4.1

isUnauthenticated

public boolean isUnauthenticated()
                          throws UnknownUserException,
                                 NonUniqueUserException
Returns true only if the user is unauthenticated. A user is unauthenticated if he is currently logged in to SSP with a copy of the unauthenticated user profile. The unauthenticated user profile is an otherwise normal user profile that is designated as the unauthenticated user profile during SSP configuration. Depending on the desired portal behaviour, this property could be used to determine which users should be redirected to a login JSP page. Note that those users who connect via authenticated PPP or DHCP, and whose automatic login (based on the PPP or DHCP session information, or on a registered login) was denied due to an authorization failure, will be assigned a copy of the unauthenticated user profile. Also note that, depending on SSP's user classification script, DHCP users can be assigned a copy of the unauthenticated user profile when they first obtain an IP address.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
See Also:
Ssp.loginUser(java.lang.String, java.lang.String, java.lang.String)

getAuthDeniedReasons

public Set getAuthDeniedReasons()
                         throws UnknownUserException,
                                NonUniqueUserException
Those users who connect via authenticated PPP or DHCP, and whose automatic login (based on the PPP or DHCP session information, or on a registered login) was denied due to an authorization failure, will be assigned a copy of the unauthenticated user profile, and a set of messages explaining why the automatic login was denied will be available via this method (there may be more than one reason authorization was denied).

Returns:
A Set of Strings, where each String describes one reason authorization was denied, or null if login authorization succeeded.
Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
3.0

isAnonymous

public boolean isAnonymous()
                    throws UnknownUserException,
                           NonUniqueUserException
Returns true if the user is anonymous. A user is anonymous if he is currently logged in to SSP with an anonymous user profile. An anonymous user profile is an otherwise normal user profile that is marked as anonymous in SSP's LDAP directory. Anonymous user profiles are intended to be shared between many users, each getting a copy of the same anonymous user profile. Anonymous user profiles can not be modified by any user.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

isTokenDhcpUser

public boolean isTokenDhcpUser()
                        throws UnknownUserException,
                               NonUniqueUserException
Returns true only if the user is connected via DHCP, and currently has a 'token' IP address. A 'token' IP is handed out to the user as soon as he turns on his client machine (i.e. as soon as he sends a DHCP discover message). A token IP is handed out before any type of authentication takes place. A token IP may be configured to have a short DHCP lease time.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

isPublicDhcpUser

public boolean isPublicDhcpUser()
                         throws UnknownUserException,
                                NonUniqueUserException
Returns true only if the user is connected via DHCP, and currently has a public IP address. A public IP address is handed out to the user after authentication has taken place via the E-series virtual router and a RADIUS server. A public IP address may be configured to have a long DHCP lease time.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
See Also:
Service.ISP

getPublicDhcpUserName

public String getPublicDhcpUserName()
                             throws UnknownUserException,
                                    NonUniqueUserException
Returns the user name that was passed from SSP to an E-series router, and then authenticated via RADIUS, before this user's current public IP address was granted. This user name is the same as was passed to either the Ssp.grantPublicIp method, the Ssp.registerEquipment method, or the Subscription.setSubscriptionUsername method (in the case where this user obtained his public IP address via an ISP service activation). This user name is of the form "userName@domainName".

Returns:
Null, if the user is not currently a public DHCP user.
Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
2.0.3

getMacAddress

public String getMacAddress()
                     throws UnknownUserException,
                            NonUniqueUserException
Returns the user's MAC address as a string (e.g. "A0:34:03:FF:3D:30").

Returns:
Null, if the user is not a DHCP user.
Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

isIspServiceActive

public boolean isIspServiceActive()
                           throws UnknownUserException,
                                  NonUniqueUserException
Returns true only if this user currently has a service of type Service.ISP active. If so, then the user's IP address will be automatically changed the next time he logs in or logs out. If an ISP service is active and the user logs in or out, all his services, including the ISP service, will be deactivated. Deactivating the ISP service will revoke the DHCP lease for the user's public IP address. Only DHCP users can activate services of type Service.ISP.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
See Also:
Service.ISP

getSubscriptionNames

public String[] getSubscriptionNames()
                              throws UnknownUserException,
                                     NonUniqueUserException
Returns the name of every service to which this user is subscribed. The named subscriptions are the subscriptions belonging to this user personally (i.e. those named by the getPersonalSubscriptionNames method) plus the subscriptions belonging to this user's household or site or enterprise (i.e. those inherited from this user's "ancestor" user profiles in LDAP). User Authentication plug-in can set a filter to the subscriptions. In this case, the list of returned subscriptions can be a subset of the subscribed ones. These names can be used to initialize the serviceName property of a Subscription bean.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
See Also:
Subscription, getPersonalSubscriptionNames()

getPersonalSubscriptionNames

public String[] getPersonalSubscriptionNames()
                                      throws UnknownUserException,
                                             NonUniqueUserException
Returns the name of every service to which this user is personally subscribed. This does not include the subscriptions belonging to this user's household or site or enterprise (i.e. those inherited from this user's "ancestor" user profiles in LDAP). These names can be used to initialize the serviceName property of a Subscription bean. User Authentication plug-in can set a filter to the subscriptions. In this case, the list of returned subscriptions can be a subset of the personally subscribed ones.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
3.0
See Also:
Subscription, getSubscriptionNames()

getAvailableSubscriptionNames

public String[] getAvailableSubscriptionNames()
                                       throws UnknownUserException,
                                              NonUniqueUserException
Returns the name of every service that is currently available to this user. These named subscriptions are all of the user's subscriptions (i.e. those named by the getSubscriptionNames method) minus the subscriptions that are currently suspended and minus the subscriptions that are not accessible from the user's current location and, if the user is not connected via DHCP, minus all subscriptions to ISP services. These names can be used to initialize the serviceName property of a Subscription bean.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
3.0
See Also:
Subscription.isSuspended(), getLocationName(), Service.ISP

getActiveSubscriptionNames

public String[] getActiveSubscriptionNames()
                                    throws UnknownUserException,
                                           NonUniqueUserException
Returns the name of every service that is currently activated for this user. These names can be used to initialize the serviceName property of a Subscription bean.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
See Also:
Subscription.setActive(boolean)

getAttribute

public Object getAttribute(String attributeName)
                    throws UnknownUserException,
                           NonUniqueUserException
Returns the value of the named attribute from this user's entry in SSP's LDAP user directory. If the attribute is a single value, the returned Object must be cast to the appropriate type. If the attribute is multi-valued, the returned Object must be cast to an array of the appropriate type.

Returns:
Returns null if this user's entry in SSP's LDAP user directory does not contain an attribute with the specified name.
Throws:
IllegalStateException - If this bean's mandatory userIp or userDn property has not been set.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
3.0

getDhcpPacket

public DhcpPacket getDhcpPacket()
                         throws UnknownUserException,
                                NonUniqueUserException
Return information about DHCP request.

Returns:
Returns null if this user is not logged in through DHCP
Throws:
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
4.0

addSubscription

public String[] addSubscription(String serviceName,
                                String userName,
                                String password)
                         throws UnknownUserException,
                                UnknownServiceException,
                                ServiceAuthenticationException,
                                SspException,
                                NonUniqueUserException
Subscribes the currently logged in user to the service specified by serviceName. This method creates a new subscription entry in SSP's LDAP user directory or revokes its DELETED attribute if the subscription already existed with the DELETED attribute marked as true. All configured subscription authorization plug-ins must authorize the subscription. If any plug-in rejects the subscription, a ServiceAuthenticationException will be thrown.

Parameters:
serviceName - The desired service's name (e.g. "Video Gold").
userName - The user name passed to the subscription authorization plugin.
password - The password passed to the subscription authorization plugin.
Returns:
Array of "reply Messages" returned from authorization plug-ins.
Throws:
IllegalArgumentException - If the userIp string does not contain a parseable IP address.
UnknownUserException - If the user specified by userIp is not currently logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
UnknownServiceException - If the service specified by the serviceName argument is not currently loaded into SSP.
ServiceAuthenticationException - If any subscription plug-in denies the subscription, or if the service serviceName is not currently available for subscription.
SspException - If the user with userIp address is already subscribed to the service serviceName or if failed to add the subscription to its LDAP directory or if failed to revoke the subscription's DELETED attribute.
NonUniqueUserException
Since:
4.0
See Also:
deleteSubscription(java.lang.String, java.lang.String, java.lang.String)

deleteSubscription

public String[] deleteSubscription(String serviceName,
                                   String userName,
                                   String password)
                            throws UnknownUserException,
                                   UnknownServiceException,
                                   UnknownSubscriptionException,
                                   ServiceAuthenticationException,
                                   SspException,
                                   NonUniqueUserException
Unsubscribes the currently logged in user from the service specified by serviceName. This method marks the subscription's attribute DELETED as true from SSP's LDAP user directory. All configured subscription authorization plug-ins must authorize the deletion of the subscription. If any plug-in rejects the deletion, a ServiceAuthenticationException will be thrown.

Parameters:
serviceName - The desired service's name (e.g. "Video Gold").
userName - The user name passed to the subscription authorization plugin.
password - The password passed to the subscription authorization plugin.
Throws:
IllegalArgumentException - If the userIp string does not contain a parseable IP address.
UnknownUserException - If the user specified by userIp is not currently logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
UnknownServiceException - If the service specified by the serviceName argument is not currently loaded into SSP.
UnknownSubscriptionException - If the user with userIp address is not currently subscribed to the service serviceName.
ServiceAuthenticationException - If any subscription plug-in denies the subscription deletion.
SspException - If failed to mark the subscription's attribute DELETED as true on its LDAP directory.
NonUniqueUserException
Since:
4.0
See Also:
addSubscription(java.lang.String, java.lang.String, java.lang.String)

setSessionTimeout

public void setSessionTimeout(int timeout)
                       throws UnknownUserException,
                              NonUniqueUserException
Set the Session Timeout for the current user session. The session timeout limits the total length of the user session, i.e the value counts from the start of the user session, not from the current time. The timeout can olny be set, if it was not set previously, or if the new value is smaller than the remaining timeout.

Parameters:
timeout - max length of user session in seconds.
Throws:
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
UnknownUserException
NonUniqueUserException
Since:
4.0

updateSessionTimeout

public void updateSessionTimeout(int timeout)
                          throws UnknownUserException,
                                 NonUniqueUserException
Update the session timeout for the user session object that this bean has been initialized to provide access to. The session timeout counts from the current time, not from the time of the start of the user session. If the user session timeout is currently not active, it is activated. If the value for timeout is equal to -1, the session timeout is cancelled. The new value for the session timeout is not updated on the E-series router.

Parameters:
timeout - max length of user session in seconds.
Throws:
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
4.1

getServiceBundle

public String getServiceBundle()
                        throws UnknownUserException,
                               NonUniqueUserException
Returns service bundle attribute from authorization plug-ins.

Returns:
Null, if no service bundle.
Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NonUniqueUserException
Since:
4.0

getRadiusClass

public String[] getRadiusClass()
                        throws UnknownUserException,
                               NonUniqueUserException
Returns radius class attribute from authorization plug-ins.

Returns:
Null, if no radius class.
Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP. property is logged in more than once.
NonUniqueUserException
Since:
4.0

getAttributeNames

public String[] getAttributeNames()
                           throws UnknownUserException,
                                  NonUniqueUserException
Get the names of the LDAP attributes defined for the profile of the current user. Each returned string can be used as an argument for getAttribute().

Returns:
Array of attribute names
Throws:
UnknownUserException - if the User is currently not logged in.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
4.0

getNumConcurrentSessions

public int getNumConcurrentSessions()
                             throws UnknownUserException,
                                    NonUniqueUserException
Return the number of concurrent logins of the current user profile.

Throws:
UnknownUserException - if the User is currently not logged in.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
4.0

getNumConcurrentGroupSessions

public int getNumConcurrentGroupSessions()
                                  throws UnknownUserException,
                                         NonUniqueUserException
Return the number of concurrent logins of the group of the current user profile. The group of the current user profile are the descendants of the lowest entry in the subscriber hierarchy, which defines the "maxGroupLogin" attribute.

Throws:
UnknownUserException - if the User is currently not logged in.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
4.0

getReplyMessages

public String[] getReplyMessages()
                          throws UnknownUserException,
                                 NonUniqueUserException
Return the "reply messages" from the authorization plug-in for the current user session. An authorization plug-in can specify a "reply message", when authorization is granted.

Throws:
UnknownUserException - if the User is currently not logged in.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

updatedScheduleEntry

public void updatedScheduleEntry(String id,
                                 ScheduledTime aScheduleTime,
                                 Action[] aActions)
                          throws SspException,
                                 IllegalStateException,
                                 UnknownUserException,
                                 NonUniqueUserException
Updates the scheduled time and actions of the ScheduleEntry for the Subscriber for the given date.

Throws:
SspException - If there is no schedule entry for the subscriber for the given date or if there is a failure to update the schedule entry in the LDAP Directory Server.
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
4.1

deleteScheduleEntry

public void deleteScheduleEntry(String id)
                         throws SspException,
                                IllegalStateException,
                                UnknownUserException,
                                NonUniqueUserException
Delete the ScheduleEntry for the Subscriber for the given date.

Throws:
SspException - If there is no schedule entry for the subscriber for the given date or if there is a failure to delete the schedule entry from the LDAP Directory Server.
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
Since:
4.1
See Also:
deleteScheduleEntry(String id)

getScheduleEntryIds

public String[] getScheduleEntryIds()
                             throws SspException,
                                    IllegalStateException,
                                    UnknownUserException,
                                    NonUniqueUserException
Get list of ids for the Subscriber for the Subscriber's schedules.

Returns:
String[] The array of ids for schedule entries
Throws:
SspException - If there is no schedule entry for the subscriber for the given date or if there is a failure to delete the schedule entry from the LDAP Directory Server.
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

addScheduleEntry

public void addScheduleEntry(ScheduleEntry aSE)
                      throws SspException,
                             IllegalStateException,
                             UnknownUserException,
                             NonUniqueUserException
Adds a ScheuldeEntry for the Subscriber.

Throws:
SspException - If there is already a schedule entry for the subscriber for the given date or if there is a failure to add the schedule entry to the LDAP Directory Server.
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

updatedScheduleEntryActions

public void updatedScheduleEntryActions(long date,
                                        Action[] aActions)
                                 throws SspException,
                                        IllegalStateException,
                                        UnknownUserException,
                                        NonUniqueUserException
Deprecated. Use updatedScheduleEntryActions(String id, Action[] aActions) instead. Convert long date to string date using String.valueOf(date).

Updates the actions of the ScheduleEntry for the Subscriber for the given date.

Throws:
SspException - If there is no schedule entry for the subscriber for the given date or if there is a failure to update the schedule entry in the LDAP Directory Server.
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

deleteScheduleEntry

public void deleteScheduleEntry(long date)
                         throws SspException,
                                IllegalStateException,
                                UnknownUserException,
                                NonUniqueUserException
Deprecated. Use deleteScheduleEntry(String id) instead. Convert long date to string date using String.valueOf(date).

Delete the ScheduleEntry for the Subscriber for the given date.

Throws:
SspException - If there is no schedule entry for the subscriber for the given date or if there is a failure to delete the schedule entry from the LDAP Directory Server.
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException
See Also:
deleteScheduleEntry(String id)

getScheduleEntry

public ScheduleEntry getScheduleEntry(long date)
                               throws SspException,
                                      IllegalStateException,
                                      UnknownUserException,
                                      NonUniqueUserException
Deprecated. Use getScheduleEntry(String id) instead. Convert long date to string date using String.valueOf(date).

Get the ScheduleEntry for the Subscriber for the given date.

Returns:
ScheuldeEntry The schedule entery for the Subscriber for the given date. Returns null if there is no schedule entery for the give date.
Throws:
SspException - If there is no schedule entry for the subscriber for the given date or if there is a failure to delete the schedule entry from the LDAP Directory Server.
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

getScheduleEntry

public ScheduleEntry getScheduleEntry(String id)
                               throws SspException,
                                      IllegalStateException,
                                      UnknownUserException,
                                      NonUniqueUserException
Get the ScheduleEntry for the Subscriber for the given date.

Parameters:
id - The unique id of the schedule entry.
Returns:
ScheuldeEntry The schedule entery for the Subscriber for the given date. Returns null if there is no schedule entery for the give date.
Throws:
SspException - If there is no schedule entry for the subscriber for the given date or if there is a failure to delete the schedule entry from the LDAP Directory Server.
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

getScheduleEntries

public ScheduleEntry[] getScheduleEntries()
                                   throws SspException,
                                          IllegalStateException,
                                          UnknownUserException
Get all schedule enteries for the Subscriber.

Returns:
ScheduleEntry[] The array of schedule enteris for the subscriber. Returns empty array if the subscriber has not schedule enteries.
Throws:
SspException - If there is no schedule entry for the subscriber for the given date or if there is a failure to delete the schedule entry from the LDAP Directory Server.
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.

getScheduleEntryEventDates

public long[] getScheduleEntryEventDates()
                                  throws SspException,
                                         IllegalStateException,
                                         UnknownUserException,
                                         NonUniqueUserException
Get list of dates for the Subscriber for the Subscriber's schedules.

Returns:
long[] The array of dates for the subscriber's schedule. Returns empty array if there are no schedules for the subscriber.
Throws:
SspException - If there is no schedule entry for the subscriber for the given date or if there is a failure to delete the schedule entry from the LDAP Directory Server.
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

getNasIp

public String getNasIp()
                throws UnknownUserException,
                       NonUniqueUserException
Returns the IP address of the router which this user is connected.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NonUniqueUserException
Since:
4.0

getInterfaceAttributeNames

public String[] getInterfaceAttributeNames()
                                    throws UnknownUserException,
                                           NonUniqueUserException
Get the names of attributes of the interface which this user is connected.

Returns:
Array of attribute names
Throws:
UnknownUserException - if the User is currently not logged in.
NonUniqueUserException
Since:
4.0

getInterfaceAttributes

public Map getInterfaceAttributes()
                           throws UnknownUserException,
                                  NonUniqueUserException
Get all attributes of the interface which this user is connected.

Returns:
Map of interface attributes
Throws:
UnknownUserException - if the User is currently not logged in.
NonUniqueUserException
Since:
4.0

isPppUser

public boolean isPppUser()
                  throws UnknownUserException,
                         NonUniqueUserException
Deprecated. This method has been deprecated. Returns true only if the user is connected via authenticated PPP.

Throws:
IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SSP.
NoneUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
NonUniqueUserException

toString

public String toString()
For debugging only. Returns a description of this User bean.

Overrides:
toString in class Object

Core API 4.3