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 Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    addToMyAssets(String serverName, String userId, String assetGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody nullRequestBody)
    Add an asset to the identified user's list of favorite assets.
    org.odpi.openmetadata.accessservices.communityprofile.rest.AssetListResponse
    getMyAssets(String serverName, String userId, int startFrom, int pageSize)
    Return a list of assets that the specified user has added to their favorites list.
    org.odpi.openmetadata.accessservices.communityprofile.rest.PersonalProfileResponse
    getMyProfile(String serverName, String userId)
    Return the profile for this user.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    removeFromMyAssets(String serverName, String userId, String assetGUID, org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody nullRequestBody)
    Remove an asset from identified user's list of favorite assets.
    org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse
    updateMyProfile(String serverName, String userId, org.odpi.openmetadata.accessservices.communityprofile.rest.MyProfileRequestBody requestBody)
    Create or update the profile for the requesting user.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MyProfileResource

      public MyProfileResource()
      Default constructor
  • Method Details

    • getMyProfile

      @GetMapping(path="/my-profile") public org.odpi.openmetadata.accessservices.communityprofile.rest.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 org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse updateMyProfile(@PathVariable String serverName, @PathVariable String userId, @RequestBody org.odpi.openmetadata.accessservices.communityprofile.rest.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 org.odpi.openmetadata.accessservices.communityprofile.rest.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 org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse addToMyAssets(@PathVariable String serverName, @PathVariable String userId, @PathVariable String assetGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.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 org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse removeFromMyAssets(@PathVariable String serverName, @PathVariable String userId, @PathVariable String assetGUID, @RequestBody(required=false) org.odpi.openmetadata.commonservices.ffdc.rest.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.