com.ibm.commerce.accesscontrol.policyeditor.commands
Class PolicyDeleteTaskCmdImpl
java.lang.Object
|
+--com.ibm.commerce.command.AbstractECCommand
|
+--com.ibm.commerce.command.TaskCommandImpl
|
+--com.ibm.commerce.accesscontrol.policyeditor.commands.PolicyDeleteTaskCmdImpl
- All Implemented Interfaces:
- ECCommand, PolicyDeleteTaskCmd, TaskCommand
- public class PolicyDeleteTaskCmdImpl
- extends TaskCommandImpl
- implements PolicyDeleteTaskCmd
Deletes an individual policy from the datasource.
This command accepts the id of the policy to be deleted
along with the orgId
of the selected organization.
It then checks to see whether the user is a Site Admin
or a Store Admin and if the policy being deleted is a
default policy. Depending upon the registration type of
the user logged in and the type of the policy one of the following
four scenarios is handled:
- Site Admin tries to delete default policy - Policy is deleted
- Site Admin tries to delete non-default policy - Policy is deleted
- Store Admin tries to delete default policy - command updates the
ACORGPOL
exclusion table which excludes the store from this default
policy.
- Store Admin tries to delete non-default policy - Policy is deleted
Method Summary |
java.lang.Long |
getOwnerId()
Gets the owner Id of the policy owner |
int |
getPolicyId()
Gets the policy id. |
java.lang.String |
getResultMsg()
Gets the message to be returned to the caller. |
void |
performExecute()
The business logic for this task command. |
void |
setOwnerId(java.lang.Long ownerId)
Sets the owner Id of the policy owner |
void |
setPolicyId(int policyId)
Sets the policy id. |
void |
setResultMsg(java.lang.String resultMsg)
Sets the message to be returned to the caller. |
Methods inherited from class com.ibm.commerce.command.AbstractECCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters |
PolicyDeleteTaskCmdImpl
public PolicyDeleteTaskCmdImpl()
- PolicyDeleteTaskCmdImpl constructor comment.
getOwnerId
public java.lang.Long getOwnerId()
- Gets the owner Id of the policy owner
- Specified by:
getOwnerId
in interface PolicyDeleteTaskCmd
- Returns:
- The owner Id of the policy owner
getPolicyId
public int getPolicyId()
- Gets the policy id.
- Specified by:
getPolicyId
in interface PolicyDeleteTaskCmd
- Returns:
- The id of the policy to be deleted
getResultMsg
public java.lang.String getResultMsg()
- Gets the message to be returned to the caller.
- Specified by:
getResultMsg
in interface PolicyDeleteTaskCmd
- Returns:
- Message that is returned to the caller
upon completion of the command
performExecute
public void performExecute()
throws ECException
- The business logic for this task command. To see the details of the logic
see the comments for the class.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECCommand
- Throws:
ECException
- If an error is encountered while
updating the datasource
setOwnerId
public void setOwnerId(java.lang.Long ownerId)
- Sets the owner Id of the policy owner
- Specified by:
setOwnerId
in interface PolicyDeleteTaskCmd
- Parameters:
ownerId
- the owner Id of the policy owner
setPolicyId
public void setPolicyId(int policyId)
- Sets the policy id.
- Specified by:
setPolicyId
in interface PolicyDeleteTaskCmd
- Parameters:
policyId
- The id of the policy to be deleted
setResultMsg
public void setResultMsg(java.lang.String resultMsg)
- Sets the message to be returned to the caller.
- Specified by:
setResultMsg
in interface PolicyDeleteTaskCmd
- Parameters:
resultMsg
- Message that is returned to the caller
upon completion of the command