Class ProjectManagerRESTServices

java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.viewservices.projectmanager.server.ProjectManagerRESTServices

public class ProjectManagerRESTServices extends TokenController
The ProjectManagerRESTServices provides the implementation of the Project Manager Open Metadata View Service (OMVS).
  • Constructor Details

    • ProjectManagerRESTServices

      public ProjectManagerRESTServices()
      Default constructor
  • Method Details

    • getLinkedProjects

      public ProjectsResponse getLinkedProjects(String serverName, String parentGUID, int startFrom, int pageSize, FilterRequestBody requestBody)
      Returns the list of projects that are linked off of the supplied element.
      Parameters:
      serverName - name of called server
      parentGUID - unique identifier of referenceable object (typically a personal profile, project or community) that the projects hang off of
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return
      requestBody - 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.
    • getProjectTeam

      public ProjectMembersResponse getProjectTeam(String serverName, String projectGUID, int startFrom, int pageSize, FilterRequestBody requestBody)
      Returns the list of actors that are linked off of the project.
      Parameters:
      serverName - name of called server
      projectGUID - unique identifier of the project
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return
      requestBody - 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.
    • getClassifiedProjects

      public ProjectsResponse getClassifiedProjects(String serverName, int startFrom, int pageSize, FilterRequestBody requestBody)
      Returns the list of projects with a particular classification.
      Parameters:
      serverName - name of called server
      requestBody - name of the classification - if null, all projects are returned
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return
      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

      public ProjectsResponse findProjects(String serverName, boolean startsWith, boolean endsWith, boolean ignoreCase, int startFrom, int pageSize, FilterRequestBody requestBody)
      Returns the list of projects matching the search string - this is coded as a regular expression.
      Parameters:
      serverName - name of the service to route the request to
      startsWith - does the value start with the supplied string?
      endsWith - does the value end with the supplied string?
      ignoreCase - should the search ignore case?
      startFrom - paging start point
      pageSize - maximum results that can be returned
      requestBody - 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

      public ProjectsResponse getProjectsByName(String serverName, int startFrom, int pageSize, FilterRequestBody requestBody)
      Returns the list of projects with a particular name.
      Parameters:
      serverName - name of called server
      requestBody - name of the projects to return - match is full text match in qualifiedName or name
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return
      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

      public ProjectResponse getProject(String serverName, String projectGUID)
      Return the properties of a specific project.
      Parameters:
      serverName - name of called server
      projectGUID - unique identifier of the required project
      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.
    • createProject

      public GUIDResponse createProject(String serverName, String optionalClassificationName, NewProjectRequestBody requestBody)
      Create a new generic project.
      Parameters:
      serverName - name of called server.
      optionalClassificationName - name of project classification
      requestBody - 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.
    • createTaskForProject

      public GUIDResponse createTaskForProject(String serverName, String projectGUID, ProjectProperties requestBody)
      Create a new project with the Task classification. Used to identify the top of a project hierarchy.
      Parameters:
      serverName - name of called server.
      projectGUID - unique identifier of the project
      requestBody - 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

      public GUIDResponse createProjectFromTemplate(String serverName, 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 user
      requestBody - 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

      public VoidResponse updateProject(String serverName, String projectGUID, boolean replaceAllProperties, ProjectProperties requestBody)
      Update the properties of a project.
      Parameters:
      serverName - name of called server.
      projectGUID - unique identifier of the project (returned from create)
      replaceAllProperties - flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.
      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

      public VoidResponse deleteProject(String serverName, String projectGUID, NullRequestBody 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

      public VoidResponse addToProjectTeam(String serverName, String projectGUID, String actorGUID, ProjectTeamProperties 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

      public VoidResponse removeFromProjectTeam(String serverName, String projectGUID, String actorGUID, NullRequestBody requestBody)
      Remove a ProjectTeam relationship between a project and an actor.
      Parameters:
      serverName - name of called server.
      projectGUID - unique identifier of the project.
      actorGUID - unique identifier of the element.
      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.
    • setupProjectManagementRole

      public VoidResponse setupProjectManagementRole(String serverName, String projectGUID, String projectRoleGUID, NullRequestBody requestBody)
      Create a ProjectManagement relationship between a project and a person role to show that anyone appointed to the role is a member of the project.
      Parameters:
      serverName - name of the service to route the request to.
      projectGUID - unique identifier of the project
      projectRoleGUID - unique identifier of the person role
      requestBody - 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)
    • clearProjectManagementRole

      public VoidResponse clearProjectManagementRole(String serverName, String projectGUID, String projectRoleGUID, NullRequestBody requestBody)
      Remove a ProjectManagement relationship between a project and a person role.
      Parameters:
      serverName - name of the service to route the request to.
      projectGUID - unique identifier of the project
      projectRoleGUID - unique identifier of the person role
      requestBody - 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)
    • setupResource

      public VoidResponse setupResource(String serverName, String elementGUID, String resourceGUID, RelationshipRequestBody requestBody)
      Create a "ResourceList" relationship between a consuming element and an element that represents resources.
      Parameters:
      serverName - name of the service to route the request to.
      elementGUID - unique identifier of the element
      resourceGUID - unique identifier of the resource
      requestBody - relationship properties
      Returns:
      void or 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)
    • clearResource

      public VoidResponse clearResource(String serverName, String elementGUID, String resourceGUID, ExternalSourceRequestBody requestBody)
      Remove a "ResourceList" relationship between two referenceables.
      Parameters:
      serverName - name of the service to route the request to.
      elementGUID - unique identifier of the element
      resourceGUID - unique identifier of the resource
      requestBody - external source identifiers
      Returns:
      void or 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)
    • getResourceList

      public RelatedElementsResponse getResourceList(String serverName, String elementGUID, int startFrom, int pageSize)
      Retrieve the list of resources assigned to an element via the "ResourceList" relationship between two referenceables.
      Parameters:
      serverName - name of the service to route the request to.
      elementGUID - unique identifier of the element
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return.
      Returns:
      void or 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)
    • getSupportedByResource

      public RelatedElementsResponse getSupportedByResource(String serverName, String resourceGUID, int startFrom, int pageSize)
      Retrieve the list of elements assigned to a resource via the "ResourceList" relationship between two referenceables.
      Parameters:
      serverName - name of the service to route the request to.
      resourceGUID - unique identifier of the resource
      startFrom - index of the list to start from (0 for start)
      pageSize - maximum number of elements to return.
      Returns:
      void or 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)