common-util

local.tomas.util.versioning
Interface VersionInterface


public interface VersionInterface

Interface for version dependent entities.

Author:
Teubner

Method Summary
 String getCurrentVersion(String name)
          Get current version of entity.
 void postInitVersion(String name, String toVersion)
          Called after initializing new version.
 void postUpdateVersion(String name, String fromVersion, String toVersion)
          Called after updating to new version.
 void preInitVersion(String name, String toVersion)
          Called before initializing new version.
 void preUpdateVersion(String name, String fromVersion, String toVersion)
          Called before updating to new version.
 void setVersion(String name, String newVersion)
          Set current version of entity.
 

Method Detail

getCurrentVersion

String getCurrentVersion(String name)
                         throws VersionException
Get current version of entity.

Parameters:
name - entity name
Returns:
version string
Throws:
VersionException

setVersion

void setVersion(String name,
                String newVersion)
                throws VersionException
Set current version of entity.

Parameters:
name - entity name
newVersion - new ersion string
Throws:
VersionException

preInitVersion

void preInitVersion(String name,
                    String toVersion)
                    throws VersionException
Called before initializing new version.

Parameters:
name - entity name
toVersion - version to be initialized
Throws:
VersionException

postInitVersion

void postInitVersion(String name,
                     String toVersion)
                     throws VersionException
Called after initializing new version.

Parameters:
name - entity name
toVersion - version initialized
Throws:
VersionException

preUpdateVersion

void preUpdateVersion(String name,
                      String fromVersion,
                      String toVersion)
                      throws VersionException
Called before updating to new version.

Parameters:
name - entity name
fromVersion - previous version
toVersion - target version of update
Throws:
VersionException

postUpdateVersion

void postUpdateVersion(String name,
                       String fromVersion,
                       String toVersion)
                       throws VersionException
Called after updating to new version.

Parameters:
name - entity name
fromVersion - previous version
toVersion - new version
Throws:
VersionException

common-util

Copyright © 2005-2007 Tomas Teubner. All Rights Reserved.