Class GlossaryAuthorViewProjectRESTServices
-
Field Summary
Fields inherited from class org.odpi.openmetadata.viewservices.glossaryauthor.services.BaseGlossaryAuthorView
instanceHandler, invalidParameterHandler, restCallLogger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateProject
(String serverName, String userId, Project suppliedProject) Create a Project.deleteProject
(String serverName, String userId, String guid) Delete a Project instancefindProject
(String serverName, String userId, Date asOfTime, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty) Find ProjectgetProject
(String serverName, String userId, String guid) Get a project.getProjectRelationships
(String serverName, String userId, String guid, Date asOfTime, Integer startingFrom, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty) Get Project relationshipsrestoreProject
(String serverName, String userId, String guid) Restore a ProjectupdateProject
(String serverName, String userId, String guid, Project project, boolean isReplace) Update a ProjectMethods inherited from class org.odpi.openmetadata.viewservices.glossaryauthor.services.BaseGlossaryAuthorView
getFindRequest, getResponseForException
-
Constructor Details
-
GlossaryAuthorViewProjectRESTServices
public GlossaryAuthorViewProjectRESTServices()Default constructor
-
-
Method Details
-
createProject
public SubjectAreaOMASAPIResponse<Project> createProject(String serverName, String userId, 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
- name of the local UI server.userId
- unique identifier for requesting user, under which the request is performedsuppliedProject
- Project to create- Returns:
- the created Project.
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
getProject
public SubjectAreaOMASAPIResponse<Project> getProject(String serverName, String userId, String guid) Get a project.- Parameters:
serverName
- name of the local UI server.userId
- user identifierguid
- 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.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
findProject
public SubjectAreaOMASAPIResponse<Project> findProject(String serverName, String userId, Date asOfTime, String searchCriteria, boolean exactValue, boolean ignoreCase, Integer startingFrom, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty) Find Project- Parameters:
serverName
- name of the local UI server.userId
- user identifiersearchCriteria
- String expression matching Project property values .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 respectedasOfTime
- the glossaries 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 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 list of glossaries 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
public SubjectAreaOMASAPIResponse<Relationship> getProjectRelationships(String serverName, String userId, String guid, Date asOfTime, Integer startingFrom, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty) Get Project relationships- Parameters:
serverName
- name of the local UI server.userId
- user identifierguid
- guid of the project to getasOfTime
- 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
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
updateProject
public SubjectAreaOMASAPIResponse<Project> updateProject(String serverName, String userId, String guid, Project project, boolean isReplace) Update a ProjectStatus is not updated using this call.
- Parameters:
serverName
- name of the local UI server.userId
- user identifierguid
- guid of the project to updateproject
- project to updateisReplace
- 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
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
deleteProject
public SubjectAreaOMASAPIResponse<Project> deleteProject(String serverName, String userId, String guid) Delete a Project instanceThe deletion of a project is only allowed if there is no project content (i.e. no terms or categories).
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. when not successful the following Exceptions can occur
- Parameters:
serverName
- name of the local UI server.userId
- user identifierguid
- guid of the project to be deleted.- Returns:
- a void response
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-
restoreProject
public SubjectAreaOMASAPIResponse<Project> restoreProject(String serverName, String userId, String guid) Restore a ProjectRestore 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
- name of the local UI server.userId
- user identifierguid
- guid of the project to restore- Returns:
- response which when successful contains the restored project
when not successful the following Exception responses can occur
- UserNotAuthorizedException the requesting user is not authorized to issue this request.
- InvalidParameterException one of the parameters is null or invalid.
- PropertyServerException Property server exception.
-