Package com.openindex.openestate.tool.db
Class DbAdminHandlerImpl
- java.lang.Object
-
- com.openindex.openestate.tool.db.DbAdminHandlerImpl
-
- All Implemented Interfaces:
DbAdminHandler
- Direct Known Subclasses:
HSqlDbAdminHandler
public abstract class DbAdminHandlerImpl extends Object implements DbAdminHandler
DbAdminHandlerImpl.- Author:
- Andreas Rudolph
-
-
Constructor Summary
Constructors Constructor Description DbAdminHandlerImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidbackupLocalDb(Connection c, File backupArchive)abstract voidbackupRemoteDb(Connection c, String dbName)abstract voidcreateAccount(Connection c, String account, char[] password)abstract voiddefrag(Connection c)abstract voiddumpLocalDb(Connection c, File backupArchive)abstract String[]getAccounts(Connection c, boolean includeAdmin)abstract String[]getProcedures(Connection c)abstract String[]getRoles(Connection c, boolean includeAdmin)abstract DbSession[]getSessions(Connection c)abstract String[]getTables(Connection c)abstract String[]getViews(Connection c)abstract booleangrantRole(Connection c, String account, String role)booleanhasRole(Connection c, String role)abstract booleanhasRole(Connection c, String account, String role)booleanisAdmin(Connection c)abstract booleanisAdmin(Connection c, String account)booleanisEnabled(Connection c)abstract booleanisEnabled(Connection c, String account)abstract booleanisLocalDbBackupSupported()abstract booleanisLocalDbDumpSupported()abstract booleanisRemoteDbBackupSupported()abstract voidremoveAccount(Connection c, String account)abstract booleanrevokeRole(Connection c, String account, String role)abstract FileselectLocalBackupFile(Component parentComponent, File defaultDir)abstract FileselectLocalDumpFile(Component parentComponent, File defaultDir)abstract voidsetAdmin(Connection c, String account, boolean isAdmin)abstract voidsetEnabled(Connection c, String account, boolean isEnabled)abstract voidupdateAccount(Connection c, String account, char[] password)
-
-
-
Method Detail
-
backupLocalDb
public abstract void backupLocalDb(Connection c, File backupArchive) throws SQLException
- Specified by:
backupLocalDbin interfaceDbAdminHandler- Throws:
SQLException
-
backupRemoteDb
public abstract void backupRemoteDb(Connection c, String dbName) throws SQLException
- Specified by:
backupRemoteDbin interfaceDbAdminHandler- Throws:
SQLException
-
createAccount
public abstract void createAccount(Connection c, String account, char[] password) throws SQLException
- Specified by:
createAccountin interfaceDbAdminHandler- Throws:
SQLException
-
dumpLocalDb
public abstract void dumpLocalDb(Connection c, File backupArchive) throws SQLException
- Specified by:
dumpLocalDbin interfaceDbAdminHandler- Throws:
SQLException
-
defrag
public abstract void defrag(Connection c) throws SQLException
- Specified by:
defragin interfaceDbAdminHandler- Throws:
SQLException
-
getAccounts
public abstract String[] getAccounts(Connection c, boolean includeAdmin) throws SQLException
- Specified by:
getAccountsin interfaceDbAdminHandler- Throws:
SQLException
-
getProcedures
public abstract String[] getProcedures(Connection c) throws SQLException
- Specified by:
getProceduresin interfaceDbAdminHandler- Throws:
SQLException
-
getRoles
public abstract String[] getRoles(Connection c, boolean includeAdmin) throws SQLException
- Specified by:
getRolesin interfaceDbAdminHandler- Throws:
SQLException
-
getSessions
public abstract DbSession[] getSessions(Connection c) throws SQLException
- Specified by:
getSessionsin interfaceDbAdminHandler- Throws:
SQLException
-
getTables
public abstract String[] getTables(Connection c) throws SQLException
- Specified by:
getTablesin interfaceDbAdminHandler- Throws:
SQLException
-
getViews
public abstract String[] getViews(Connection c) throws SQLException
- Specified by:
getViewsin interfaceDbAdminHandler- Throws:
SQLException
-
grantRole
public abstract boolean grantRole(Connection c, String account, String role) throws SQLException
- Specified by:
grantRolein interfaceDbAdminHandler- Throws:
SQLException
-
hasRole
public final boolean hasRole(Connection c, String role) throws SQLException
- Specified by:
hasRolein interfaceDbAdminHandler- Throws:
SQLException
-
hasRole
public abstract boolean hasRole(Connection c, String account, String role) throws SQLException
- Specified by:
hasRolein interfaceDbAdminHandler- Throws:
SQLException
-
isAdmin
public final boolean isAdmin(Connection c) throws SQLException
- Specified by:
isAdminin interfaceDbAdminHandler- Throws:
SQLException
-
isAdmin
public abstract boolean isAdmin(Connection c, String account) throws SQLException
- Specified by:
isAdminin interfaceDbAdminHandler- Throws:
SQLException
-
isEnabled
public final boolean isEnabled(Connection c) throws SQLException
- Specified by:
isEnabledin interfaceDbAdminHandler- Throws:
SQLException
-
isEnabled
public abstract boolean isEnabled(Connection c, String account) throws SQLException
- Specified by:
isEnabledin interfaceDbAdminHandler- Throws:
SQLException
-
isLocalDbBackupSupported
public abstract boolean isLocalDbBackupSupported()
- Specified by:
isLocalDbBackupSupportedin interfaceDbAdminHandler
-
isLocalDbDumpSupported
public abstract boolean isLocalDbDumpSupported()
- Specified by:
isLocalDbDumpSupportedin interfaceDbAdminHandler
-
isRemoteDbBackupSupported
public abstract boolean isRemoteDbBackupSupported()
- Specified by:
isRemoteDbBackupSupportedin interfaceDbAdminHandler
-
removeAccount
public abstract void removeAccount(Connection c, String account) throws SQLException
- Specified by:
removeAccountin interfaceDbAdminHandler- Throws:
SQLException
-
revokeRole
public abstract boolean revokeRole(Connection c, String account, String role) throws SQLException
- Specified by:
revokeRolein interfaceDbAdminHandler- Throws:
SQLException
-
selectLocalBackupFile
public abstract File selectLocalBackupFile(Component parentComponent, File defaultDir)
- Specified by:
selectLocalBackupFilein interfaceDbAdminHandler
-
selectLocalDumpFile
public abstract File selectLocalDumpFile(Component parentComponent, File defaultDir)
- Specified by:
selectLocalDumpFilein interfaceDbAdminHandler
-
setAdmin
public abstract void setAdmin(Connection c, String account, boolean isAdmin) throws SQLException
- Specified by:
setAdminin interfaceDbAdminHandler- Throws:
SQLException
-
setEnabled
public abstract void setEnabled(Connection c, String account, boolean isEnabled) throws SQLException
- Specified by:
setEnabledin interfaceDbAdminHandler- Throws:
SQLException
-
updateAccount
public abstract void updateAccount(Connection c, String account, char[] password) throws SQLException
- Specified by:
updateAccountin interfaceDbAdminHandler- Throws:
SQLException
-
-