public class SubjectAreaUtils extends Object
| Constructor and Description |
|---|
SubjectAreaUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkStatusNotDeleted(Status status,
SubjectAreaErrorCode errorCode) |
static Status |
convertInstanceStatusToStatus(InstanceStatus instanceStatus) |
static InstanceStatus |
convertStatusToInstanceStatus(Status status) |
static SystemAttributes |
createSystemAttributes(InstanceHeader instanceHeader)
create SystemAttributes instance from an insance header object
|
static InstanceType |
createTemplateFromTypeDef(TypeDef typeDef) |
static CategorySummary |
extractCategorySummaryFromCategory(Category category,
Relationship relationship)
Convert a Category to a CategorySummary
|
static GlossarySummary |
extractGlossarySummaryFromGlossary(Glossary glossary,
Relationship relationship)
Extract Glossary Summary
|
static String |
getGlossaryGuidFromAnchor(Relationship relationship)
Get glossary guid from anchors
|
SubjectAreaOMASAPIResponse<IconSummary> |
getIconSummarySet(String userId,
String guid)
Set icon summaries from related media relationships by issuing a call to omrs using the related media guid - which is at one end of the relationship.
|
static void |
populateSystemAttributesForInstanceAuditHeader(SystemAttributes systemAttributes,
InstanceAuditHeader instanceAuditHeader) |
static void |
setDatePropertyInInstanceProperties(InstanceProperties instanceProperties,
Date date,
String propertyName)
set the Date value into the InstanceProperties
|
static void |
setIntegerPropertyInInstanceProperties(InstanceProperties instanceProperties,
Integer integerValue,
String propertyName)
Set the Integer value into the InstanceProperties.
|
static void |
setStringPropertyInInstanceProperties(InstanceProperties instanceProperties,
String stringValue,
String propertyName)
Set the String value into the InstanceProperties.
|
public static InstanceType createTemplateFromTypeDef(TypeDef typeDef)
public static CategorySummary extractCategorySummaryFromCategory(Category category, Relationship relationship)
category - to convertrelationship - Relationshippublic static GlossarySummary extractGlossarySummaryFromGlossary(Glossary glossary, Relationship relationship)
glossary - the glossary that is to be summarisedrelationship - the relationship to the glossary, which feeds part of the node summarypublic static String getGlossaryGuidFromAnchor(Relationship relationship)
relationship - - TermAnchor or CategoryAnchorpublic static void checkStatusNotDeleted(Status status, SubjectAreaErrorCode errorCode) throws InvalidParameterException
InvalidParameterExceptionpublic static Status convertInstanceStatusToStatus(InstanceStatus instanceStatus)
public static InstanceStatus convertStatusToInstanceStatus(Status status)
public static SystemAttributes createSystemAttributes(InstanceHeader instanceHeader)
instanceHeader - omrs instance headerpublic static void populateSystemAttributesForInstanceAuditHeader(SystemAttributes systemAttributes, InstanceAuditHeader instanceAuditHeader)
public static void setStringPropertyInInstanceProperties(InstanceProperties instanceProperties, String stringValue, String propertyName)
instanceProperties - supplied instancepropertiesstringValue - string valuepropertyName - property name.public static void setIntegerPropertyInInstanceProperties(InstanceProperties instanceProperties, Integer integerValue, String propertyName)
instanceProperties - supplied instancepropertiesintegerValue - integer valuepropertyName - property name.public static void setDatePropertyInInstanceProperties(InstanceProperties instanceProperties, Date date, String propertyName)
instanceProperties - supplied instancepropertiesdate - Datew valuepropertyName - property namepublic SubjectAreaOMASAPIResponse<IconSummary> getIconSummarySet(String userId, String guid)
userId - userid under which to issue to the get of the related mediaguid - to get associated icons fromCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.