|
Core API 7.14 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.juniper.smgt.sae.portal.Service
public class Service
This bean represents a service currently loaded into SAE from
the SAE's LDAP directory.
The current value of this bean's serviceName
property determines which loaded service this bean
represents.
If it has been set, the current value of this bean's locationName
property
determines which localized version of that loaded service this bean
represents. If you are not using localized versions of services, the
locationName
property can be safely ignored.
This bean's serviceName
property must be set before any other properties are read.
Constructor Summary | |
---|---|
Service()
The default bean constructor. |
|
Service(User user)
|
Method Summary | |
---|---|
java.lang.Object |
getAttribute(java.lang.String attributeName)
Returns the value of the named attribute from this service's entry in SAE's LDAP service directory. |
java.lang.String[] |
getAttributeNames()
Get the names of the LDAP attributes defined for this service. |
java.lang.String |
getCategory()
Returns the category of this service (e.g. |
static java.util.Set |
getDeprecatedProperties()
return a set of deprecated properties. |
java.lang.String |
getDescriptionOrServiceName()
Returns the description of this service (e.g. |
java.lang.String |
getDesignAndGraphics()
Returns the `design and graphics' string for this service (e.g. |
java.lang.String |
getDomainName()
Returns the domain name of this service (e.g. |
java.lang.String |
getLocationName()
Deprecated. Returns the location name with which this bean was initialized. The value of some Service properties will vary according to the location where the
service is used. |
long |
getMaxSessionTime()
Returns the number of seconds that the service may be active before SAE will automatically deactivate it. |
java.lang.String |
getServiceName()
Returns the service name with which this bean was initialized. |
java.lang.String |
getSessionId()
Returns the user's session ID from the user bean which this bean was initialized (e.g. |
java.lang.String |
getType()
Returns the type of this service. |
java.lang.String |
getUrl()
Returns the URL of this service (e.g. |
java.lang.String |
getUserDn()
Returns the LDAP dististinguished 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. |
boolean |
isActivateOnly()
Returns true if this service is defined as an activate only service. |
boolean |
isAuthenticationRequired()
Returns true if this service requires a subscription-specific username and password before being activated. |
boolean |
isInitialized()
Returns true only if this bean has been fully initialized. |
boolean |
isInvisible()
Returns true if the attribute category of this service is marked as invisible. |
void |
setLocationName(java.lang.String locationName)
Deprecated. Determines which localized version of the service definition will be described by all subsequent reads of this bean's properties. The value of some Service properties will vary
according to the location where the service is used. If you are using
location-specific service definitions it is critical to set
both the locationName and serviceName properties
before reading any other properties. If you are not using localized
versions of services, this property can be safely ignored.
If you are using localized
versions of services, the required location name can be obtained from an
initialized User bean. |
void |
setServiceName(java.lang.String serviceName)
Determines which service will be described by all subsequent reads of this bean's properties. |
void |
setSessionId(java.lang.String sessionId)
Setting this property specifies which user's service will be described or affected by all subsequent reads or writes of this bean's properties. |
void |
setUserDn(java.lang.String userDn)
Setting this property specifies which interface user's service will be described or affected by all subsequent reads or writes of this bean's properties. |
void |
setUserIp(java.lang.String userIp)
Setting this property specifies which user's service will be described or affected by all subsequent reads or writes of this bean's properties. |
java.lang.String |
toString()
For debugging only. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Service()
public Service(User user)
Method Detail |
---|
public void setServiceName(java.lang.String serviceName) throws UnknownServiceException
Service
properties will vary
according to the location where the service is used. If you are using location-specific
service definitions, it is critical to set both the locationName
and serviceName
properties before reading any other properties.
serviceName
- The desired service's name (e.g. "Video Gold").
UnknownServiceException
- If the service specified by the serviceName
argument is not currently loaded into SAE.setLocationName(java.lang.String)
public java.lang.String getServiceName()
java.lang.IllegalStateException
- If this bean has not been properly initialized.public void setSessionId(java.lang.String sessionId) throws UnknownUserException
sessionId
- The desired user's current session ID in string format (e.g. "jane:1113315547138:0").
UnknownUserException
- If the specified user is not currently logged in to SAE.public java.lang.String getSessionId()
java.lang.IllegalStateException
- If this bean has not been properly initialized.public void setUserIp(java.lang.String userIp) throws UnknownUserException
userIp
property has the side-effect of setting the userDn
property to null.
userIp
- The desired user's current IP address in string format (e.g. "192.168.3.34").
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.public java.lang.String getUserIp()
java.lang.IllegalStateException
- If this bean has not been properly initialized.public void setUserDn(java.lang.String userDn) throws UnknownUserException, NonUniqueUserException
userDn
property has the
side-effect of setting the userIp
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").
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.public java.lang.String getUserDn()
java.lang.IllegalStateException
- If this bean has not been properly initialized.public void setLocationName(java.lang.String locationName)
Service
properties will vary
according to the location where the service is used. If you are using
location-specific service definitions it is critical to set
both the locationName
and serviceName
properties
before reading any other properties. If you are not using localized
versions of services, this property can be safely ignored.
If you are using localized
versions of services, the required location name can be obtained from an
initialized User
bean.
locationName
- The name of the location for which the desired localized version of
this service was created.User.getLocationName()
public java.lang.String getLocationName()
Service
properties will vary according to the location where the
service is used.
public boolean isInitialized()
serviceName
property has been set.
public boolean isActivateOnly() throws UnknownServiceException, UnknownUserException, NonUniqueUserException
active
property to false.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownServiceException
- If the service is no longer loaded in SAE.
UnknownUserException
- If the specified user is not currently logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.Subscription.setSubscriptionUsername(java.lang.String)
,
Subscription.setSubscriptionPassword(java.lang.String)
,
Subscription.setActive(boolean)
public boolean isAuthenticationRequired() throws UnknownServiceException, UnknownUserException, NonUniqueUserException
Subscription
bean's subscriptionUsername
and
subscriptionPassword
properties. After these properties are set, the subscription
can be activated by setting its active
property to true.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownServiceException
- If the service is no longer loaded in SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownUserException
Subscription.setSubscriptionUsername(java.lang.String)
,
Subscription.setSubscriptionPassword(java.lang.String)
,
Subscription.setActive(boolean)
public boolean isInvisible() throws UnknownServiceException, UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownServiceException
- If the service is no longer loaded in SAE.
UnknownUserException
- If the specified user is not currently logged in to SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.Subscription.setSubscriptionUsername(java.lang.String)
,
Subscription.setSubscriptionPassword(java.lang.String)
,
Subscription.setActive(boolean)
public java.lang.String getType() throws UnknownServiceException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownServiceException
- If the service is no longer loaded in SAE.public long getMaxSessionTime() throws UnknownServiceException, UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownServiceException
- If the service is no longer loaded in SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownUserException
public java.lang.String getDescriptionOrServiceName() throws UnknownServiceException, UnknownUserException, NonUniqueUserException
serviceName
property
instead.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownServiceException
- If the service is no longer loaded in SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownUserException
public java.lang.String getUrl() throws UnknownServiceException, UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownServiceException
- If the service is no longer loaded in SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownUserException
public java.lang.String getDomainName() throws UnknownServiceException, UnknownUserException, NonUniqueUserException
Subscription
bean's subscriptionUsername
property
for the purposes of authentication only.
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownServiceException
- If the service is no longer loaded in SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownUserException
Subscription.setSubscriptionUsername(java.lang.String)
,
Subscription.setActive(boolean)
public java.lang.String getDesignAndGraphics() throws UnknownServiceException, UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownServiceException
- If the service is no longer loaded in SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownUserException
public java.lang.String getCategory() throws UnknownServiceException, UnknownUserException, NonUniqueUserException
java.lang.IllegalStateException
- If this bean has not been properly initialized.
UnknownServiceException
- If the service is no longer loaded in SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownUserException
public java.lang.Object getAttribute(java.lang.String attributeName) throws UnknownServiceException, UnknownUserException, NonUniqueUserException
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.
java.lang.IllegalStateException
- If this bean's mandatory serviceName
property has not been set.
UnknownServiceException
- If the service is no longer loaded in SAE.
NonUniqueUserException
- If the user specified by this bean's userDn
property is logged in more than once.
UnknownUserException
public java.lang.String[] getAttributeNames() throws UnknownServiceException
UnknownServiceException
- If the service is no longer loaded in SAE.public java.lang.String toString()
Service
bean.
toString
in class java.lang.Object
public static java.util.Set getDeprecatedProperties()
|
Core API 7.14 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |