com.ibm.commerce.usermanagement.commands
Class RoleAddCmdImpl

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

public class RoleAddCmdImpl
extends ControllerCommandImpl
implements RoleAddCmd

RoleAdd command creates a role at the site level and assigns it to the Root Organization.

Roles are stored in the ROLE 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 roleName is mandatory.

Behavior

Exception Conditions

See Also:
Serialized Form

Field Summary
protected  boolean bToolsFramework
          Whether the command is called by 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.String istrRoleDescription
          The role description.
protected  java.lang.String istrRoleDisplayName
          The role display name.
protected  java.lang.String istrRoleId
          The role identifier.
protected  java.lang.String istrRoleName
          The role name.
 
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. RoleAddCmd
NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
RoleAddCmdImpl()
           
 
Method Summary
 java.lang.String getRoleDescription()
          Returns the role description.
 java.lang.String getRoleDisplayName()
          Returns the istrRoleDisplayName.
 java.lang.String getRoleId()
          Returns the role identifier.
 java.lang.String getRoleName()
          Returns the role name.
  TypedProperty getViewInputProperties()
          Returns the request properties without the tools framework objects.
 void performExecute()
          Creates the new Role.
 void reset()
          Resets the values of the command so it can be reused to add another role.
 void setRequestProperties( TypedProperty reqProperties)
          Sets the request properties.
 void setRoleDescription(java.lang.String astrRoleDescription)
          Sets the role description.
 void setRoleDisplayName(java.lang.String istrRoleDisplayName)
          Sets the istrRoleDisplayName.
 void setRoleName(java.lang.String astrRoleName)
          Sets the role name.
 void validateParameters()
          Validates that the name of the role is defined and an exist role of the same name does not exist.
 
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, getResources, 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, getResources, 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

bToolsFramework

protected boolean bToolsFramework
Whether the command is called by the tools framework.

istrRoleId

protected java.lang.String istrRoleId
The role identifier.

istrRoleName

protected java.lang.String istrRoleName
The role name.

istrRoleDisplayName

protected java.lang.String istrRoleDisplayName
The role display name.

istrRoleDescription

protected java.lang.String istrRoleDescription
The role description.
Constructor Detail

RoleAddCmdImpl

public RoleAddCmdImpl()
Method Detail

getRoleDescription

public java.lang.String getRoleDescription()
Returns the role description.
Specified by:
getRoleDescription in interface RoleAddCmd
Returns:
The role description.

getRoleId

public java.lang.String getRoleId()
Returns the role identifier.
Specified by:
getRoleId in interface RoleAddCmd
Returns:
The role identifier.

getRoleName

public java.lang.String getRoleName()
Returns the role name.
Specified by:
getRoleName in interface RoleAddCmd
Returns:
The role name.

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 requestion properties without the tools framework objects.

performExecute

public void performExecute()
                    throws ECException
Creates the new Role. Then calls the PostRoleAdd command to perform any addition function needed after the role is created.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - If there is a problem creating the new role or executing the PostRoleAdd command.

reset

public void reset()
Resets the values of the command so it can be reused to add another role.
Specified by:
reset in interface RoleAddCmd
Overrides:
reset in class AbstractECTargetableCommand

setRequestProperties

public void setRequestProperties(TypedProperty reqProperties)
                          throws ECException
Sets the request properties. Then calls the PreRoleAdd command for any preprocessing needed before adding the role.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Parameters:
reqProperties - the parameters passed to the command.
Throws:
ECException - If there is a problem indicated by the PreRoleAdd command.

setRoleDescription

public void setRoleDescription(java.lang.String astrRoleDescription)
Sets the role description.
Specified by:
setRoleDescription in interface RoleAddCmd
Parameters:
astrRoleDescription - the role description.

setRoleName

public void setRoleName(java.lang.String astrRoleName)
Sets the role name.
Specified by:
setRoleName in interface RoleAddCmd
Parameters:
astrRoleName - the role name.

validateParameters

public void validateParameters()
                        throws ECException
Validates that the name of the role is defined and an exist role of the same name does not exist.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException - If the name is not specified or the name already exists for another role.

getRoleDisplayName

public java.lang.String getRoleDisplayName()
Returns the istrRoleDisplayName.
Returns:
String

setRoleDisplayName

public void setRoleDisplayName(java.lang.String istrRoleDisplayName)
Sets the istrRoleDisplayName.
Parameters:
istrRoleDisplayName - The istrRoleDisplayName to set