java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.server.spring.MyProfileResource

@RestController @RequestMapping("/servers/{serverName}/open-metadata/access-services/community-profile/users/{userId}") public class MyProfileResource extends Object
The MyProfileResource provides part of the server-side implementation of the Community Profile Open Metadata Assess Service (OMAS). This interface provides access to an individual's personal profile and the management of a special collection linked to their profile called my-assets.
  • Constructor Details

    • MyProfileResource

      public MyProfileResource()
      Default constructor
  • Method Details

    • getMyProfile

      @GetMapping(path="/my-profile") public PersonalProfileResponse getMyProfile(@PathVariable String serverName, @PathVariable String userId)
      Return the profile for this user.
      Parameters:
      serverName - name of the server instances for this request
      userId - userId of the user making the request.
      Returns:
      profile response object or InvalidParameterException the userId is null or invalid or NoProfileForUserException the user does not have a profile or PropertyServerException there is a problem retrieving information from the property server(s) or UserNotAuthorizedException the requesting user is not authorized to issue this request.
    • updateMyProfile

      @PostMapping(path="/my-profile") public VoidResponse updateMyProfile(@PathVariable String serverName, @PathVariable String userId, @RequestBody MyProfileRequestBody requestBody)
      Create or update the profile for the requesting user.
      Parameters:
      serverName - name of the server instances for this request
      userId - the name of the calling user.
      requestBody - properties for the new profile.
      Returns:
      void response or InvalidParameterException - one of the parameters is invalid or PropertyServerException - there is a problem retrieving information from the property server(s) or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getMyAssets

      @GetMapping(path="/my-assets") public AssetListResponse getMyAssets(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize)
      Return a list of assets that the specified user has added to their favorites list.
      Parameters:
      serverName - name of the server instances for this request
      userId - userId of user making request.
      startFrom - index of the list ot start from (0 for start)
      pageSize - maximum number of elements to return.
      Returns:
      list of asset details or InvalidParameterException one of the parameters is invalid or PropertyServerException there is a problem retrieving information from the property server(s) or UserNotAuthorizedException the requesting user is not authorized to issue this request.
    • addToMyAssets

      @PostMapping(path="/my-assets/{assetGUID}") public VoidResponse addToMyAssets(@PathVariable String serverName, @PathVariable String userId, @PathVariable String assetGUID, @RequestBody(required=false) NullRequestBody nullRequestBody)
      Add an asset to the identified user's list of favorite assets.
      Parameters:
      serverName - name of the server instances for this request
      userId - userId of user making request.
      assetGUID - unique identifier of the asset.
      nullRequestBody - null request body
      Returns:
      void response or InvalidParameterException one of the parameters is invalid or PropertyServerException there is a problem updating information in the property server(s) or UserNotAuthorizedException the requesting user is not authorized to issue this request.
    • removeFromMyAssets

      @PostMapping(path="/my-assets/{assetGUID}/delete") public VoidResponse removeFromMyAssets(@PathVariable String serverName, @PathVariable String userId, @PathVariable String assetGUID, @RequestBody(required=false) NullRequestBody nullRequestBody)
      Remove an asset from identified user's list of favorite assets.
      Parameters:
      serverName - name of the server instances for this request
      userId - userId of user making request.
      assetGUID - unique identifier of the asset.
      nullRequestBody - null request body
      Returns:
      void response or InvalidParameterException one of the parameters is invalid or PropertyServerException there is a problem updating information in the property server(s) or UserNotAuthorizedException the requesting user is not authorized to issue this request.