org.eclipse.emf.emfstore.internal.server.accesscontrol.authentication.verifiers
Class VersionVerifier

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.accesscontrol.authentication.verifiers.VersionVerifier

public final class VersionVerifier
extends Object

Utility class to verify the client version. When specifying the allowed versions, clients may either specify an array containing all allowed version numbers or specify a single wildcard version.

A wildcard version is specified via the '*' letter. All other letters known from regular expressions are not considered.

For instance the wildcard version 1.2.3.x would accept all 1.2.3 versions independently of the actual qualifier where x stand for a qualifier. Multiple wildcard versions are not allowed

Author:
emueller

Method Summary
static void verify(String[] versions, ClientVersionInfo clientVersionInfo)
          Verifies the client version against a set of allowed versions.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

verify

public static void verify(String[] versions,
                          ClientVersionInfo clientVersionInfo)
                   throws ClientVersionOutOfDateException
Verifies the client version against a set of allowed versions.

Parameters:
versions - the list of accepted versions or a single wildcard version like '1.2.3.*'
clientVersionInfo - the client version to verify
Throws:
ClientVersionOutOfDateException - in case the client version is out of date


Copyright © 2015. All Rights Reserved.