Class SubjectAreaProjectRESTResource


  • @RestController
    @RequestMapping("/servers/{serverName}/open-metadata/access-services/subject-area")
    public class SubjectAreaProjectRESTResource
    extends Object
    The SubjectAreaRESTServicesInstance provides the org.odpi.openmetadata.accessservices.subjectarea.server-side implementation of the SubjectArea Open Metadata Access Service (OMAS). This interface provides Project authoring interfaces for subject area experts.
    • Constructor Detail

      • SubjectAreaProjectRESTResource

        public SubjectAreaProjectRESTResource()
        Default constructor
    • Method Detail

      • createProject

        @PostMapping(path="/users/{userId}/projects")
        public SubjectAreaOMASAPIResponse<Project> createProject​(@PathVariable
                                                                 String serverName,
                                                                 @PathVariable
                                                                 String userId,
                                                                 @RequestBody
                                                                 Project suppliedProject)
        Create a Project.

        Projects with the same name can be confusing. Best practise is to create projects that have unique names. This Create call does not police that Project names are unique. So it is possible to create projects with the same name as each other.

        Projects that are created using this call will be GlossaryProjects.

        Parameters:
        serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenant
        userId - unique identifier for requesting user, under which the request is performed
        suppliedProject - Project to create
        Returns:
        response, when successful contains the created Project. when not successful the following Exception responses can occur UserNotAuthorizedException the requesting user is not authorized to issue this request. MetadataServerUncontactableException not able to communicate with a Metadata respository service. InvalidParameterException one of the parameters is null or invalid. UnrecognizedGUIDException the supplied guid was not recognised ClassificationException Error processing a classification StatusNotSupportedException A status value is not supported
      • getProject

        @GetMapping(path="/users/{userId}/projects/{guid}")
        public SubjectAreaOMASAPIResponse<Project> getProject​(@PathVariable
                                                              String serverName,
                                                              @PathVariable
                                                              String userId,
                                                              @PathVariable
                                                              String guid)
        Get a Project.
        Parameters:
        serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenant
        userId - userId under which the request is performed
        guid - guid of the Project to get
        Returns:
        response which when successful contains the Project with the requested guid when not successful the following Exception responses can occur
        • UserNotAuthorizedException the requesting user is not authorized to issue this request.
        • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
        • InvalidParameterException one of the parameters is null or invalid.
        • UnrecognizedGUIDException the supplied guid was not recognised
        • UnrecognizedGUIDException the supplied guid was not recognised
        • FunctionNotSupportedException Function not supported
      • findProject

        @GetMapping(path="/users/{userId}/projects")
        public SubjectAreaOMASAPIResponse<Project> findProject​(@PathVariable
                                                               String serverName,
                                                               @PathVariable
                                                               String userId,
                                                               @RequestParam(value="searchCriteria",required=false)
                                                               String searchCriteria,
                                                               @RequestParam(value="exactValue",required=false,defaultValue="false")
                                                               Boolean exactValue,
                                                               @RequestParam(value="ignoreCase",required=false,defaultValue="true")
                                                               Boolean ignoreCase,
                                                               @RequestParam(value="asOfTime",required=false)
                                                               Date asOfTime,
                                                               @RequestParam(value="startingFrom",required=false,defaultValue="0")
                                                               Integer startingFrom,
                                                               @RequestParam(value="pageSize",required=false)
                                                               Integer pageSize,
                                                               @RequestParam(value="sequencingOrder",required=false)
                                                               SequencingOrder sequencingOrder,
                                                               @RequestParam(value="sequencingProperty",required=false)
                                                               String sequencingProperty)
        Find Project
        Parameters:
        serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenant
        userId - unique identifier for requesting user, under which the request is performed
        searchCriteria - String expression matching Project property values. If not specified then all projects are returned.
        exactValue - a boolean, which when set means that only exact matches will be returned, otherwise matches that start with the search criteria will be returned.
        ignoreCase - a boolean, which when set means that case will be ignored, if not set that case will be respected
        asOfTime - the projects returned as they were at this time. null indicates at the current time.
        startingFrom - the starting element number for this set of results. This is used when retrieving elements
        pageSize - the maximum number of elements that can be returned on this request.
        sequencingOrder - the sequencing order for the results.
        sequencingProperty - the name of the property that should be used to sequence the results.
        Returns:
        A list of projects meeting the search Criteria
        • UserNotAuthorizedException the requesting user is not authorized to issue this request.
        • InvalidParameterException one of the parameters is null or invalid.
        • PropertyServerException Property server exception.
      • getProjectRelationships

        @GetMapping(path="/users/{userId}/projects/{guid}/relationships")
        public SubjectAreaOMASAPIResponse<Relationship> getProjectRelationships​(@PathVariable
                                                                                String serverName,
                                                                                @PathVariable
                                                                                String userId,
                                                                                @PathVariable
                                                                                String guid,
                                                                                @RequestParam(value="asOfTime",required=false)
                                                                                Date asOfTime,
                                                                                @RequestParam(value="startingFrom",required=false,defaultValue="0")
                                                                                Integer startingFrom,
                                                                                @RequestParam(value="pageSize",required=false)
                                                                                Integer pageSize,
                                                                                @RequestParam(value="sequencingOrder",required=false)
                                                                                SequencingOrder sequencingOrder,
                                                                                @RequestParam(value="sequencingProperty",required=false)
                                                                                String sequencingProperty)
        Get Project relationships
        Parameters:
        serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenant
        userId - unique identifier for requesting user, under which the request is performed
        guid - guid of the Project to get
        asOfTime - the relationships returned as they were at this time. null indicates at the current time. If specified, the date is in milliseconds since 1970-01-01 00:00:00.
        startingFrom - the starting element number for this set of results. This is used when retrieving elements beyond the first page of results. Zero means the results start from the first element.
        pageSize - the maximum number of elements that can be returned on this request.
        sequencingOrder - the sequencing order for the results.
        sequencingProperty - the name of the property that should be used to sequence the results.
        Returns:
        a response which when successful contains the Project relationships when not successful the following Exception responses can occur
        • UnrecognizedGUIDException the supplied guid was not recognised
        • UserNotAuthorizedException the requesting user is not authorized to issue this request.
        • InvalidParameterException one of the parameters is null or invalid.
        • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
      • updateProject

        @PutMapping(path="/users/{userId}/projects/{guid}")
        public SubjectAreaOMASAPIResponse<Project> updateProject​(@PathVariable
                                                                 String serverName,
                                                                 @PathVariable
                                                                 String userId,
                                                                 @PathVariable
                                                                 String guid,
                                                                 @RequestBody
                                                                 Project Project,
                                                                 @RequestParam(value="isReplace",required=false,defaultValue="false")
                                                                 Boolean isReplace)
        Update a Project

        If the caller has chosen to incorporate the Project name in their Project Terms or Categories qualified name, renaming the Project will cause those qualified names to mismatch the Project name. If the caller has chosen to incorporate the Project qualifiedName in their Project Terms or Categories qualified name, changing the qualified name of the Project will cause those qualified names to mismatch the Project name. Status is not updated using this call.

        Parameters:
        serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenant
        userId - unique identifier for requesting user, under which the request is performed
        guid - guid of the Project to update
        Project - Project to update
        isReplace - flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated.
        Returns:
        a response which when successful contains the updated Project when not successful the following Exception responses can occur
        • UnrecognizedGUIDException the supplied guid was not recognised
        • UserNotAuthorizedException the requesting user is not authorized to issue this request.
        • FunctionNotSupportedException Function not supported
        • InvalidParameterException one of the parameters is null or invalid.
        • MetadataServerUncontactableException not able to communicate with a Metadata respository service.
      • deleteProject

        @DeleteMapping(path="/users/{userId}/projects/{guid}")
        public SubjectAreaOMASAPIResponse<Project> deleteProject​(@PathVariable
                                                                 String serverName,
                                                                 @PathVariable
                                                                 String userId,
                                                                 @PathVariable
                                                                 String guid)
        Delete a Project instance

        There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support is optional.

        A soft delete means that the Project instance will exist in a deleted state in the repository after the delete operation. This means that it is possible to undo the delete. A hard delete means that the Project will not exist after the operation.

        Parameters:
        serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenant
        userId - unique identifier for requesting user, under which the request is performed
        guid - guid of the Project to be deleted.
        Returns:
        a void response when not successful the following Exception responses can occur
        • UnrecognizedGUIDException the supplied guid was not recognised
        • UserNotAuthorizedException the requesting user is not authorized to issue this request.
        • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
        • InvalidParameterException one of the parameters is null or invalid.
        • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.
        • EntityNotDeletedException a soft delete was issued but the Project was not deleted.
      • restoreProject

        @PostMapping(path="/users/{userId}/projects/{guid}")
        public SubjectAreaOMASAPIResponse<Project> restoreProject​(@PathVariable
                                                                  String serverName,
                                                                  @PathVariable
                                                                  String userId,
                                                                  @PathVariable
                                                                  String guid)
        Restore a Project

        Restore allows the deleted Project to be made active again. Restore allows deletes to be undone. Hard deletes are not stored in the repository so cannot be restored.

        Parameters:
        serverName - serverName under which this request is performed, this is used in multi tenanting to identify the tenant
        userId - unique identifier for requesting user, under which the request is performed
        guid - guid of the Project to restore
        Returns:
        response which when successful contains the restored Project when not successful the following Exception responses can occur
        • UnrecognizedGUIDException the supplied guid was not recognised
        • UserNotAuthorizedException the requesting user is not authorized to issue this request.
        • FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.
        • InvalidParameterException one of the parameters is null or invalid.
        • MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.