@@ -0,0 +1,2959 @@
+package com.bitdubai.fermat_api.layer.all_definition.util;%0A%0Aimport com.bitdubai.fermat_api.layer.all_definition.exceptions.InvalidParameterException;%0A%0Aimport java.io.Serializable;%0A%0A/**%0A * Created by rodrigo on 7/29/15.%0A * Used to define the versions in which this object will be valid.%0A * Can be used to compare against the platform version or a Wallet version.%0A */%0Apublic class ValidityVersion implements Serializable %7B%0A    Version initialVersion;%0A    Version finalVersion;%0A%0A    // platform version will be calculated with another plugin soon.%0A    final Version PLATFORM_VERSION = new Version(%221.0.0%22);%0A%0A    /**%0A     * Constructor%0A     * @param initialVersion the initial Version in which this object will be executed. For example 1.0.0%0A     * @param finalVersion the final Version in which this object will be executed. For example 2.0.0%0A     * @throws InvalidParameterException if the inital version is greater than the final, or viceversa%0A     */%0A    public ValidityVersion(Version initialVersion, Version finalVersion) throws InvalidParameterException %7B%0A        this.initialVersion = initialVersion;%0A        this.finalVersion = finalVersion;%0A%0A        if (initialVersion.isAbove(finalVersion))%0A            throw new InvalidParameterException(%22The final version must be greater than the initial version%22, null, %22Initial Version: %22 + initialVersion.toString() + %22, final version: %22 + finalVersion.toString(), null);%0A    %7D%0A%0A    public Version getInitialVersion() %7B%0A        return initialVersion;%0A    %7D%0A%0A    public void setInitialVersion(Version initialVersion) throws InvalidParameterException %7B%0A        if (!finalVersion.isAbove(initialVersion))%0A            throw new InvalidParameterException(%22The initial version must be lower than the final version%22, null, %22Initial Version: %22 + initialVersion.toString() + %22, final version: %22 + finalVersion.toString(), null);%0A        else%0A            this.initialVersion = initialVersion;%0A    %7D%0A%0A    public Version getFinalVersion() %7B%0A        return finalVersion;%0A    %7D%0A%0A    public void setFinalVersion(Version finalVersion) throws InvalidParameterException %7B%0A        if (this.initialVersion.isAbove(finalVersion))%0A            throw new InvalidParameterException(%22The final version must be greater than the initial version%22, null, %22Initial Version: %22 + initialVersion.toString() + %22, final version: %22 + finalVersion.toString(), null);%0A        else%0A            this.finalVersion = finalVersion;%0A    %7D%0A%0A    /**%0A     * Returns true if this ValidityVersion is valid to run on this platform.%0A     * @return%0A     */%0A    public boolean isValidInPlatform()%7B%0A        return PLATFORM_VERSION.isBetween(this.initialVersion, this.finalVersion);%0A    %7D%0A%0A    /**%0A     * Returns true if the passed version is valid to be executed on this version object.%0A     * @param version%0A     * @return%0A     */%0A    public boolean isValidInVersion(Version version)%7B%0A        return version.isBetween(this.initialVersion, this.finalVersion);%0A    %7D%0A%7D%0A

Fix #958 Created new class ValidityVersion