Class PortalClientContext

java.lang.Object
com.webmethods.caf.portalclient.PortalClientContext
All Implemented Interfaces:
Serializable

public class PortalClientContext extends Object implements Serializable
See Also:
  • Field Details

    • m_portalEndpoint

      protected String m_portalEndpoint
      The MWS endpoint this context will connect to
    • m_authCredentials

      protected AuthCredentials m_authCredentials
      The authentication credentials to connect to MWS with
    • m_inProc

      protected boolean m_inProc
      Is this context running within the same MWS process that the endpoint is referencing
    • m_isAuthenticated

      protected boolean m_isAuthenticated
      Is this context connected and authenticated with the target MWS
    • m_remoteVMID

      protected String m_remoteVMID
      The VMID of the remote MWS process instance
    • m_enableInprocCheck

      protected boolean m_enableInprocCheck
      Is the in-process check enabled for this context
  • Constructor Details

    • PortalClientContext

      public PortalClientContext()
      Default constructor
    • PortalClientContext

      public PortalClientContext(String portalServerURL)
      Create a new instance for a MWS frontend URL
      Parameters:
      portalServerURL - the MWS frontend URL (e.g. http://localhost:8585)
    • PortalClientContext

      public PortalClientContext(String portalServerURL, AuthCredentials authCred)
      Create a new instance for a MWS frontend URL
      Parameters:
      portalServerURL - the MWS frontend URL (e.g. http://localhost:8585)
      authCred - the MWS authentication credentials
    • PortalClientContext

      public PortalClientContext(String portalServerURL, AuthCredentials authCred, boolean enableInprocCheck)
      Create a new client context instance for a MWS frontend URL
      Parameters:
      portalServerURL - the MWS frontend URL (e.g. http://localhost:8585)
      authCred - the MWS authentication credentials
      enableInprocCheck - true to enable check that PortalClient is not running with the target MWS runtime
  • Method Details

    • getPortalServerURL

      public String getPortalServerURL()
      Get the MWS server endpoint URL for this client context
      Returns:
      the MWS server endpoint URL as a string
    • getAuthCredentials

      public AuthCredentials getAuthCredentials()
      Get the AuthCredentials object used to authenticate the MWS session
      Returns:
      the AuthCredentials used to authenticate the MWS session
    • isInProc

      public boolean isInProc()
      Is this PortalClientContext running in the same process as the endpoint it is connected to?
      Returns:
      true if running in the same MWS runtime as the endpoint, otherwise false
    • isAuthenticated

      public boolean isAuthenticated()
      Is this client context successfully connected and authenticated with MWS
      Returns:
    • getPortType

      public IWSClientProxy getPortType(AuthCredentials authCredentials, Class clazz, boolean useCache)
      Factory function to simplify getting references to the various port types exposed by the portalclient API
      Parameters:
      authCredentials - the authentication credentials to connect to MWS with
      clazz - the web service interface class to proxy
      useCache - enable caching of web service results
      Returns:
      A IWSClientProxy that proxies the web service interface class
    • getEndpoint

      protected String getEndpoint(String serviceEndpoint)
      Construct a MWS service endpoint. This prepends the provided service endpoint with the MWS frontend URL this context is connected with.
      Parameters:
      serviceEndpoint - the relative web service endpoint path
      Returns:
      return the fully qualified web service endpoint
    • getIdirectorySystemPortType

      public IdirectorySystemPortType getIdirectorySystemPortType(AuthCredentials authCredentials) throws WSClientException
      Get the IdirectorySystemPortType interface for invoking directory web services using this client context.
      Parameters:
      authCredentials - the credentials to authenticate against MWS with, may be null
      Returns:
      the web service port type
      Throws:
      WSClientException
    • getIdirectoryServicePortType

      public IdirectoryServicePortType getIdirectoryServicePortType(AuthCredentials authCredentials) throws WSClientException
      Get the IdirectoryServicePortType interface for invoking directory web services using this client context
      Parameters:
      authCredentials - the credentials to authenticate against MWS with, may be null
      Returns:
      the web service port type
      Throws:
      WSClientException
    • getIprincipalPortType

      public IprincipalPortType getIprincipalPortType(AuthCredentials authCredentials) throws WSClientException
      Get the IprincipalPortType interface for invoking directory principal services using this client context
      Parameters:
      authCredentials - the credentials to authenticate against MWS with, may be null
      Returns:
      the web service port type
      Throws:
      WSClientException
    • getIprincipalAttributePortType

      public IprincipalAttributePortType getIprincipalAttributePortType(AuthCredentials authCredentials) throws WSClientException
      Get the IprincipalAttributePortType interface for invoking directory principal attributes services using this client context
      Parameters:
      authCredentials - the credentials to authenticate against MWS with, may be null
      Returns:
      the web service port type
      Throws:
      WSClientException
    • getIuserPortType

      public IuserPortType getIuserPortType(AuthCredentials authCredentials) throws WSClientException
      Get the getIuserPortType interface for invoking user services using this client context
      Parameters:
      authCredentials - the credentials to authenticate against MWS with, may be null
      Returns:
      the web service port type
      Throws:
      WSClientException
    • getIaccessPortType

      public IaccessPortType getIaccessPortType(AuthCredentials authCredentials) throws WSClientException
      Get the IaccessPortType interface for invoking access control services using this client context
      Parameters:
      authCredentials - the credentials to authenticate against MWS with, may be null
      Returns:
      the web service port type
      Throws:
      WSClientException
    • getIbasicPortType

      public IbasicPortType getIbasicPortType(AuthCredentials authCredentials) throws WSClientException
      Get the getIbasicPortType interface for invoking basic services using this client context
      Parameters:
      authCredentials - the credentials to authenticate against MWS with, may be null
      Returns:
      the web service port type
      Throws:
      WSClientException
    • getItaskPortType

      public ItaskPortType getItaskPortType(AuthCredentials authCredentials) throws WSClientException
      Get the ItaskPortType interface for invoking MWS task services using this client context
      Parameters:
      authCredentials - the credentials to authenticate against MWS with, may be null
      Returns:
      the web service port type
      Throws:
      WSClientException
    • getIaliasPortType

      public IaliasPortType getIaliasPortType(AuthCredentials authCredentials) throws WSClientException
      Get the IaliasPortType interface for invoking MWS alias services using this client context
      Parameters:
      authCredentials - the credentials to authenticate against MWS with, may be null
      Returns:
      the web service port type
      Throws:
      WSClientException
    • getIsystemPortType

      public IsystemPortType getIsystemPortType(AuthCredentials authCredentials) throws WSClientException
      Get the IsystemPortType interface for invoking MWS system services using this client context
      Parameters:
      authCredentials - the credentials to authenticate against MWS with, may be null
      Returns:
      the web service port type
      Throws:
      WSClientException
    • getRemoteVMID

      protected String getRemoteVMID()
      Get the VMID of the MWS process we are connecting to
      Returns:
      the VMID of the remote process as a string
    • checkRemoteVMID

      protected void checkRemoteVMID()
      Determine if the serviceEndpoint Portal is the same Portal we're running in. This method sets the internal m_inProc field value