Holger's
Java API

com.antelmann.util.revision
Interface Revisable

All Known Implementing Classes:
DefaultRevisable

public interface Revisable

represents an object allowing revisions of itself

Author:
Holger Antelmann

Method Summary
 void addListener(RevisionListener listener)
           
 Revision getLastRevision()
          provides access to the last revision that was applied to this instance
 Enumeration<Revision> getRevisions(Filter<? super Revision> filter)
          optionally allows to access revisions that were performed on this instance
 Status getStatus()
          reflects the current status of this instance
 void removeListener(RevisionListener listener)
           
 void revise(Object source, Object changes, Status newStatus, String comment)
          adds a revision to the history and changes the current status accordingly; the revision's old status must match this Revisable's current status.
 

Method Detail

addListener

void addListener(RevisionListener listener)

removeListener

void removeListener(RevisionListener listener)

getStatus

Status getStatus()
reflects the current status of this instance


revise

void revise(Object source,
            Object changes,
            Status newStatus,
            String comment)
            throws RevisionException,
                   IOException
adds a revision to the history and changes the current status accordingly; the revision's old status must match this Revisable's current status.

Throws:
RevisionException - if this Revisable doesn't accept the given revision
IOException - if the any resources could not be access to perform the revision

getLastRevision

Revision getLastRevision()
provides access to the last revision that was applied to this instance


getRevisions

Enumeration<Revision> getRevisions(Filter<? super Revision> filter)
                                   throws IOException,
                                          UnsupportedOperationException
optionally allows to access revisions that were performed on this instance

Throws:
IOException
UnsupportedOperationException


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads