@Path(value="store/{storeId}/person") @Encoded public class PersonHandler extends AbstractConfigBasedClassicHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright notice field.
|
static java.lang.String |
FORMAT_GROUP_NAME
The constant FORMAT_GROUP_NAME
|
static java.lang.String |
PARAMETER_MEMBER_ID
The constant PARAMETER_MEMBER_ID
|
static java.lang.String |
PARAMETER_SCOPED_BY_ORGS_I_CAN_ADMIN
The constant PARAMETER_SCOPED_BY_ORGS_I_CAN_ADMIN
|
static java.lang.String |
PARAMETER_USER_ID
The constant PARAMETER_USER_ID
|
static java.lang.String |
PARAMETER_USER_ID_DESCRIPTION
The constant PARAMETER_USER_ID_DESCRIPTION
|
static java.lang.String |
RESOURCE_MAPPING_KEY
The Constant RESOURCE_MAPPING_KEY.
|
static java.lang.String |
RESOURCE_NAME
Resource name for person.
|
APPLICATION_ATOM_XML, APPLICATION_JSON, APPLICATION_XHTML_XML, APPLICATION_XML, CHANGE_VERB, PARAMETER_ACTION, PARAMETER_ACTION_DESCRIPTION, PARAMETER_CATALOG_ID, PARAMETER_CATALOG_ID_DESCRIPTION, PARAMETER_CURRENCY, PARAMETER_CURRENCY_DESCRIPTION, PARAMETER_FOR_USER, PARAMETER_FOR_USER_DESCRIPTION, PARAMETER_FOR_USER_ID, PARAMETER_FOR_USER_ID_DESCRIPTION, PARAMETER_LANG_ID, PARAMETER_LANG_ID_DESCRIPTION, PARAMETER_LOCALE, PARAMETER_LOCALE_DESCRIPTION, PARAMETER_MODE, PARAMETER_MODE_DESCRIPTION, PARAMETER_PAGE_NUMBER, PARAMETER_PAGE_NUMBER_DESCRIPTION, PARAMETER_PAGE_SIZE, PARAMETER_PAGE_SIZE_DESCRIPTION, PARAMETER_PROFILE_NAME, PARAMETER_PROFILE_NAME_DESCRIPTION, PARAMETER_QUERY, PARAMETER_QUERY_DESCRIPTION, PARAMETER_RESET_PASSWORD_DESCRIPTION, PARAMETER_RESPONSE_FORMAT, PARAMETER_RESPONSE_FORMAT_DESCRIPTION, PARAMETER_STORE_ID, PARAMETER_STORE_ID_DESCRIPTION, PARAMETER_WORKSPACE_IDENTIFIER, PARAMETER_WORKSPACE_IDENTIFIER_DESCRIPTION, PARAMETER_WORKSPACE_NAME, PARAMETER_WORKSPACE_NAME_DESCRIPTION, PARAMETER_WORKSPACE_TASK, PARAMETER_WORKSPACE_TASK_DESCRIPTION, PARAMETER_WORKSPACE_TASKGROUP, PARAMETER_WORKSPACE_TASKGROUP_DESCRIPTION, PROCESS_VERB, RESPONSE_200_DESCRIPTION, RESPONSE_201_DESCRIPTION, RESPONSE_204_DESCRIPTION, RESPONSE_400_DESCRIPTION, RESPONSE_401_DESCRIPTION, RESPONSE_403_DESCRIPTION, RESPONSE_404_DESCRIPTION, RESPONSE_500_DESCRIPTION
Constructor and Description |
---|
PersonHandler() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
assignRoleByAdmin(java.lang.String storeId,
java.lang.String userId)
This allows an administrator to assign role(s) to a registered user.
|
javax.ws.rs.core.Response |
changeLanguageCurrency(java.lang.String storeId,
java.lang.String responseFormat)
Change language and currency preference for a person
|
javax.ws.rs.core.Response |
deleteContextAttributeForPerson(java.lang.String jobName,
java.lang.String values,
java.lang.String storeId,
java.lang.String responseFormat)
Deletes one or more context attributes of an existing person.
|
javax.ws.rs.core.Response |
findByQuery(java.lang.String storeId,
java.lang.String queryName)
This allows an administrator to find users based on a query name.
|
javax.ws.rs.core.Response |
findByUserId(java.lang.String storeId,
java.lang.String userId)
This allows an administrator to find user information by user identifier.
|
javax.ws.rs.core.Response |
findByUserIdWAssignedRolesDetailsProfileName(java.lang.String storeId,
java.lang.String userId)
Internal method
findByUserIdWAssignedRolesDetailsProfileName for documentation ONLY. |
javax.ws.rs.core.Response |
findByUserIdWRolesOfUserAllProfileName(java.lang.String storeId,
java.lang.String userId)
Internal method
findByUserIdWRolesOfUserAllProfileName for documentation ONLY. |
javax.ws.rs.core.Response |
findByUserIdWRolesOfUserInOrgsICanAdminProfileName(java.lang.String storeId,
java.lang.String userId)
Internal method
findByUserIdWRolesOfUserInOrgsICanAdminProfileName for documentation ONLY. |
javax.ws.rs.core.Response |
findByUserIdWUserRegistrationDetailsProfileName(java.lang.String storeId,
java.lang.String userId)
Internal method
findByUserIdWUserRegistrationDetailsProfileName for documentation ONLY. |
javax.ws.rs.core.Response |
findByUserIdWUserRegistrationSummaryProfileName(java.lang.String storeId,
java.lang.String userId)
Internal method
findByUserIdWUserRegistrationSummaryProfileName for documentation ONLY. |
javax.ws.rs.core.Response |
findByUserIdWUserTopLevelOrganizationsAdministered(java.lang.String storeId,
java.lang.String userId)
Internal method
findByUserIdWUserTopLevelOrganizationsAdministered for documentation ONLY. |
javax.ws.rs.core.Response |
findOptOutBySelf(java.lang.String storeId)
Find personal opt-out.
|
javax.ws.rs.core.Response |
findOptOutBySelfWOptOutAllProfileName(java.lang.String storeId)
Internal method
findOptOutBySelfWOptOutAllProfileName for documentation ONLY. |
javax.ws.rs.core.Response |
findOptOutBySelfWOptOutSmsProfileName(java.lang.String storeId)
Internal method
findOptOutBySelfWOptOutSmsProfileName for documentation ONLY. |
javax.ws.rs.core.Response |
findPersonBySelf(java.lang.String storeId,
java.lang.String responseFormat)
This method retrieves user data for the logged in user using Member
service.
|
java.lang.String |
getFormattingGroupName()
This method returns the format group name to locate JSP template.
|
PersonHelper |
getHelper()
This method returns the BOD helper used to get product data
|
java.lang.String |
getResourceName()
This method returns the name of the resource used primarily to determine
the representation of the resource.
|
void |
initializeActionRegistry(OperationRegistry registry)
Initialize the action registry.
|
void |
initializeQueryRegistry(OperationRegistry registry)
Initializes the registry mapping between the query names and the methods being called to handle requests.
|
javax.ws.rs.core.Response |
performActionByAdmin(java.lang.String storeId,
java.lang.String userId)
Performs an action on a person.
|
void |
postProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
Method to provide post process in out of box JSON/XML entity providers
after each DataObject has been converted to a Map and before constructing
the REST response.
|
javax.ws.rs.core.Response |
registeredUsersICanManage(java.lang.String storeId)
This allows CSR/CSS to find approved registered users in store organizations that he/she can manage.
|
javax.ws.rs.core.Response |
registeredUsersICanManageWUserListDetailsProfileName(java.lang.String storeId)
Internal method
registeredUsersICanManageWUserListDetailsProfileName for documentation ONLY. |
javax.ws.rs.core.Response |
registerPerson(java.lang.String storeId,
java.lang.String responseFormat)
Registers a new user.
|
javax.ws.rs.core.Response |
registerPersonOnUserRegistrationAdminAdd(java.lang.String storeId,
java.lang.String responseFormat)
Internal method
registerPersonOnUserRegistrationAdminAdd for documentation ONLY. |
javax.ws.rs.core.Response |
resetPasswordByAdmin(java.lang.String storeId)
This method allows an administrator to reset password for a registered
user.
|
javax.ws.rs.core.Response |
unassignRoleByAdmin(java.lang.String storeId,
java.lang.String userId)
This allows an administrator to unassign role(s) from a registered user.
|
javax.ws.rs.core.Response |
updateMemberUser(java.lang.String storeId,
java.lang.String userId)
Updates user to be included/excluded from a member group or to be unassigned
|
javax.ws.rs.core.Response |
updatePerson(java.lang.String storeId,
java.lang.String responseFormat)
Update user account data for a registered shopper.
|
javax.ws.rs.core.Response |
updatePersonByAdmin(java.lang.String storeId,
java.lang.String userId)
This allows an administrator to update account data for a registered user.
|
javax.ws.rs.core.Response |
updatePersonOnUserRegistrationUpdate(java.lang.String storeId,
java.lang.String responseFormat)
Internal method
updatePersonOnUserRegistrationUpdate for documentation ONLY. |
javax.ws.rs.core.Response |
usersICanAdmin(java.lang.String storeId)
This allows an administrator to find users in organizations that he/she can administer.
|
javax.ws.rs.core.Response |
usersICanAdminWUserListDetailsProfileName(java.lang.String storeId)
Internal method
usersICanAdminWUserListDetailsProfileName for documentation ONLY. |
executeConfigBasedBean, executeConfigBasedBean, executeConfigBasedBeanWithContext, executeConfigBasedBeanWithContext, executeConfigBasedCommand, executeConfigBasedCommandWithContext
createMapForProvider, createMapForProvider, generateResponseForEntireDataObject, getMapFromRequest, getStoreId, getUserId, isRequestInPreviewMode, mergeMapsForProvider, prepareAndValidate
addError, createMapForProviderWithResultData, documentApi, generateResponseFromHttpStatusCodeAndRespData, getActionRegistry, getBooleanParameterValue, getClassDescription, getDoubleParameterValue, getDoubleParameterValues, getEnumeratedParameterValue, getErrorCodeFromMessage, getExternalResourceName, getFormattedMessage, getFormattedMessageWithLocale, getInstrumentor, getIntegerParameterValue, getIntegerParameterValues, getLongParameterValue, getLongParameterValues, getParameterValue, getParameterValue, getParameterValues, getQueryRegistry, getRequest, getResponse, getUriInfo, handleException, performAction, preProcess, registerOperationWithMethodSignature, runQuery, staticConvertStreamToString, throwInvalidQueryNameException, throwInvalidQueryNameException, throwRestException, throwRestExceptionIfErrorsAreDetected, validatePageNumberPageSize
public static final java.lang.String COPYRIGHT
public static final java.lang.String RESOURCE_NAME
public static final java.lang.String RESOURCE_MAPPING_KEY
public static final java.lang.String FORMAT_GROUP_NAME
public static final java.lang.String PARAMETER_USER_ID
public static final java.lang.String PARAMETER_USER_ID_DESCRIPTION
public static final java.lang.String PARAMETER_MEMBER_ID
public static final java.lang.String PARAMETER_SCOPED_BY_ORGS_I_CAN_ADMIN
public void initializeQueryRegistry(OperationRegistry registry)
initializeQueryRegistry
in class AbstractBaseResourceHandler
registry
- The operation registry object.public void initializeActionRegistry(OperationRegistry registry)
AbstractBaseResourceHandler
initializeActionRegistry
in class AbstractBaseResourceHandler
registry
- The query registry to initialize.public java.lang.String getResourceName()
IResourceHandler
public java.lang.String getFormattingGroupName()
getFormattingGroupName
in interface IResourceHandler
getFormattingGroupName
in class AbstractBaseResourceHandler
public PersonHelper getHelper()
@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="@self") public javax.ws.rs.core.Response findPersonBySelf(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
storeId
- the store idresponseFormat
- the response format@PUT @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="@self/languageCurrency") public javax.ws.rs.core.Response changeLanguageCurrency(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
storeId
- the store idresponseFormat
- the response format@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="{userId}") public javax.ws.rs.core.Response findByUserId(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
storeId
- The store IDuserId
- The user ID@Path(value="{userId}") public javax.ws.rs.core.Response findByUserIdWUserRegistrationDetailsProfileName(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
findByUserIdWUserRegistrationDetailsProfileName
for documentation ONLY.storeId
- the store IDuserId
- the user ID@Path(value="{userId}") public javax.ws.rs.core.Response findByUserIdWUserRegistrationSummaryProfileName(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
findByUserIdWUserRegistrationSummaryProfileName
for documentation ONLY.storeId
- the store IDuserId
- the user ID@Path(value="{userId}") public javax.ws.rs.core.Response findByUserIdWAssignedRolesDetailsProfileName(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
findByUserIdWAssignedRolesDetailsProfileName
for documentation ONLY.storeId
- the store IDuserId
- the user ID@Path(value="{userId}") public javax.ws.rs.core.Response findByUserIdWUserTopLevelOrganizationsAdministered(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
findByUserIdWUserTopLevelOrganizationsAdministered
for documentation ONLY.storeId
- the store IDuserId
- the user ID@Path(value="{userId}") public javax.ws.rs.core.Response findByUserIdWRolesOfUserAllProfileName(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
findByUserIdWRolesOfUserAllProfileName
for documentation ONLY.storeId
- the store IDuserId
- the user ID@Path(value="{userId}") public javax.ws.rs.core.Response findByUserIdWRolesOfUserInOrgsICanAdminProfileName(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
findByUserIdWRolesOfUserInOrgsICanAdminProfileName
for documentation ONLY.storeId
- the store IDuserId
- the user IDpublic javax.ws.rs.core.Response usersICanAdmin(@PathParam(value="storeId") java.lang.String storeId)
storeId
- The store ID.public javax.ws.rs.core.Response registeredUsersICanManage(@PathParam(value="storeId") java.lang.String storeId)
storeId
- The store ID.public javax.ws.rs.core.Response usersICanAdminWUserListDetailsProfileName(@PathParam(value="storeId") java.lang.String storeId)
usersICanAdminWUserListDetailsProfileName
for documentation ONLY.storeId
- the store IDpublic javax.ws.rs.core.Response registeredUsersICanManageWUserListDetailsProfileName(@PathParam(value="storeId") java.lang.String storeId)
registeredUsersICanManageWUserListDetailsProfileName
for documentation ONLY.storeId
- the store ID@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) public javax.ws.rs.core.Response findByQuery(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="q") java.lang.String queryName)
storeId
- The store ID.queryName
- The query name.@GET @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="@self/optOut") public javax.ws.rs.core.Response findOptOutBySelf(@PathParam(value="storeId") java.lang.String storeId)
storeId
- The store ID.@Path(value="@self/optOut") public javax.ws.rs.core.Response findOptOutBySelfWOptOutSmsProfileName(@PathParam(value="storeId") java.lang.String storeId)
findOptOutBySelfWOptOutSmsProfileName
for documentation ONLY.storeId
- the store ID@Path(value="@self/optOut") public javax.ws.rs.core.Response findOptOutBySelfWOptOutAllProfileName(@PathParam(value="storeId") java.lang.String storeId)
findOptOutBySelfWOptOutAllProfileName
for documentation ONLY.storeId
- the store ID@POST @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Consumes(value={"application/json","application/xml"}) public javax.ws.rs.core.Response registerPerson(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
storeId
- the store idresponseFormat
- the response format@Consumes(value={"application/json","application/xml"}) public javax.ws.rs.core.Response registerPersonOnUserRegistrationAdminAdd(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
registerPersonOnUserRegistrationAdminAdd
for documentation ONLY.storeId
- the store IDresponseFormat
- the response format@PUT @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Consumes(value={"application/json","application/xml"}) @Path(value="@self") public javax.ws.rs.core.Response updatePerson(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
Supporting 2 scenarios to reset a shopper's password:
While unauthenticated: If you do not know the password and want to reset password, you will pass in a Map with the following keys.
resetPassword
- set it to true
logonId
- user login id
challengeAnswer - challenge answer
b) Two-step process: Beginning in 7.0.0.9, the CMDREG.PROPERTIES
of ResetPasswordGuestCmd
can be updated to include inSessionValidationCode=true
to enable the following flow.
(Note: A guest identity must be obtained before this two-step process can be invoked):
resetPassword
- set it to true
logonPassword
- new logon password
xcred_logonPasswordVerify - new logon verify password
xcred_validationCode - the validation code
resetPassword
- set it to true
logonPassword
- new logon password
xcred_logonPasswordOld - existing/old logon password
xcred_logonPasswordVerify - new logon verify password
storeId
- The store identifier.responseFormat
- The response format.@Consumes(value={"application/json","application/xml"}) @Path(value="@self") public javax.ws.rs.core.Response updatePersonOnUserRegistrationUpdate(@PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
updatePersonOnUserRegistrationUpdate
for documentation ONLY.storeId
- the store IDresponseFormat
- the response format@PUT @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Consumes(value={"application/json","application/xml"}) @Path(value="{userId}") public javax.ws.rs.core.Response updatePersonByAdmin(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
storeId
- the store IDuserId
- the user ID@Consumes(value={"application/json","application/xml"}) @Path(value="{userId}") public javax.ws.rs.core.Response assignRoleByAdmin(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
storeId
- the store IDuserId
- the user ID@Consumes(value={"application/json","application/xml"}) @Path(value="{userId}") public javax.ws.rs.core.Response unassignRoleByAdmin(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
storeId
- the store IDuserId
- the user ID@POST @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Consumes(value={"application/json","application/xml"}) @Path(value="updateMemberPassword") public javax.ws.rs.core.Response resetPasswordByAdmin(@PathParam(value="storeId") java.lang.String storeId)
storeId
- the store ID@POST @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Consumes(value={"application/json","application/xml"}) @Path(value="{userId}") public javax.ws.rs.core.Response performActionByAdmin(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
storeId
- the store IDuserId
- the user ID@DELETE @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="@self/contextattributes/{jobNames}/{values}") public javax.ws.rs.core.Response deleteContextAttributeForPerson(@PathParam(value="jobNames") java.lang.String jobName, @PathParam(value="values") java.lang.String values, @PathParam(value="storeId") java.lang.String storeId, @QueryParam(value="responseFormat") java.lang.String responseFormat)
jobName
- is the name of the context attribute.values
- is the value of the context attribute . Multiple context attribute values can be passed to the URI separated by comma ','.storeId
- storeIdresponseFormat
- response Formatpublic void postProcess(java.util.Map<java.lang.String,java.lang.Object> responseMap)
AbstractBaseResourceHandler
postProcess
in interface IResourceHandler
postProcess
in class AbstractBaseResourceHandler
responseMap
- The response Map after each DataObject has been converted to a
Map.@POST @Produces(value={"application/json","application/xml","application/xhtml+xml","application/atom+xml"}) @Path(value="updateMemberUser/{userId}") public javax.ws.rs.core.Response updateMemberUser(@PathParam(value="storeId") java.lang.String storeId, @PathParam(value="userId") java.lang.String userId)
storeId
- the store IDuserId
- the user Id