public class SubjectAreaProjectHandler extends SubjectAreaHandler
oMRSAPIHelper| Constructor and Description |
|---|
SubjectAreaProjectHandler(OMRSAPIHelper oMRSAPIHelper)
Construct the Subject Area Project Handler
needed to operate within a single server instance.
|
| Modifier and Type | Method and Description |
|---|---|
SubjectAreaOMASAPIResponse |
createProject(String userId,
Project suppliedProject)
Create a Project.
|
SubjectAreaOMASAPIResponse |
deleteProject(String userId,
String guid,
Boolean isPurge)
Delete a Project instance
|
SubjectAreaOMASAPIResponse |
findProject(String userId,
String searchCriteria,
Date asOfTime,
Integer offset,
Integer pageSize,
SequencingOrder sequencingOrder,
String sequencingProperty)
Find Project
|
SubjectAreaOMASAPIResponse |
getProjectByGuid(String userId,
String guid)
Get a project by guid.
|
SubjectAreaOMASAPIResponse |
getProjectRelationships(String userId,
String guid,
Date asOfTime,
Integer offset,
Integer pageSize,
SequencingOrder sequencingOrder,
String sequencingProperty)
Get Project relationships
|
SubjectAreaOMASAPIResponse |
getProjectTerms(SubjectAreaGraphHandler subjectAreaGraphHandler,
String userId,
String guid,
Date asOfTime)
Get the terms in this project.
|
protected SubjectAreaOMASAPIResponse |
getResponse(SubjectAreaOMASAPIResponse response)
Take an entityDetail response and map it to the appropriate Project orientated response
|
SubjectAreaOMASAPIResponse |
restoreProject(String userId,
String guid)
Restore a Project
|
SubjectAreaOMASAPIResponse |
updateProject(String userId,
String guid,
Project suppliedProject,
boolean isReplace)
Update a Project
|
getRelationshipsFromGuid, validateGlossarySummaryDuringCreationpublic SubjectAreaProjectHandler(OMRSAPIHelper oMRSAPIHelper)
oMRSAPIHelper - OMRS API helperprotected SubjectAreaOMASAPIResponse getResponse(SubjectAreaOMASAPIResponse response)
getResponse in class SubjectAreaHandlerresponse - entityDetailResponsepublic SubjectAreaOMASAPIResponse createProject(String userId, Project suppliedProject)
Projects with the same name can be confusing. Best practise is to createProjects 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.
Valid nodeTypes for this request are:
userId - unique identifier for requesting user, under which the request is performedsuppliedProject - Project to createpublic SubjectAreaOMASAPIResponse getProjectByGuid(String userId, String guid)
userId - unique identifier for requesting user, under which the request is performedguid - guid of the project to getpublic SubjectAreaOMASAPIResponse findProject(String userId, String searchCriteria, Date asOfTime, Integer offset, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty)
userId - unique identifier for requesting user, under which the request is performedsearchCriteria - String expression matching Project property values. If not specified then all projects are returned.asOfTime - the projects returned as they were at this time. null indicates at the current time.offset - 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.
0 means there is no limit to the page sizesequencingOrder - the sequencing order for the results.sequencingProperty - the name of the property that should be used to sequence the results.public SubjectAreaOMASAPIResponse getProjectRelationships(String userId, String guid, Date asOfTime, Integer offset, Integer pageSize, SequencingOrder sequencingOrder, String sequencingProperty)
userId - unique identifier for requesting user, under which the request is performedguid - 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.offset - 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.
0 means there is not limit to the page sizesequencingOrder - the sequencing order for the results.sequencingProperty - the name of the property that should be used to sequence the results.when not successful the following Exception responses can occur
public SubjectAreaOMASAPIResponse updateProject(String userId, String guid, Project suppliedProject, boolean isReplace)
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.
userId - unique identifier for requesting user, under which the request is performedguid - guid of the project to updatesuppliedProject - project to be updatedisReplace - flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated.public SubjectAreaOMASAPIResponse deleteProject(String userId, String guid, Boolean isPurge)
The 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. Soft delete is the default.
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
userId - unique identifier for requesting user, under which the request is performedguid - guid of the project to be deleted.isPurge - true indicates a hard delete, false is a soft delete.public SubjectAreaOMASAPIResponse restoreProject(String userId, String guid)
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.
userId - unique identifier for requesting user, under which the request is performedguid - guid of the project to restorepublic SubjectAreaOMASAPIResponse getProjectTerms(SubjectAreaGraphHandler subjectAreaGraphHandler, String userId, String guid, Date asOfTime)
subjectAreaGraphHandler - graph handleruserId - unique identifier for requesting user, under which the request is performedguid - 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.Copyright © 2018–2020 ODPi. All rights reserved.