public class OpenMetadataAPIGenericBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected RepositoryErrorHandler |
errorHandler |
protected List<Classification> |
existingClassifications |
protected Map<String,Object> |
extendedProperties |
protected InstanceStatus |
instanceStatus |
protected Map<String,Classification> |
newClassifications |
protected OMRSRepositoryHelper |
repositoryHelper |
protected String |
serverName |
protected String |
serviceName |
protected InstanceProperties |
templateProperties |
protected String |
typeGUID |
protected String |
typeName |
| Modifier | Constructor and Description |
|---|---|
protected |
OpenMetadataAPIGenericBuilder(String typeGUID,
String typeName,
Map<String,Object> extendedProperties,
InstanceStatus instanceStatus,
Date effectiveFrom,
Date effectiveTo,
List<Classification> existingClassifications,
OMRSRepositoryHelper repositoryHelper,
String serviceName,
String serverName)
Constructor for type specific creates.
|
protected |
OpenMetadataAPIGenericBuilder(String typeGUID,
String typeName,
Map<String,Object> extendedProperties,
InstanceStatus instanceStatus,
List<Classification> existingClassifications,
OMRSRepositoryHelper repositoryHelper,
String serviceName,
String serverName)
Constructor for type specific creates.
|
protected |
OpenMetadataAPIGenericBuilder(String typeGUID,
String typeName,
OMRSRepositoryHelper repositoryHelper,
String serviceName,
String serverName)
Constructor for working with classifications.
|
| Modifier and Type | Method and Description |
|---|---|
InstanceProperties |
getEntityClassificationProperties(String elementClassificationName,
String methodName)
Retrieve the requested classification and convert it to the OMRS format.
|
List<Classification> |
getEntityClassifications()
Return a list of entity classifications that can be stored in the metadata
repository.
|
InstanceAuditHeader |
getExistingEntityClassificationHeader(String elementClassificationName,
String methodName)
Retrieve the requested classification and convert it to the OMRS format.
|
InstanceProperties |
getInstanceProperties(Map<String,InstancePropertyValue> propertyMap,
Date effectiveFrom,
Date effectiveTo)
Return the properties based on the parameters supplied.
|
InstanceProperties |
getInstanceProperties(String methodName)
Return the supplied bean properties in an InstanceProperties object.
|
InstanceStatus |
getInstanceStatus()
Return the status that this entity should be created with.
|
String |
getTypeGUID()
Return the bean's type id
|
String |
getTypeName()
Return the bean's type name
|
void |
setAnchors(String userId,
String anchorGUID,
String methodName)
Set up the Anchors classification for this entity.
|
void |
setClassification(Classification newClassification)
Add a classification to the entity.
|
void |
setLatestChange(String userId,
int latestChangeTargetOrdinal,
int latestChangeActionOrdinal,
String classificationName,
String attachmentGUID,
String attachmentTypeName,
String relationshipTypeName,
String actionDescription,
String methodName)
Set up the LatestChange classification for an anchor entity.
|
void |
setTemplateClassifications(String userId,
String externalSourceGUID,
String externalSourceName,
List<Classification> templateClassifications,
String methodName)
Set up the list of classifications from a template entity.
|
protected InstanceProperties |
updateInstanceProperties(InstanceProperties properties,
Map<String,Object> propertyMap,
String methodName)
Add the supplied properties to the supplied instance properties object.
|
protected RepositoryErrorHandler errorHandler
protected OMRSRepositoryHelper repositoryHelper
protected String serviceName
protected String serverName
protected String typeGUID
protected String typeName
protected InstanceStatus instanceStatus
protected List<Classification> existingClassifications
protected Map<String,Classification> newClassifications
protected InstanceProperties templateProperties
protected OpenMetadataAPIGenericBuilder(String typeGUID, String typeName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
typeGUID - type GUID to use for the entitytypeName - type name to use for the entityrepositoryHelper - helper methodsserviceName - name of this OMASserverName - name of local serverprotected OpenMetadataAPIGenericBuilder(String typeGUID, String typeName, Map<String,Object> extendedProperties, InstanceStatus instanceStatus, List<Classification> existingClassifications, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
typeGUID - type GUID to use for the entitytypeName - type name to use for the entityextendedProperties - properties for the sub type (if any)instanceStatus - status to use on the requestexistingClassifications - classifications that are currently storedrepositoryHelper - helper methodsserviceName - name of this OMASserverName - name of local serverprotected OpenMetadataAPIGenericBuilder(String typeGUID, String typeName, Map<String,Object> extendedProperties, InstanceStatus instanceStatus, Date effectiveFrom, Date effectiveTo, List<Classification> existingClassifications, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
typeGUID - type GUID to use for the entitytypeName - type name to use for the entityextendedProperties - properties for the sub type (if any)instanceStatus - status to use on the requesteffectiveFrom - date to make the element active in the governance program (null for now)effectiveTo - date to remove the element from the governance program (null = until deleted)existingClassifications - classifications that are currently storedrepositoryHelper - helper methodsserviceName - name of this OMASserverName - name of local serverpublic void setClassification(Classification newClassification)
newClassification - classification object ready for the repositorypublic void setTemplateClassifications(String userId, String externalSourceGUID, String externalSourceName, List<Classification> templateClassifications, String methodName) throws InvalidParameterException
userId - calling userexternalSourceGUID - guid of the software server capability entity that represented the external source - null for localexternalSourceName - name of the software server capability entity that represented the external sourcetemplateClassifications - list of classifications from the templatemethodName - calling methodInvalidParameterException - the type of one of the classifications is not supportedpublic void setAnchors(String userId, String anchorGUID, String methodName) throws PropertyServerException
userId - calling useranchorGUID - unique identifier of the anchor entity that this entity is linked to directly or indirectlymethodName - calling methodPropertyServerException - a null anchors GUID has been suppliedpublic void setLatestChange(String userId, int latestChangeTargetOrdinal, int latestChangeActionOrdinal, String classificationName, String attachmentGUID, String attachmentTypeName, String relationshipTypeName, String actionDescription, String methodName) throws InvalidParameterException
userId - calling userlatestChangeTargetOrdinal - ordinal for the LatestChangeTarget enum valuelatestChangeActionOrdinal - ordinal for the LatestChangeAction enum valueclassificationName - name of a changed classificationattachmentGUID - unique identifier of an entity attached to the anchorattachmentTypeName - type name of the attached entityrelationshipTypeName - relationship used to attach the entityactionDescription - human readable description of the changemethodName - calling methodInvalidParameterException - this classification is not supportedpublic String getTypeName()
public String getTypeGUID()
public InstanceStatus getInstanceStatus()
public InstanceProperties getInstanceProperties(String methodName) throws InvalidParameterException
methodName - name of the calling methodInvalidParameterException - there is a problem with the propertiespublic InstanceProperties getInstanceProperties(Map<String,InstancePropertyValue> propertyMap, Date effectiveFrom, Date effectiveTo) throws InvalidParameterException
propertyMap - map of property names to valueseffectiveFrom - date to make the element active in the governance program (null for now)effectiveTo - date to remove the element from the governance program (null = until deleted)InvalidParameterException - problem mapping propertiesprotected InstanceProperties updateInstanceProperties(InstanceProperties properties, Map<String,Object> propertyMap, String methodName) throws InvalidParameterException
properties - current accumulated propertiespropertyMap - map of property names to valuesmethodName - calling methodInvalidParameterException - problem mapping propertiespublic List<Classification> getEntityClassifications()
public InstanceAuditHeader getExistingEntityClassificationHeader(String elementClassificationName, String methodName) throws InvalidParameterException
elementClassificationName - name of the classification to retrieve/convertmethodName - calling methodInvalidParameterException - the classification name parameter is nullpublic InstanceProperties getEntityClassificationProperties(String elementClassificationName, String methodName) throws InvalidParameterException
elementClassificationName - name of the classification to retrieve/convertmethodName - calling methodInvalidParameterException - the classification name parameter is nullCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.