Package com.webmethods.caf.portalclient
Class PortalClientContext
java.lang.Object
com.webmethods.caf.portalclient.PortalClientContext
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuthCredentials
The authentication credentials to connect to MWS withprotected boolean
Is the in-process check enabled for this contextprotected boolean
Is this context running within the same MWS process that the endpoint is referencingprotected boolean
Is this context connected and authenticated with the target MWSprotected String
The MWS endpoint this context will connect toprotected String
The VMID of the remote MWS process instance -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorPortalClientContext
(String portalServerURL) Create a new instance for a MWS frontend URLPortalClientContext
(String portalServerURL, AuthCredentials authCred) Create a new instance for a MWS frontend URLPortalClientContext
(String portalServerURL, AuthCredentials authCred, boolean enableInprocCheck) Create a new client context instance for a MWS frontend URL -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Determine if the serviceEndpoint Portal is the same Portal we're running in.Get the AuthCredentials object used to authenticate the MWS sessionprotected String
getEndpoint
(String serviceEndpoint) Construct a MWS service endpoint.getIaccessPortType
(AuthCredentials authCredentials) Get the IaccessPortType interface for invoking access control services using this client contextgetIaliasPortType
(AuthCredentials authCredentials) Get the IaliasPortType interface for invoking MWS alias services using this client contextgetIbasicPortType
(AuthCredentials authCredentials) Get the getIbasicPortType interface for invoking basic services using this client contextgetIdirectoryServicePortType
(AuthCredentials authCredentials) Get the IdirectoryServicePortType interface for invoking directory web services using this client contextgetIdirectorySystemPortType
(AuthCredentials authCredentials) Get the IdirectorySystemPortType interface for invoking directory web services using this client context.getIprincipalAttributePortType
(AuthCredentials authCredentials) Get the IprincipalAttributePortType interface for invoking directory principal attributes services using this client contextgetIprincipalPortType
(AuthCredentials authCredentials) Get the IprincipalPortType interface for invoking directory principal services using this client contextgetIsystemPortType
(AuthCredentials authCredentials) Get the IsystemPortType interface for invoking MWS system services using this client contextgetItaskPortType
(AuthCredentials authCredentials) Get the ItaskPortType interface for invoking MWS task services using this client contextgetIuserPortType
(AuthCredentials authCredentials) Get the getIuserPortType interface for invoking user services using this client contextGet the MWS server endpoint URL for this client contextgetPortType
(AuthCredentials authCredentials, Class clazz, boolean useCache) Factory function to simplify getting references to the various port types exposed by the portalclient APIprotected String
Get the VMID of the MWS process we are connecting toboolean
Is this client context successfully connected and authenticated with MWSboolean
isInProc()
Is this PortalClientContext running in the same process as the endpoint it is connected to?
-
Field Details
-
m_portalEndpoint
The MWS endpoint this context will connect to -
m_authCredentials
The authentication credentials to connect to MWS with -
m_inProc
protected boolean m_inProcIs this context running within the same MWS process that the endpoint is referencing -
m_isAuthenticated
protected boolean m_isAuthenticatedIs this context connected and authenticated with the target MWS -
m_remoteVMID
The VMID of the remote MWS process instance -
m_enableInprocCheck
protected boolean m_enableInprocCheckIs the in-process check enabled for this context
-
-
Constructor Details
-
PortalClientContext
public PortalClientContext()Default constructor -
PortalClientContext
Create a new instance for a MWS frontend URL- Parameters:
portalServerURL
- the MWS frontend URL (e.g. http://localhost:8585)
-
PortalClientContext
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 credentialsenableInprocCheck
- true to enable check that PortalClient is not running with the target MWS runtime
-
-
Method Details
-
getPortalServerURL
Get the MWS server endpoint URL for this client context- Returns:
- the MWS server endpoint URL as a string
-
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
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 withclazz
- the web service interface class to proxyuseCache
- enable caching of web service results- Returns:
- A IWSClientProxy that proxies the web service interface class
-
getEndpoint
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
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
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
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
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
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
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
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
-