de.smartics.maven.issues
Interface VersionFactory

Package class diagram package VersionFactory
All Known Implementing Classes:
AbstractVersionFactory, BugzillaVersionFactory

public interface VersionFactory

A factory to create version instances. Version conventions may be different in different projects. The factory ensures that for each project a specific version syntax can be supported.

The instance created provides information about the version string parsed. The main support it provides is the implementation of a comparable interface. The natural order should be ascending from lowest version number to highest.

The instances created by the factory are expected to be performing well as hash keys.

Author:
Robert Reiner

Method Summary
 ArtifactVersionRange createRange(String versionSpecification)
          Creates a version range by the given specification.
 org.apache.maven.artifact.versioning.ArtifactVersion createVersion(String versionString)
          Creates a version instance from the given version string.
 

Method Detail

createVersion

org.apache.maven.artifact.versioning.ArtifactVersion createVersion(String versionString)
Creates a version instance from the given version string.

Warnings:
Please note that it is not expected that parse exceptions occur. The implementation should make sure that at least a default representation of the version string is returned.
Parameters:
versionString - the version string to parse.
Returns:
the version instance.

createRange

ArtifactVersionRange createRange(String versionSpecification)
                                 throws org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
Creates a version range by the given specification.

Parameters:
versionSpecification - the specification of the version range to create.
Returns:
the range instance built from the specification.
Throws:
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException - if the specification cannot be parsed.


Copyright © 2008-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.