public class MemberRoleUpdateCmdImpl extends ControllerCommandImpl implements MemberRoleUpdateCmd
The parameters memberId, roleId and orgEntityId are mandatory.
Usage:
Usage 1: To assign roles to a user in an organization based on the user's users_id, use the
following syntax (in this example, the user with users_id
2 will be granted roles -2 and -4 in
the default organization):
memberId=2&roleId0=-2&orgEntityId0=-2000&roleId1=-4&orgEntityId1=-2000
Note that if the user had other roles defined, then these roles will be implicitly removed. The
end result will be that the user only plays the two roles defined in this example.
Usage 2: To define roles for an organization (in this example, the roles -2 and -4 will be added
to the default organization):
memberId=-2000&roleId0=-2&orgentityId0=-2000&roleId1=-4&orgentityId1=-2000
Usage 3: To assign a role to a user based on the user's distinguished name (DN):
distinguishedName=uid=buyeraadmin,o=buyer a organization,o=root organization&roleId=-2&orgentityId=-2000
In this example, the user with DN uid=buyeraadmin,o=buyer a organization,o=root organization will be
granted the -2 role in the default organization.
Usage 4: To unassign a role from a user based on the user's distinguished name (DN):
distinguishedName=uid=buyeraadmin,o=buyer a organization,o=root organization&roleId=-2&orgentityId=-2000&unassignRole=true
This example will take away the buyeraadmin's -2 role in the default organization (if it existed).
Exception Conditions
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
Class name.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
NAME, REQUEST_PARAM_DISTINGUISHEDNAME, REQUEST_PARAM_MEMBERID, REQUEST_PARAM_ORGENTITYID, REQUEST_PARAM_ROLEID, REQUEST_PARAM_UNASSIGNROLE, REQUEST_PARAM_UNASSIGNROLE_VALUE_TRUE
defaultCommandClassName
Constructor and Description |
---|
MemberRoleUpdateCmdImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
getIsAssigningRoleToOrgentity()
Get whether or not we are assigning the role to an organization.
|
boolean |
getIsUnassigningRoleFromDN()
Get whether or not we are unassigning the role; applies only when updating a role
based on a user DN.
|
boolean |
getIsUpdatingRoleByDN()
Get whether or not the role(s) are being updated based on the user distinguished
name.
|
java.lang.String |
getMemberId()
Gets the memberId of the user or orgEntities to assign roles.
|
java.util.Vector |
getOrgEntityIdsToAssign()
Get the list of organization Ids for the role assignment.
|
java.util.Vector |
getOrgEntityIdsToUnassign()
Get the list of organization Ids for the role unassignment.
|
java.lang.String |
getRedirectURL()
Return redirect URL.
|
java.util.Vector |
getRoleIdsToAssign()
Get the role Ids for the role assignment.
|
java.util.Vector |
getRoleIdsToUnassign()
Get the role Ids for the role unassignment.
|
TypedProperty |
getViewInputProperties()
Removes the XML properties from the request
|
void |
performExecute()
The performExecute method is called to when the marketing manager
asks to add one or more users to a customer segment.
|
void |
setIsAssigningRoleToOrgentity(boolean abOrgEntity)
Set whether or not we are assigning the role to an orgEntity.
|
void |
setIsUnassigningRoleFromDN(boolean abUnassignRoleByDN)
Set whether or not we are unassigning the role.
|
void |
setIsUpdatingRoleByDN(boolean abByUserDN)
Set whether or not we are updating the role by DN.
|
void |
setMemberId(java.lang.String astrMemberId)
Sets the memberId of the user or orgEntities to assign roles.
|
void |
setOrgEntityIdsToAssign(java.util.Vector avecOrgEntityId)
Set the organization Ids to assign.
|
void |
setOrgEntityIdsToUnassign(java.util.Vector avecRemOrgEntityId)
Set the organization Ids to unassign.
|
void |
setRedirectURL(java.lang.String astrRedirectURL)
Sets redirect URL.
|
void |
setRequestProperties(TypedProperty reqProperties)
Sets the request properties
|
void |
setRoleIdsToAssign(java.util.Vector avecRoleId)
The role Ids to assign.
|
void |
setRoleIdsToUnassign(java.util.Vector avecRemRoleId)
Set the role Ids to unassign.
|
void |
validateParameters()
Validates the parameters before calling performExecute
|
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
fulfills, getOwner
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
public java.lang.String getMemberId()
getMemberId
in interface MemberRoleUpdateCmd
public java.lang.String getRedirectURL()
getRedirectURL
in interface MemberRoleUpdateCmd
public TypedProperty getViewInputProperties()
getViewInputProperties
in interface ControllerCommand
getViewInputProperties
in class ControllerCommandImpl
public void performExecute() throws ECException
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AbstractECTargetableCommand
ECExcption
- thrown if user does not existECException
public void setMemberId(java.lang.String astrMemberId)
setMemberId
in interface MemberRoleUpdateCmd
astrMemberId
- The memberIdpublic void setRedirectURL(java.lang.String astrRedirectURL)
setRedirectURL
in interface MemberRoleUpdateCmd
astrRedirectURL
- The redirect URLpublic void setRequestProperties(TypedProperty reqProperties) throws ECException
setRequestProperties
in interface ControllerCommand
setRequestProperties
in class ControllerCommandImpl
reqProperties
- the typed properties from the incoming requestECException
- thrown if the request properties does not textpublic void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class AbstractECTargetableCommand
ECException
- thrown if the parameters do not existpublic boolean getIsUpdatingRoleByDN()
public boolean getIsAssigningRoleToOrgentity()
public boolean getIsUnassigningRoleFromDN()
public java.util.Vector getOrgEntityIdsToAssign()
public java.util.Vector getOrgEntityIdsToUnassign()
public java.util.Vector getRoleIdsToUnassign()
public java.util.Vector getRoleIdsToAssign()
public void setIsUpdatingRoleByDN(boolean abByUserDN)
abByUserDN
- true if we are updating the role by DN; false if we are updating
the role by member Id.public void setIsAssigningRoleToOrgentity(boolean abOrgEntity)
abOrgEntity
- true if we are assigning the role to an orgEntity; false if
we are assigning the role to a user.public void setIsUnassigningRoleFromDN(boolean abUnassignRoleByDN)
abUnassignRoleByDN
- true if we are unassigning a role; false if we are
assigning the role.public void setOrgEntityIdsToAssign(java.util.Vector avecOrgEntityId)
avecOrgEntityId
- The organization Ids to assign.public void setOrgEntityIdsToUnassign(java.util.Vector avecRemOrgEntityId)
avecRemOrgEntityId
- The organization Ids to unassign.public void setRoleIdsToUnassign(java.util.Vector avecRemRoleId)
avecRemRoleId
- The role Ids to unassign.public void setRoleIdsToAssign(java.util.Vector avecRoleId)
avecRoleId
- The role Ids to assign.