java.lang.Object
org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.server.OCFMetadataRESTServices

public class OCFMetadataRESTServices extends Object
The OCFMetadataRESTServices is the server-side implementation of the Connected Asset REST interface used by connectors.
  • Constructor Details

    • OCFMetadataRESTServices

      public OCFMetadataRESTServices()
      Default constructor
  • Method Details

    • logAssetAuditMessage

      public VoidResponse logAssetAuditMessage(String serverName, String userId, String assetGUID, String governanceService, String message)
      Log an audit message about this asset.
      Parameters:
      serverName - name of server instance to route request to
      userId - userId of user making request.
      assetGUID - unique identifier for asset.
      governanceService - name of governance service
      message - message to log
      Returns:
      void or InvalidParameterException one of the parameters is null or invalid. UserNotAuthorizedException user not authorized to issue this request. PropertyServerException there was a problem that occurred within the property server.
    • getConnectionByGUID

      public ConnectionResponse getConnectionByGUID(String serverName, String serviceURLName, String userId, String guid)
      Returns the connection object corresponding to the supplied connection GUID.
      Parameters:
      serverName - name of the server instances for this request
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - userId of user making request.
      guid - the unique id for the connection within the property server.
      Returns:
      connection object or InvalidParameterException - one of the parameters is null or invalid or UnrecognizedConnectionGUIDException - the supplied GUID is not recognized by the metadata repository or PropertyServerException - there is a problem retrieving information from the property (metadata) server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getConnectionByName

      public ConnectionResponse getConnectionByName(String serverName, String serviceURLName, String userId, String name)
      Returns the connection object corresponding to the supplied connection name.
      Parameters:
      serverName - name of the server instances for this request
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - userId of user making request.
      name - this may be the qualifiedName or displayName of the connection.
      Returns:
      connection object or InvalidParameterException - one of the parameters is null or invalid or UnrecognizedConnectionNameException - there is no connection defined for this name or AmbiguousConnectionNameException - there is more than one connection defined for this name or PropertyServerException - there is a problem retrieving information from the property (metadata) server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getAssetForConnectionGUID

      public GUIDResponse getAssetForConnectionGUID(String serverName, String serviceURLName, String userId, String connectionGUID)
      Returns the unique identifier for the asset connected to the connection.
      Parameters:
      serverName - name of the server instances for this request
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - the userId of the requesting user.
      connectionGUID - uniqueId for the connection.
      Returns:
      unique identifier of asset or InvalidParameterException - one of the parameters is null or invalid or PropertyServerException - there is a problem retrieving the connected asset properties from the property server or UnrecognizedConnectionGUIDException - the supplied GUID is not recognized by the property server or NoConnectedAssetException - there is no asset associated with this connection or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getConnectionForAsset

      public ConnectionResponse getConnectionForAsset(String serverName, String serviceURLName, String userId, String assetGUID)
      Returns the connection corresponding to the supplied asset GUID.
      Parameters:
      serverName - name of the server instances for this request
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - userId of user making request.
      assetGUID - the unique id for the asset within the metadata repository.
      Returns:
      connection object or InvalidParameterException one of the parameters is null or invalid or UnrecognizedConnectionNameException there is no connection defined for this name or PropertyServerException there is a problem retrieving information from the property (metadata) server or UserNotAuthorizedException the requesting user is not authorized to issue this request.
    • saveConnectionForAsset

      public GUIDResponse saveConnectionForAsset(String serverName, String serviceURLName, String userId, String assetGUID, Connection connection)
      Save the connection optionally linked to the supplied asset GUID.
      Parameters:
      serverName - name of the server instances for this request
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - userId of user making request.
      assetGUID - the unique id for the asset within the metadata repository. This optional. However, if specified then the new connection is attached to the asset
      connection - connection to save
      Returns:
      connection object or InvalidParameterException one of the parameters is null or invalid or UnrecognizedConnectionNameException there is no connection defined for this name or PropertyServerException there is a problem retrieving information from the property (metadata) server or UserNotAuthorizedException the requesting user is not authorized to issue this request.
    • getConnectedAssetSummary

      public AssetResponse getConnectedAssetSummary(String serverName, String serviceURLName, String userId, String assetGUID, String connectionGUID)
      Returns the basic information about the asset. The connection guid allows the short description for the asset to be filled out.
      Parameters:
      serverName - name of the server.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      connectionGUID - unique id for connection used to access asset.
      Returns:
      a bean with the basic properties about the asset or InvalidParameterException - the asset GUID is null or invalid or UnrecognizedAssetGUIDException - the asset GUID is not recognized by the property server or UnrecognizedConnectionGUIDException - the connection GUID is not recognized by the property server or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException the requesting user is not authorized to issue this request.
    • getAssetSummary

      public AssetResponse getAssetSummary(String serverName, String serviceURLName, String userId, String assetGUID)
      Returns the basic information about the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      Returns:
      a bean with the basic properties about the asset or InvalidParameterException - the userId is null or invalid or UnrecognizedAssetGUIDException - the GUID is null or invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getCertifications

      public CertificationsResponse getCertifications(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of certifications for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of certifications or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getAssetComments

      public CommentsResponse getAssetComments(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of comments for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of comments or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getAssetCommentReplies

      public CommentsResponse getAssetCommentReplies(String serverName, String serviceURLName, String userId, String assetGUID, String commentGUID, int elementStart, int maxElements)
      Returns the list of replies to a comment.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      commentGUID - String unique id for root comment.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of comments or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getConnections

      public ConnectionsResponse getConnections(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of connections for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of connections or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getExternalIdentifiers

      public ExternalIdentifiersResponse getExternalIdentifiers(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of external identifiers for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of external identifiers or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getExternalReferences

      public ExternalReferencesResponse getExternalReferences(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of external references for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of external references or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getInformalTags

      public InformalTagsResponse getInformalTags(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of informal tags for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of informal tags or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getLicenses

      public LicensesResponse getLicenses(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of licenses for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of licenses or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getLikes

      public LikesResponse getLikes(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of likes for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of likes or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getKnownLocations

      public LocationsResponse getKnownLocations(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of known locations for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of known locations or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getNoteLogs

      public NoteLogsResponse getNoteLogs(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of note logs for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of note logs or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getNotes

      public NotesResponse getNotes(String serverName, String serviceURLName, String userId, String noteLogGUID, int elementStart, int maxElements)
      Returns the list of notes for a note log.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      noteLogGUID - String unique id for the note log.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of notes or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getRatings

      public RatingsResponse getRatings(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of ratings for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of ratings or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getRelatedAssets

      public RelatedAssetsResponse getRelatedAssets(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of related assets for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of assets or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getMoreInformation

      public MoreInformationResponse getMoreInformation(String serverName, String serviceURLName, String userId, String elementGUID, int elementStart, int maxElements)
      Returns the list of related Referenceables that provide more information for this asset, schema, ...
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      elementGUID - String unique id for the element.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of related assets or InvalidParameterException - the GUID is not recognized or the paging values are invalid or UnrecognizedAssetGUIDException - the GUID is null or invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getRelatedMediaReferences

      public RelatedMediaReferencesResponse getRelatedMediaReferences(String serverName, String serviceURLName, String userId, String assetGUID, int elementStart, int maxElements)
      Returns the list of related media references for the asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      assetGUID - String unique id for asset.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a list of related media references or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getSchemaAttributes

      public SchemaAttributesResponse getSchemaAttributes(String serverName, String serviceURLName, String userId, String parentSchemaGUID, int elementStart, int maxElements)
      Returns a list of schema attributes for a schema type.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      parentSchemaGUID - String unique id for containing schema element.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a schema attributes response or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getAPIOperations

      public APIOperationsResponse getAPIOperations(String serverName, String serviceURLName, String userId, String parentSchemaTypeGUID, int elementStart, int maxElements)
      Returns a list of schema attributes for a schema type.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      parentSchemaTypeGUID - String unique id for containing schema type.
      elementStart - int starting position for fist returned element.
      maxElements - int maximum number of elements to return on the call.
      Returns:
      a schema attributes response or InvalidParameterException - the GUID is not recognized or the paging values are invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
    • getAnchorAssetFromGUID

      public AssetResponse getAnchorAssetFromGUID(String serverName, String serviceURLName, String userId, String guid)
      Returns the anchor asset.
      Parameters:
      serverName - String name of server instance to call.
      serviceURLName - String name of the service that created the connector that issued this request.
      userId - String userId of user making request.
      guid - String unique id for the metadata element.
      Returns:
      a bean with the basic properties about the anchor asset or InvalidParameterException - the userId is null or invalid or UnrecognizedAssetGUIDException - the GUID is null or invalid or PropertyServerException - there is a problem retrieving the asset properties from the property server or UserNotAuthorizedException - the requesting user is not authorized to issue this request.