Class OMRSMetadataDefaultRepositorySecurity
java.lang.Object
org.odpi.openmetadata.repositoryservices.localrepository.repositoryconnector.OMRSMetadataDefaultRepositorySecurity
- All Implemented Interfaces:
OpenMetadataRepositorySecurity
public class OMRSMetadataDefaultRepositorySecurity
extends Object
implements OpenMetadataRepositorySecurity
OMRSMetadataDefaultRepositorySecurity provides a default instance repository security support that allows all
actions. It is replaced if the server's security connector implements the repository security interface.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
validateEntityReferenceCopySave
(String userId, EntityDetail instance) Tests for whether a reference copy should be saved to the repository.boolean
validateRelationshipReferenceCopySave
(String userId, Relationship instance) Tests for whether a reference copy should be saved to the repository.void
validateUserForEntityClassificationAdd
(String userId, String metadataCollectionName, EntitySummary instance, String classificationName, InstanceProperties properties) Tests for whether a specific user should have the right to add a classification to an entity instance within a repository.void
validateUserForEntityClassificationDelete
(String userId, String metadataCollectionName, EntitySummary instance, String classificationName) Tests for whether a specific user should have the right to delete a classification from an entity instance within a repository.void
validateUserForEntityClassificationUpdate
(String userId, String metadataCollectionName, EntitySummary instance, String classificationName, InstanceProperties properties) Tests for whether a specific user should have the right to update the classification for an entity instance within a repository.void
validateUserForEntityCreate
(String userId, String metadataCollectionName, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) Tests for whether a specific user should have the right to create a instance within a repository.void
validateUserForEntityDelete
(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have the right to delete a instance within a repository.void
validateUserForEntityProxyRead
(String userId, String metadataCollectionName, EntityProxy instance) Tests for whether a specific user should have read access to a specific instance within a repository.validateUserForEntityRead
(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have read access to a specific instance within a repository.void
validateUserForEntityReHoming
(String userId, String metadataCollectionName, EntityDetail instance, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Tests for whether a specific user should have the right to change the home of a instance within a repository.void
validateUserForEntityReIdentification
(String userId, String metadataCollectionName, EntityDetail instance, String newGUID) Tests for whether a specific user should have the right to change the guid on a instance within a repository.void
validateUserForEntityRestore
(String userId, String metadataCollectionName, String deletedEntityGUID) Tests for whether a specific user should have the right to restore a instance within a repository.void
validateUserForEntityReTyping
(String userId, String metadataCollectionName, EntityDetail instance, TypeDefSummary newTypeDefSummary) Tests for whether a specific user should have the right to change the type of a instance within a repository.void
validateUserForEntitySummaryRead
(String userId, String metadataCollectionName, EntitySummary instance) Tests for whether a specific user should have read access to a specific instance within a repository.void
validateUserForEntityUpdate
(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have the right to update a instance within a repository.void
validateUserForRelationshipCreate
(String userId, String metadataCollectionName, String relationshipTypeGUID, InstanceProperties initialProperties, EntitySummary entityOneSummary, EntitySummary entityTwoSummary, InstanceStatus initialStatus) Tests for whether a specific user should have the right to create a instance within a repository.void
validateUserForRelationshipDelete
(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have the right to delete a instance within a repository.validateUserForRelationshipRead
(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have read access to a specific instance within a repository.void
validateUserForRelationshipReHoming
(String userId, String metadataCollectionName, Relationship instance, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Tests for whether a specific user should have the right to change the home of a instance within a repository.void
validateUserForRelationshipReIdentification
(String userId, String metadataCollectionName, Relationship instance, String newGUID) Tests for whether a specific user should have the right to change the guid on a instance within a repository.void
validateUserForRelationshipRestore
(String userId, String metadataCollectionName, String deletedRelationshipGUID) Tests for whether a specific user should have the right to restore a instance within a repository.void
validateUserForRelationshipReTyping
(String userId, String metadataCollectionName, Relationship instance, TypeDefSummary newTypeDefSummary) Tests for whether a specific user should have the right to change the type of a instance within a repository.void
validateUserForRelationshipUpdate
(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have the right to update a instance within a repository.void
validateUserForTypeCreate
(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have the right to create a type within a repository.void
validateUserForTypeCreate
(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have the right to create a type within a repository.void
validateUserForTypeDelete
(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have the right to delete a type within a repository.void
validateUserForTypeDelete
(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have the right to delete a type within a repository.void
validateUserForTypeRead
(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have read access to a specific type within a repository.void
validateUserForTypeRead
(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have read access to a specific type within a repository.void
validateUserForTypeReIdentify
(String userId, String metadataCollectionName, AttributeTypeDef originalAttributeTypeDef, String newTypeDefGUID, String newTypeDefName) Tests for whether a specific user should have the right to change the identifiers for a type within a repository.void
validateUserForTypeReIdentify
(String userId, String metadataCollectionName, TypeDef originalTypeDef, String newTypeDefGUID, String newTypeDefName) Tests for whether a specific user should have the right to change the identifiers for a type within a repository.void
validateUserForTypeUpdate
(String userId, String metadataCollectionName, TypeDef typeDef, TypeDefPatch patch) Tests for whether a specific user should have the right to update a type within a repository.
-
Constructor Details
-
OMRSMetadataDefaultRepositorySecurity
public OMRSMetadataDefaultRepositorySecurity()
-
-
Method Details
-
validateUserForTypeCreate
public void validateUserForTypeCreate(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have the right to create a type within a repository.- Specified by:
validateUserForTypeCreate
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiontypeDef
- type details
-
validateUserForTypeCreate
public void validateUserForTypeCreate(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have the right to create a type within a repository.- Specified by:
validateUserForTypeCreate
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionattributeTypeDef
- type details
-
validateUserForTypeRead
Tests for whether a specific user should have read access to a specific type within a repository.- Specified by:
validateUserForTypeRead
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiontypeDef
- type details
-
validateUserForTypeRead
public void validateUserForTypeRead(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have read access to a specific type within a repository.- Specified by:
validateUserForTypeRead
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionattributeTypeDef
- type details
-
validateUserForTypeUpdate
public void validateUserForTypeUpdate(String userId, String metadataCollectionName, TypeDef typeDef, TypeDefPatch patch) Tests for whether a specific user should have the right to update a type within a repository.- Specified by:
validateUserForTypeUpdate
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiontypeDef
- type detailspatch
- changes to the type
-
validateUserForTypeDelete
public void validateUserForTypeDelete(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have the right to delete a type within a repository.- Specified by:
validateUserForTypeDelete
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiontypeDef
- type details
-
validateUserForTypeDelete
public void validateUserForTypeDelete(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have the right to delete a type within a repository.- Specified by:
validateUserForTypeDelete
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionattributeTypeDef
- type details
-
validateUserForTypeReIdentify
public void validateUserForTypeReIdentify(String userId, String metadataCollectionName, TypeDef originalTypeDef, String newTypeDefGUID, String newTypeDefName) Tests for whether a specific user should have the right to change the identifiers for a type within a repository.- Specified by:
validateUserForTypeReIdentify
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionoriginalTypeDef
- type detailsnewTypeDefGUID
- the new identifier for the type.newTypeDefName
- new name for this type.
-
validateUserForTypeReIdentify
public void validateUserForTypeReIdentify(String userId, String metadataCollectionName, AttributeTypeDef originalAttributeTypeDef, String newTypeDefGUID, String newTypeDefName) Tests for whether a specific user should have the right to change the identifiers for a type within a repository.- Specified by:
validateUserForTypeReIdentify
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionoriginalAttributeTypeDef
- type detailsnewTypeDefGUID
- the new identifier for the type.newTypeDefName
- new name for this type.
-
validateUserForEntityCreate
public void validateUserForEntityCreate(String userId, String metadataCollectionName, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) Tests for whether a specific user should have the right to create a instance within a repository.- Specified by:
validateUserForEntityCreate
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionentityTypeGUID
- unique identifier (guid) for the new entity's type.initialProperties
- initial list of properties for the new entity null means no properties.initialClassifications
- initial list of classifications for the new entity null means no classifications.initialStatus
- initial status typically DRAFT, PREPARED or ACTIVE.
-
validateUserForEntityRead
public EntityDetail validateUserForEntityRead(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have read access to a specific instance within a repository.- Specified by:
validateUserForEntityRead
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details- Returns:
- entity to return (may be altered by the repositorySecurityConnector)
-
validateUserForEntitySummaryRead
public void validateUserForEntitySummaryRead(String userId, String metadataCollectionName, EntitySummary instance) Tests for whether a specific user should have read access to a specific instance within a repository.- Specified by:
validateUserForEntitySummaryRead
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details
-
validateUserForEntityProxyRead
public void validateUserForEntityProxyRead(String userId, String metadataCollectionName, EntityProxy instance) Tests for whether a specific user should have read access to a specific instance within a repository.- Specified by:
validateUserForEntityProxyRead
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details
-
validateUserForEntityUpdate
public void validateUserForEntityUpdate(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have the right to update a instance within a repository.- Specified by:
validateUserForEntityUpdate
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details
-
validateUserForEntityClassificationAdd
public void validateUserForEntityClassificationAdd(String userId, String metadataCollectionName, EntitySummary instance, String classificationName, InstanceProperties properties) Tests for whether a specific user should have the right to add a classification to an entity instance within a repository.- Specified by:
validateUserForEntityClassificationAdd
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsclassificationName
- String name for the classification.properties
- list of properties for the classification.
-
validateUserForEntityClassificationUpdate
public void validateUserForEntityClassificationUpdate(String userId, String metadataCollectionName, EntitySummary instance, String classificationName, InstanceProperties properties) Tests for whether a specific user should have the right to update the classification for an entity instance within a repository.- Specified by:
validateUserForEntityClassificationUpdate
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsclassificationName
- String name for the classification.properties
- list of properties for the classification.
-
validateUserForEntityClassificationDelete
public void validateUserForEntityClassificationDelete(String userId, String metadataCollectionName, EntitySummary instance, String classificationName) Tests for whether a specific user should have the right to delete a classification from an entity instance within a repository.- Specified by:
validateUserForEntityClassificationDelete
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsclassificationName
- String name for the classification.
-
validateUserForEntityDelete
public void validateUserForEntityDelete(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have the right to delete a instance within a repository.- Specified by:
validateUserForEntityDelete
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details
-
validateUserForEntityRestore
public void validateUserForEntityRestore(String userId, String metadataCollectionName, String deletedEntityGUID) Tests for whether a specific user should have the right to restore a instance within a repository.- Specified by:
validateUserForEntityRestore
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiondeletedEntityGUID
- String unique identifier (guid) for the entity.
-
validateUserForEntityReIdentification
public void validateUserForEntityReIdentification(String userId, String metadataCollectionName, EntityDetail instance, String newGUID) Tests for whether a specific user should have the right to change the guid on a instance within a repository.- Specified by:
validateUserForEntityReIdentification
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewGUID
- the new guid for the instance.
-
validateUserForEntityReTyping
public void validateUserForEntityReTyping(String userId, String metadataCollectionName, EntityDetail instance, TypeDefSummary newTypeDefSummary) Tests for whether a specific user should have the right to change the type of a instance within a repository.- Specified by:
validateUserForEntityReTyping
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewTypeDefSummary
- details of this instance's new TypeDef.
-
validateUserForEntityReHoming
public void validateUserForEntityReHoming(String userId, String metadataCollectionName, EntityDetail instance, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Tests for whether a specific user should have the right to change the home of a instance within a repository.- Specified by:
validateUserForEntityReHoming
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewHomeMetadataCollectionId
- unique identifier for the new home metadata collection/repository.newHomeMetadataCollectionName
- display name for the new home metadata collection/repository.
-
validateUserForRelationshipCreate
public void validateUserForRelationshipCreate(String userId, String metadataCollectionName, String relationshipTypeGUID, InstanceProperties initialProperties, EntitySummary entityOneSummary, EntitySummary entityTwoSummary, InstanceStatus initialStatus) Tests for whether a specific user should have the right to create a instance within a repository.- Specified by:
validateUserForRelationshipCreate
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionrelationshipTypeGUID
- unique identifier (guid) for the new relationship's type.initialProperties
- initial list of properties for the new entity null means no properties.entityOneSummary
- the unique identifier of one of the entities that the relationship is connecting together.entityTwoSummary
- the unique identifier of the other entity that the relationship is connecting together.initialStatus
- initial status typically DRAFT, PREPARED or ACTIVE.
-
validateUserForRelationshipRead
public Relationship validateUserForRelationshipRead(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have read access to a specific instance within a repository.- Specified by:
validateUserForRelationshipRead
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details- Returns:
- relationship to return (may be altered by the repositorySecurityConnector)
-
validateUserForRelationshipUpdate
public void validateUserForRelationshipUpdate(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have the right to update a instance within a repository.- Specified by:
validateUserForRelationshipUpdate
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details
-
validateUserForRelationshipDelete
public void validateUserForRelationshipDelete(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have the right to delete a instance within a repository.- Specified by:
validateUserForRelationshipDelete
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details
-
validateUserForRelationshipRestore
public void validateUserForRelationshipRestore(String userId, String metadataCollectionName, String deletedRelationshipGUID) Tests for whether a specific user should have the right to restore a instance within a repository.- Specified by:
validateUserForRelationshipRestore
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiondeletedRelationshipGUID
- String unique identifier (guid) for the relationship.
-
validateUserForRelationshipReIdentification
public void validateUserForRelationshipReIdentification(String userId, String metadataCollectionName, Relationship instance, String newGUID) Tests for whether a specific user should have the right to change the guid on a instance within a repository.- Specified by:
validateUserForRelationshipReIdentification
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewGUID
- the new guid for the instance.
-
validateUserForRelationshipReTyping
public void validateUserForRelationshipReTyping(String userId, String metadataCollectionName, Relationship instance, TypeDefSummary newTypeDefSummary) Tests for whether a specific user should have the right to change the type of a instance within a repository.- Specified by:
validateUserForRelationshipReTyping
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewTypeDefSummary
- details of this instance's new TypeDef.
-
validateUserForRelationshipReHoming
public void validateUserForRelationshipReHoming(String userId, String metadataCollectionName, Relationship instance, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Tests for whether a specific user should have the right to change the home of a instance within a repository.- Specified by:
validateUserForRelationshipReHoming
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewHomeMetadataCollectionId
- unique identifier for the new home metadata collection/repository.newHomeMetadataCollectionName
- display name for the new home metadata collection/repository.
-
validateEntityReferenceCopySave
Tests for whether a reference copy should be saved to the repository.- Specified by:
validateEntityReferenceCopySave
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of userinstance
- instance details- Returns:
- flag indicating whether the reference copy should be saved
-
validateRelationshipReferenceCopySave
Tests for whether a reference copy should be saved to the repository.- Specified by:
validateRelationshipReferenceCopySave
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of userinstance
- instance details- Returns:
- flag indicating whether the reference copy should be saved
-