Interface FavoritesApi
-
- All Implemented Interfaces:
@JvmSuppressWildcards() public interface FavoritesApi
-
-
Method Summary
Modifier and Type Method Description abstract FavoriteEntrycreateFavorite(@Path(value = "personId") String personId, @Body() FavoriteBodyCreate favoriteBodyCreate, @Query(value = "include") List<String> include, @Query(value = "fields") List<String> fields)Create a favorite Favorite a site, file, or folder in the repository. abstract UnitdeleteFavorite(@Path(value = "personId") String personId, @Path(value = "favoriteId") String favoriteId)Delete a favorite Deletes favoriteId as a favorite of person personId. abstract FavoriteEntrygetFavorite(@Path(value = "personId") String personId, @Path(value = "favoriteId") String favoriteId, @Query(value = "include") List<String> include, @Query(value = "fields") List<String> fields)Get a favorite Gets favorite favoriteId for person personId. abstract FavoritePaginglistFavorites(@Path(value = "personId") String personId, @Query(value = "skipCount") Integer skipCount, @Query(value = "maxItems") Integer maxItems, @Query(value = "orderBy") List<String> orderBy, @Query(value = "where") String where, @Query(value = "include") List<String> include, @Query(value = "fields") List<String> fields)List favorites Gets a list of favorites for person personId. -
-
Method Detail
-
createFavorite
@Headers(value = {"Content-Type: application/json"})@POST(value = "alfresco/versions/1/people/{personId}/favorites") abstract FavoriteEntry createFavorite(@Path(value = "personId") String personId, @Body() FavoriteBodyCreate favoriteBodyCreate, @Query(value = "include") List<String> include, @Query(value = "fields") List<String> fields)Create a favorite Favorite a site, file, or folder in the repository. You can use the
-me-string in place of<personId>to specify the currently authenticated user. Note: You can favorite more than one entity by specifying a list of objects in the JSON body like this:``JSON [ { \"target\": { \"file\": { \"guid\": \"abcde-01234-....\" } } }, { \"target\": { \"file\": { \"guid\": \"abcde-09863-....\" } } }, ] ``If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:``JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ``The endpoint is owned by defaultname service owner @param personId The identifier of a person. (required) @param favoriteBodyCreate An object identifying the entity to be favorited. The object consists of a single property which is an object with the name `site`, `file`, or `folder`. The content of that object is the `guid` of the target entity. For example, to favorite a file the following body would be used: ```JSON { \"target\": { \"file\": { \"guid\": \"abcde-01234-....\" } } } ``` (required) @param include Returns additional information about favorites, the following optional fields can be requested: * path (note, this only applies to files and folders) * properties (optional) @param fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. (optional)
-
deleteFavorite
@Headers(value = {"Content-Type: application/json"})@DELETE(value = "alfresco/versions/1/people/{personId}/favorites/{favoriteId}") abstract Unit deleteFavorite(@Path(value = "personId") String personId, @Path(value = "favoriteId") String favoriteId)Delete a favorite Deletes favoriteId as a favorite of person personId. You can use the
-me-string in place of<personId>to specify the currently authenticated user. The endpoint is owned by defaultname service owner- Parameters:
personId- The identifier of a person.favoriteId- The identifier of a favorite.
-
getFavorite
@Headers(value = {"Content-Type: application/json"})@GET(value = "alfresco/versions/1/people/{personId}/favorites/{favoriteId}") abstract FavoriteEntry getFavorite(@Path(value = "personId") String personId, @Path(value = "favoriteId") String favoriteId, @Query(value = "include") List<String> include, @Query(value = "fields") List<String> fields)Get a favorite Gets favorite favoriteId for person personId. You can use the
-me-string in place of<personId>to specify the currently authenticated user. The endpoint is owned by defaultname service owner- Parameters:
personId- The identifier of a person.favoriteId- The identifier of a favorite.include- Returns additional information about favorites, the following optional fields can be requested: * path (note, this only applies to files and folders) * properties (optional)fields- A list of field names.
-
listFavorites
@Headers(value = {"Content-Type: application/json"})@GET(value = "alfresco/versions/1/people/{personId}/favorites") abstract FavoritePaging listFavorites(@Path(value = "personId") String personId, @Query(value = "skipCount") Integer skipCount, @Query(value = "maxItems") Integer maxItems, @Query(value = "orderBy") List<String> orderBy, @Query(value = "where") String where, @Query(value = "include") List<String> include, @Query(value = "fields") List<String> fields)List favorites Gets a list of favorites for person personId. You can use the
-me-string in place of<personId>to specify the currently authenticated user. The default sort order for the returned list of favorites is type ascending, createdAt descending. You can override the default by using the orderBy parameter. You can use any of the following fields to order the results: *type*createdAt*titleYou can use the where parameter to restrict the list in the response to entries of a specific kind. The where parameter takes a value. The value is a single predicate that can include one or more EXISTS conditions. The EXISTS condition uses a single operand to limit the list to include entries that include that one property. The property values are: *target/file*target/folder*target/siteFor example, the following where parameter restricts the returned list to the file favorites for a person:``SQL (EXISTS(target/file)) ``You can specify more than one condition using OR. The predicate must be enclosed in parentheses. For example, the following where parameter restricts the returned list to the file and folder favorites for a person:``SQL (EXISTS(target/file) OR EXISTS(target/folder)) ``The endpoint is owned by defaultname service owner @param personId The identifier of a person. (required) @param skipCount The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (optional, default to 0) @param maxItems The maximum number of items to return in the list. If not supplied then the default value is 100. (optional, default to 100) @param orderBy A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. (optional) @param where A string to restrict the returned objects by using a predicate. (optional) @param include Returns additional information about favorites, the following optional fields can be requested: * path (note, this only applies to files and folders) * properties (optional) @param fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. (optional)
-
-
-
-