Class ProjectManagement
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.projectmanagement.client.ProjectManagementBaseClient
-
- org.odpi.openmetadata.accessservices.projectmanagement.client.ProjectManagement
-
- All Implemented Interfaces:
ProjectsInterface,RelatedElementsInterface
public class ProjectManagement extends ProjectManagementBaseClient implements ProjectsInterface
ProjectManagerClient supports the APIs to maintain projects and their related objects.
-
-
Constructor Summary
Constructors Constructor Description ProjectManagement(String serverName, String serverPlatformURLRoot)Create a new client with no authentication embedded in the HTTP request.ProjectManagement(String serverName, String serverPlatformURLRoot, String userId, String password)Create a new client that passes userId and password in each HTTP request.ProjectManagement(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog)Create a new client that passes userId and password in each HTTP request.ProjectManagement(String serverName, String serverPlatformURLRoot, ProjectManagementRESTClient restClient, int maxPageSize)Create a new client that is going to be used in an OMAG Server.ProjectManagement(String serverName, String serverPlatformURLRoot, AuditLog auditLog)Create a new client with no authentication embedded in the HTTP request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearProjectManagementRole(String userId, String externalSourceGUID, String externalSourceName, String projectGUID, String personRoleGUID)Remove a membership relationship between a project and a person role.voidclearProjectTeam(String userId, String externalSourceGUID, String externalSourceName, String projectGUID, String actorProfileGUID)Remove a membership relationship between a project and a person role.StringcreateProject(String userId, String externalSourceGUID, String externalSourceName, ProjectProperties projectProperties)Create a new metadata element to represent a project.StringcreateProjectFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String templateGUID, TemplateProperties templateProperties)Create a new metadata element to represent a project using an existing metadata element as a template.List<ProjectElement>findProjects(String userId, String searchString, int startFrom, int pageSize)Retrieve the list of metadata elements that contain the search string.List<ActorProfileElement>getProjectActors(String userId, String projectGUID, int startFrom, int pageSize)Return information about the actors linked to a project.ProjectElementgetProjectByGUID(String userId, String projectGUID)Retrieve the metadata element with the supplied unique identifier.List<PersonRoleElement>getProjectManagementRoles(String userId, String projectGUID, int startFrom, int pageSize)Return information about the person roles linked to a project.List<ProjectElement>getProjects(String userId, int startFrom, int pageSize)Retrieve the list of projects.List<ProjectElement>getProjectsByName(String userId, String name, int startFrom, int pageSize)Retrieve the list of metadata elements with a matching qualified or display name.voidremoveProject(String userId, String externalSourceGUID, String externalSourceName, String projectGUID)Remove the metadata element representing a project.voidsetupProjectManagementRole(String userId, String externalSourceGUID, String externalSourceName, String projectGUID, String personRoleGUID)Create a membership relationship between a project and a person role to show that anyone appointed to the role is a member of the project.voidsetupProjectTeam(String userId, String externalSourceGUID, String externalSourceName, String projectGUID, ProjectTeamProperties properties, String actorProfileGUID)Create a project team relationship between a project and a person role to show that anyone appointed to the role is a member of the project.voidupdateProject(String userId, String externalSourceGUID, String externalSourceName, String projectGUID, boolean isMergeUpdate, ProjectProperties projectProperties)Update the metadata element representing a project.-
Methods inherited from class org.odpi.openmetadata.accessservices.projectmanagement.client.ProjectManagementBaseClient
clearAssignmentScope, clearMoreInformation, clearResource, clearStakeholder, getAssignedActors, getAssignedScopes, getDescriptiveElements, getMoreInformation, getResourceList, getStakeholderCommissionedElements, getStakeholders, getSupportedByResource, removeReferenceable, setupAssignmentScope, setupMoreInformation, setupResource, setupStakeholder
-
-
-
-
Constructor Detail
-
ProjectManagement
public ProjectManagement(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ProjectManagement
public ProjectManagement(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servers- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ProjectManagement
public ProjectManagement(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ProjectManagement
public ProjectManagement(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException
Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestsauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ProjectManagement
public ProjectManagement(String serverName, String serverPlatformURLRoot, ProjectManagementRESTClient restClient, int maxPageSize) throws InvalidParameterException
Create a new client that is going to be used in an OMAG Server.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversrestClient- client that issues the REST API callsmaxPageSize- maximum number of results supported by this server- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Detail
-
createProject
public String createProject(String userId, String externalSourceGUID, String externalSourceName, ProjectProperties projectProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a project.- Specified by:
createProjectin interfaceProjectsInterface- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software capability representing the callerexternalSourceName- unique name of software capability representing the callerprojectProperties- properties about the project to store- Returns:
- unique identifier of the new project
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
createProjectFromTemplate
public String createProjectFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a project using an existing metadata element as a template.- Specified by:
createProjectFromTemplatein interfaceProjectsInterface- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software capability representing the callerexternalSourceName- unique name of software capability representing the callertemplateGUID- unique identifier of the metadata element to copytemplateProperties- properties that override the template- Returns:
- unique identifier of the new project
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateProject
public void updateProject(String userId, String externalSourceGUID, String externalSourceName, String projectGUID, boolean isMergeUpdate, ProjectProperties projectProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the metadata element representing a project. It is possible to use the subtype property classes or set up specialized properties in extended properties.- Specified by:
updateProjectin interfaceProjectsInterface- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software capability representing the callerexternalSourceName- unique name of software capability representing the callerprojectGUID- unique identifier of the metadata element to updateisMergeUpdate- should the new properties be merged with existing properties (true) or completely replace them (false)?projectProperties- new properties for the metadata element- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
setupProjectManagementRole
public void setupProjectManagementRole(String userId, String externalSourceGUID, String externalSourceName, String projectGUID, String personRoleGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a membership relationship between a project and a person role to show that anyone appointed to the role is a member of the project.- Specified by:
setupProjectManagementRolein interfaceProjectsInterface- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software capability representing the callerexternalSourceName- unique name of software capability representing the callerprojectGUID- unique identifier of the project in the external data managerpersonRoleGUID- unique identifier of the person role in the external data manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
clearProjectManagementRole
public void clearProjectManagementRole(String userId, String externalSourceGUID, String externalSourceName, String projectGUID, String personRoleGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove a membership relationship between a project and a person role.- Specified by:
clearProjectManagementRolein interfaceProjectsInterface- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software capability representing the callerexternalSourceName- unique name of software capability representing the callerprojectGUID- unique identifier of the project in the external data managerpersonRoleGUID- unique identifier of the person role in the external data manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
setupProjectTeam
public void setupProjectTeam(String userId, String externalSourceGUID, String externalSourceName, String projectGUID, ProjectTeamProperties properties, String actorProfileGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a project team relationship between a project and a person role to show that anyone appointed to the role is a member of the project.- Specified by:
setupProjectTeamin interfaceProjectsInterface- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software capability representing the callerexternalSourceName- unique name of software capability representing the callerprojectGUID- unique identifier of the projectproperties- describes the permissions that the role has in the projectactorProfileGUID- unique identifier of the person role- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
clearProjectTeam
public void clearProjectTeam(String userId, String externalSourceGUID, String externalSourceName, String projectGUID, String actorProfileGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove a membership relationship between a project and a person role.- Specified by:
clearProjectTeamin interfaceProjectsInterface- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software capability representing the callerexternalSourceName- unique name of software capability representing the callerprojectGUID- unique identifier of the project in the external data manageractorProfileGUID- unique identifier of the person role in the external data manager- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
removeProject
public void removeProject(String userId, String externalSourceGUID, String externalSourceName, String projectGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing a project.- Specified by:
removeProjectin interfaceProjectsInterface- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software capability representing the callerexternalSourceName- unique name of software capability representing the callerprojectGUID- unique identifier of the metadata element to remove- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
findProjects
public List<ProjectElement> findProjects(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findProjectsin interfaceProjectsInterface- Parameters:
userId- calling usersearchString- string to find in the propertiesstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getProjectsByName
public List<ProjectElement> getProjectsByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getProjectsByNamein interfaceProjectsInterface- Parameters:
userId- calling username- name to search forstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getProjects
public List<ProjectElement> getProjects(String userId, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of projects.- Specified by:
getProjectsin interfaceProjectsInterface- Parameters:
userId- calling userstartFrom- paging start pointpageSize- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
getProjectManagementRoles
public List<PersonRoleElement> getProjectManagementRoles(String userId, String projectGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return information about the person roles linked to a project.- Specified by:
getProjectManagementRolesin interfaceProjectsInterface- Parameters:
userId- calling userprojectGUID- unique identifier for the projectstartFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to return.- Returns:
- list of matching actor profiles (hopefully only one)
- Throws:
InvalidParameterException- name or userId is nullPropertyServerException- problem accessing property serverUserNotAuthorizedException- security access problem
-
getProjectActors
public List<ActorProfileElement> getProjectActors(String userId, String projectGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return information about the actors linked to a project.- Specified by:
getProjectActorsin interfaceProjectsInterface- Parameters:
userId- calling userprojectGUID- unique identifier for the projectstartFrom- index of the list to start from (0 for start)pageSize- maximum number of elements to return.- Returns:
- list of matching actor profiles (hopefully only one)
- Throws:
InvalidParameterException- name or userId is nullPropertyServerException- problem accessing property serverUserNotAuthorizedException- security access problem
-
getProjectByGUID
public ProjectElement getProjectByGUID(String userId, String projectGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the metadata element with the supplied unique identifier.- Specified by:
getProjectByGUIDin interfaceProjectsInterface- Parameters:
userId- calling userprojectGUID- unique identifier of the requested metadata element- Returns:
- requested metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
-