Class OpenMetadataSecurityConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.metadatasecurity.connectors.OpenMetadataSecurityConnector
- All Implemented Interfaces:
AuditLoggingComponent,SecureConnectorExtension,VirtualConnectorExtension
- Direct Known Subclasses:
OpenMetadataAccessSecurityConnector,OpenMetadataPlatformSecurityConnector,OpenMetadataServerSecurityConnector
OpenMetadataServerSecurityConnector provides the base class for an Open Metadata Security Connector for
both the platform and a server. This connector is configured in an OMAG Configuration Document.
Its default behavior is to reject every request. It generates well-defined exceptions and audit log
messages.
Override these to define the required access for the deployment environment. The methods
in this base class can be called if access is to be denied as a way of making use of the message
logging and exceptions.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Stringprotected Stringprotected final StringFields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
auditLog, connectionBean, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidFree up any resources held since the connector is no longer needed.Return the component description that is used by this connector in the audit log.protected voidWrite an audit log message to say that the connector is stopping.protected voidWrite a log message to say that the connector is initializing.protected StringprintZoneList(List<String> zones) Return a string representing the list of zones.voidsetAuditLog(AuditLog auditLog) Receive an audit log object that can be used to record audit log messages.voidsetLocalServerUserId(String userId) Provide the local server's userId.voidsetServerName(String serverName) Set the name of the server that this connector is supporting.voidsetServerPlatformURL(String serverURLRoot) Set up the URL Root for the platform where this is running.setSupportedZonesForUser(List<String> supportedZones, String serviceName, String user) Determine the appropriate setting for the supported zones depending on the user and the default supported zones set up for the service.voidstart()Indicates that the connector is completely configured and can begin processing.protected voidthrowMissingAnchor(String userId, String operation, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedAddFeedback(String userId, String elementGUID, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedAnchorAccess(String userId, String operationName, String elementTypeName, String elementGUID, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedElementAccess(String userId, String operation, String entityGUID, String entityTypeName, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedInstanceAccess(String userId, String instanceGUID, String typeName, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedInstanceChange(String userId, String instanceGUID, String typeName, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedInstanceCreate(String userId, String typeGUID, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedPlatformAccess(String userId, String requestType, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedServerAccess(String userId, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedServiceAccess(String userId, String serviceName, String serviceOperationName, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedTypeAccess(String userId, String typeGUID, String typeName, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedTypeChange(String userId, String typeGUID, String typeName, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnauthorizedZoneChange(String userId, String elementGUID, List<String> originalZones, List<String> newZones, String methodName) Write an audit log message and throw exception to record an unauthorized access.protected voidthrowUnknownUser(String userId, Exception underLyingException, String methodName) Write an audit log message and throw exception to record an unauthorized access.voidCheck that the calling user is authorized to issue diagnostic requests to the OMAG Server Platform.voidCheck that the calling user is authorized to issue operator requests to the OMAG Server Platform.protected voidvalidateUserAsServerAdmin(String userId) Check that the calling user is authorized to update the configuration for a server.protected voidCheck that the calling user is authorized to issue operator requests to the OMAG Server.protected voidvalidateUserAsServerOperator(String userId) Check that the calling user is authorized to issue operator requests to the OMAG Server.protected voidvalidateUserForEntityClassificationAdd(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.protected voidvalidateUserForEntityClassificationDelete(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.protected voidvalidateUserForEntityClassificationUpdate(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.protected voidvalidateUserForEntityCreate(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 an instance within a repository.protected voidvalidateUserForEntityDelete(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have the right to delete an instance within a repository.protected voidvalidateUserForEntityProxyRead(String userId, String metadataCollectionName, EntityProxy instance) Tests for whether a specific user should have read access to a specific instance within a repository.protected EntityDetailvalidateUserForEntityRead(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have read access to a specific instance within a repository.protected voidvalidateUserForEntityReHoming(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 an instance within a repository.protected voidvalidateUserForEntityReIdentification(String userId, String metadataCollectionName, EntityDetail instance, String newGUID) Tests for whether a specific user should have the right to change the guid on an instance within a repository.protected voidvalidateUserForEntityRestore(String userId, String metadataCollectionName, String deletedEntityGUID) Tests for whether a specific user should have the right to restore an instance within a repository.protected voidvalidateUserForEntityReTyping(String userId, String metadataCollectionName, EntityDetail instance, TypeDefSummary newTypeDefSummary) Tests for whether a specific user should have the right to change an instance's type within a repository.protected voidvalidateUserForEntitySummaryRead(String userId, String metadataCollectionName, EntitySummary instance) Tests for whether a specific user should have read access to a specific instance within a repository.protected voidvalidateUserForEntityUpdate(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have the right to update an instance within a repository.voidvalidateUserForNewServer(String userId) Check that the calling user is authorized to create new servers.protected voidvalidateUserForRelationshipCreate(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 an instance within a repository.protected voidvalidateUserForRelationshipDelete(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have the right to delete an instance within a repository.protected RelationshipvalidateUserForRelationshipRead(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have read access to a specific instance within a repository.protected voidvalidateUserForRelationshipReHoming(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 an instance within a repository.protected voidvalidateUserForRelationshipReIdentification(String userId, String metadataCollectionName, Relationship instance, String newGUID) Tests for whether a specific user should have the right to change the guid on an instance within a repository.protected voidvalidateUserForRelationshipRestore(String userId, String metadataCollectionName, String deletedRelationshipGUID) Tests for whether a specific user should have the right to restore an instance within a repository.protected voidvalidateUserForRelationshipReTyping(String userId, String metadataCollectionName, Relationship instance, TypeDefSummary newTypeDefSummary) Tests for whether a specific user should have the right to change an instance's type within a repository.protected voidvalidateUserForRelationshipUpdate(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have the right to update an instance within a repository.protected voidvalidateUserForServer(String userId) Check that the calling user is authorized to issue a (any) request to the OMAG Server Platform.protected voidvalidateUserForService(String userId, String serviceName) Check that the calling user is authorized to issue this request.protected voidvalidateUserForServiceOperation(String userId, String serviceName, String serviceOperationName) Check that the calling user is authorized to issue this specific request.protected voidvalidateUserForTypeCreate(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have the right to create a type within a repository.protected voidvalidateUserForTypeCreate(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have the right to create a type within a repository.protected voidvalidateUserForTypeDelete(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have the right to delete a type within a repository.protected voidvalidateUserForTypeDelete(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have the right to delete a type within a repository.protected voidvalidateUserForTypeRead(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have read access to a specific type within a repository.protected voidvalidateUserForTypeRead(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have read access to a specific type within a repository.protected voidvalidateUserForTypeReIdentify(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.protected voidvalidateUserForTypeReIdentify(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.protected voidvalidateUserForTypeUpdate(String userId, String metadataCollectionName, TypeDef typeDef, TypeDefPatch patch) Tests for whether a specific user should have the right to update a typeDef within a repository.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, fromCanonicalToKebabCase, fromCanonicalToSnakeCase, fromKebabToCanonicalCase, fromSnakeToCanonicalCase, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getBooleanConfigurationProperty, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingEndpointAddress, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toStringMethods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, refreshStatistics, setStatisticProperty, setStatisticTimestamp
-
Field Details
-
serverRootURL
-
serverName
-
localServerUserId
-
connectorName
-
unknownTypeName
- See Also:
-
-
Constructor Details
-
OpenMetadataSecurityConnector
public OpenMetadataSecurityConnector()
-
-
Method Details
-
logConnectorStarting
protected void logConnectorStarting()Write a log message to say that the connector is initializing. -
logConnectorDisconnecting
protected void logConnectorDisconnecting()Write an audit log message to say that the connector is stopping. -
setServerPlatformURL
Set up the URL Root for the platform where this is running.- Parameters:
serverURLRoot- url root
-
throwUnauthorizedPlatformAccess
protected void throwUnauthorizedPlatformAccess(String userId, String requestType, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling userrequestType- type of requestmethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
printZoneList
Return a string representing the list of zones.- Parameters:
zones- zones to output- Returns:
- string for messages
-
throwUnauthorizedServerAccess
protected void throwUnauthorizedServerAccess(String userId, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling usermethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnauthorizedServiceAccess
protected void throwUnauthorizedServiceAccess(String userId, String serviceName, String serviceOperationName, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling userserviceName- name of serviceserviceOperationName- name of operationmethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnauthorizedTypeAccess
protected void throwUnauthorizedTypeAccess(String userId, String typeGUID, String typeName, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling usertypeGUID- uniqueId of typetypeName- name of typemethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnauthorizedTypeChange
protected void throwUnauthorizedTypeChange(String userId, String typeGUID, String typeName, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling usertypeGUID- uniqueId of typetypeName- name of typemethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnauthorizedInstanceCreate
protected void throwUnauthorizedInstanceCreate(String userId, String typeGUID, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling usertypeGUID- uniqueId of typemethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnauthorizedInstanceAccess
protected void throwUnauthorizedInstanceAccess(String userId, String instanceGUID, String typeName, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling userinstanceGUID- uniqueId of typetypeName- name of typemethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnauthorizedInstanceChange
protected void throwUnauthorizedInstanceChange(String userId, String instanceGUID, String typeName, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling userinstanceGUID- uniqueId of typetypeName- name of typemethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnauthorizedAnchorAccess
protected void throwUnauthorizedAnchorAccess(String userId, String operationName, String elementTypeName, String elementGUID, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling useroperationName- name of operationelementTypeName- type of elementelementGUID- element being accessedmethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnknownUser
protected void throwUnknownUser(String userId, Exception underLyingException, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling userunderLyingException- optional exceptionmethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnauthorizedZoneChange
protected void throwUnauthorizedZoneChange(String userId, String elementGUID, List<String> originalZones, List<String> newZones, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling userelementGUID- element being accessedoriginalZones- previous value of the zone membership for the element being accessednewZones- new value of the zone membership for the element being accessedmethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnauthorizedAddFeedback
protected void throwUnauthorizedAddFeedback(String userId, String elementGUID, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling userelementGUID- element in errormethodName- calling method- Throws:
UserNotAuthorizedException- the user is not authorized to access this zone
-
throwMissingAnchor
protected void throwMissingAnchor(String userId, String operation, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling useroperation- of requested operationmethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
throwUnauthorizedElementAccess
protected void throwUnauthorizedElementAccess(String userId, String operation, String entityGUID, String entityTypeName, String methodName) throws UserNotAuthorizedException Write an audit log message and throw exception to record an unauthorized access.- Parameters:
userId- calling useroperation- of requested operationmethodName- calling method- Throws:
UserNotAuthorizedException- the authorization check failed
-
setAuditLog
Receive an audit log object that can be used to record audit log messages. The caller has initialized it with the correct component description and log destinations.- Specified by:
setAuditLogin interfaceAuditLoggingComponent- Parameters:
auditLog- audit log object
-
getConnectorComponentDescription
Return the component description that is used by this connector in the audit log.- Specified by:
getConnectorComponentDescriptionin interfaceAuditLoggingComponent- Returns:
- id, name, description, wiki page URL.
-
setServerName
Set the name of the server that this connector is supporting.- Parameters:
serverName- name of server
-
setLocalServerUserId
Provide the local server's userId. This is used for requests that originate from within the local server.- Parameters:
userId- local server's userId
-
start
Indicates that the connector is completely configured and can begin processing.- Overrides:
startin classConnectorBase- Throws:
ConnectorCheckedException- there is a problem within the connector.UserNotAuthorizedException- the connector was disconnected before/during start
-
setSupportedZonesForUser
protected List<String> setSupportedZonesForUser(List<String> supportedZones, String serviceName, String user) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Determine the appropriate setting for the supported zones depending on the user and the default supported zones set up for the service. This is called whenever an asset is accessed.- Parameters:
supportedZones- default setting of the supported zones for the serviceserviceName- name of the called serviceuser- name of the user- Returns:
- list of supported zones for the user
- Throws:
InvalidParameterException- one of the parameter values is invalidPropertyServerException- there is a problem calculating the zonesUserNotAuthorizedException- unknown user
-
validateUserForNewServer
Check that the calling user is authorized to create new servers.- Parameters:
userId- calling user- Throws:
UserNotAuthorizedException- the user is not authorized to access this platform
-
validateUserAsOperatorForPlatform
Check that the calling user is authorized to issue operator requests to the OMAG Server Platform.- Parameters:
userId- calling user- Throws:
UserNotAuthorizedException- the user is not authorized to issue operator commands to this platform
-
validateUserAsInvestigatorForPlatform
Check that the calling user is authorized to issue diagnostic requests to the OMAG Server Platform.- Parameters:
userId- calling user- Throws:
UserNotAuthorizedException- the user is not authorized to issue diagnostic commands to this platform
-
validateUserForServer
Check that the calling user is authorized to issue a (any) request to the OMAG Server Platform.- Parameters:
userId- calling user- Throws:
UserNotAuthorizedException- the user is not authorized to access this function
-
validateUserAsServerAdmin
Check that the calling user is authorized to update the configuration for a server.- Parameters:
userId- calling user- Throws:
UserNotAuthorizedException- the user is not authorized to change configuration
-
validateUserAsServerOperator
Check that the calling user is authorized to issue operator requests to the OMAG Server.- Parameters:
userId- calling user- Throws:
UserNotAuthorizedException- the user is not authorized to issue operator commands to this server
-
validateUserAsServerInvestigator
Check that the calling user is authorized to issue operator requests to the OMAG Server.- Parameters:
userId- calling user- Throws:
UserNotAuthorizedException- the user is not authorized to issue diagnostic commands to this server
-
validateUserForService
protected void validateUserForService(String userId, String serviceName) throws UserNotAuthorizedException Check that the calling user is authorized to issue this request.- Parameters:
userId- calling userserviceName- name of called service- Throws:
UserNotAuthorizedException- the user is not authorized to access this service
-
validateUserForServiceOperation
protected void validateUserForServiceOperation(String userId, String serviceName, String serviceOperationName) throws UserNotAuthorizedException Check that the calling user is authorized to issue this specific request.- Parameters:
userId- calling userserviceName- name of called serviceserviceOperationName- name of called operation- Throws:
UserNotAuthorizedException- the user is not authorized to access this service
-
validateUserForTypeCreate
protected void validateUserForTypeCreate(String userId, String metadataCollectionName, TypeDef typeDef) throws UserNotAuthorizedException Tests for whether a specific user should have the right to create a type within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectiontypeDef- type details- Throws:
UserNotAuthorizedException- the user is not authorized to maintain types
-
validateUserForTypeCreate
protected void validateUserForTypeCreate(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) throws UserNotAuthorizedException Tests for whether a specific user should have the right to create a type within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectionattributeTypeDef- type details- Throws:
UserNotAuthorizedException- the user is not authorized to maintain types
-
validateUserForTypeRead
protected void validateUserForTypeRead(String userId, String metadataCollectionName, TypeDef typeDef) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific type within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectiontypeDef- type details- Throws:
UserNotAuthorizedException- the user is not authorized to retrieve types
-
validateUserForTypeRead
protected void validateUserForTypeRead(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific type within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectionattributeTypeDef- type details- Throws:
UserNotAuthorizedException- the user is not authorized to retrieve types
-
validateUserForTypeUpdate
protected void validateUserForTypeUpdate(String userId, String metadataCollectionName, TypeDef typeDef, TypeDefPatch patch) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update a typeDef within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectiontypeDef- current typeDef detailspatch- proposed changes to type- Throws:
UserNotAuthorizedException- the user is not authorized to maintain types
-
validateUserForTypeDelete
protected void validateUserForTypeDelete(String userId, String metadataCollectionName, TypeDef typeDef) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete a type within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectiontypeDef- type details- Throws:
UserNotAuthorizedException- the user is not authorized to maintain types
-
validateUserForTypeDelete
protected void validateUserForTypeDelete(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete a type within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectionattributeTypeDef- type details- Throws:
UserNotAuthorizedException- the user is not authorized to maintain types
-
validateUserForTypeReIdentify
protected void validateUserForTypeReIdentify(String userId, String metadataCollectionName, TypeDef originalTypeDef, String newTypeDefGUID, String newTypeDefName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the identifiers for a type within a repository.- 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.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain types
-
validateUserForTypeReIdentify
protected void validateUserForTypeReIdentify(String userId, String metadataCollectionName, AttributeTypeDef originalAttributeTypeDef, String newTypeDefGUID, String newTypeDefName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the identifiers for a type within a repository.- 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.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain types
-
validateUserForEntityCreate
protected void validateUserForEntityCreate(String userId, String metadataCollectionName, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) throws UserNotAuthorizedException Tests for whether a specific user should have the right to create an instance within a repository.- 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.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForEntityRead
protected EntityDetail validateUserForEntityRead(String userId, String metadataCollectionName, EntityDetail instance) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance details- Returns:
- entity to return (maybe altered by the connector)
- Throws:
UserNotAuthorizedException- the user is not authorized to retrieve instances
-
validateUserForEntitySummaryRead
protected void validateUserForEntitySummaryRead(String userId, String metadataCollectionName, EntitySummary instance) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance details- Throws:
UserNotAuthorizedException- the user is not authorized to retrieve instances
-
validateUserForEntityProxyRead
protected void validateUserForEntityProxyRead(String userId, String metadataCollectionName, EntityProxy instance) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance details- Throws:
UserNotAuthorizedException- the user is not authorized to retrieve instances
-
validateUserForEntityUpdate
protected void validateUserForEntityUpdate(String userId, String metadataCollectionName, EntityDetail instance) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update an instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance details- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForEntityClassificationAdd
protected void validateUserForEntityClassificationAdd(String userId, String metadataCollectionName, EntitySummary instance, String classificationName, InstanceProperties properties) throws UserNotAuthorizedException Tests for whether a specific user should have the right to add a classification to an entity instance within a repository.- 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.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForEntityClassificationUpdate
protected void validateUserForEntityClassificationUpdate(String userId, String metadataCollectionName, EntitySummary instance, String classificationName, InstanceProperties properties) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update the classification for an entity instance within a repository.- 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.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForEntityClassificationDelete
protected void validateUserForEntityClassificationDelete(String userId, String metadataCollectionName, EntitySummary instance, String classificationName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete a classification from an entity instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance detailsclassificationName- String name for the classification.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForEntityDelete
protected void validateUserForEntityDelete(String userId, String metadataCollectionName, EntityDetail instance) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete an instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance details- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForEntityRestore
protected void validateUserForEntityRestore(String userId, String metadataCollectionName, String deletedEntityGUID) throws UserNotAuthorizedException Tests for whether a specific user should have the right to restore an instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectiondeletedEntityGUID- String unique identifier (guid) for the entity.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForEntityReIdentification
protected void validateUserForEntityReIdentification(String userId, String metadataCollectionName, EntityDetail instance, String newGUID) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the guid on an instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance detailsnewGUID- the new guid for the instance.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForEntityReTyping
protected void validateUserForEntityReTyping(String userId, String metadataCollectionName, EntityDetail instance, TypeDefSummary newTypeDefSummary) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change an instance's type within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance detailsnewTypeDefSummary- details of this instance's new TypeDef.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForEntityReHoming
protected void validateUserForEntityReHoming(String userId, String metadataCollectionName, EntityDetail instance, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the home of an instance within a repository.- 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.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForRelationshipCreate
protected void validateUserForRelationshipCreate(String userId, String metadataCollectionName, String relationshipTypeGUID, InstanceProperties initialProperties, EntitySummary entityOneSummary, EntitySummary entityTwoSummary, InstanceStatus initialStatus) throws UserNotAuthorizedException Tests for whether a specific user should have the right to create an instance within a repository.- 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.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForRelationshipRead
protected Relationship validateUserForRelationshipRead(String userId, String metadataCollectionName, Relationship instance) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance details- Returns:
- relationship
- Throws:
UserNotAuthorizedException- the user is not authorized to retrieve instances
-
validateUserForRelationshipUpdate
protected void validateUserForRelationshipUpdate(String userId, String metadataCollectionName, Relationship instance) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update an instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance details- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForRelationshipDelete
protected void validateUserForRelationshipDelete(String userId, String metadataCollectionName, Relationship instance) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete an instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance details- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForRelationshipRestore
protected void validateUserForRelationshipRestore(String userId, String metadataCollectionName, String deletedRelationshipGUID) throws UserNotAuthorizedException Tests for whether a specific user should have the right to restore an instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectiondeletedRelationshipGUID- String unique identifier (guid) for the relationship.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForRelationshipReIdentification
protected void validateUserForRelationshipReIdentification(String userId, String metadataCollectionName, Relationship instance, String newGUID) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the guid on an instance within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance detailsnewGUID- the new guid for the instance.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForRelationshipReTyping
protected void validateUserForRelationshipReTyping(String userId, String metadataCollectionName, Relationship instance, TypeDefSummary newTypeDefSummary) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change an instance's type within a repository.- Parameters:
userId- identifier of usermetadataCollectionName- configurable name of the metadata collectioninstance- instance detailsnewTypeDefSummary- details of this instance's new TypeDef.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
validateUserForRelationshipReHoming
protected void validateUserForRelationshipReHoming(String userId, String metadataCollectionName, Relationship instance, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the home of an instance within a repository.- 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.- Throws:
UserNotAuthorizedException- the user is not authorized to maintain instances
-
disconnect
Free up any resources held since the connector is no longer needed.- Overrides:
disconnectin classConnectorBase- Throws:
ConnectorCheckedException- there is a problem within the connector.
-