com.ibm.commerce.usermanagement.commands
Class SetBusinessEntityCmdImpl

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

public class SetBusinessEntityCmdImpl
extends TaskCommandImpl
implements SetBusinessEntityCmd

This task command is called by OrgEntityAdd commands to set the BusinessEntity attribute.

In 5.2, each orgEntity has an attribute called 'BusinessEntity'. When BusinessEntity equals 1, it means the orgEntity is a business orgEntity that can be used for the purpose of creating accounts. The Root Org and the Default Org will have BusinessEntity equals 0. When an orgEntity is created in 5.2, the OrgEntityAdd command will call this task command which will set the BusinessEntity attribute according to the following logic:

Set the BusinessEntity attribute to 1 if the orgEntity to be created has the Root Organization as its parent, ie, in 5.2 all orgEntities directly below the Root Org (except the Default Org) will have BusinessEntity set to 1. For all other cases, set BusinessEntity to 0

The default logic can be overwriten.

Inputs of this task command are:

 setRequestProperties(TypedProperty)
 - set request properties which should contain parentMemberId, otherwise, an exception will thrown.
 getRequestProperties(TypedProperty)
 - return request properties which contains determined BusinessEntity property.
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  TypedProperty requestProperties
          The request properties.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.usermanagement.commands. SetBusinessEntityCmd
NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
SetBusinessEntityCmdImpl()
           
 
Method Summary
  TypedProperty getRequestProperties()
          Returns the request properties.
 void performExecute()
          Sets the business entity.
 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.
Constructor Detail

SetBusinessEntityCmdImpl

public SetBusinessEntityCmdImpl()
Method Detail

getRequestProperties

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

performExecute

public void performExecute()
                    throws ECException
Sets the business entity.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If the parent member was not specified.

setRequestProperties

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