com.ibm.commerce.usermanagement.commands
Class MemberRoleUnassignCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.usermanagement.commands.MemberRoleUnassignCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, MemberRoleUnassignCmd

public class MemberRoleUnassignCmdImpl
extends ControllerCommandImpl
implements MemberRoleUnassignCmd

The MemberRoleUnassign command unassigns roles for a member from orgentities.

The member can be a user, organization or organizational unit. When unassigning roles from organiztion or organizational unit, the memberId and organEntityId should be same.

The unassigned records is removed from the MBRROLE table. Use this command with SSL (Secure Sockets Layer) to ensure that the information are encrypted. To do so type the command with the HTTPS secure protocol.

The parameter URL and memberId are mandatory.

Behavior

Exception Conditions

See Also:
Serialized Form

Field Summary
protected  boolean bCheckURL
          Whether to check if the URL parameter has been specified.
protected  boolean bToolsFramework
          Whether the command is being called from the tools framework.
static java.lang.String CLASSNAME
          The name of this implementation of the command.
static java.lang.String COPYRIGHT
          IBM Copyright notice field.
protected  java.lang.Long[] Descendants
          The decendent identifiers of the organization.
protected   OrganizationAccessBean iabOrgEntity
          The organization that is being unassigned from the role.
protected  UserAccessBean iabUser
          The user that is being unassigned from the role.
protected  boolean ibOrgEntity
          Whether the member is a user or organization entity.
protected  java.lang.Long inMemberId
          The long representation of the member identifier.
protected  java.lang.String istrMemberId
          The string representation of the member identifier.
protected  java.util.Vector ivecOrgEntityId
          A list of organization entity identifiers.
protected  java.util.Vector ivecRoleId
          A list of role identifiers.
 
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.usermanagement.commands. MemberRoleUnassignCmd
NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
MemberRoleUnassignCmdImpl()
           
 
Method Summary
 boolean getCheckURL()
          Returns whether the URL parameter needs to be specified.
 java.lang.String getMemberId()
          Returns the member identifier of the member which is being unassigned from the specified role.
 java.util.Vector getOrgEntities()
          Returns a list of organization entity identifiers.
  AccessVector getResources()
          Returns the resource that is being unassigned from the role.
 java.util.Vector getRoles()
          Returs the list of roles that the member is being unassigned from.
  TypedProperty getViewInputProperties()
          Returns the request properties without the tools framework objects.
 void performExecute()
          Unassigns the member from the specified member groups.
 void reset()
          Resets the parameters to their original state so the command object can be reused.
 void setCheckURL(boolean abCheckURL)
          Sets whether the URL needs to be specified.
 void setMemberId(java.lang.String astrMemberId)
          Sets the member identifier of the member that is being unassigned to the specified roles.
 void setRequestProperties( TypedProperty reqProperties)
          Sets the request properties by calling the ProcessRequestProperties command.
 void validateParameters()
          Validate the member and the roles specified.
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
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. ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command. AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.
See Also:
Constant Field Values

CLASSNAME

public static final java.lang.String CLASSNAME
The name of this implementation of the command.
See Also:
Constant Field Values

istrMemberId

protected java.lang.String istrMemberId
The string representation of the member identifier.

inMemberId

protected java.lang.Long inMemberId
The long representation of the member identifier.

ivecRoleId

protected java.util.Vector ivecRoleId
A list of role identifiers.

ivecOrgEntityId

protected java.util.Vector ivecOrgEntityId
A list of organization entity identifiers.

iabUser

protected UserAccessBean iabUser
The user that is being unassigned from the role.

iabOrgEntity

protected OrganizationAccessBean iabOrgEntity
The organization that is being unassigned from the role.

ibOrgEntity

protected boolean ibOrgEntity
Whether the member is a user or organization entity.

Descendants

protected java.lang.Long[] Descendants
The decendent identifiers of the organization.

bCheckURL

protected boolean bCheckURL
Whether to check if the URL parameter has been specified.

bToolsFramework

protected boolean bToolsFramework
Whether the command is being called from the tools framework.
Constructor Detail

MemberRoleUnassignCmdImpl

public MemberRoleUnassignCmdImpl()
Method Detail

getCheckURL

public boolean getCheckURL()
Returns whether the URL parameter needs to be specified.
Specified by:
getCheckURL in interface MemberRoleUnassignCmd
Returns:
Whether the URL parameter needs to be specified.

getMemberId

public java.lang.String getMemberId()
Returns the member identifier of the member which is being unassigned from the specified role.
Specified by:
getMemberId in interface MemberRoleUnassignCmd
Returns:
The member identifier.

getOrgEntities

public java.util.Vector getOrgEntities()
Returns a list of organization entity identifiers.
Specified by:
getOrgEntities in interface MemberRoleUnassignCmd
Returns:
A list or organization entity identifiers.

getResources

public AccessVector getResources()
                          throws ECException
Returns the resource that is being unassigned from the role.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
Either a AccessVector containing the user or organization entity being unassign from the role.
ECException

getRoles

public java.util.Vector getRoles()
Returs the list of roles that the member is being unassigned from.
Specified by:
getRoles in interface MemberRoleUnassignCmd
Returns:
The list of roles.

getViewInputProperties

public TypedProperty getViewInputProperties()
Returns the request properties without the tools framework objects.
Specified by:
getViewInputProperties in interface ControllerCommand
Overrides:
getViewInputProperties in class ControllerCommandImpl
Returns:
The request properties without the tools framework objects.

performExecute

public void performExecute()
                    throws ECException
Unassigns the member from the specified member groups. Then calls the PostMemberRoleUnassignCmd command to perform some customized function.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If there was a problem unassigning the member from the roles or a problem when executing the customize post command.

reset

public void reset()
Resets the parameters to their original state so the command object can be reused.
Specified by:
reset in interface MemberRoleUnassignCmd
Overrides:
reset in class AbstractECTargetableCommand

setCheckURL

public void setCheckURL(boolean abCheckURL)
Sets whether the URL needs to be specified.
Specified by:
setCheckURL in interface MemberRoleUnassignCmd
Parameters:
abCheckURL - boolean
  • true - This command will check URL parameter
  • false - This command will not check URL parameter

setMemberId

public void setMemberId(java.lang.String astrMemberId)
Sets the member identifier of the member that is being unassigned to the specified roles.
Specified by:
setMemberId in interface MemberRoleUnassignCmd
Parameters:
astrMemberId - the member identifier.

setRequestProperties

public void setRequestProperties(TypedProperty reqProperties)
                          throws ECException
Sets the request properties by calling the ProcessRequestProperties command. Then calls the PreMemberRoleUnassign command to preform any preprocessing before the command is executed.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
reqProperties - the parameters of the command.
Throws:
ECException - If there is a problem with invalid or missing parameters or there was a problem reported by the PreMemberRoleUnassign command.

validateParameters

public void validateParameters()
                        throws ECException
Validate the member and the roles specified.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - If any of the specified parameters are invalid.