Core API 7.8

net.juniper.smgt.sae.portal
Class User

java.lang.Object
  extended by net.juniper.smgt.sae.portal.User

public class User
extends java.lang.Object

This bean represents a user currently logged in to SAE. The current value of any of this bean's userIp property or its userDn property or its sessionId property determines which logged in user this bean represents. This bean's userIp or userDn or sessionId 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 SAE in response to an E-series router interface coming up (except for most authenticated PPP interfaces).


Constructor Summary
User()
          The default bean constructor.
 
Method Summary
 void addScheduleEntry(ScheduleEntry aSE)
          Adds a ScheuldeEntry for the Subscriber.
 java.lang.String[] addSubscription(java.lang.String serviceName, java.lang.String userName, java.lang.String password)
          Subscribes the currently logged in user to the service specified by serviceName.
 java.lang.String[] addSubscription(java.lang.String serviceName, java.lang.String userName, java.lang.String password, java.util.Map attributes)
          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(java.lang.String id)
          Delete the ScheduleEntry for the Subscriber for the given date.
 java.lang.String[] deleteSubscription(java.lang.String serviceName, java.lang.String userName, java.lang.String password)
          Unsubscribes the currently logged in user from the service specified by serviceName.
 void disconnect()
          Disconnects a user from the SAE.
 java.lang.String[] getActiveSubscriptionNames()
          Returns the name of every service that is currently activated for this user.
 java.lang.Object getAttribute(java.lang.String attributeName)
          Returns the value of the named attribute from this user's entry in SAE's LDAP user directory.
 java.lang.String[] getAttributeNames()
          Get the names of the LDAP attributes defined for the profile of the current user.
 java.util.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).
 java.lang.String getAutoSubscriptions()
          Returns subscriptions to be activated on login, set by RADIUS auth plugin.
 java.lang.String[] getAvailableServiceNames()
          Returns the names of every service currently available for this user session
 java.lang.String[] getAvailableSubscriptionNames()
          Returns the name of every service that is currently available to this user.
 java.lang.String getCallingStationId()
          Returns the Calling-Station-Id associated with the primary interface of the subscriber
 java.lang.String[] getDelegatedIpv6Prefix()
          Returns the delegated IPv6 prefixes of the subscriber in the form "xxxx::/len"
