Class DynamicArchiveService
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector
org.odpi.openmetadata.adapters.connectors.dynamicarchivers.DynamicArchiveService
- All Implemented Interfaces:
org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceService,org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent,org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension
- Direct Known Subclasses:
GlossaryDynamicArchiverConnector
public abstract class DynamicArchiveService
extends org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector
DynamicArchiveService describes a specific type of connector that is responsible for managing the content
of a specific open metadata archive. Information about the available metadata is passed in the archive context.
The returned archive context also contains the status of this service.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classDetails of one of the archive destination that this archive service is managing.Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.frameworks.connectors.ConnectorBase.ProtectedConnection -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected List<DynamicArchiveService.ArchiveDestination>protected static final Stringprotected static final Stringprotected static final Stringprotected static final org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveTypeprotected static final Dateprotected static final Stringprotected static final Stringprotected static final longFields inherited from class org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector
auditLog, embeddedConnectors, repositoryGovernanceContext, repositoryGovernanceServiceNameFields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, securedProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddClassification(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension classification) Add a new classification to the archive.protected voidaddClassificationDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef classificationDef) Add a new ClassificationDef to the archive.protected voidaddCollectionDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef collectionDef) Add a new CollectionDef to the archive.protected voidaddEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity) Add a new entity to the archive.protected voidaddEntityDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef entityDef) Add a new EntityDef to the archive.protected voidaddEnumDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef enumDef) Add a new EnumDef to the archive.protected voidaddPrimitiveDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef primitiveDef) Add a new PrimitiveDef to the archive.protected voidaddRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship) Add a new relationship to the archive.protected voidaddRelationshipDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef relationshipDef) Add a new RelationshipDef to the archive.protected voidaddTypeDefPatch(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch typeDefPatch) Add a new patch to the archive.protected org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchivePropertiesReturn the archive properties as will appear in the archive.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtensiongetClassification(String entityGUID, String classificationName) Retrieve a classification extension from the archive.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDefgetClassificationDef(String classificationDef) Retrieve the relationshipDef or null if it is not defined.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDefgetCollectionDef(String collectionDefName) Retrieve a CollectionDef from the archive.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailRetrieve an entity from the archive.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDefgetEntityDef(String entityDefName) Retrieve the entityDef or null if it is not defined.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDefgetEnumDef(String enumDefName) Get an existing EnumDef from the archive.org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveOnce the content of the archive has been added to the archive builder, an archive object can be retrieved.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatchgetPatchForType(String typeName) Create a skeleton patch for a TypeDefPatch.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefgetPrimitiveDef(String primitiveDefName) Retrieve a PrimitiveDef from the archive.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.RelationshipgetRelationship(String guid) Retrieve a relationship from the archive.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDefgetRelationshipDef(String relationshipDefName) Retrieve the relationshipDef or null if it is not defined.protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefgetTypeDefByName(String typeName) Return the requested type definition if known.protected voidhandleUnexpectedException(String methodName, Exception error) Provide a common exception for unexpected errors.voidsetArchiveProperties(String archiveGUID, String archiveName, String archiveDescription, org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType archiveType, String archiveVersion, String originatorName, String originatorLicense, Date creationDate, List<org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive> dependsOnArchives) Set up archive header.voidstart()Indicates that the archive service is completely configured and can begin processing.protected voidvalidateContext(org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceContext governanceContext) Verify that the context has been set up for the subclassMethods inherited from class org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector
disconnect, getConnectorComponentDescription, getRepositoryGovernanceContext, initializeEmbeddedConnectors, setAuditLog, setRepositoryGovernanceContext, setRepositoryGovernanceServiceNameMethods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
equals, getConnectedAssetProperties, getConnection, getConnectorInstanceId, hashCode, initialize, initializeConnectedAssetProperties, isActive, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
-
Field Details
-
archiveGUID
- See Also:
-
archiveName
- See Also:
-
archiveLicense
- See Also:
-
archiveDescription
- See Also:
-
archiveType
protected static final org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType archiveType -
originatorName
- See Also:
-
creationDate
-
versionNumber
protected static final long versionNumber- See Also:
-
versionName
- See Also:
-
archiveDestinations
-
-
Constructor Details
-
DynamicArchiveService
public DynamicArchiveService()
-
-
Method Details
-
start
public void start() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedExceptionIndicates that the archive service is completely configured and can begin processing. Any embedded connectors are started. This is the method where the function of the archive service is implemented in the subclass. This is a standard method from the Open Connector Framework (OCF) so be sure to call super.start() in your version.- Overrides:
startin classorg.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- there is a problem within the archive service.
-
handleUnexpectedException
protected void handleUnexpectedException(String methodName, Exception error) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException Provide a common exception for unexpected errors.- Overrides:
handleUnexpectedExceptionin classorg.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector- Parameters:
methodName- calling methoderror- caught exception- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- wrapped exception
-
validateContext
protected void validateContext(org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceContext governanceContext) throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException Verify that the context has been set up for the subclass- Overrides:
validateContextin classorg.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceServiceConnector- Parameters:
governanceContext- context from the subclass- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- error to say that the connector (governance action service) is not able to proceed because it has not been set up correctly.
-
getOpenMetadataArchive
public org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive getOpenMetadataArchive()Once the content of the archive has been added to the archive builder, an archive object can be retrieved.- Returns:
- open metadata archive object with all the supplied content in it.
-
setArchiveProperties
public void setArchiveProperties(String archiveGUID, String archiveName, String archiveDescription, org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType archiveType, String archiveVersion, String originatorName, String originatorLicense, Date creationDate, List<org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive> dependsOnArchives) Set up archive header. It passes parameters used to build the open metadata archive's property header including the default license string. This determines the license and copyright for all instances in the archive that do not have their own explicit license string. The default license string will be inserted into each instance with a null license when it is loaded into an open metadata repository.- Parameters:
archiveGUID- unique identifier for this open metadata archive.archiveName- name of the open metadata archive.archiveDescription- description of the open metadata archive.archiveType- enum describing the type of archive this is.archiveVersion- descriptive name for the version of the archive.originatorName- name of the originator (person or organization) of the archive.originatorLicense- default license string for content.creationDate- data that this archive was created.dependsOnArchives- list of archives that this archive depends on (null for no dependencies).
-
getArchiveProperties
protected org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveProperties getArchiveProperties()Return the archive properties as will appear in the archive. Null is returned if archive properties not set up.- Returns:
- property bean
-
addPrimitiveDef
protected void addPrimitiveDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef primitiveDef) Add a new PrimitiveDef to the archive.- Parameters:
primitiveDef- type to add nulls are ignored
-
getPrimitiveDef
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDef getPrimitiveDef(String primitiveDefName) Retrieve a PrimitiveDef from the archive.- Parameters:
primitiveDefName- primitive to retrieve- Returns:
- PrimitiveDef type
-
addCollectionDef
protected void addCollectionDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef collectionDef) Add a new CollectionDef to the archive.- Parameters:
collectionDef- type to add
-
getCollectionDef
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.CollectionDef getCollectionDef(String collectionDefName) Retrieve a CollectionDef from the archive.- Parameters:
collectionDefName- type to retrieve- Returns:
- CollectionDef type
-
addEnumDef
protected void addEnumDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef enumDef) Add a new EnumDef to the archive.- Parameters:
enumDef- type to add
-
getEnumDef
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EnumDef getEnumDef(String enumDefName) Get an existing EnumDef from the archive.- Parameters:
enumDefName- type to retrieve- Returns:
- EnumDef object
-
addClassificationDef
protected void addClassificationDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef classificationDef) Add a new ClassificationDef to the archive.- Parameters:
classificationDef- type to add
-
getClassificationDef
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.ClassificationDef getClassificationDef(String classificationDef) Retrieve the relationshipDef or null if it is not defined.- Parameters:
classificationDef- name of the classification- Returns:
- the retrieved classification def
-
addEntityDef
protected void addEntityDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef entityDef) Add a new EntityDef to the archive.- Parameters:
entityDef- type to add
-
getEntityDef
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef getEntityDef(String entityDefName) Retrieve the entityDef or null if it is not defined.- Parameters:
entityDefName- name of the entity- Returns:
- the retrieved entity def
-
getRelationshipDef
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef getRelationshipDef(String relationshipDefName) Retrieve the relationshipDef or null if it is not defined.- Parameters:
relationshipDefName- name of the relationship- Returns:
- the retrieved relationship def
-
addRelationshipDef
protected void addRelationshipDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef relationshipDef) Add a new RelationshipDef to the archive.- Parameters:
relationshipDef- type to add
-
getPatchForType
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch getPatchForType(String typeName) Create a skeleton patch for a TypeDefPatch.- Parameters:
typeName- name of type- Returns:
- TypeDefPatch
-
addTypeDefPatch
protected void addTypeDefPatch(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch typeDefPatch) Add a new patch to the archive.- Parameters:
typeDefPatch- patch
-
getTypeDefByName
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef getTypeDefByName(String typeName) Return the requested type definition if known.- Parameters:
typeName- name ot type- Returns:
- type definition
-
addEntity
protected void addEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity) Add a new entity to the archive.- Parameters:
entity- instance to add
-
getEntity
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getEntity(String guid) Retrieve an entity from the archive.- Parameters:
guid- unique identifier- Returns:
- requested entity
-
addRelationship
protected void addRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship) Add a new relationship to the archive.- Parameters:
relationship- instance to add
-
getRelationship
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship(String guid) Retrieve a relationship from the archive.- Parameters:
guid- unique identifier- Returns:
- requested relationship
-
addClassification
protected void addClassification(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension classification) Add a new classification to the archive.- Parameters:
classification- instance to add
-
getClassification
protected org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.ClassificationEntityExtension getClassification(String entityGUID, String classificationName) Retrieve a classification extension from the archive.- Parameters:
entityGUID- unique identifier of entityclassificationName- name of the classification- Returns:
- requested classification extension
-