Class InstanceAuditHeader
java.lang.Object
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.RepositoryElementHeader
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceElementHeader
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Classification
,InstanceHeader
InstanceAuditHeader manages the attributes that are common to classifications,
entities and relationships. We need to be able to audit when these fundamental elements change and
by whom. Thus, they share this header. The fields in this header are managed as follows:
- Type identifies which TypeDef defines the type of concept/thing that this instance represents and controls the properties that can be stored in the instance.
- InstanceProvenanceType defines the type of metadata collection that this instance originated from.
- MetadataCollectionId defines which metadata collection that this instance came from - that is its home.
- MetadataCollectionName defines the display name for the home metadata collection.
- InstanceLicense defines a specific license that applies to this instance - null means no restrictions.
- CreatedBy contains the userId of the person/engine that created the instance. This field is set up when the instance is created and not changed. It typically indicates who is the owner of the element and hence who has update rights.
- UpdatedBy contains the userId of the person/engine that last updated the instance. This field is set automatically by the open metadata repository when the update happens.
- MaintainedBy contains the list of userIds of the person/engine that are responsible for maintained this instance. Null means that the maintainer is the creator.
- CreateTime contains the Date/Time when the instance was created. It is set automatically by the open metadata repository when the instance is created.
- UpdateTime contains the Data/Time when the instance was last updated. It is also set automatically by the open metadata repository when the update happens.
- Version is a numeric count of the updates to the instance. It is used by the open metadata repositories to ensure updates to reference copies of the instance are applied in the right sequence. The home open metadata repository (where the create an all subsequent updates happen) maintains the version number.
- CurrentStatus indicates the status of the instance. It is initialized by the open metadata repository to the first status defined in the TypeDef. After that, it is the actions of the consumers of the metadata (typically the Open Metadata Access Services (OMASs)
- StatusOnDelete is populated when the instance is deleted and is se to the status when the deleted was called - it is used set the status if the instance is restored.
- MappingProperties is used by connector implementations that are mapping between an existing repository and open metadata. It provides space for the connector to stash identifiers and other values that help them to map instances stored with the open metadata equivalent. These values should be maintained by the master repository and stored by any repository that is saving the reference copy.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Version of the header used in this release -
Constructor Summary
ConstructorDescriptionDefault Constructor sets the instance to nulls.InstanceAuditHeader
(InstanceAuditHeader template) Copy/clone constructor set the value to those supplied in the template. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Validate if the supplied object equals this object.Return the name of the user that created this instance.Return the date/time that this instance was created.Return the license string for this instance - null means no restrictions.Return the type of the provenance for this instance.Return the list of users responsible for maintaining this instance.Return the additional properties used by the master repository to map to stored instances.Return the unique identifier for the metadata collection that is the home for this instance.Return a display name for the metadata collection that this instance belongs to.Return the metadata collection id of the cohort member responsible for replicating metadata owned by repositories (eg data tools/engines/platforms) from outside the cohort or from an open metadata archive.Return the status of this instance.Return the status to use when a deleted instance is restored.getType()
Return the type of this instance.Return the name of the user that last updated this instance.Return what was the late time this instance was updated.long
Return the version number for this instance.int
hashCode()
Return a hash code based on the values of this object.void
setCreatedBy
(String createdBy) Set up the name of the user that created this instance.void
setCreateTime
(Date createTime) Set up the time that this instance was created.void
setInstanceLicense
(String instanceLicense) Set up the license string for this instance - null means no restrictions.void
setInstanceProvenanceType
(InstanceProvenanceType instanceProvenanceType) Set up the type of the provenance for this instance.void
setMaintainedBy
(List<String> maintainedBy) Set up the list of users responsible for maintaining this instance.void
setMappingProperties
(Map<String, Serializable> mappingProperties) Set up the additional properties used by the master repository to map to stored instances.void
setMetadataCollectionId
(String metadataCollectionId) Set up the unique identifier for the home metadata collection for this instance.void
setMetadataCollectionName
(String metadataCollectionName) Set up a display name for the metadata collection that this instance belongs to.void
setReplicatedBy
(String replicatedBy) Set up the metadata collection id of the cohort member responsible for replicating metadata owned by repositories (eg data tools/engines/platforms) from outside the cohort or from an open metadata archive.void
setStatus
(InstanceStatus newStatus) Set up the status of this instance.void
setStatusOnDelete
(InstanceStatus statusOnDelete) Set up the status to use when a deleted instance is restored.void
setType
(InstanceType type) Set up the type of this instance.void
setUpdatedBy
(String updatedBy) Set up the name of the user that last updated this instance.void
setUpdateTime
(Date updateTime) Set up the last update time for this instance.void
setVersion
(long version) Set up the version number for this instance.toString()
Standard toString method.Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.RepositoryElementHeader
getHeaderVersion, setHeaderVersion
-
Field Details
-
CURRENT_AUDIT_HEADER_VERSION
public static final long CURRENT_AUDIT_HEADER_VERSIONVersion of the header used in this release- See Also:
-
-
Constructor Details
-
InstanceAuditHeader
public InstanceAuditHeader()Default Constructor sets the instance to nulls. -
InstanceAuditHeader
Copy/clone constructor set the value to those supplied in the template.- Parameters:
template
- Instance header
-
-
Method Details
-
getType
Return the type of this instance. This identifies the type definition (TypeDef) that determines its properties.- Returns:
- InstanceType object
-
setType
Set up the type of this instance. This identifies the type definition (TypeDef) that determines its properties.- Parameters:
type
- InstanceType object
-
getInstanceProvenanceType
Return the type of the provenance for this instance.- Returns:
- InstanceProvenanceType enum
-
setInstanceProvenanceType
Set up the type of the provenance for this instance.- Parameters:
instanceProvenanceType
- InstanceProvenanceType enum
-
getMetadataCollectionId
Return the unique identifier for the metadata collection that is the home for this instance. If the metadataCollectionId is null it means this instance belongs to the local metadata collection.- Returns:
- metadataCollectionId String unique identifier for the repository
-
setMetadataCollectionId
Set up the unique identifier for the home metadata collection for this instance. If the metadataCollectionId is null it means this instance belongs to the local metadata collection.- Parameters:
metadataCollectionId
- String unique identifier for the repository
-
getMetadataCollectionName
Return a display name for the metadata collection that this instance belongs to. The source of this name is dependent on the type of origin it has. For example, this may be the name of the server where the metadata is hosted, the archive that the instance came from or the name of the tool, platform or engine that originated the metadata.- Returns:
- display name or null
-
setMetadataCollectionName
Set up a display name for the metadata collection that this instance belongs to. The source of this name is dependent on the type of origin it has. For example, this may be the name of the server where the metadata is hosted, the archive that the instance came from or the name of the tool, platform or engine that originated the metadata.- Parameters:
metadataCollectionName
- display name or null
-
getReplicatedBy
Return the metadata collection id of the cohort member responsible for replicating metadata owned by repositories (eg data tools/engines/platforms) from outside the cohort or from an open metadata archive. Null means the metadata is owned by a cohort member, or is not to be replicated.- Returns:
- string metadata collection id
-
setReplicatedBy
Set up the metadata collection id of the cohort member responsible for replicating metadata owned by repositories (eg data tools/engines/platforms) from outside the cohort or from an open metadata archive. Null means the metadata is owned by a cohort member, or is not to be replicated.- Parameters:
replicatedBy
- string metadata collection id
-
getInstanceLicense
Return the license string for this instance - null means no restrictions.- Returns:
- license string or null
-
setInstanceLicense
Set up the license string for this instance - null means no restrictions.- Parameters:
instanceLicense
- license string or null
-
getStatus
Return the status of this instance.- Returns:
- InstanceStatus
-
setStatus
Set up the status of this instance.- Parameters:
newStatus
- InstanceStatus
-
getCreatedBy
Return the name of the user that created this instance.- Returns:
- String user name
-
setCreatedBy
Set up the name of the user that created this instance.- Parameters:
createdBy
- String user name
-
getUpdatedBy
Return the name of the user that last updated this instance.- Returns:
- String user name
-
setUpdatedBy
Set up the name of the user that last updated this instance.- Parameters:
updatedBy
- String user name
-
getMaintainedBy
Return the list of users responsible for maintaining this instance.- Returns:
- list of user identifiers
-
setMaintainedBy
Set up the list of users responsible for maintaining this instance.- Parameters:
maintainedBy
- list of user identifiers
-
getCreateTime
Return the date/time that this instance was created.- Returns:
- Date/Time of creation
-
setCreateTime
Set up the time that this instance was created.- Parameters:
createTime
- Date/Time of creation
-
getUpdateTime
Return what was the late time this instance was updated.- Returns:
- Date/Time last updated
-
setUpdateTime
Set up the last update time for this instance.- Parameters:
updateTime
- Date/Time last updated
-
getVersion
public long getVersion()Return the version number for this instance.- Returns:
- Long version number
-
setVersion
public void setVersion(long version) Set up the version number for this instance.- Parameters:
version
- Long version number
-
getStatusOnDelete
Return the status to use when a deleted instance is restored. UNKNOWN is used whenever the instance is not in DELETED status.- Returns:
- InstanceStatus
-
setStatusOnDelete
Set up the status to use when a deleted instance is restored. UNKNOWN is used whenever the instance is not in DELETED status.- Parameters:
statusOnDelete
- InstanceStatus Enum
-
getMappingProperties
Return the additional properties used by the master repository to map to stored instances.- Returns:
- property map
-
setMappingProperties
Set up the additional properties used by the master repository to map to stored instances.- Parameters:
mappingProperties
- property map
-
toString
Standard toString method. -
equals
Validate if the supplied object equals this object.- Overrides:
equals
in classRepositoryElementHeader
- Parameters:
objectToCompare
- test object- Returns:
- boolean evaluation
-
hashCode
public int hashCode()Return a hash code based on the values of this object.- Overrides:
hashCode
in classRepositoryElementHeader
- Returns:
- in hash code
-