static java.util.Set getDeprecatedProperties()
          return a set of deprecated properties.
 DhcpPacket getDhcpPacket()
          Return information about DHCP request.
 java.lang.String getFramedIpv6Prefix()
          Return the IPv6 prefix of the subscriber in the form "xxxx::/len"
 java.lang.String[] getInterfaceAttributeNames()
          Get the names of attributes of the interface which this user is connected.
 java.util.Map getInterfaceAttributes()
          Get all attributes of the interface which this user is connected.
 java.lang.String getIntfAlias()
          Returns the alias of the router interface to which this user is connected, as it is configured in the E-series router.
 java.lang.String getIntfName()
          Returns the name of the router interface to which this user is connected.
 java.lang.String getLoadSubscriptions()
          Returns the filter for "loaded" subscriptions, set by RADIUS auth plugin.
 java.util.Map getLocalQosProfiles()
          Get a map of local profiles.
 java.lang.String getLocationName()
          Return's the name of the user's current location.
 java.lang.String getLoginDomain()
          Returns this user's login domain (e.g.
 java.lang.String getLoginId()
          Returns this user's login ID (e.g.
 java.util.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.
 java.lang.String getMacAddress()
          Returns the user's MAC address as a string (e.g.
 java.lang.String getName()
          Returns this user's full name (e.g.
 java.lang.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.
 java.lang.String[] getPersonalSubscriptionNames()
          Returns the name of every service to which this user is personally subscribed.
 java.lang.String getPrimaryUserName()
          Return the primary user name of this User Session.
 java.util.Set getProperties()
          Deprecated. use getPropertyMap instead
 java.util.Map getPropertyMap()
          Get a map of user session properties.
 java.lang.String getPublicDhcpUserName()
          Deprecated. Use getPrimaryUserName instead
 java.lang.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 SAE.
 java.lang.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(java.lang.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.
 java.lang.String[] getScheduleEntryIds()
          Get list of ids for the Subscriber for the Subscriber's schedules.
 java.util.List getScopes()
          Return a list of the DN of the user's current scopes dn sorted by scope's precedence and seperated by "\n".
 java.lang.String getServiceBundle()
          Returns service bundle attribute from authorization plug-ins.
 java.lang.String getSessionHandle()
          Returns this user's session handle (e.g.
 java.lang.String getSessionId()
          Returns this user's session ID (e.g.
 java.lang.String getSspPassword()
          Returns the password attribute from this user's profile in LDAP, exactly as it is stored in the SAE's LDAP directory (i.e.
 java.lang.String[] getSubscriptionAndServiceSessionNames()
          Returns the name of every service to which this user is subscribed to and the name of subscriptions of active service sessions to which this user is not subscribed to but has an active session (i.e. fragment session from an aggregate service session).
 java.lang.String[] getSubscriptionNames()
          Returns the name of every service to which this user is subscribed.
 java.lang.String getUserDn()
          Returns the LDAP distinguished name with which this bean was initialized (e.g.
 java.lang.String getUserIp()
          Returns the IP address with which this bean was initialized (e.g.
 net.juniper.smgt.sae.session.UserSession getUserSession()
          Returns the UserSession object that this bean has been initialized to provide access to.
 java.lang.String getVirtualRouterName()
          Return the virtual router name with which this bean was initialized.
 java.lang.String getVpnId()
           
 java.lang.String getVrName()
          Returns the name of the virtual router to which this user is connected.
 void grantPublicIp(java.lang.String loginName, java.lang.String password)
          Assigns a public IP address to the specified user.
 void grantPublicIp(java.lang.String loginName, java.lang.String password, DhcpProfile dhcpProfile)
          Assigns a public IP address to the specified user.
 boolean isAddressUser()
          Returns true only if the user is connected via DHCP.
 boolean isAnonymous()
          Returns true if the user is anonymous.
 boolean isInitialized()
          Returns true only if this bean has been fully initialized.
 boolean isIspServiceActive()
          Deprecated. ISP services are no longer supported
 boolean isPppUser()
          Deprecated. This method has been deprecated. Returns true only if the user is connected via authenticated PPP.
 boolean isPublicDhcpUser()
          Deprecated. Use isAddressUser and getPrimaryUserName instead
 boolean isTokenDhcpUser()
          Deprecated. Use isAddressUser and getPrimaryUserName instead
 boolean isUnauthenticated()
          Returns true only if the user is unauthenticated.
 boolean login(java.lang.String loginName, java.lang.String password)
          Logs a user into SAE.
 void logout()
          Logs a user out of SAE.
 void revokePublicIp()
          Revokes the public IP address held by the specified user.
 void setProperty(java.lang.String aProperty)
          The setProperty() method sets the property attribute of the subscriber session.
 void setSessionId(java.lang.String sessionId)
          Determines which user will be described or affected by all subsequent calls to this bean's methods.
 void setSessionTimeout(int timeout)
          Set the Session Timeout for the current user session.
 void setTimeStamp(long timeStamp)
          Set the time stamp.
 void setUserDn(java.lang.String userDn)
          Determines which interface user will be described or affected by all subsequent calls to this bean's methods.
 void setUserIp(java.lang.String userIp)
          Determines which user will be described or affected by all subsequent calls to this bean's methods.
 void setVirtualRouterName(java.lang.String aVr)
          Set the virtual router name.
 java.lang.String toString()
          For debugging only.
 void updatedScheduleEntry(java.lang.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(java.lang.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:
java.lang.IllegalArgumentException - If the userIp string does not contain a parseable IP address.
UnknownUserException - If the specified user is not currently logged in to SAE. In some cases, such as with some interface users (e.g. some static IP users), SAE 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 SAE. 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, SAE 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.

Throws:
UnknownUserException

getUserIp

public java.lang.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.

setUserDn

public void setUserDn(java.lang.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:
java.lang.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 SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
3.0

getUserDn

public java.lang.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 or with a session ID.

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 SAE. 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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
Since:
3.0

setSessionId

public void setSessionId(java.lang.String sessionId)
                  throws UnknownUserException
Determines which user will be described or affected by all subsequent calls to this bean's methods.

Parameters:
sessionId - The desired user's current session ID in string format (e.g. "jane:1113315547138:0").
Throws:
UnknownUserException - If the specified user is not currently logged in to SAE.
Since:
6.2.0

getSessionId

public java.lang.String getSessionId()
Returns this user's session ID (e.g. "jane:1113315547138:0").

Throws:
java.lang.IllegalStateException - If this bean has not been properly initialized.
Since:
6.2.0

setVirtualRouterName

public void setVirtualRouterName(java.lang.String aVr)
Set the virtual router name.

Since:
6.2.0

getVirtualRouterName

public java.lang.String getVirtualRouterName()
Return the virtual router name with which this bean was initialized.

Since:
6.2.0

isInitialized

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


getName

public java.lang.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 SAE's LDAP directory.

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

getLoginTime

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

Throws:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
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,
                                   java.lang.IllegalStateException
Returns the time in seconds that remain before this user will be automatically logged out from SAE.

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

getLoginId

public java.lang.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getLoginDomain

public java.lang.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getSspPassword

public java.lang.String getSspPassword()
                                throws UnknownUserException,
                                       NonUniqueUserException
Returns the password attribute from this user's profile in LDAP, exactly as it is stored in the SAE'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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getLocationName

public java.lang.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 SAE, this property is identical to the vrName property.

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

getScopes

public java.util.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getVrName

public java.lang.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getIntfName

public java.lang.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getIntfAlias

public java.lang.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
3.0

getLoadSubscriptions

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

Throws:
UnknownUserException
NonUniqueUserException
Since:
4.1

getAutoSubscriptions

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

Throws:
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 SAE 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 SAE 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 SAE's user classification script, DHCP users can be assigned a copy of the unauthenticated user profile when they first obtain an IP address.

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

getAuthDeniedReasons

public java.util.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
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 SAE with an anonymous user profile. An anonymous user profile is an otherwise normal user profile that is marked as anonymous in SAE'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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

isAddressUser

public boolean isAddressUser()
                      throws UnknownUserException,
                             NonUniqueUserException
Returns true only if the user is connected via DHCP.

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

isTokenDhcpUser

public boolean isTokenDhcpUser()
                        throws UnknownUserException,
                               NonUniqueUserException
Deprecated. Use isAddressUser and getPrimaryUserName instead

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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

isPublicDhcpUser

public boolean isPublicDhcpUser()
                         throws UnknownUserException,
                                NonUniqueUserException
Deprecated. Use isAddressUser and getPrimaryUserName instead

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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getPublicDhcpUserName

public java.lang.String getPublicDhcpUserName()
                                       throws UnknownUserException,
                                              NonUniqueUserException
Deprecated. Use getPrimaryUserName instead

Returns the user name that was passed from SAE 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 grantPublicIp method, or the Ssp.registerEquipment method. This user name is of the form "userName@domainName".

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

getPrimaryUserName

public java.lang.String getPrimaryUserName()
                                    throws UnknownUserException,
                                           NonUniqueUserException
Return the primary user name of this User Session. The primary user name is the name that was used to authenticate the transport interface of the user. for example if the user session is an authenticated PPP session, the primary user name is the PPP login name of the user. The user can login or logout using the portal API, which will change the LoginName of the session, but the primary user name will always stay the same.

Returns:
the name of the authenticated interface or DHCP address that was used to originally establish the session. Returns an empty string, if the primary login was unauthenticated.
Throws:
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getMacAddress

public java.lang.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

isIspServiceActive

public boolean isIspServiceActive()
                           throws UnknownUserException,
                                  NonUniqueUserException
Deprecated. ISP services are no longer supported

Obsolete method. Do not use.

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

getSubscriptionNames

public java.lang.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
See Also:
Subscription, getPersonalSubscriptionNames()

getSubscriptionAndServiceSessionNames

public java.lang.String[] getSubscriptionAndServiceSessionNames()
                                                         throws UnknownUserException,
                                                                NonUniqueUserException
Returns the name of every service to which this user is subscribed to and the name of subscriptions of active service sessions to which this user is not subscribed to but has an active session (i.e. fragment session from an aggregate service session). 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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getPersonalSubscriptionNames

public java.lang.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
3.0
See Also:
Subscription, getSubscriptionNames()

getAvailableSubscriptionNames

public java.lang.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. These names can be used to initialize the serviceName property of a Subscription bean.

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

getAvailableServiceNames

public java.lang.String[] getAvailableServiceNames()
                                            throws UnknownUserException,
                                                   NonUniqueUserException
Returns the names of every service currently available for this user session

Returns:
Each String in the returned array is the name of an available service.
Throws:
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
5.0

getActiveSubscriptionNames

public java.lang.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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
See Also:
Subscription.setActive(boolean)

getAttribute

public java.lang.Object getAttribute(java.lang.String attributeName)
                              throws UnknownUserException,
                                     NonUniqueUserException
Returns the value of the named attribute from this user's entry in SAE'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 SAE's LDAP user directory does not contain an attribute with the specified name.
Throws:
java.lang.IllegalStateException - If this bean's mandatory userIp or userDn property has not been set.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
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 SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
4.0

addSubscription

public java.lang.String[] addSubscription(java.lang.String serviceName,
                                          java.lang.String userName,
                                          java.lang.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 SAE'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:
java.lang.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 SAE.
NonUniqueUserException - 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 SAE.
ServiceAuthenticationException - If any subscription plug-in denies the subscription, or if the service serviceName is not currently available for subscription, or if the user is anonymous.
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.
Since:
4.0
See Also:
deleteSubscription(java.lang.String, java.lang.String, java.lang.String)

addSubscription

public java.lang.String[] addSubscription(java.lang.String serviceName,
                                          java.lang.String userName,
                                          java.lang.String password,
                                          java.util.Map attributes)
                                   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 SAE'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:
java.lang.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 SAE.
NonUniqueUserException - 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 SAE.
ServiceAuthenticationException - If any subscription plug-in denies the subscription, or if the service serviceName is not currently available for subscription, or if the user is anonymous.
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.
Since:
7.0
See Also:
deleteSubscription(java.lang.String, java.lang.String, java.lang.String)

deleteSubscription

public java.lang.String[] deleteSubscription(java.lang.String serviceName,
                                             java.lang.String userName,
                                             java.lang.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 SAE'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:
userIp - The user's current IP address (e.g. "192.168.34.4").
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:
java.lang.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 SAE.
NonUniqueUserException - 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 SAE.
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, or if the user is anonymous.
SspException - If failed to mark the subscription's attribute DELETED as true on its LDAP directory.
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:
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
UnknownUserException
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 SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
4.1

getServiceBundle

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

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

getCallingStationId

public java.lang.String getCallingStationId()
                                     throws UnknownUserException,
                                            NonUniqueUserException
Returns the Calling-Station-Id associated with the primary interface of the subscriber

Throws:
UnknownUserException
NonUniqueUserException

getRadiusClass

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

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

getAttributeNames

public java.lang.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.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
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.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
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.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
4.0

getReplyMessages

public java.lang.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.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

updatedScheduleEntry

public void updatedScheduleEntry(java.lang.String id,
                                 ScheduledTime aScheduleTime,
                                 Action[] aActions)
                          throws SspException,
                                 java.lang.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.
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
4.1

deleteScheduleEntry

public void deleteScheduleEntry(java.lang.String id)
                         throws SspException,
                                java.lang.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.
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
4.1
See Also:
deleteScheduleEntry(String id)

getScheduleEntryIds

public java.lang.String[] getScheduleEntryIds()
                                       throws SspException,
                                              java.lang.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.
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

addScheduleEntry

public void addScheduleEntry(ScheduleEntry aSE)
                      throws SspException,
                             java.lang.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.
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

updatedScheduleEntryActions

public void updatedScheduleEntryActions(long date,
                                        Action[] aActions)
                                 throws SspException,
                                        java.lang.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.
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

deleteScheduleEntry

public void deleteScheduleEntry(long date)
                         throws SspException,
                                java.lang.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.
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
See Also:
deleteScheduleEntry(String id)

getScheduleEntry

public ScheduleEntry getScheduleEntry(long date)
                               throws SspException,
                                      java.lang.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.
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getScheduleEntry

public ScheduleEntry getScheduleEntry(java.lang.String id)
                               throws SspException,
                                      java.lang.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.
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getScheduleEntries

public ScheduleEntry[] getScheduleEntries()
                                   throws SspException,
                                          java.lang.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.
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.

getScheduleEntryEventDates

public long[] getScheduleEntryEventDates()
                                  throws SspException,
                                         java.lang.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.
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

getNasIp

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

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

getInterfaceAttributeNames

public java.lang.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 java.util.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

getProperties

public java.util.Set getProperties()
                            throws UnknownUserException,
                                   NonUniqueUserException
Deprecated. use getPropertyMap instead

Get the user session properties. The user session properties are arbitrary strings that are persistently stored in the user session. The properties can be set by an authorization plug-in and are formatted as "key=value".

Returns:
Set of session properties
Throws:
UnknownUserException - if the User is currently not logged in.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
6.0

getPropertyMap

public java.util.Map getPropertyMap()
                             throws UnknownUserException,
                                    NonUniqueUserException
Get a map of user session properties. The user session properties are arbitary strins that are persistently stored in the user session. The properties can be set by an authorization plug-in.

Returns:
Map of session properties
Throws:
UnknownUserException - if the User is currently not logged in.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
7.6

login

public boolean login(java.lang.String loginName,
                     java.lang.String password)
              throws LoginException
Logs a user into SAE. This method will load the user profile specified by loginName from the SAE's LDAP directory, and assign it to the user. The new user profile will replace the user's current user profile. The new user profile is selected by the SAE's user classification script based on the loginName provided here.
  

Returns:
false. \b NOTE: The return value has not been used since version 4.2.
Throws:
java.lang.IllegalArgumentException - If the loginName string is null or zero-length, or if the password string is null.
LoginException - If the login fails for any reason. A login will fail if an invalid username and/or password are supplied. A login may also fail for other reasons, such as a network connectivity problem between SAE and the LDAP directory. (To aid in diagnosing repeated login failures, the LoginException contains an English language message explaining the failure. This message is not suitable for presentation to end users on a web page.)
Since:
6.2.0

logout

public void logout()
            throws UnknownUserException,
                   SspException
Logs a user out of SAE. This method will load the unauthenticated user profile from the SAE's LDAP directory, and assign it to the user as a replacement for his or her current user profile. All the user's subscriptions will be stopped as part of the logout process.
  

Throws:
UnknownUserException - If the user is no longer logged in to SAE.
SspException - If this operation fails due to an unexpected error condition in SAE or in an external system upon which SAE depends (e.g. an LDAP directory, a RADIUS server, an E-series router, etc.).
Since:
6.2.0

disconnect

public void disconnect()
                throws UnknownUserException,
                       NonUniqueUserException,
                       UnsupportedException,
                       SspException
Disconnects a user from the SAE. The SAE will try to disconnect the primary user session for this user, if the router driver supports it.
  

Throws:
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
UnsupportedException - If the router driver does not support the disconnect operation.
SspException - If this operation fails due to an unexpected error condition in SAE or in an external system upon which SAE depends (e.g. an LDAP directory, a RADIUS server, an E-series router, etc.).
Since:
callisto

grantPublicIp

public void grantPublicIp(java.lang.String loginName,
                          java.lang.String password)
                   throws UnknownUserException,
                          ServiceAuthenticationException,
                          SspException
Assigns a public IP address to the specified user. The loginName and password parameters will immediately be sent to the E-series router, which will authenticate them against a RADIUS server. The E-series requires that the loginName contain an "@" character followed by a domain name. If the authentication succeeds, the user's 'token' IP address lease will no longer be renewed. Once the 'token' IP address lease expires, the user will be assigned a new public IP address. Depending on the E-series router's configuration, this public IP address may come from a pool of IP addresses that is associated with the domain name found inside the loginName parameter (i.e. everything after the '@' character),
   Every time a user's IP address changes, he is logged out of SAE and then logged back into SAE. This means all his active subscriptions will be deactivated, and then all his ACTIVATE_ON_LOGIN subscriptions will be activated.
   Note that this operation is not permanent. The next time the user's client device requests a new IP address via DHCP it will receive a token IP address rather than a public IP address. Use the registerEquipment method to always assign a public IP address to a client device every time it requests a new IP address via DHCP.

Parameters:
loginName - The login name to be authenticated via RADIUS before the new public IP address is granted (e.g. "jsmith@isp3.com"). Leading and trailing whitespace are automatically trimmed from this String.
password - The clear text password to be authenticated via RADIUS before the new public IP address is granted. Leading and trailing whitespace are automatically trimmed from this String.
Throws:
java.lang.IllegalArgumentException - If there is no user ID followed by an "@" character followed by a domain name (e.g. "jsmith@isp3.com") in the loginName string, or if the password string is null.
java.lang.IllegalStateException - If the user specified by this bean is not currently a token DHCP user.
ServiceAuthenticationException - If authentication of the loginName and password fails.
SspException - If this operation fails due to an unexpected error condition in SAE or in an external system upon which SAE depends (e.g. an LDAP directory, a RADIUS server, an E-series router, etc.). This includes the case where the specified login name and password can not be authenticated by the E-series router.
UnknownUserException - If the user is not currently logged in to SAE.
Since:
6.2.0

grantPublicIp

public void grantPublicIp(java.lang.String loginName,
                          java.lang.String password,
                          DhcpProfile dhcpProfile)
                   throws UnknownUserException,
                          ServiceAuthenticationException,
                          SspException
Assigns a public IP address to the specified user. The loginName and password parameters will be authenticated and if authentication was successful the dhcpProfile will be used to assign the new address.
   Every time a user's IP address changes, he is logged out of SAE and then logged back into SAE. This means all his active subscriptions will be deactivated, and then all his ACTIVATE_ON_LOGIN subscriptions will be activated.
   Note that this operation is not permanent. The next time the user's client device requests a new IP address via DHCP it will receive a token IP address rather than a public IP address. Use the registerEquipment method to always assign a public IP address to a client device every time it requests a new IP address via DHCP.

Parameters:
loginName - The login name to be authenticated before the new public IP address is granted (e.g. "jsmith@isp3.com"). Leading and trailing whitespace are automatically trimmed from this String.
password - The clear text password to be authenticated via RADIUS before the new public IP address is granted. Leading and trailing whitespace are automatically trimmed from this String.
dhcpProfile - additional data used to modify the DHCP offer sent to the user. Note: not all versions of JUNOSe honor the data contained in the dhcpProfile, please check your JUNOSe documenation for details.
Throws:
ServiceAuthenticationException - If authentication of the loginName and password fails.
SspException - If this operation fails due to an unexpected error condition in SAE or in an external system upon which SAE depends (e.g. an LDAP directory, a RADIUS server, an E-series router, etc.). This includes the case where the specified login name and password can not be authenticated by the E-series router.
UnknownUserException - If the user specified by this bean is not currently logged in to SAE.
Since:
6.2.0
See Also:
grantPublicIp(String, String), Ssp.registerEquipment(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

revokePublicIp

public void revokePublicIp()
                    throws UnknownUserException,
                           NonUniqueUserException,
                           SspException
Revokes the public IP address held by the specified user. The user's public IP address lease will no longer be renewed. Once the public IP address lease expires, the user will be assigned a new 'token' IP address.
   Every time a user's IP address changes, he is logged out of SAE and then logged back into SAE. This means all his active subscriptions will be deactivated, and then all his ACTIVATE_ON_LOGIN subscriptions will be activated.

Throws:
UnknownUserException - If the user specified by this bean is not currently logged in to SAE.
SspException - If this operation fails due to an unexpected error condition in SAE or in an external system upon which SAE depends (e.g. an LDAP directory, a RADIUS server, an E-series router, etc.).
NonUniqueUserException
Since:
6.2.0
See Also:
grantPublicIp(java.lang.String, java.lang.String)

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:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException - If the user is no longer logged in to SAE.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.

toString

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

Overrides:
toString in class java.lang.Object

getUserSession

public net.juniper.smgt.sae.session.UserSession getUserSession()
                                                        throws UnknownUserException,
                                                               NonUniqueUserException
Returns the UserSession object that this bean has been initialized to provide access to.

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

getDeprecatedProperties

public static java.util.Set getDeprecatedProperties()
return a set of deprecated properties.


getSessionHandle

public java.lang.String getSessionHandle()
                                  throws UnknownUserException,
                                         NonUniqueUserException
Returns this user's session handle (e.g. "SAE:jane:1113315547138:0@vr1").

Throws:
java.lang.IllegalStateException - If this bean has not been properly initialized.
UnknownUserException
NonUniqueUserException
Since:
Ale

getVpnId

public java.lang.String getVpnId()
                          throws UnknownUserException,
                                 NonUniqueUserException
Throws:
IllegalStateExeption - if this bean has not been properly initialized.
UnknownUserException - if the user is not currently logged in
NonUniqueUserException - if the user is not uniquely identified
Since:
SRC-4.0.0

getLocalQosProfiles

public java.util.Map getLocalQosProfiles()
                                  throws UnknownUserException,
                                         NonUniqueUserException
Get a map of local profiles.

Returns:
Map of local profiles. key is the profile layer and value is the profile name.
Throws:
UnknownUserException - if the User is currently not logged in.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
7.6

setProperty

public void setProperty(java.lang.String aProperty)
                 throws UnknownUserException,
                        NonUniqueUserException
The setProperty() method sets the property attribute of the subscriber session. NOTE: Setting properties does not cause subscriber reclassification.

Parameters:
aProperty - is typically in = format.
Throws:
UnknownUserException - if the User is currently not logged in.
NonUniqueUserException - If the user specified by this bean's userDn property is logged in more than once.
Since:
7.6

getFramedIpv6Prefix

public java.lang.String getFramedIpv6Prefix()
                                     throws UnknownUserException,
                                            NonUniqueUserException
Return the IPv6 prefix of the subscriber in the form "xxxx::/len"

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

getDelegatedIpv6Prefix

public java.lang.String[] getDelegatedIpv6Prefix()
                                          throws UnknownUserException,
                                                 NonUniqueUserException
Returns the delegated IPv6 prefixes of the subscriber in the form "xxxx::/len"

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

Core API 7.8