Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

openfuture.bugbase.domain.update
Class PasswordUpdate  view PasswordUpdate download PasswordUpdate.java

java.lang.Object
  extended byopenfuture.bugbase.domain.update.PasswordUpdate
All Implemented Interfaces:
openfuture.bugbase.model.Transaction, openfuture.bugbase.model.VersionUpdate

public class PasswordUpdate
extends java.lang.Object
implements openfuture.bugbase.model.VersionUpdate

User passwords are stored in the USERS table. A password column is added by this update. Created: Sun Aug 27 14:51:30 2000

Version:
$Revision: 1.3 $

Field Summary
private  java.sql.Connection connection
           
private  openfuture.bugbase.domain.Persistency persistency
           
private  openfuture.bugbase.model.Version version
           
 
Constructor Summary
PasswordUpdate(openfuture.bugbase.domain.Persistency persistency)
           
 
Method Summary
 openfuture.bugbase.model.TransactionResult cleanup()
          This method will be executed after a successful execution of execute() 55 .
 openfuture.bugbase.model.TransactionResult execute()
          Core execution of the transaction.
 java.lang.String getDescription()
          Description for this version update.
 openfuture.bugbase.model.Version getVersion()
          Persistency version after this update.
 openfuture.bugbase.model.VersionUpdate predecessor()
          No predecessor available.
 openfuture.bugbase.model.TransactionResult rollback()
          This method will be executed after a unsuccessful execution of execute() 55 .
 openfuture.bugbase.model.TransactionResult setup()
          Setup before the transaction core is executed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

private openfuture.bugbase.model.Version version

connection

private java.sql.Connection connection

persistency

private openfuture.bugbase.domain.Persistency persistency
Constructor Detail

PasswordUpdate

public PasswordUpdate(openfuture.bugbase.domain.Persistency persistency)
Method Detail

setup

public openfuture.bugbase.model.TransactionResult setup()
Setup before the transaction core is executed.
  • Read all entries from the users table.

Specified by:
setup in interface openfuture.bugbase.model.Transaction

execute

public openfuture.bugbase.model.TransactionResult execute()
Core execution of the transaction.
  • drop USERS table.
  • create new USERS table with additional PASSWORD column.
  • Copy USERS_BACKUP into USERS.
  • Set all passwords to 'bugbase'.

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 .
  • drop users_backup table.

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