org.pentaho.di.repository.kdr
Class KettleDatabaseRepositorySecurityProvider
java.lang.Object
org.pentaho.di.repository.BaseRepositorySecurityProvider
org.pentaho.di.repository.kdr.KettleDatabaseRepositorySecurityProvider
- All Implemented Interfaces:
- IRepositoryService, RepositorySecurityManager, RepositorySecurityProvider
public class KettleDatabaseRepositorySecurityProvider
- extends BaseRepositorySecurityProvider
- implements RepositorySecurityProvider, RepositorySecurityManager
KettleDatabaseRepositorySecurityProvider
public KettleDatabaseRepositorySecurityProvider(KettleDatabaseRepository repository,
RepositoryMeta repositoryMeta,
IUser userInfo)
- Parameters:
repository
- userInfo
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in interface RepositorySecurityProvider
- Returns:
- true if the repository or the user is read only
isLockingPossible
public boolean isLockingPossible()
- Specified by:
isLockingPossible
in interface RepositorySecurityProvider
- Returns:
- true if this repository supports file locking and if the user is allowed to lock a file
allowsVersionComments
public boolean allowsVersionComments()
- Specified by:
allowsVersionComments
in interface RepositorySecurityProvider
- Returns:
- true if the repository supports revisions AND if it is possible to give version comments
isVersionCommentMandatory
public boolean isVersionCommentMandatory()
- Specified by:
isVersionCommentMandatory
in interface RepositorySecurityProvider
- Returns:
- true if version comments are allowed and mandatory.
loadUserInfo
public IUser loadUserInfo(String login)
throws KettleException
- Specified by:
loadUserInfo
in interface RepositorySecurityManager
- Throws:
KettleException
saveUserInfo
public void saveUserInfo(IUser userInfo)
throws KettleException
- Specified by:
saveUserInfo
in interface RepositorySecurityManager
- Throws:
KettleException
validateAction
public void validateAction(RepositoryOperation... operations)
throws KettleException,
KettleSecurityException
- Description copied from interface:
RepositorySecurityProvider
- Validates the supplied operation.
- Specified by:
validateAction
in interface RepositorySecurityProvider
- Overrides:
validateAction
in class BaseRepositorySecurityProvider
- Throws:
KettleSecurityException
- in case the provided user is not know or the password is incorrect
KettleException
- in case the action couldn't be validated because of an unexpected problem.
delUser
public void delUser(ObjectId id_user)
throws KettleException
- Specified by:
delUser
in interface RepositorySecurityManager
- Throws:
KettleException
getUserID
public ObjectId getUserID(String login)
throws KettleException
- Specified by:
getUserID
in interface RepositorySecurityManager
- Throws:
KettleException
getUserIDs
public ObjectId[] getUserIDs()
throws KettleException
- Specified by:
getUserIDs
in interface RepositorySecurityManager
- Throws:
KettleException
getUserLogins
public String[] getUserLogins()
throws KettleException
- Specified by:
getUserLogins
in interface RepositorySecurityProvider
- Throws:
KettleException
renameUser
public void renameUser(ObjectId id_user,
String newname)
throws KettleException
- Specified by:
renameUser
in interface RepositorySecurityManager
- Throws:
KettleException
deleteUsers
public void deleteUsers(List<IUser> users)
throws KettleException
- Specified by:
deleteUsers
in interface RepositorySecurityManager
- Throws:
KettleException
getUsers
public List<IUser> getUsers()
throws KettleException
- Specified by:
getUsers
in interface RepositorySecurityManager
- Throws:
KettleException
setUsers
public void setUsers(List<IUser> users)
throws KettleException
- Specified by:
setUsers
in interface RepositorySecurityManager
- Throws:
KettleException
delUser
public void delUser(String name)
throws KettleException
- Specified by:
delUser
in interface RepositorySecurityManager
- Throws:
KettleException
updateUser
public void updateUser(IUser user)
throws KettleException
- Specified by:
updateUser
in interface RepositorySecurityManager
- Throws:
KettleException
constructUser
public IUser constructUser()
throws KettleException
- Specified by:
constructUser
in interface RepositorySecurityManager
- Throws:
KettleException
getAllRoles
public List<String> getAllRoles()
throws KettleException
- Description copied from interface:
RepositorySecurityProvider
- Retrieves all roles in the system
- Specified by:
getAllRoles
in interface RepositorySecurityProvider
- Returns:
- list of role
- Throws:
KettleSecurityException
- in case anything went wrong
KettleException
getAllUsers
public List<String> getAllUsers()
throws KettleException
- Description copied from interface:
RepositorySecurityProvider
- Retrieves all users in the system
- Specified by:
getAllUsers
in interface RepositorySecurityProvider
- Returns:
- list of username
- Throws:
KettleSecurityException
- in case anything went wrong
KettleException
isManaged
public boolean isManaged()
throws KettleException
- Specified by:
isManaged
in interface RepositorySecurityManager
- Throws:
KettleException