com.ibm.commerce.accesscontrol.policyeditor.commands
Interface PolicyDeleteTaskCmd

All Superinterfaces:
ECCommand, TaskCommand
All Known Implementing Classes:
PolicyDeleteTaskCmdImpl

public interface PolicyDeleteTaskCmd
extends TaskCommand

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:

  1. Site Admin tries to delete default policy - Policy is deleted
  2. Site Admin tries to delete non-default policy - Policy is deleted
  3. Store Admin tries to delete default policy - command updates the
    ACORGPOL exclusion table which excludes the store from this default
    policy.
  4. Store Admin tries to delete non-default policy - Policy is deleted


Field Summary
static java.lang.String COPYRIGHT
          copyright notice
static java.lang.String defaultCommandClassName
          name of the default implementation of this command
static java.lang.String NAME
          name of this command
 
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 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 interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, performExecute, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties, validateParameters
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
copyright notice

defaultCommandClassName

public static final java.lang.String defaultCommandClassName
name of the default implementation of this command

NAME

public static final java.lang.String NAME
name of this command
Method Detail

getOwnerId

public java.lang.Long getOwnerId()
Gets the owner Id of the policy owner
Returns:
The owner Id of the policy owner

getPolicyId

public int getPolicyId()
Gets the policy id.
Returns:
The id of the policy to be deleted

getResultMsg

public java.lang.String getResultMsg()
Gets the message to be returned to the caller.
Returns:
Message that is returned to the caller upon completion of the command

setOwnerId

public void setOwnerId(java.lang.Long ownerId)
Sets the owner Id of the policy owner
Parameters:
ownerId - the owner Id of the policy owner

setPolicyId

public void setPolicyId(int policyId)
Sets the policy id.
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.
Parameters:
resultMsg - Message that is returned to the caller upon completion of the command