public class PortalClient extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
INPROC_FACTORY_ID |
protected static PortalClientContext |
m_defaultContext |
protected static boolean |
m_init |
protected static boolean |
m_inprocFactoriesRegistered |
protected static Map<Class<?>,com.webmethods.caf.portalclient.impl.PortalClientAPI> |
m_portalClientMap |
static String |
PORTAL_CLIENT_MOD
Logging module for this component
|
Constructor and Description |
---|
PortalClient() |
Modifier and Type | Method and Description |
---|---|
static void |
addFailedAuthCallback(IFailedAuthCallback callbackObj)
Convenience method to add a IFailedAuthCallback handler to the WSClient used by PortalClient
|
static void |
addLogListener(ILogListener listener)
Convenience method to add a logging listener to the WSClient used by PortalClient
Logging events within the WSClient are fired to the log listeners as events.
|
static URI |
createAlias(String alias)
Static helper to create a new URI that represents an MWS alias
|
static PortalClientContext |
getClientContext(String portalServerURL,
AuthCredentials authCred)
Get an initialize a PortalClientContext used to invoke MWS runtime services
|
static PortalClientContext |
getClientContext(String portalServerURL,
AuthCredentials authCred,
boolean doInprocCheck)
Get an initialize a PortalClientContext used to invoke MWS runtime services
|
protected static PortalClientContext |
getDefaultClientContext() |
static IaccessPortType |
getIaccessPortType(AuthCredentials authCredentials)
Get the IaccessPortType interface for invoking access web services using the
default PortalClientContext
|
static Ialias2PortType |
getIalias2PortType(AuthCredentials authCredentials)
Get the Ialias2PortType interface for invoking the extended MWS alias web services using the
default PortalClientContext
|
static IaliasPortType |
getIaliasPortType(AuthCredentials authCredentials)
Get the IaliasPortType interface for invoking MWS alias web services using the
default PortalClientContext
|
static IbasicPortType |
getIbasicPortType(AuthCredentials authCredentials)
Get the IbasicPortType interface for invoking core MWS web services using the
default PortalClientContext
|
static IdirectoryServicePortType |
getIdirectoryServicePortType(AuthCredentials authCredentials)
Get the IdirectoryServicePortType interface for invoking directory web services using the
default PortalClientContext
|
static IdirectorySystemPortType |
getIdirectorySystemPortType(AuthCredentials authCredentials)
Get the idirectorySystemPortType interface for invoking MWS system web services using the
default PortalClientContext
|
static IfolderPortType |
getIfolderPortType(AuthCredentials authCredentials)
Get the IfolderPortType interface for invoking folder web services using the
default PortalClientContext
|
static IprincipalAttributePortType |
getIprincipalAttributePortType(AuthCredentials authCredentials)
Get the IprincipalAttributePortType interface for invoking principal attribute web services using the
default PortalClientContext
|
static IprincipalPortType |
getIprincipalPortType(AuthCredentials authCredentials)
Get the IprincipalPortType interface for invoking principal web services using the
default PortalClientContext
|
static IsystemPortType |
getIsystemPortType(AuthCredentials authCredentials)
Get the IsystemPortType interface for invoking the MWS system web services using the
default PortalClientContext
|
static ItaskPortType |
getItaskPortType(AuthCredentials authCredentials)
Get the ItaskPortType interface for invoking task web services using the
default PortalClientContext
|
static ItaskPortTypeEx |
getItaskPortTypeEx(AuthCredentials authCredentials)
Get the IfolderPortTypeEx
|
static IuserPortType |
getIuserPortType(AuthCredentials authCredentials)
Get the IuserPortType interface for invoking user web services using the
default PortalClientContext
|
static Map<Class<?>,com.webmethods.caf.portalclient.impl.PortalClientAPI> |
getPortalClientMap()
Retrieve a map of web service interfaces and their corresponding MWS bizpolicies
NOTE this is exposed for testing purposes and is not indended to be used externally
|
static IWSClientProxy |
getPortType(AuthCredentials authCredentials,
Class<?> clazz)
Factory function to simplify getting references to the various port types exposed
by the portalclient API
|
protected static void |
initClientMap()
Initialize the map of web service interfaces and their bizpolicy names
|
static void |
initialize(String portalServerURL)
Initialize the default PortalClientContext with the URL of the MWS server to call
|
static void |
initialize(String portalServerURL,
AuthCredentials authCred)
Initialize the default PortalClientContext with the frontend URL of the MWS server to invoke
and the login credentials to authenticate with
|
static void |
initialize(String portalServerURL,
AuthCredentials authCred,
boolean doInprocCheck)
Initialize the default PortalClientContext with the frontend URL of the MWS server to invoke,
the login credentials use to authenticate, and whether to bypass the optimization check if the PortalClient instance
is running within the MWS runtime
|
static boolean |
isInitialized()
Determine if the default PortalClientContext has been initialized
|
protected static void |
registerInProcFactories() |
static void |
removeFailedAuthCallback(IFailedAuthCallback callbackObj)
Convenience method to remove a IFailedAuthCallback handler to the WSClient used by PortalClient
|
static void |
removeLogListener(ILogListener listener)
Convenience method to remove a logging listener to the WSClient used by PortalClient
Logging events within the WSClient are fired to the log listeners as events.
|
public static final String PORTAL_CLIENT_MOD
protected static final String INPROC_FACTORY_ID
protected static Map<Class<?>,com.webmethods.caf.portalclient.impl.PortalClientAPI> m_portalClientMap
protected static boolean m_init
protected static PortalClientContext m_defaultContext
protected static boolean m_inprocFactoriesRegistered
public static void initialize(String portalServerURL)
portalServerURL
- the fully qualified URL of the MWS runtime (e.g. http://localhost:8585)public static void initialize(String portalServerURL, AuthCredentials authCred)
portalServerURL
- the fully qualified URL of the MWS runtime (e.g. http://localhost:8585)authCred
- the AuthCredentials to authenticate to MWS withpublic static void initialize(String portalServerURL, AuthCredentials authCred, boolean doInprocCheck)
portalServerURL
- the fully qualified URL of the MWS runtime (e.g. http://localhost:8585)authCred
- the AuthCredentials to authenticate to MWS withdoInprocCheck
- true to check if running within the target MWS runtime process and run in optimized "in-proc" modepublic static boolean isInitialized()
public static PortalClientContext getClientContext(String portalServerURL, AuthCredentials authCred)
portalServerURL
- the fully qualified URL of the MWS runtime (e.g. http://localhost:8585)authCred
- the AuthCredentials to authenticate to MWS withpublic static PortalClientContext getClientContext(String portalServerURL, AuthCredentials authCred, boolean doInprocCheck)
portalServerURL
- the fully qualified URL of the MWS runtime (e.g. http://localhost:8585)authCred
- the AuthCredentials to authenticate to MWS withdoInprocCheck
- true to check if running within the target MWS runtime process and run in optimized "in-proc" modeprotected static void registerInProcFactories()
public static URI createAlias(String alias)
alias
- the alias to create a URI forpublic static IdirectorySystemPortType getIdirectorySystemPortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static IdirectoryServicePortType getIdirectoryServicePortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static IprincipalPortType getIprincipalPortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static IprincipalAttributePortType getIprincipalAttributePortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static IuserPortType getIuserPortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static IaccessPortType getIaccessPortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static IbasicPortType getIbasicPortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static ItaskPortType getItaskPortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static ItaskPortTypeEx getItaskPortTypeEx(AuthCredentials authCredentials) throws WSClientException
authCredentials
- may be nullWSClientException
public static IfolderPortType getIfolderPortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static IaliasPortType getIaliasPortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static Ialias2PortType getIalias2PortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static IsystemPortType getIsystemPortType(AuthCredentials authCredentials) throws WSClientException
authCredentials
- the credentials to authenticate against MWS with, may be nullWSClientException
public static Map<Class<?>,com.webmethods.caf.portalclient.impl.PortalClientAPI> getPortalClientMap()
public static IWSClientProxy getPortType(AuthCredentials authCredentials, Class<?> clazz)
authCredentials
- the authentication credentials to connect to MWS withclazz
- the web service interface class to proxyprotected static PortalClientContext getDefaultClientContext()
protected static void initClientMap()
public static void addLogListener(ILogListener listener)
listener
- the ILogListener implementation to addpublic static void removeLogListener(ILogListener listener)
listener
- the ILogListener implementation to removepublic static void addFailedAuthCallback(IFailedAuthCallback callbackObj)
callbackObj
- the IFailedAuthCallback implementation to addpublic static void removeFailedAuthCallback(IFailedAuthCallback callbackObj)
callbackObj
- the IFailedAuthCallback implementation to remove