public abstract class SubjectAreaHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CATEGORY_ANCHOR_RELATIONSHIP_NAME |
protected static String |
CATEGORY_HIERARCHY_LINK_RELATIONSHIP_NAME |
protected static String |
CATEGORY_TYPE_NAME |
protected static String |
GLOSSARY_TYPE_NAME |
protected MappersFactory |
mappersFactory |
protected OMRSAPIHelper |
oMRSAPIHelper |
protected static String |
PROJECT_SCOPE_RELATIONSHIP_NAME |
protected static String |
PROJECT_TYPE_NAME |
protected static String |
TERM_ANCHOR_RELATIONSHIP_NAME |
protected static String |
TERM_TYPE_NAME |
| Constructor and Description |
|---|
SubjectAreaHandler(OMRSAPIHelper oMRSAPIHelper)
Construct the Subject Area Project Handler
needed to operate within a single server instance.
|
| Modifier and Type | Method and Description |
|---|---|
<R extends InstanceHeader,T extends OmasObject> |
convertOmrsToOmas(Collection<R> list,
Class<? extends Mapper> mapperInterface) |
protected <T extends Node> |
findEntities(String userId,
String typeEntityName,
FindRequest findRequest,
Class<? extends INodeMapper<T>> mapperClass,
String methodName) |
List<Line> |
getAllLineForEntity(String restAPIName,
String userId,
String entityGuid,
FindRequest findRequest)
Get the relationships keyed off an entity guid.
|
SubjectAreaOMASAPIResponse<Line> |
getAllRelationshipsForEntity(String methodName,
String userId,
String guid,
FindRequest findRequest)
Get All relationships for entity
|
List<Line> |
getLinesFromRelationships(Collection<Relationship> relationships) |
List<Node> |
getNodesFromEntityDetails(Collection<EntityDetail> entityDetails) |
protected String |
validateGlossarySummaryDuringCreation(String userId,
String methodName,
GlossarySummary suppliedGlossary)
This method validated for creation.
|
protected static final String GLOSSARY_TYPE_NAME
protected static final String CATEGORY_TYPE_NAME
protected static final String TERM_TYPE_NAME
protected static final String PROJECT_TYPE_NAME
protected static final String TERM_ANCHOR_RELATIONSHIP_NAME
protected static final String PROJECT_SCOPE_RELATIONSHIP_NAME
protected static final String CATEGORY_ANCHOR_RELATIONSHIP_NAME
protected static final String CATEGORY_HIERARCHY_LINK_RELATIONSHIP_NAME
protected final MappersFactory mappersFactory
protected final OMRSAPIHelper oMRSAPIHelper
public SubjectAreaHandler(OMRSAPIHelper oMRSAPIHelper)
oMRSAPIHelper - omrs API helperprotected <T extends Node> List<T> findEntities(String userId, String typeEntityName, FindRequest findRequest, Class<? extends INodeMapper<T>> mapperClass, String methodName) throws SubjectAreaCheckedException, PropertyServerException, UserNotAuthorizedException
public SubjectAreaOMASAPIResponse<Line> getAllRelationshipsForEntity(String methodName, String userId, String guid, FindRequest findRequest)
methodName - name of the method being called.userId - unique identifier for requesting user, under which the request is performedguid - guidfindRequest - FindRequestpublic List<Line> getAllLineForEntity(String restAPIName, String userId, String entityGuid, FindRequest findRequest) throws SubjectAreaCheckedException, PropertyServerException, UserNotAuthorizedException
restAPIName - rest API nameuserId - user identityentityGuid - globally unique identifierfindRequest - FindRequestList<Line>PropertyServerException - something went wrong with the REST call stack.UserNotAuthorizedException - the requesting user is not authorized to issue this request.SubjectAreaCheckedException - standard exception Subject Area OMAS servicespublic List<Line> getLinesFromRelationships(Collection<Relationship> relationships)
public List<Node> getNodesFromEntityDetails(Collection<EntityDetail> entityDetails)
public <R extends InstanceHeader,T extends OmasObject> List<T> convertOmrsToOmas(Collection<R> list, Class<? extends Mapper> mapperInterface)
protected String validateGlossarySummaryDuringCreation(String userId, String methodName, GlossarySummary suppliedGlossary) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, SubjectAreaCheckedException
userId - userId under which the request is performedmethodName - method making the callsuppliedGlossary - glossary to validate against.PropertyServerException - something went wrong with the REST call stack.UserNotAuthorizedException - the requesting user is not authorized to issue this request.InvalidParameterException - one of the parameters is null or invalidSubjectAreaCheckedException - standard exception Subject Area OMAS servicesCopyright © 2018–2020 ODPi. All rights reserved.