java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.server.MyProfileRESTServices

public class MyProfileRESTServices extends Object
The CommunityProfileRESTServices provides the server-side implementation of the CommunityProfile Open Metadata Assess Service (OMAS). This interface provides connections to assets and APIs for adding feedback on the asset.
  • Constructor Details

    • MyProfileRESTServices

      public MyProfileRESTServices()
      Default constructor
  • Method Details

    • getMyProfile

      public PersonalProfileResponse getMyProfile(String serverName, 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 or null or InvalidParameterException the userId is null or 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.
    • updateMyProfile

      public VoidResponse updateMyProfile(String serverName, String userId, 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

      public 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.
      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

      public VoidResponse addToMyAssets(String serverName, String userId, String assetGUID, 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

      public VoidResponse removeFromMyAssets(String serverName, String userId, String assetGUID, 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.