Class ProjectManagerResource
java.lang.Object
org.odpi.openmetadata.viewservices.projectmanager.server.spring.ProjectManagerResource
@RestController
@RequestMapping("/servers/{serverName}/api/open-metadata/project-manager")
public class ProjectManagerResource
extends Object
The ProjectManagerResource provides the Spring API endpoints of the Project Manager Open Metadata View Service (OMVS).
=
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddToProjectTeam
(String serverName, String projectGUID, String actorGUID, NewRelationshipRequestBody requestBody) Add an actor to a project.clearProjectDependency
(String serverName, String projectGUID, String dependsOnProjectGUID, DeleteRequestBody requestBody) Remove a project dependency relationship between two projects.clearProjectHierarchy
(String serverName, String projectGUID, String managedProjectGUID, DeleteRequestBody requestBody) Remove a project hierarchy relationship between two projects.createProject
(String serverName, String classificationName, NewElementRequestBody requestBody) Create a new generic project.createProjectFromTemplate
(String serverName, TemplateRequestBody requestBody) Create a new metadata element to represent a project using an existing metadata element as a template.createTaskProject
(String serverName, String projectGUID, ProjectProperties requestBody) Create a new task linked to the supplied project.deleteProject
(String serverName, String projectGUID, DeleteRequestBody requestBody) Delete a project.findProjects
(String serverName, SearchStringRequestBody requestBody) Returns the list of projects matching the search string.getClassifiedProjects
(String serverName, FilterRequestBody requestBody) Returns the list of projects with a particular classification.getLinkedProjects
(String serverName, String parentGUID, FilterRequestBody requestBody) Returns the list of projects that are linked off of the supplied element.getProject
(String serverName, String projectGUID, GetRequestBody requestBody) Return the properties of a specific project.getProjectGraph
(String serverName, String projectGUID, ResultsRequestBody requestBody) Returns the graph of related projects and resources starting with a supplied project guid.getProjectHierarchy
(String serverName, String projectGUID, ResultsRequestBody requestBody) Returns the hierarchy of managed projects and resources starting with a supplied project guid.getProjectsByName
(String serverName, FilterRequestBody requestBody) Returns the list of projects with a particular name.getProjectTeam
(String serverName, String projectGUID, FilterRequestBody requestBody) Returns the list of actors that are linked off of the project.removeFromProjectTeam
(String serverName, String projectGUID, String actorGUID, DeleteRequestBody requestBody) Remove an actor from a project.setupProjectDependency
(String serverName, String projectGUID, String dependsOnProjectGUID, NewRelationshipRequestBody requestBody) Create a project dependency relationship between two projects.setupProjectHierarchy
(String serverName, String projectGUID, String managedProjectGUID, NewRelationshipRequestBody requestBody) Create a project hierarchy relationship between two projects.updateProject
(String serverName, String projectGUID, UpdateElementRequestBody requestBody) Update the properties of a project.
-
Constructor Details
-
ProjectManagerResource
public ProjectManagerResource()Default constructor
-
-
Method Details
-
getLinkedProjects
@PostMapping(path="/metadata-elements/{parentGUID}/projects") public OpenMetadataRootElementsResponse getLinkedProjects(@PathVariable String serverName, @PathVariable String parentGUID, @RequestBody(required=false) FilterRequestBody requestBody) Returns the list of projects that are linked off of the supplied element. Any relationship will do.- Parameters:
serverName
- name of called serverparentGUID
- unique identifier of referenceable object (typically a personal profile, project or community) that the projects hang off ofrequestBody
- filter response by project status - if null, any value will do- Returns:
- a list of projects InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getClassifiedProjects
@PostMapping(path="/projects/by-classifications") public OpenMetadataRootElementsResponse getClassifiedProjects(@PathVariable String serverName, @RequestBody FilterRequestBody requestBody) Returns the list of projects with a particular classification.- Parameters:
serverName
- name of called serverrequestBody
- name of the classification - if null, all projects are returned- Returns:
- a list of projects InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getProjectTeam
@PostMapping(path="/projects/{projectGUID}/team") public OpenMetadataRootElementsResponse getProjectTeam(@PathVariable String serverName, @PathVariable String projectGUID, @RequestBody(required=false) FilterRequestBody requestBody) Returns the list of actors that are linked off of the project.- Parameters:
serverName
- name of called serverprojectGUID
- unique identifier of the projectrequestBody
- filter response by team role- Returns:
- a list of projects InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
findProjects
@PostMapping(path="/projects/by-search-string") public OpenMetadataRootElementsResponse findProjects(@PathVariable String serverName, @RequestBody(required=false) SearchStringRequestBody requestBody) Returns the list of projects matching the search string.- Parameters:
serverName
- name of the service to route the request torequestBody
- string to find in the properties- Returns:
- a list of projects InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getProjectsByName
@PostMapping(path="/projects/by-name") public OpenMetadataRootElementsResponse getProjectsByName(@PathVariable String serverName, @RequestBody(required=false) FilterRequestBody requestBody) Returns the list of projects with a particular name.- Parameters:
serverName
- name of called serverrequestBody
- name of the projects to return - match is full text match in qualifiedName or name- Returns:
- a list of projects InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getProject
@PostMapping(path="/projects/{projectGUID}") public OpenMetadataRootElementResponse getProject(@PathVariable String serverName, @PathVariable String projectGUID, @RequestBody(required=false) GetRequestBody requestBody) Return the properties of a specific project.- Parameters:
serverName
- name of called serverprojectGUID
- unique identifier of the required projectrequestBody
- optional properties to control the query- Returns:
- project properties InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getProjectGraph
@PostMapping(path="/projects/{projectGUID}/graph") public OpenMetadataRootElementResponse getProjectGraph(@PathVariable String serverName, @PathVariable String projectGUID, @RequestBody(required=false) ResultsRequestBody requestBody) Returns the graph of related projects and resources starting with a supplied project guid.- Parameters:
serverName
- name of called serverprojectGUID
- unique identifier of the starting projectrequestBody
- optional properties to control the query- Returns:
- a graph of projects or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getProjectHierarchy
@PostMapping(path="/projects/{projectGUID}/hierarchy") public OpenMetadataRootElementResponse getProjectHierarchy(@PathVariable String serverName, @PathVariable String projectGUID, @RequestBody(required=false) ResultsRequestBody requestBody) Returns the hierarchy of managed projects and resources starting with a supplied project guid.- Parameters:
serverName
- name of called serverprojectGUID
- unique identifier of the starting projectrequestBody
- optional properties to control the query- Returns:
- a graph of projects or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
createProject
@PostMapping(path="/projects") public GUIDResponse createProject(@PathVariable String serverName, @RequestParam(required=false) String classificationName, @RequestBody NewElementRequestBody requestBody) Create a new generic project.- Parameters:
serverName
- name of called server.classificationName
- name of project classificationrequestBody
- properties for the project.- Returns:
- unique identifier of the newly created Project InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
createTaskProject
@PostMapping(path="/projects/{projectGUID}/task") public GUIDResponse createTaskProject(@PathVariable String serverName, @PathVariable String projectGUID, @RequestBody ProjectProperties requestBody) Create a new task linked to the supplied project. Used to identify a discrete piece of work within the project.- Parameters:
serverName
- name of called serverprojectGUID
- unique identifier of the projectrequestBody
- properties for the project- Returns:
- unique identifier of the newly created Project InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
createProjectFromTemplate
@PostMapping(path="/projects/from-template") public GUIDResponse createProjectFromTemplate(@PathVariable String serverName, @RequestBody TemplateRequestBody requestBody) Create a new metadata element to represent a project using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new project.- Parameters:
serverName
- calling userrequestBody
- properties that override the template- Returns:
- unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
updateProject
@PostMapping(path="/projects/{projectGUID}/update") public VoidResponse updateProject(@PathVariable String serverName, @PathVariable String projectGUID, @RequestBody(required=false) UpdateElementRequestBody requestBody) Update the properties of a project.- Parameters:
serverName
- name of called server.projectGUID
- unique identifier of the project (returned from create)requestBody
- properties for the project.- Returns:
- void or InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
deleteProject
@PostMapping(path="/projects/{projectGUID}/delete") public VoidResponse deleteProject(@PathVariable String serverName, @PathVariable String projectGUID, @RequestBody(required=false) DeleteRequestBody requestBody) Delete a project. It is detected from all parent elements. If members are anchored to the project then they are also deleted.- Parameters:
serverName
- name of called server.projectGUID
- unique identifier of the project.requestBody
- null request body- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
addToProjectTeam
@PostMapping(path="/projects/{projectGUID}/members/{actorGUID}/attach") public VoidResponse addToProjectTeam(@PathVariable String serverName, @PathVariable String projectGUID, @PathVariable String actorGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody) Add an actor to a project.- Parameters:
serverName
- name of called server.projectGUID
- unique identifier of the project.requestBody
- properties describing the membership characteristics.actorGUID
- unique identifier of the actor.- Returns:
- void or InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem updating information in the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
removeFromProjectTeam
@PostMapping(path="/projects/{projectGUID}/members/{actorGUID}/detach") public VoidResponse removeFromProjectTeam(@PathVariable String serverName, @PathVariable String projectGUID, @PathVariable String actorGUID, @RequestBody(required=false) DeleteRequestBody requestBody) Remove an actor from a project.- Parameters:
serverName
- name of called server.projectGUID
- unique identifier of the project.actorGUID
- unique identifier of the actor.requestBody
- null request body- Returns:
- void or InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem updating information in the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
setupProjectHierarchy
@PostMapping(path="/projects/{projectGUID}/project-hierarchies/{managedProjectGUID}/attach") public VoidResponse setupProjectHierarchy(@PathVariable String serverName, @PathVariable String projectGUID, @PathVariable String managedProjectGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody) Create a project hierarchy relationship between two projects.- Parameters:
serverName
- name of the service to route the request to.projectGUID
- unique identifier of the projectmanagedProjectGUID
- unique identifier of the project it depends onrequestBody
- external identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
clearProjectHierarchy
@PostMapping(path="/projects/{projectGUID}/project-hierarchies/{managedProjectGUID}/detach") public VoidResponse clearProjectHierarchy(@PathVariable String serverName, @PathVariable String projectGUID, @PathVariable String managedProjectGUID, @RequestBody(required=false) DeleteRequestBody requestBody) Remove a project hierarchy relationship between two projects.- Parameters:
serverName
- name of the service to route the request to.projectGUID
- unique identifier of the projectmanagedProjectGUID
- unique identifier of the project it depends onrequestBody
- external identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
setupProjectDependency
@PostMapping(path="/projects/{projectGUID}/project-dependencies/{dependsOnProjectGUID}/attach") public VoidResponse setupProjectDependency(@PathVariable String serverName, @PathVariable String projectGUID, @PathVariable String dependsOnProjectGUID, @RequestBody(required=false) NewRelationshipRequestBody requestBody) Create a project dependency relationship between two projects.- Parameters:
serverName
- name of the service to route the request to.projectGUID
- unique identifier of the projectdependsOnProjectGUID
- unique identifier of the project it depends onrequestBody
- external identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-
clearProjectDependency
@PostMapping(path="/projects/{projectGUID}/project-dependencies/{dependsOnProjectGUID}/detach") public VoidResponse clearProjectDependency(@PathVariable String serverName, @PathVariable String projectGUID, @PathVariable String dependsOnProjectGUID, @RequestBody(required=false) DeleteRequestBody requestBody) Remove a project dependency relationship between two projects.- Parameters:
serverName
- name of the service to route the request to.projectGUID
- unique identifier of the projectdependsOnProjectGUID
- unique identifier of the project it depends onrequestBody
- external identifiers- Returns:
- void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
-