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

public class ReferenceableBuilder extends OpenMetadataAPIGenericBuilder
ReferenceableBuilder creates Open Metadata Repository Services (OMRS) objects based on the bean properties supplied in the constructor.
  • Field Details

    • qualifiedName

      protected String qualifiedName
  • Constructor Details

    • ReferenceableBuilder

      public ReferenceableBuilder(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
      Constructor for simple creates.
      Parameters:
      repositoryHelper - helper methods
      serviceName - name of this OMAS
      serverName - name of local server
    • ReferenceableBuilder

      protected ReferenceableBuilder(String qualifiedName, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
      Constructor for simple creates.
      Parameters:
      qualifiedName - unique name
      repositoryHelper - helper methods
      serviceName - name of this OMAS
      serverName - 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 entity
      typeName - type name to use for the entity
      repositoryHelper - helper methods
      serviceName - name of this OMAS
      serverName - 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 name
      typeName - type name to use for the entity
      typeId - type GUID to use for the entity
      repositoryHelper - helper methods
      serviceName - name of this OMAS
      serverName - 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 name
      additionalProperties - additional properties
      repositoryHelper - helper methods
      serviceName - name of this OMAS
      serverName - 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 name
      additionalProperties - additional properties
      typeName - type name to use for the entity
      typeId - type GUID to use for the entity
      repositoryHelper - helper methods
      serviceName - name of this OMAS
      serverName - 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 name
      additionalProperties - name value pairs for values that are not formally defined in the type system
      typeName - type name to use for the entity
      typeId - type GUID to use for the entity
      extendedProperties - properties from the subtype.
      repositoryHelper - helper methods
      serviceName - name of this OMAS
      serverName - 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 name
      additionalProperties - name value pairs for values that are not formally defined in the type system
      typeName - type name to use for the entity
      typeId - type GUID to use for the entity
      extendedProperties - properties from the subtype
      instanceStatus - initial instance status for the entity
      repositoryHelper - helper methods
      serviceName - name of this OMAS
      serverName - 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 user
      owner - name of the owner
      ownerTypeName - type of element that owner comes from
      ownerPropertyName - name of property used to identify owner
      methodName - 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 InvalidParameterException
      Set up the Template classification.
      Parameters:
      userId - calling user
      name - template name
      versionIdentifier - version identifier for the template eg 1.0
      description - template description
      additionalProperties - additional properties about the template
      methodName - 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 InvalidParameterException
      Set up the Memento classification.
      Parameters:
      userId - calling user
      archiveDate - timestamp that the archive either occurred or was detected
      archiveUser - 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 detected
      archiveUser - 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,List<String>> accessGroups, String methodName) throws InvalidParameterException
      Set up the SecurityTags classification for this entity. This method overrides a previously defined SecurityTags classification for this entity.
      Parameters:
      userId - calling user
      securityLabels - list of security labels
      securityProperties - map of name value pairs
      accessGroups - map from operation to list of security groups
      methodName - calling method
      Throws:
      InvalidParameterException - security tags is not supported in the local repository, or any repository connected by an open metadata repository cohort
    • getQualifiedName

      public String getQualifiedName()
      Return the qualified name so the handler can check for uniqueness.
      Returns:
      string name
    • getInstanceProperties

      public InstanceProperties getInstanceProperties(String methodName) throws InvalidParameterException
      Return the supplied bean properties in an InstanceProperties object.
      Overrides:
      getInstanceProperties in class OpenMetadataAPIGenericBuilder
      Parameters:
      methodName - name of the calling method
      Returns:
      InstanceProperties object
      Throws:
      InvalidParameterException - there is a problem with the properties