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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
Copyright field.
|
Constructor and Description |
---|
OrganizationSetInSessionCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Long | getActiveOrganizationId()
Gets the active organization to switch to.
|
protected static java.lang.Integer | getActiveOrganizationRoleId()
Maps the Organization Participant Role to that of the system's Id for this role.
|
protected java.lang.Long[] | getOrganizationAncestors()
Get the list of organization ancestors for the specified active organization.
|
java.lang.String | getURL()
Gets the URL specified.
|
protected boolean | isAncestralOrgsLocked()
Returns true if any parent organization is locked.
|
boolean | isGeneric()
Whether or not this command can be invoked by a generic user.
|
boolean | isParentOrganization()
Checks if the user's parent organization is the same as the active organization.
|
boolean | isRequiredRolePlayed()
Checks if the required role is played in the ancestral organizations of the active Organization.
|
protected boolean | isSwitchAllowed()
Determines whether the user is allowed to switch to the specified active organization.
|
void | performExecute()
Executes the command.
|
void | setActiveOrganizationId(java.lang.Long nOrganizationId)
Sets the active organization to switch to.
|
void | setRequestProperties(TypedProperty hshReqParameters)
Sets the request properties.
|
void | setURL(java.lang.String strURL)
Sets the URL to redirect to after logging off the user.
|
protected void | updateCommandContext()
Updates the command context to reflect the new active organization.
|
void | validateParameters()
Validates the parameters.
|
public static final java.lang.String COPYRIGHT
protected static java.lang.Integer getActiveOrganizationRoleId() throws ECException
public boolean isGeneric()
public void setRequestProperties(TypedProperty hshReqParameters) throws ECApplicationException
public void setURL(java.lang.String strURL)
public java.lang.String getURL()
public void setActiveOrganizationId(java.lang.Long nOrganizationId)
protected java.lang.Long getActiveOrganizationId()
protected boolean isSwitchAllowed() throws ECException
protected void updateCommandContext() throws ECException
public void performExecute() throws ECException
public void validateParameters() throws ECException
protected boolean isAncestralOrgsLocked() throws ECException
public boolean isParentOrganization()
public boolean isRequiredRolePlayed() throws ECException
protected java.lang.Long[] getOrganizationAncestors() throws ECException