com.ibm.commerce.usermanagement.commands

Class RoleAddCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, RoleAddCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    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

    • Create a role in the ROLE table.
    • Assign this role to Root Organization (orgEntityId=-2001).

    Exception Conditions

    • roleName is null (_ERR_CMD_MISSING_PARAM).
    • The length of roleName equals to 0 (_ERR_CMD_INVALID_PARAM).
    • Same roleName already exists (_ERR_ROLENAME_ALREADY_EXIST).
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        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
    • 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.
      • 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
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        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
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • 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.
      • 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