Package org.alfresco.rest.requests
Class People
- java.lang.Object
-
- org.alfresco.rest.requests.ModelRequest<People>
-
- org.alfresco.rest.requests.People
-
public class People extends ModelRequest<People>
Declares all Rest API under the /people path
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPeople.WhereClauseConstruct the Where clause of getFavorites You can use the where parameter to restrict the list in the response to entries of a specific kind.
-
Field Summary
-
Fields inherited from class org.alfresco.rest.requests.ModelRequest
restWrapper
-
-
Constructor Summary
Constructors Constructor Description People(org.alfresco.utility.model.UserModel person, RestWrapper restWrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RestFavoriteSiteModeladdFavoriteSite(org.alfresco.utility.model.SiteModel site)Add a favorite site for a specific person using POST call on "people/{personId}/favorite-sites"RestPersonFavoritesModeladdFileToFavorites(org.alfresco.utility.model.FileModel fileModel)Add a folder to favorites for a specific user using POST call on "people/{personId}/favorites"RestPersonFavoritesModeladdFolderToFavorites(org.alfresco.utility.model.FolderModel folderModel)Add a folder to favorites for a specific user using POST call on "people/{personId}/favorites"RestSiteMembershipRequestModeladdSiteMembershipRequest(java.lang.String siteMembershipRequest)Add new site membership request using POST call on "people/{personId}/site-membership-requests"RestSiteMembershipRequestModeladdSiteMembershipRequest(java.lang.String message, org.alfresco.utility.model.SiteModel siteModel, java.lang.String title)Add new site membership request using POST call on "people/{personId}/site-membership-requests"RestSiteMembershipRequestModeladdSiteMembershipRequest(org.alfresco.utility.model.SiteModel siteModel)Add new site membership request using POST call on "people/{personId}/site-membership-requests"RestPersonFavoritesModeladdSiteToFavorites(org.alfresco.utility.model.SiteModel siteModel)Add a site to favorites for a specific user using POST call on "people/{personId}/favorites"RestPersonModelcreatePerson(RestPersonModel newPerson)Create new person with given newPerson details using POST call on "people"RestWrapperdeleteFileFromFavorites(org.alfresco.utility.model.FileModel fileModel)Delete a file from favorites for a specific user using DELETE call on "people/{personId}/favorites/{favoriteId}"RestWrapperdeleteFolderFromFavorites(org.alfresco.utility.model.FolderModel folderModel)Delete a folder from favorites for a specific user using DELETE call on "people/{personId}/favorites/{favoriteId}"RestWrapperdeleteSiteFromFavorites(org.alfresco.utility.model.SiteModel site)Delete site from favorites for a specific user using DELETE call on "people/{personId}/favorites/{favoriteId}"voiddeleteSiteMember(org.alfresco.utility.model.SiteModel site)Delete site member with DELETE call on "people/{personId}/sites/{siteId}"voiddeleteSiteMembershipRequest(org.alfresco.utility.model.SiteModel site)Delete site membership request with DELETE call on "/people/{personId}/site-membership-requests/{siteId}"RestResponsedownloadAvatarContent()Get people avatar image using GET call on '/people/{personId}/avatar Please note that it retries to get the renditions response several times because on the alfresco server the rendition can take a while to be created.RestPersonFavoritesModelgetFavorite(java.lang.String favoriteId)Retrieve favorite site for a specific user using GET call on "people/{personId}/favorites/{favoriteId}"RestPersonFavoritesModelsCollectiongetFavorites()Retrieve specific favorites for a specific user using GET call on "people/{personId}/favorites"RestSiteModelgetFavoriteSite(org.alfresco.utility.model.SiteModel site)Returns information on favorite site siteId of person personId.RestSiteModelsCollectiongetFavoriteSites()Retrieve a specific person's favorite sites using GET call on "people/{personId}/favorite-sites"RestNetworkModelgetNetwork()Retrieve details of the current user network using GET call on "people/{personId}/networks/{networkId}"RestNetworkModelgetNetwork(org.alfresco.utility.model.UserModel tenant)Retrieve details of a specific network using GET call on "people/{personId}/networks/{networkId}"RestNetworkModelsCollectiongetNetworks()Retrieve details of all networks related to the current person using GET call on "people/{personId}/networks"RestNetworkModelsCollectiongetNetworks(org.alfresco.utility.model.UserModel tenant)Retrieve details of all networks related to a specific person using GET call on "people/{personId}/networks"RestPersonModelgetPerson()Retrieve details of a specific person using GET call on "people/{personId}"RestActivityModelsCollectiongetPersonActivities()Retrieve list of activities for a specific person using GET call on "people/{personId}/activities" without retryRestActivityModelsCollectiongetPersonActivitiesUntilEntriesCountIs(int expectedNoOfEntries)Retrieve list of activities for a specific person using GET call on "people/{personId}/activities" Please note that it retries to get the list of activities several times before returning the empty list.RestPreferenceModelgetPersonPreferenceInformation(java.lang.String preferenceName)Retrieve a specific preference of a specific person using GET call on "people/{personId}/preferences/{preferenceName}"RestPreferenceModelsCollectiongetPersonPreferences()Retrieve preferences of a specific person using GET call on "people/{personId}/preferences"RestSiteEntrygetSiteMembership(org.alfresco.utility.model.SiteModel site)Retrieve site membership information for a person using GET call on "people/{personId}/sites/{siteId}"RestSiteMembershipRequestModelgetSiteMembershipRequest(org.alfresco.utility.model.SiteModel site)Retrieve site membership request details for a person/site using GET call on "people/{personId}/site-membership-requests/{siteId}"RestSiteMembershipRequestModelsCollectiongetSiteMembershipRequests()Retrieve the current site membership requests for a specific person using GET call on "/people/{personId}/site-membership-requests"RestSiteMembershipModelsCollectiongetSitesMembershipInformation()Get site membership information using GET call on "/people/{personId}/sites"RestGroupsModelsCollectionlistGroupMemberships()List group memberships for a person using GET on '/people/{personId}/groupsvoidremoveFavoriteSite(org.alfresco.utility.model.SiteModel site)Remove a specific site from favorite sites list of a person using DELETE call on "people/{personId}/favorite-sites/{siteId}"voidresetAvatarImageRequest()Delete avatar image with DELETE call on "/people/{personId}/avatar}"RestPersonModelupdatePerson(java.lang.String putBody)Update a person properties using PUT call on "people/{personId}"RestSiteMembershipRequestModelupdateSiteMembershipRequest(org.alfresco.utility.model.SiteModel siteModel, java.lang.String message)Update site membership request using PUT call on "people/{personId}/site-membership-requests/{siteId}"io.restassured.response.ValidatableResponseuploadAvatarContent(java.lang.String fullServerUrL, java.io.File avatarFile)Update avatar image PUT call on 'people/{nodeId}/childrenPeople.WhereClausewhere()-
Methods inherited from class org.alfresco.rest.requests.ModelRequest
includePath, usingParams
-
-
-
-
Constructor Detail
-
People
public People(org.alfresco.utility.model.UserModel person, RestWrapper restWrapper) throws java.lang.Exception- Throws:
java.lang.Exception
-
-
Method Detail
-
getPerson
public RestPersonModel getPerson() throws java.lang.Exception
Retrieve details of a specific person using GET call on "people/{personId}"- Throws:
java.lang.Exception
-
updatePerson
public RestPersonModel updatePerson(java.lang.String putBody) throws java.lang.Exception
Update a person properties using PUT call on "people/{personId}"- Throws:
java.lang.Exception
-
getPersonActivitiesUntilEntriesCountIs
public RestActivityModelsCollection getPersonActivitiesUntilEntriesCountIs(int expectedNoOfEntries) throws java.lang.Exception
Retrieve list of activities for a specific person using GET call on "people/{personId}/activities" Please note that it retries to get the list of activities several times before returning the empty list. The list of activities are not displayed as they are created.- Throws:
java.lang.Exception
-
getPersonActivities
public RestActivityModelsCollection getPersonActivities() throws java.lang.Exception
Retrieve list of activities for a specific person using GET call on "people/{personId}/activities" without retry- Throws:
java.lang.Exception
-
getPersonPreferences
public RestPreferenceModelsCollection getPersonPreferences() throws java.lang.Exception
Retrieve preferences of a specific person using GET call on "people/{personId}/preferences"- Throws:
java.lang.Exception
-
getSiteMembershipRequests
public RestSiteMembershipRequestModelsCollection getSiteMembershipRequests() throws java.lang.Exception
Retrieve the current site membership requests for a specific person using GET call on "/people/{personId}/site-membership-requests"- Throws:
java.lang.Exception
-
getFavoriteSites
public RestSiteModelsCollection getFavoriteSites() throws java.lang.Exception
Retrieve a specific person's favorite sites using GET call on "people/{personId}/favorite-sites"- Throws:
java.lang.Exception
-
addFavoriteSite
public RestFavoriteSiteModel addFavoriteSite(org.alfresco.utility.model.SiteModel site) throws java.lang.Exception
Add a favorite site for a specific person using POST call on "people/{personId}/favorite-sites"- Throws:
java.lang.Exception
-
getPersonPreferenceInformation
public RestPreferenceModel getPersonPreferenceInformation(java.lang.String preferenceName) throws java.lang.Exception
Retrieve a specific preference of a specific person using GET call on "people/{personId}/preferences/{preferenceName}"- Throws:
java.lang.Exception
-
removeFavoriteSite
public void removeFavoriteSite(org.alfresco.utility.model.SiteModel site) throws java.lang.ExceptionRemove a specific site from favorite sites list of a person using DELETE call on "people/{personId}/favorite-sites/{siteId}"- Throws:
java.lang.Exception
-
getFavoriteSite
public RestSiteModel getFavoriteSite(org.alfresco.utility.model.SiteModel site) throws java.lang.Exception
Returns information on favorite site siteId of person personId. GET call on "people/{personId}/favorite-sites/{siteId}"- Throws:
java.lang.Exception
-
deleteSiteMember
public void deleteSiteMember(org.alfresco.utility.model.SiteModel site) throws java.lang.ExceptionDelete site member with DELETE call on "people/{personId}/sites/{siteId}"- Throws:
java.lang.Exception
-
addSiteMembershipRequest
public RestSiteMembershipRequestModel addSiteMembershipRequest(java.lang.String siteMembershipRequest) throws java.lang.Exception
Add new site membership request using POST call on "people/{personId}/site-membership-requests"- Throws:
java.lang.Exception
-
addSiteMembershipRequest
public RestSiteMembershipRequestModel addSiteMembershipRequest(org.alfresco.utility.model.SiteModel siteModel) throws java.lang.Exception
Add new site membership request using POST call on "people/{personId}/site-membership-requests"- Throws:
java.lang.Exception
-
addSiteMembershipRequest
public RestSiteMembershipRequestModel addSiteMembershipRequest(java.lang.String message, org.alfresco.utility.model.SiteModel siteModel, java.lang.String title) throws java.lang.Exception
Add new site membership request using POST call on "people/{personId}/site-membership-requests"- Throws:
java.lang.Exception
-
getSitesMembershipInformation
public RestSiteMembershipModelsCollection getSitesMembershipInformation() throws java.lang.Exception
Get site membership information using GET call on "/people/{personId}/sites"- Throws:
java.lang.Exception
-
getSiteMembership
public RestSiteEntry getSiteMembership(org.alfresco.utility.model.SiteModel site) throws java.lang.Exception
Retrieve site membership information for a person using GET call on "people/{personId}/sites/{siteId}"- Throws:
java.lang.Exception
-
getSiteMembershipRequest
public RestSiteMembershipRequestModel getSiteMembershipRequest(org.alfresco.utility.model.SiteModel site) throws java.lang.Exception
Retrieve site membership request details for a person/site using GET call on "people/{personId}/site-membership-requests/{siteId}"- Throws:
java.lang.Exception
-
deleteSiteMembershipRequest
public void deleteSiteMembershipRequest(org.alfresco.utility.model.SiteModel site) throws JsonToModelConversionException, EmptyJsonResponseExceptionDelete site membership request with DELETE call on "/people/{personId}/site-membership-requests/{siteId}"
-
updateSiteMembershipRequest
public RestSiteMembershipRequestModel updateSiteMembershipRequest(org.alfresco.utility.model.SiteModel siteModel, java.lang.String message) throws java.lang.Exception
Update site membership request using PUT call on "people/{personId}/site-membership-requests/{siteId}"- Throws:
java.lang.Exception
-
getFavorite
public RestPersonFavoritesModel getFavorite(java.lang.String favoriteId) throws java.lang.Exception
Retrieve favorite site for a specific user using GET call on "people/{personId}/favorites/{favoriteId}"- Throws:
java.lang.Exception
-
getFavorites
public RestPersonFavoritesModelsCollection getFavorites() throws java.lang.Exception
Retrieve specific favorites for a specific user using GET call on "people/{personId}/favorites"- Throws:
java.lang.Exception
-
addFolderToFavorites
public RestPersonFavoritesModel addFolderToFavorites(org.alfresco.utility.model.FolderModel folderModel) throws java.lang.Exception
Add a folder to favorites for a specific user using POST call on "people/{personId}/favorites"- Throws:
java.lang.Exception
-
addFileToFavorites
public RestPersonFavoritesModel addFileToFavorites(org.alfresco.utility.model.FileModel fileModel) throws java.lang.Exception
Add a folder to favorites for a specific user using POST call on "people/{personId}/favorites"- Throws:
java.lang.Exception
-
addSiteToFavorites
public RestPersonFavoritesModel addSiteToFavorites(org.alfresco.utility.model.SiteModel siteModel) throws java.lang.Exception
Add a site to favorites for a specific user using POST call on "people/{personId}/favorites"- Throws:
java.lang.Exception
-
deleteSiteFromFavorites
public RestWrapper deleteSiteFromFavorites(org.alfresco.utility.model.SiteModel site) throws java.lang.Exception
Delete site from favorites for a specific user using DELETE call on "people/{personId}/favorites/{favoriteId}"- Throws:
java.lang.Exception
-
deleteFolderFromFavorites
public RestWrapper deleteFolderFromFavorites(org.alfresco.utility.model.FolderModel folderModel) throws java.lang.Exception
Delete a folder from favorites for a specific user using DELETE call on "people/{personId}/favorites/{favoriteId}"- Throws:
java.lang.Exception
-
deleteFileFromFavorites
public RestWrapper deleteFileFromFavorites(org.alfresco.utility.model.FileModel fileModel) throws java.lang.Exception
Delete a file from favorites for a specific user using DELETE call on "people/{personId}/favorites/{favoriteId}"- Throws:
java.lang.Exception
-
getNetwork
public RestNetworkModel getNetwork() throws java.lang.Exception
Retrieve details of the current user network using GET call on "people/{personId}/networks/{networkId}"- Throws:
java.lang.Exception
-
getNetwork
public RestNetworkModel getNetwork(org.alfresco.utility.model.UserModel tenant) throws java.lang.Exception
Retrieve details of a specific network using GET call on "people/{personId}/networks/{networkId}"- Throws:
java.lang.Exception
-
getNetworks
public RestNetworkModelsCollection getNetworks() throws java.lang.Exception
Retrieve details of all networks related to the current person using GET call on "people/{personId}/networks"- Throws:
java.lang.Exception
-
getNetworks
public RestNetworkModelsCollection getNetworks(org.alfresco.utility.model.UserModel tenant) throws java.lang.Exception
Retrieve details of all networks related to a specific person using GET call on "people/{personId}/networks"- Throws:
java.lang.Exception
-
createPerson
public RestPersonModel createPerson(RestPersonModel newPerson) throws java.lang.Exception
Create new person with given newPerson details using POST call on "people"- Throws:
java.lang.Exception
-
downloadAvatarContent
public RestResponse downloadAvatarContent() throws java.lang.Exception
Get people avatar image using GET call on '/people/{personId}/avatar Please note that it retries to get the renditions response several times because on the alfresco server the rendition can take a while to be created.- Throws:
java.lang.Exception
-
resetAvatarImageRequest
public void resetAvatarImageRequest() throws JsonToModelConversionException, EmptyJsonResponseExceptionDelete avatar image with DELETE call on "/people/{personId}/avatar}"
-
uploadAvatarContent
public io.restassured.response.ValidatableResponse uploadAvatarContent(java.lang.String fullServerUrL, java.io.File avatarFile) throws java.lang.ExceptionUpdate avatar image PUT call on 'people/{nodeId}/children- Throws:
java.lang.Exception
-
listGroupMemberships
public RestGroupsModelsCollection listGroupMemberships() throws java.lang.Exception
List group memberships for a person using GET on '/people/{personId}/groups- Throws:
java.lang.Exception
-
where
public People.WhereClause where()
-
-