Class ReferenceableBuilder
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericBuilder
org.odpi.openmetadata.commonservices.generichandlers.ReferenceableBuilder
- Direct Known Subclasses:
ActorProfileBuilder
,AssetBuilder
,CollectionBuilder
,CommentBuilder
,CommunityBuilder
,ConnectionBuilder
,ConnectorTypeBuilder
,ContributionRecordBuilder
,EngineActionBuilder
,ExternalReferenceBuilder
,GlossaryBuilder
,GlossaryCategoryBuilder
,GlossaryTermBuilder
,GovernanceActionProcessStepBuilder
,GovernanceActionTypeBuilder
,GovernanceDefinitionBuilder
,GovernanceDomainBuilder
,GovernanceMetricBuilder
,GovernanceZoneBuilder
,LocationBuilder
,NoteBuilder
,NoteLogBuilder
,OperatingPlatformBuilder
,PersonRoleBuilder
,PortBuilder
,ProjectBuilder
,PropertyFacetBuilder
,SchemaAttributeBuilder
,SchemaTypeBuilder
,SoftwareCapabilityBuilder
,SubjectAreaBuilder
,SurveyReportBuilder
,UserIdentityBuilder
,ValidValuesBuilder
ReferenceableBuilder creates Open Metadata Repository Services (OMRS) objects based on the
bean properties supplied in the constructor.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericBuilder
errorHandler, existingClassifications, extendedProperties, instanceStatus, newClassifications, repositoryHelper, serverName, serviceName, templateProperties, typeGUID, typeName
-
Constructor Summary
ModifierConstructorDescriptionprotected
ReferenceableBuilder
(String qualifiedName, String typeId, String typeName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for simple creates.protected
ReferenceableBuilder
(String typeId, String typeName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for simple creates.protected
ReferenceableBuilder
(String qualifiedName, Map<String, String> additionalProperties, String typeId, String typeName, Map<String, Object> extendedProperties, InstanceStatus instanceStatus, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for templated entities.protected
ReferenceableBuilder
(String qualifiedName, Map<String, String> additionalProperties, String typeId, String typeName, Map<String, Object> extendedProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for updates.protected
ReferenceableBuilder
(String qualifiedName, Map<String, String> additionalProperties, String typeId, String typeName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for updates.protected
ReferenceableBuilder
(String qualifiedName, Map<String, String> additionalProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for updates.protected
ReferenceableBuilder
(String qualifiedName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for simple creates.ReferenceableBuilder
(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for simple creates. -
Method Summary
Modifier and TypeMethodDescriptiongetInstanceProperties
(String methodName) Return the supplied bean properties in an InstanceProperties object.getMementoProperties
(Date archiveDate, String archiveUser, String archiveProcess, Map<String, String> archiveProperties, String methodName) Return the template properties in an InstanceProperties object.Return the qualified name so the handler can check for uniqueness.void
setMemento
(String userId, Date archiveDate, String archiveUser, String archiveProcess, Map<String, String> archiveProperties, String methodName) Set up the Memento classification.protected void
setOwnershipClassification
(String userId, String owner, String ownerTypeName, String ownerPropertyName, String methodName) Set up the Ownership classification for this entity.void
setSecurityTags
(String userId, List<String> securityLabels, Map<String, Object> securityProperties, Map<String, List<String>> accessGroups, String methodName) Set up the SecurityTags classification for this entity.void
setTemplate
(String userId, String name, String versionIdentifier, String description, Map<String, String> additionalProperties, String methodName) Set up the Template classification.Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericBuilder
getEntityClassifications, getInstanceProperties, getInstanceStatus, getTypeGUID, getTypeName, isClassificationSet, setAnchors, setClassification, setEffectivityDates, setEffectivityDates, setTemplateClassifications, setTemplateSubstitute, updateInstanceProperties
-
Field Details
-
qualifiedName
-
-
Constructor Details
-
ReferenceableBuilder
public ReferenceableBuilder(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for simple creates.- Parameters:
repositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
ReferenceableBuilder
protected ReferenceableBuilder(String qualifiedName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for simple creates.- Parameters:
qualifiedName
- unique namerepositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
ReferenceableBuilder
protected ReferenceableBuilder(String typeId, String typeName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for simple creates.- Parameters:
typeId
- type GUID to use for the entitytypeName
- type name to use for the entityrepositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
ReferenceableBuilder
protected ReferenceableBuilder(String qualifiedName, String typeId, String typeName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for simple creates.- Parameters:
qualifiedName
- unique nametypeName
- type name to use for the entitytypeId
- type GUID to use for the entityrepositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
ReferenceableBuilder
protected ReferenceableBuilder(String qualifiedName, Map<String, String> additionalProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for updates.- Parameters:
qualifiedName
- unique nameadditionalProperties
- additional propertiesrepositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
ReferenceableBuilder
protected ReferenceableBuilder(String qualifiedName, Map<String, String> additionalProperties, String typeId, String typeName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for updates.- Parameters:
qualifiedName
- unique nameadditionalProperties
- additional propertiestypeName
- type name to use for the entitytypeId
- type GUID to use for the entityrepositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
ReferenceableBuilder
protected ReferenceableBuilder(String qualifiedName, Map<String, String> additionalProperties, String typeId, String typeName, Map<String, Object> extendedProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for updates.- Parameters:
qualifiedName
- unique nameadditionalProperties
- name value pairs for values that are not formally defined in the type systemtypeName
- type name to use for the entitytypeId
- type GUID to use for the entityextendedProperties
- properties from the subtype.repositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
ReferenceableBuilder
protected ReferenceableBuilder(String qualifiedName, Map<String, String> additionalProperties, String typeId, String typeName, Map<String, Object> extendedProperties, InstanceStatus instanceStatus, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor for templated entities.- Parameters:
qualifiedName
- unique nameadditionalProperties
- name value pairs for values that are not formally defined in the type systemtypeName
- type name to use for the entitytypeId
- type GUID to use for the entityextendedProperties
- properties from the subtypeinstanceStatus
- initial instance status for the entityrepositoryHelper
- helper methodsserviceName
- name of this OMASserverName
- name of local server
-
-
Method Details
-
setOwnershipClassification
protected void setOwnershipClassification(String userId, String owner, String ownerTypeName, String ownerPropertyName, String methodName) throws InvalidParameterException Set up the Ownership classification for this entity. This method overrides a previously defined AssetOwnership classification for this entity.- Parameters:
userId
- calling userowner
- name of the ownerownerTypeName
- type of element that owner comes fromownerPropertyName
- name of property used to identify ownermethodName
- calling method- Throws:
InvalidParameterException
- Ownership is not supported in the local repository, or any repository connected by an open metadata repository cohort
-
setTemplate
public void setTemplate(String userId, String name, String versionIdentifier, String description, Map<String, String> additionalProperties, String methodName) throws InvalidParameterExceptionSet up the Template classification.- Parameters:
userId
- calling username
- template nameversionIdentifier
- version identifier for the template eg 1.0description
- template descriptionadditionalProperties
- additional properties about the templatemethodName
- calling method- Throws:
InvalidParameterException
- Template classification not available in the repositories
-
setMemento
public void setMemento(String userId, Date archiveDate, String archiveUser, String archiveProcess, Map<String, String> archiveProperties, String methodName) throws InvalidParameterExceptionSet up the Memento classification.- Parameters:
userId
- calling userarchiveDate
- timestamp that the archive either occurred or was detectedarchiveUser
- name of user responsible for performing the archive (or detecting it)archiveProcess
- process responsible for performing the archive (or detecting it)archiveProperties
- additional properties to locate the archived asset/artifact (if known)methodName
- calling method- Throws:
InvalidParameterException
- Template classification not available in the repositories
-
getMementoProperties
public InstanceProperties getMementoProperties(Date archiveDate, String archiveUser, String archiveProcess, Map<String, String> archiveProperties, String methodName) Return the template properties in an InstanceProperties object.- Parameters:
archiveDate
- timestamp that the archive either occurred or was detectedarchiveUser
- name of user responsible for performing the archive (or detecting it)archiveProcess
- process responsible for performing the archive (or detecting it)archiveProperties
- additional properties to locate the archived asset/artifact (if known)methodName
- name of the calling method- Returns:
- InstanceProperties object
-
setSecurityTags
public void setSecurityTags(String userId, List<String> securityLabels, Map<String, Object> securityProperties, Map<String, throws InvalidParameterExceptionList<String>> accessGroups, String methodName) Set up the SecurityTags classification for this entity. This method overrides a previously defined SecurityTags classification for this entity.- Parameters:
userId
- calling usersecurityLabels
- list of security labelssecurityProperties
- map of name value pairsaccessGroups
- map from operation to list of security groupsmethodName
- calling method- Throws:
InvalidParameterException
- security tags is not supported in the local repository, or any repository connected by an open metadata repository cohort
-
getQualifiedName
Return the qualified name so the handler can check for uniqueness.- Returns:
- string name
-
getInstanceProperties
Return the supplied bean properties in an InstanceProperties object.- Overrides:
getInstanceProperties
in classOpenMetadataAPIGenericBuilder
- Parameters:
methodName
- name of the calling method- Returns:
- InstanceProperties object
- Throws:
InvalidParameterException
- there is a problem with the properties
-