java.lang.Object
openfuture.bugbase.domain.update.CreateNewDbUsers
- All Implemented Interfaces:
- openfuture.bugbase.model.Transaction, openfuture.bugbase.model.VersionUpdate
- public class CreateNewDbUsers
- extends java.lang.Object
- implements openfuture.bugbase.model.VersionUpdate
Creates new DB users for each user ID occuring in the 'users' table.
All user IDs must be alphanumeric.
Created: Sat Jun 24 10:56:39 2000
- Version:
- $Revision: 1.3 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
version
private openfuture.bugbase.model.Version version
connection
private java.sql.Connection connection
persistency
private openfuture.bugbase.domain.Persistency persistency
userids
private java.util.HashSet userids
CreateNewDbUsers
public CreateNewDbUsers(openfuture.bugbase.domain.Persistency persistency)
setup
public openfuture.bugbase.model.TransactionResult setup()
- Setup before the transaction core is executed.
- Retrieve all userid entries from 'users'. If one entry
is not valid, the setup fails.
- Specified by:
setup
in interface openfuture.bugbase.model.Transaction
execute
public openfuture.bugbase.model.TransactionResult execute()
- Core execution of the transaction.
- Create new database user for each userid from 'users'.
All new users obtain the the password 'bugbase'.
- Give public access to all tables to public.
- Specified by:
execute
in interface openfuture.bugbase.model.Transaction
cleanup
public openfuture.bugbase.model.TransactionResult cleanup()
- This method will be executed after a successful execution of
execute()
55 . Nothing to be done here.
- Specified by:
cleanup
in interface openfuture.bugbase.model.Transaction
rollback
public openfuture.bugbase.model.TransactionResult rollback()
- This method will be executed after a unsuccessful execution of
execute()
55 . Nothing to be done here.
- Specified by:
rollback
in interface openfuture.bugbase.model.Transaction
getDescription
public java.lang.String getDescription()
- Description copied from interface:
openfuture.bugbase.model.Transaction
- Description for this version update.
- Specified by:
getDescription
in interface openfuture.bugbase.model.Transaction
predecessor
public final openfuture.bugbase.model.VersionUpdate predecessor()
- No predecessor available.
- Specified by:
predecessor
in interface openfuture.bugbase.model.VersionUpdate
getVersion
public final openfuture.bugbase.model.Version getVersion()
- Persistency version after this update.
- Specified by:
getVersion
in interface openfuture.bugbase.model.VersionUpdate