@RestResource(id="atg.userprofiling.restresources.userRestResource") public class UserRestResource extends GenericService
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
CLASS_VERSION
Class version string 
 | 
static java.lang.String | 
CONFIRMATION_PASSWORD_PROPERTY  | 
static java.lang.String | 
CREATE  | 
ProfileTools | 
mProfileTools
The ProfileTools component 
 | 
static java.lang.String | 
NEW_PASSWORD_PROPERTY  | 
static java.lang.String | 
OLD_PASSWORD_PROPERTY  | 
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
UserRestResource()  | 
| Modifier and Type | Method and Description | 
|---|---|
java.lang.Object | 
getAddresses(java.lang.String pUserId)
Gets the address rest subresource. 
 | 
protected java.lang.String | 
getAddressesUri(java.lang.String pProfileId)
Build a resource URI for the Addresses. 
 | 
java.lang.String | 
getEmbeddedAddressesRelationshipName()
Get the relationship name used when embedding the addresses resource. 
 | 
java.lang.String[] | 
getIgnoreProperties()
Gets the ignore properties. 
 | 
ProfileTools | 
getProfileTools()
Returns the ProfileTools component. 
 | 
protected RepresentationModel.Builder | 
getRepresentationModelBuilder(java.lang.Object pState)
Gets the RepresentationModel.Builder with the given object acting as the state. 
 | 
protected RepresentationModel.Builder | 
getRepresentationModelBuilderWithEmbeddedDetails(java.lang.Object pState)
Gets the RepresentationModel.Builder with the given object acting as the state. 
 | 
RepresentationModel | 
getUser(java.lang.String pUserId)
Gets a user based on user id. 
 | 
void | 
setEmbeddedAddressesRelationshipName(java.lang.String pEmbeddedAddressesRelationshipName)
Configure the relationship name used for embedded addresses. 
 | 
void | 
setIgnoreProperties(java.lang.String[] pIgnoreProperties)
Sets the ignore properties. 
 | 
void | 
setProfileTools(ProfileTools pProfileTools)
Sets the ProfileTools component. 
 | 
java.util.Map<java.lang.String,java.lang.Boolean> | 
updateExpiredPassword(org.json.JSONObject pInputJson)
This end point should be used for updating a password. 
 | 
protected void | 
validateProfile(RepositoryItem pProfile,
               java.lang.String pUserId)
It validates the profile id against the supplied user id. 
 | 
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService, toStringvlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static final java.lang.String CLASS_VERSION
public static final java.lang.String CREATE
public static final java.lang.String OLD_PASSWORD_PROPERTY
public static final java.lang.String NEW_PASSWORD_PROPERTY
public static final java.lang.String CONFIRMATION_PASSWORD_PROPERTY
public ProfileTools mProfileTools
public void setProfileTools(ProfileTools pProfileTools)
pProfileTools - the profileTools componentpublic ProfileTools getProfileTools()
public java.lang.String[] getIgnoreProperties()
public void setIgnoreProperties(java.lang.String[] pIgnoreProperties)
pIgnoreProperties - the new ignore propertiespublic void setEmbeddedAddressesRelationshipName(java.lang.String pEmbeddedAddressesRelationshipName)
pEmbeddedAddressesRelationshipName - the name of the relationship to the embedded resourcepublic java.lang.String getEmbeddedAddressesRelationshipName()
@Endpoint(id="/users/updateExpiredPassword#POST", validatorId="users.updateExpiredPassword", filterId="users.updateExpiredPassword-Default") public java.util.Map<java.lang.String,java.lang.Boolean> updateExpiredPassword(org.json.JSONObject pInputJson) throws RestException, atg.userprofiling.PasswordChangeException, RepositoryException, PropertyNotFoundException
pInputJson - JSON representation of the password dataRestException - if something went wrong whilst updating an expired passwordatg.userprofiling.PasswordChangeException - if something went wrong whilst updating an expired passwordRepositoryException - if something went wrong whilst updating an expired passwordPropertyNotFoundException - if something went wrong whilst updating an expired password@Endpoint(id="/users/{userId}#GET", isSingular=true, filterId="users.id-Default", security="logged-in") public RepresentationModel getUser(java.lang.String pUserId) throws RestException
pUserId - the user idRestException - if something went wrong whilst creating the representation model@SubresourceLocator(subresourceIds="atg.userprofiling.restresources.addressRestSubresource") public java.lang.Object getAddresses(java.lang.String pUserId) throws RestException
pUserId - the user idRestException - if something went wrong whilst getting the addressesprotected void validateProfile(RepositoryItem pProfile, java.lang.String pUserId) throws RestException
pProfile - the profilepUserId - the user idRestException - if the given profile repository item does not match against the given user idprotected RepresentationModel.Builder getRepresentationModelBuilder(java.lang.Object pState)
pState - the state that will be added to the representation modelprotected RepresentationModel.Builder getRepresentationModelBuilderWithEmbeddedDetails(java.lang.Object pState) throws RestException
Also includes embedded addresses.
pState - the state that will be added to the representation modelRestException - if the RepresentationModel.Builder could not be createdprotected java.lang.String getAddressesUri(java.lang.String pProfileId)
                                    throws RestException
pProfileId - profile idRestException - if the addresses uri could not be created