com.ibm.commerce.usermanagement.commands

Class OrganizationSetInSessionCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, OrganizationSetInSessionCmd, 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 OrganizationSetInSessionCmdImpl
    extends ControllerCommandImpl
    implements OrganizationSetInSessionCmd

    This command is used to switch the current active organization. The active organization enables a user to be entitled to contracts that belong to their parent organization as well as where they play an Organization participant role. The organization that the switch is being made to must not be locked.

    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • OrganizationSetInSessionCmdImpl

        public OrganizationSetInSessionCmdImpl()
    • Method Detail

      • setURL

        public void setURL(java.lang.String strURL)
        Sets the URL to redirect to after logging off the user.
        Parameters:
        strURL - The URL to redirect to after logging off the user.
      • getURL

        public java.lang.String getURL()
        Gets the URL specified.
        Returns:
        String The URL to redirect to after invoking the command.
      • setActiveOrganizationId

        public void setActiveOrganizationId(java.lang.Long nOrganizationId)
        Sets the active organization to switch to.
        Specified by:
        setActiveOrganizationId in interface OrganizationSetInSessionCmd
        Parameters:
        nOrganizationId - Active Organization Identity.
      • isParentOrganization

        public boolean isParentOrganization()
        Checks if the user's parent organization is the same as the active organization.
        Returns:
        True If user's parent organization and active organization are the same.
      • isRequiredRolePlayed

        public boolean isRequiredRolePlayed()
                                     throws ECException
        Checks if the required role is played in the ancestral organizations of the active Organization.
        Returns:
        True If the required role is played.
        Throws:
        ECException - If there are failures with the EJBs.