Esri Geoportal Server
1.0

com.esri.gpt.sdisuite
Class SampleIntegrationContext

java.lang.Object
  extended by com.esri.gpt.sdisuite.IntegrationContext
      extended by com.esri.gpt.sdisuite.SampleIntegrationContext

public class SampleIntegrationContext
extends IntegrationContext

Sample implementation of an integration context.


Constructor Summary
SampleIntegrationContext()
          Default constructor
 
Method Summary
 IntegrationResponse checkUrl(String url, User user, String username, String password, String licenseReturnUrl)
          methods =================================================================
 void ensureToken(User user)
          Ensure that the active user has a valid SAML token.
 String getBase64EncodedToken(User user)
          Base64 encodes the SAML token associated with the active user.
 String getLicenseId(String licenseReference)
          Gets the license id associated with a license reference.
 String getUsernameFromSAMLToken(String samlToken)
          Gets the username encoded within a SAML token.
 void initializeUser(User user)
          Provides an opportunity to initialize additional user properties.
 void shutdown()
          Executed on web-app shutdown.
 
Methods inherited from class com.esri.gpt.sdisuite.IntegrationContext
getConfig, setConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleIntegrationContext

public SampleIntegrationContext()
Default constructor

Method Detail

checkUrl

public IntegrationResponse checkUrl(String url,
                                    User user,
                                    String username,
                                    String password,
                                    String licenseReturnUrl)
                             throws NotAuthorizedException,
                                    Exception
methods =================================================================

Specified by:
checkUrl in class IntegrationContext
Parameters:
url - the URL
user - the active user
username - the username
password - the password
licenseReturnUrl - the return URL (called following license negotiation)
Returns:
the integration response
Throws:
NotAuthorizedException - if authorization for the supplied URL was denied
Exception - if a processing exception occurs

ensureToken

public void ensureToken(User user)
                 throws Exception
Description copied from class: IntegrationContext
Ensure that the active user has a valid SAML token.
This would typically be called following login.

Specified by:
ensureToken in class IntegrationContext
Parameters:
user - the active user
Throws:
Exception - if an exception occurs

getBase64EncodedToken

public String getBase64EncodedToken(User user)
                             throws Exception
Description copied from class: IntegrationContext
Base64 encodes the SAML token associated with the active user.
This would typically be called prior to launching an sdi.suite component.

Specified by:
getBase64EncodedToken in class IntegrationContext
Parameters:
user - the active user
Throws:
Exception - if an exception occurs

getLicenseId

public String getLicenseId(String licenseReference)
                    throws Exception
Description copied from class: IntegrationContext
Gets the license id associated with a license reference.

Overrides:
getLicenseId in class IntegrationContext
Parameters:
licenseReference - the license reference
Returns:
the license id
Throws:
Exception - if an exception occurs

getUsernameFromSAMLToken

public String getUsernameFromSAMLToken(String samlToken)
                                throws Exception
Description copied from class: IntegrationContext
Gets the username encoded within a SAML token.
This would typically be called when an external client executes a Geoportal request (e.g. when the smart editor saves, a SAML token is passed as part of the SOAP request)

Specified by:
getUsernameFromSAMLToken in class IntegrationContext
Parameters:
samlToken - the SAML token
Throws:
Exception - if an exception occurs

initializeUser

public void initializeUser(User user)
                    throws Exception
Description copied from class: IntegrationContext
Provides an opportunity to initialize additional user properties.
Called following login (?? following authentication ?? prior to ??).

Specified by:
initializeUser in class IntegrationContext
Parameters:
user - the active user
Throws:
Exception - if an exception occurs

shutdown

public void shutdown()
              throws Exception
Description copied from class: IntegrationContext
Executed on web-app shutdown.

Specified by:
shutdown in class IntegrationContext
Throws:
Exception - if an exception occurs

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.