Package org.openmetadata.service.jdbi3
Class UserRepository
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classclassHandles entity updated from PUT and POST operation.Nested classes/interfaces inherited from class org.openmetadata.service.jdbi3.EntityRepository
EntityRepository.DescriptionTaskWorkflow, EntityRepository.EntityUpdater, EntityRepository.Operation, EntityRepository.TagTaskWorkflow -
Field Summary
FieldsFields inherited from class org.openmetadata.service.jdbi3.EntityRepository
allowedFields, CACHE_WITH_ID, CACHE_WITH_NAME, dao, daoCollection, entityType, putFields, quoteFqn, renameAllowed, searchRepository, supportsDataProducts, supportsDomain, supportsExperts, supportsExtension, supportsFollower, supportsLifeCycle, supportsOwner, supportsReviewers, supportsSearch, supportsSoftDelete, supportsStyle, supportsTags, supportsVotes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckEmailAlreadyExists(String emailId) voidclearFields(User user, EntityUtil.Fields fields) Set the requested fields in an entity.exportToCsv(String importingTeam, String user) Override this method to support downloading CSV functionalitygetByEmail(javax.ws.rs.core.UriInfo uriInfo, String email, EntityUtil.Fields fields) getByName(javax.ws.rs.core.UriInfo uriInfo, String name, EntityUtil.Fields fields) getDefaultPersona(User user) final EntityUtil.FieldsgetFieldsWithUserAuth(String fields) getGroupTeams(javax.ws.rs.core.UriInfo uriInfo, String userName) getPersonas(User user) getUpdater(User original, User updated, EntityRepository.Operation operation) importFromCsv(String importingTeam, String csv, boolean dryRun, String user) Load CSV provided for bulk uploadvoidbooleanisTeamJoinable(String teamId) protected voidpostDelete(User entity) voidEnsures that the default roles are added for POST, PUT and PATCH operations.voidrestorePatchAttributes(User original, User updated) PATCH operations can't overwrite certain fields, such as entity ID, fullyQualifiedNames etc.voidsetFields(User user, EntityUtil.Fields fields) Set the requested fields in an entity.voidsetFullyQualifiedName(User user) Set fullyQualifiedName of an entityvoidsetInheritedFields(User user, EntityUtil.Fields fields) This method is called to set inherited fields that an entity inherits from its parent.voidstoreEntity(User user, boolean update) An entity is stored in the backend database as JSON document.voidstoreRelationships(User user) This method is called to store all the relationships of an entity.voidvalidateTeamAddition(UUID userId, UUID teamId) voidvalidateTeams(User user) Methods inherited from class org.openmetadata.service.jdbi3.EntityRepository
addFollower, addRelationship, addRelationship, addRelationship, addServiceRelationship, applyColumnTags, applySuggestion, applyTags, applyTags, bulkAddToRelationship, bulkAssetsOperation, checkSystemEntityDeletion, cleanup, clearFieldsInternal, copy, create, createInternal, createOrUpdate, delete, deleteByName, deleteExtensionAtTimestamp, deleteExtensionBeforeTimestamp, deleteFollower, deleteFrom, deleteFromSearch, deleteInternal, deleteInternalByName, deleteRelationship, deleteTo, ensureSingleRelationship, find, findBoth, findByName, findByNameOrNull, findFrom, findFromRecords, findTo, findToRecords, get, get, getAllowedFieldsCopy, getAllTags, getByName, getChildren, getCommonFields, getContainer, getContainer, getCustomPropertyFQN, getCustomPropertyFQNPrefix, getDomain, getEntitiesFromSeedData, getEntitiesFromSeedData, getEntitiesFromSeedData, getExperts, getExtension, getExtensionAtTimestamp, getFields, getFields, getFollowers, getFromEntityRef, getHref, getIngestionPipelines, getLatestExtensionFromTimeSeries, getOwner, getOwner, getParent, getParentEntity, getReference, getReferenceByName, getResultList, getResultList, getResultsFromAndToTimestamps, getResultsFromAndToTimestamps, getReviewers, getSuggestionFields, getSuggestionWorkflow, getTags, getTags, getTagsByPrefix, getTaskWorkflow, getToEntityRef, getVersion, getVotes, inheritDomain, inheritExperts, inheritOwner, inheritReviewers, initializeEntity, initSeedDataFromResources, listAfter, listAfterWithSkipFailure, listAll, listBefore, listVersions, patch, populateOwner, postCreate, postUpdate, preDelete, prepareInternal, removeExtension, restoreEntity, restoreFromSearch, setFieldsInternal, store, storeDataProducts, storeDomain, storeExtension, storeOwner, storeRelationshipsInternal, storeTimeSeries, update, updateOwner, updateVote, validateColumnTags, validateDataProducts, validateDomain, validateDomain, validateOwner, validateRoles, validateTags, validateTags, validateTaskThread, validateUsers, withHref
-
Field Details
-
AUTH_MECHANISM_FIELD
- See Also:
-
-
Constructor Details
-
UserRepository
public UserRepository()
-
-
Method Details
-
setFullyQualifiedName
Description copied from class:EntityRepositorySet fullyQualifiedName of an entity- Overrides:
setFullyQualifiedNamein classEntityRepository<User>
-
getFieldsWithUserAuth
-
getByName
- Overrides:
getByNamein classEntityRepository<User>
-
getByEmail
-
prepare
Ensures that the default roles are added for POST, PUT and PATCH operations.- Specified by:
preparein classEntityRepository<User>- See Also:
-
restorePatchAttributes
Description copied from class:EntityRepositoryPATCH operations can't overwrite certain fields, such as entity ID, fullyQualifiedNames etc. Instead of throwing an error, we take lenient approach of ignoring the user error and restore those attributes based on what is already stored in the original entity.- Overrides:
restorePatchAttributesin classEntityRepository<User>
-
storeEntity
Description copied from class:EntityRepositoryAn entity is stored in the backend database as JSON document. The JSON includes some attributes of the entity and does not include attributes such as href. The relationship fields of an entity is never stored in the JSON document. It is always reconstructed based on relationship edges from the backend database.
As an example, when table entity is stored, the attributes such as href and the relationships such as owner, database, and tags are set to null. These attributes are restored back after the JSON document is stored to be sent as response.- Specified by:
storeEntityin classEntityRepository<User>- See Also:
-
storeRelationships
Description copied from class:EntityRepositoryThis method is called to store all the relationships of an entity. It is expected that all relationships are already validated and completely setup before this method is called and no validation of relationships is required.- Specified by:
storeRelationshipsin classEntityRepository<User>- See Also:
-
setInheritedFields
Description copied from class:EntityRepositoryThis method is called to set inherited fields that an entity inherits from its parent.- Overrides:
setInheritedFieldsin classEntityRepository<User>- See Also:
-
getUpdater
public UserRepository.UserUpdater getUpdater(User original, User updated, EntityRepository.Operation operation) - Overrides:
getUpdaterin classEntityRepository<User>
-
setFields
Description copied from class:EntityRepositorySet the requested fields in an entity. This is used for requesting specific fields in the object during GET operations. It is also used during PUT and PATCH operations to set up fields that can be updated.- Specified by:
setFieldsin classEntityRepository<User>
-
clearFields
Description copied from class:EntityRepositorySet the requested fields in an entity. This is used for requesting specific fields in the object during GET operations. It is also used during PUT and PATCH operations to set up fields that can be updated.- Specified by:
clearFieldsin classEntityRepository<User>
-
exportToCsv
Description copied from class:EntityRepositoryOverride this method to support downloading CSV functionality- Overrides:
exportToCsvin classEntityRepository<User>- Throws:
IOException
-
importFromCsv
public CsvImportResult importFromCsv(String importingTeam, String csv, boolean dryRun, String user) throws IOException Description copied from class:EntityRepositoryLoad CSV provided for bulk upload- Overrides:
importFromCsvin classEntityRepository<User>- Throws:
IOException
-
isTeamJoinable
-
validateTeams
-
validateTeamAddition
-
checkEmailAlreadyExists
-
initializeUsers
-
getGroupTeams
-
getTeams
-
getPersonas
-
getDefaultPersona
-
postDelete
- Overrides:
postDeletein classEntityRepository<User>
-