com.ibm.commerce.accesscontrol.policyeditor.commands
Class ResGrpImplicitSaveCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.tools.command.ToolsControllerCommandImpl
|
+--com.ibm.commerce.accesscontrol.policyeditor.commands.ResGrpImplicitSaveCmdImpl
- All Implemented Interfaces:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, ResGrpImplicitSaveCmd, ToolsControllerCommand
- public class ResGrpImplicitSaveCmdImpl
- extends ToolsControllerCommandImpl
- implements ResGrpImplicitSaveCmd
Saves the information for an implicit resource group.
This command accepts a series of name value pairs specifying the
attributes and values which will define an implicit resource group.
The attribute value pairs are passed in the following format.
attribute1 = "..."
value1 = "..."
attribute2 = "..."
value2 = "..."
.
.
attributeN = "..."
valueN = "..."
The command parses the input in the constructXMLConditions
method to genarate an XMLConditions
object which is then
saved in the conditions column of the resource group table.
If a resGrpId
has been not been passed in to the command
it adds a new implicit resource group in the datasource by calling the
ResGrpImplicitAddTaskCmd
task command.
If a resGrpId
has been passed in to the command it executes
an update of a pre-existing implict group by calling the
ResGrpImplicitUpdateTaskCmd
task command.
Field Summary |
protected java.util.Vector |
conditionsVector
Vector to hold conditions objects |
protected java.lang.String |
XMLConditions
XML conditions to be saved in the condtions column of the resource group |
protected java.lang.String |
xmlFile
XML file passed in by tools framwork |
protected java.util.Hashtable |
xmlResGrpDetails
String containing attribute - value pairs |
Method Summary |
protected void |
constructXMLConditions()
Constructs an XMLConditions string which is then saved in the datasource
as the conditions object for the implicit resource group |
AccessVector |
getResources()
This method returns the resources accessed by this command
It will return null if no resources are being accessed by this command. |
java.lang.String |
getViewTask()
Gets the view task name to be returned to the caller |
void |
performExecute()
Updates the resource group in the datasource. |
void |
setViewTask(java.lang.String newViewTask)
Sets the view task name to be returned to the caller. |
void |
validateParameters()
Check whether all the parameters are set properly. |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
conditionsVector
protected java.util.Vector conditionsVector
- Vector to hold conditions objects
XMLConditions
protected java.lang.String XMLConditions
- XML conditions to be saved in the condtions column of the resource group
xmlFile
protected java.lang.String xmlFile
- XML file passed in by tools framwork
xmlResGrpDetails
protected java.util.Hashtable xmlResGrpDetails
- String containing attribute - value pairs
ResGrpImplicitSaveCmdImpl
public ResGrpImplicitSaveCmdImpl()
constructXMLConditions
protected void constructXMLConditions()
- Constructs an XMLConditions string which is then saved in the datasource
as the conditions object for the implicit resource group
getResources
public AccessVector getResources()
throws ECException
- This method returns the resources accessed by this command
It will return null if no resources are being accessed by this command.
- Specified by:
getResources
in interface ECCommand
- Overrides:
getResources
in class AbstractECTargetableCommand
- Returns:
- Object[] - an array of protectable resources
getViewTask
public java.lang.String getViewTask()
- Gets the view task name to be returned to the caller
- Specified by:
getViewTask
in interface ResGrpImplicitSaveCmd
- Returns:
- The view task name to be returned to the caller.
performExecute
public void performExecute()
throws ECException
- Updates the resource group in the datasource.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECTargetableCommand
- Throws:
ECException
- If an error is encountered while
updating the datasource
setViewTask
public void setViewTask(java.lang.String newViewTask)
- Sets the view task name to be returned to the caller.
- Specified by:
setViewTask
in interface ResGrpImplicitSaveCmd
- Parameters:
viewTask
- The view task name to be returned to the caller.
validateParameters
public void validateParameters()
throws ECException
- Check whether all the parameters are set properly.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
ECException.
-