public class KettleDatabaseRepositorySecurityProvider extends BaseRepositorySecurityProvider implements RepositorySecurityProvider, RepositorySecurityManager, RepositorySecurityUserValidator
repositoryMeta, userInfoADMINISTER_SECURITY_ACTION, ADMINISTER_SECURITY_ROLE, CREATE_CONTENT_ACTION, CREATE_CONTENT_ROLE, EXECUTE_CONTENT_ACTION, NAMESPACE, READ_CONTENT_ACTION, READ_CONTENT_ROLE, SCHEDULE_CONTENT_ACTION| Constructor and Description |
|---|
KettleDatabaseRepositorySecurityProvider(KettleDatabaseRepository repository,
RepositoryMeta repositoryMeta,
IUser userInfo) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsVersionComments(String fullPath) |
IUser |
constructUser() |
void |
deleteUsers(List<IUser> users) |
void |
delUser(ObjectId id_user) |
void |
delUser(String name) |
List<String> |
getAllRoles()
Retrieves all roles in the system
|
List<String> |
getAllUsers()
Retrieves all users in the system
|
ObjectId |
getUserID(String login) |
ObjectId[] |
getUserIDs() |
String[] |
getUserLogins() |
List<IUser> |
getUsers() |
boolean |
isLockingPossible() |
boolean |
isManaged() |
boolean |
isReadOnly() |
boolean |
isVersionCommentMandatory() |
boolean |
isVersioningEnabled(String fullPath)
Determines whether versioning should be enabled in the UI for the given fully qualified file/path.
|
IUser |
loadUserInfo(String login) |
void |
normalizeUserInfo(IUser user)
Performs normalization over
user due to validation rules.
Note: normalized is not guaranteed to pass validation rules |
void |
renameUser(ObjectId id_user,
String newname) |
void |
saveUserInfo(IUser userInfo)
This method creates new user after all validations have been done.
|
void |
setUsers(List<IUser> users) |
void |
updateUser(IUser user) |
void |
validateAction(RepositoryOperation... operations)
Validates the supplied operation.
|
boolean |
validateUserInfo(IUser user)
Validates
user and returns true if all its data is valid.Note: this method performs fail-fast approach and does not return any details. |
getRepositoryMeta, getUserInfo, setRepositoryMetaclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetUserInfopublic KettleDatabaseRepositorySecurityProvider(KettleDatabaseRepository repository, RepositoryMeta repositoryMeta, IUser userInfo)
repository - userInfo - public boolean isReadOnly()
isReadOnly in interface RepositorySecurityProviderpublic boolean isLockingPossible()
isLockingPossible in interface RepositorySecurityProviderpublic boolean allowsVersionComments(String fullPath)
allowsVersionComments in interface RepositorySecurityProviderpublic boolean isVersionCommentMandatory()
isVersionCommentMandatory in interface RepositorySecurityProviderpublic IUser loadUserInfo(String login) throws KettleException
loadUserInfo in interface RepositorySecurityManagerKettleExceptionpublic void saveUserInfo(IUser userInfo) throws KettleException
saveUserInfo in interface RepositorySecurityManageruserInfo - user's infoKettleExceptionIllegalArgumentException - if userInfo.getObjectId() != nullpublic void validateAction(RepositoryOperation... operations) throws KettleException, KettleSecurityException
RepositorySecurityProvidervalidateAction in interface RepositorySecurityProvidervalidateAction in class BaseRepositorySecurityProviderKettleSecurityException - in case the provided user is not know or the password is incorrectKettleException - in case the action couldn't be validated because of an unexpected problem.public void delUser(ObjectId id_user) throws KettleException
delUser in interface RepositorySecurityManagerKettleExceptionpublic ObjectId getUserID(String login) throws KettleException
getUserID in interface RepositorySecurityManagerKettleExceptionpublic ObjectId[] getUserIDs() throws KettleException
getUserIDs in interface RepositorySecurityManagerKettleExceptionpublic String[] getUserLogins() throws KettleException
getUserLogins in interface RepositorySecurityProviderKettleExceptionpublic void renameUser(ObjectId id_user, String newname) throws KettleException
renameUser in interface RepositorySecurityManagerKettleExceptionpublic void deleteUsers(List<IUser> users) throws KettleException
deleteUsers in interface RepositorySecurityManagerKettleExceptionpublic List<IUser> getUsers() throws KettleException
getUsers in interface RepositorySecurityManagerKettleExceptionpublic void setUsers(List<IUser> users) throws KettleException
setUsers in interface RepositorySecurityManagerKettleExceptionpublic void delUser(String name) throws KettleException
delUser in interface RepositorySecurityManagerKettleExceptionpublic void updateUser(IUser user) throws KettleException
updateUser in interface RepositorySecurityManagerKettleExceptionpublic IUser constructUser() throws KettleException
constructUser in interface RepositorySecurityManagerKettleExceptionpublic List<String> getAllRoles() throws KettleException
RepositorySecurityProvidergetAllRoles in interface RepositorySecurityProviderKettleSecurityException - in case anything went wrongKettleExceptionpublic List<String> getAllUsers() throws KettleException
RepositorySecurityProvidergetAllUsers in interface RepositorySecurityProviderKettleSecurityException - in case anything went wrongKettleExceptionpublic boolean isManaged()
throws KettleException
isManaged in interface RepositorySecurityManagerKettleExceptionpublic boolean isVersioningEnabled(String fullPath)
RepositorySecurityProviderisVersioningEnabled in interface RepositorySecurityProviderpublic boolean validateUserInfo(IUser user)
RepositorySecurityUserValidatoruser and returns true if all its data is valid.validateUserInfo in interface RepositorySecurityUserValidatoruser - user's infotrue or false depending on whether or not user's info is validpublic void normalizeUserInfo(IUser user)
RepositorySecurityUserValidatoruser due to validation rules.
Note: normalized is not guaranteed to pass validation rulesnormalizeUserInfo in interface RepositorySecurityUserValidatoruser - user's infoCopyright © 2018 Hitachi Vantara. All rights reserved.