com.ibm.commerce.usermanagement.commands
Class ProcessParentMemberCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.usermanagement.commands.ProcessParentMemberCmdImpl
All Implemented Interfaces:
ECCommand, ECTargetableCommand, ProcessParentMemberCmd, TaskCommand

public class ProcessParentMemberCmdImpl
extends TaskCommandImpl
implements ProcessParentMemberCmd

This task command is used to calculate parentMemberId from given parentMember property.

parentMember property can be encrypted parentMemberId or DN. If this task command is called by UserRegistrationAdminAdd/Update command, parentMember can also be un-encrypted parentMemberId.

Inputs of this task command are:

 setRequestProperties(TypedProperty)
 - set request properties which should contain parentMember property. It may also contain
   parentMemberId (it will be ignored if the task command is not called by 
   UserRegistrationAdminAdd/Upate command).
Outputs of this task command is:
 getRequestProperties(TypedProperty)
 - returns request properties which contains calculated parentMemberId property. parentmember
   property is removed.
 public OrganizationAccessBean getParentMember()
 - returns the parent OrganizationAccessBean
 public String getParentMemberType()
 - returns the type of parent organization ('O' or 'OU'). 
See Also:
Serialized Form

Field Summary
static java.lang.String CLASSNAME
          The name of this implementation of the command.
static java.lang.String COPYRIGHT
          IBM Copyright notice field.
protected   OrganizationAccessBean iabParentOrgEntity
          The parent organization
protected  java.lang.String istrParentMemberType
          The parent organization member type.
protected  TypedProperty requestProperties
          The request properties.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.usermanagement.commands. ProcessParentMemberCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
ProcessParentMemberCmdImpl()
           
 
Method Summary
protected  void checkParentMemberId(java.lang.String astrParentMemberId, java.lang.String astrPropertyName)
          Checks whether the specified member identifier is a valid organization or organizational unit.
  OrganizationAccessBean getParentMember()
          Returns the parent member.
 java.lang.String getParentMemberType()
          Returns the parent member type.
  TypedProperty getRequestProperties()
          Returns the request properties.
 void performExecute()
          Performs the business logic.
 void setRequestProperties( TypedProperty aRequestProperties)
          Sets the request properties.
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

requestProperties

protected TypedProperty requestProperties
The request properties.

iabParentOrgEntity

protected OrganizationAccessBean iabParentOrgEntity
The parent organization

istrParentMemberType

protected java.lang.String istrParentMemberType
The parent organization member type.
Constructor Detail

ProcessParentMemberCmdImpl

public ProcessParentMemberCmdImpl()
Method Detail

checkParentMemberId

protected void checkParentMemberId(java.lang.String astrParentMemberId,
                                   java.lang.String astrPropertyName)
                            throws ECException
Checks whether the specified member identifier is a valid organization or organizational unit.
Parameters:
astrParentMemberId - the member identifier.
astrPropertyName - the parameter name.
Throws:
ECException - if the specified member identifier is not an orgaization.

getParentMember

public OrganizationAccessBean getParentMember()
Returns the parent member.
Specified by:
getParentMember in interface ProcessParentMemberCmd
Returns:
The parent member.

getParentMemberType

public java.lang.String getParentMemberType()
Returns the parent member type. This will either be 'O' or 'OU'.
Specified by:
getParentMemberType in interface ProcessParentMemberCmd
Returns:
The member type of the parent member.

getRequestProperties

public TypedProperty getRequestProperties()
Returns the request properties.
Specified by:
getRequestProperties in interface ProcessParentMemberCmd
Returns:
The request properties.

performExecute

public void performExecute()
                    throws ECException
Performs the business logic. This done be finding the specified parent member.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If there is a problem finding the parent organization.

setRequestProperties

public void setRequestProperties(TypedProperty aRequestProperties)
Sets the request properties.
Specified by:
setRequestProperties in interface ProcessParentMemberCmd
Parameters:
aRequestProperties - the request properties.