Class NameOrgPosSesIDAppNameHandler
java.lang.Object
de.aristaflow.adept2.base.security.callbackhandler.NameOrgPosSesIDAppNameHandler
- All Implemented Interfaces:
AFCallbackHandler
This handler provides the means to handle
NameCallback,
OrgPositionChoiceCallback, AppNameCallback, and
UserSessionIDCallback. All data is provided in the constructor of
this handler.- Author:
- Ulrich Kreher
-
Constructor Summary
ConstructorsConstructorDescriptionNameOrgPosSesIDAppNameHandler(String userName, Collection<QualifiedAgent> agents, String appName, String userSessionID) NameOrgPosSesIDAppNameHandler(Collection<QualifiedAgent> agents, String appName, String userSessionID) -
Method Summary
Modifier and TypeMethodDescriptionCallback[]This method is similar toCallbackHandler.handle(Callback[])but returns the provided callbacks back to the caller.
-
Constructor Details
-
NameOrgPosSesIDAppNameHandler
public NameOrgPosSesIDAppNameHandler(String userName, Collection<QualifiedAgent> agents, String appName, String userSessionID) - Parameters:
userName- The unique name of the user to log on. This must not benullnor an empty/blank string. Note that this name is case-sensitive!agents- The organisational positions of the agent with the set name which to log on. All these agents need to have the provideduserName. These have to contain at least one qualified agent.appName- The application name for which to log on. This may benull.userSessionID- The user session ID to use for all provided agents. This may benull.
-
NameOrgPosSesIDAppNameHandler
public NameOrgPosSesIDAppNameHandler(Collection<QualifiedAgent> agents, String appName, String userSessionID) Creates a new handler forNameCallback,OrgPositionChoiceCallbackandUserSessionIDCallback. The user name is taken from the provided collection of agents.- Parameters:
agents- The user name and the organisational positions of the agent with the set name which to log on. All these agents need to have the same user name. These have to contain at least one qualified agent.appName- The application name for which to log on. This may benull.userSessionID- The user session ID to use for all provided agents. This may benull.
-
-
Method Details
-
handle
Description copied from interface:AFCallbackHandlerThis method is similar toCallbackHandler.handle(Callback[])but returns the provided callbacks back to the caller. This allows for calling this method remotely. Note that all callbacks need to be serialisable.
When called remotely, the provided callbacks are copies of the server-side objects. When changing these objects, the changes are not reflected on server side. Therefore these objects (or rather copies of them) need to be returned.- Specified by:
handlein interfaceAFCallbackHandler- Parameters:
callbacks- The callbacks to be handled by this callback handler.- Returns:
- All the callbacks that should be handled by this callback handler. Just return the complete array of callbacks. Do not skip any callbacks, for instance the ones that the callback handler did not handle!
- Throws:
IOException- If an input or output error occurs, anIOExceptionwill be thrown.UnsupportedCallbackException- If the implementation of this method does not support one or more of the callbacks specified in thecallbacksparameter, anUnsupportedCallbackExceptionwill be thrown.
-