Interface ICommand
- All Superinterfaces:
IComponent
,IInitializable
,ISystemHandler
- All Known Subinterfaces:
TaskCommandJMS
This is the base Handler for all Commands.
Command Handlers have the following charateristics: Details are described in the Business Policies functional spec
Each command is a specific verb for a specific resource
Unique class per command
Object oriented, extensible, uses inheritance
Not as discoverable as IBizPolicy
Leverages ICommandBean
Traits based
-
Method Summary
Modifier and TypeMethodDescriptioncreateBean
(IContext context, Map<String, ?> properties) This is a factory method for instantiating the appropriate bean for a specific CommandClass<?>
Return the actual datatype of the object returned from the handle method.handle
(IContext context, ICommandBean commandBean) This is a loosely typed function that will map to the strongly typed function inside of the commandvoid
This checks whether the current user has rights to execute this type command at all.Methods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
-
Method Details
-
hasAccess
This checks whether the current user has rights to execute this type command at all. This is unique from the access checking inside of thehandle(com.webmethods.portal.bizPolicy.IContext, com.webmethods.portal.bizPolicy.command.ICommandBean)
function, because a user might have the rights to execute the update Command, but not have the rights to execute the update Command on a resource that they don't own.- Parameters:
context
-- Throws:
BizException
PortalException
PortalAccessException
-
createBean
This is a factory method for instantiating the appropriate bean for a specific Command- Returns:
- the
ICommandBean
- Throws:
BizException
-
getReturnType
Class<?> getReturnType()Return the actual datatype of the object returned from the handle method.- Returns:
- the class of the object returned from the handle method
-
handle
This is a loosely typed function that will map to the strongly typed function inside of the command- Parameters:
context
-commandBean
-- Returns:
- an object appropriate to this command. Maybe null
- Throws:
BizException
-