/**
 *
 */
package org.javarosa.xml.util;

/**
 * @author ctsims
 */
public class UnfullfilledRequirementsException extends Exception {

    private int severity;
    private int requirement;
    private boolean isDuplicateApp;

    /**
     * Version Numbers if version is incompatible *
     */
    private int maR, miR, maA, miA;

    public UnfullfilledRequirementsException(String message, int severity) {
        this(message, severity, -1, -1, -1, -1, -1);
    }

    public UnfullfilledRequirementsException(String message, int severity, int requirement) {
        this(message, severity, requirement, -1, -1, -1, -1);
    }

    public UnfullfilledRequirementsException(String message, int severity, boolean isDuplicateApp) {
        this(message, severity, -1, -1, -1, -1, -1);
        this.isDuplicateApp = isDuplicateApp;
    }

    /**
     * Constructor for unfulfilled version requirements.
     *
     * @param message
     * @param severity
     * @param requirement
     * @param requiredMajor
     * @param requiredMinor
     * @param availableMajor
     * @param availableMinor
     */
    public UnfullfilledRequirementsException(String message, int severity,
                                             int requirement,
                                             int requiredMajor, int requiredMinor, int availableMajor, int availableMinor) {
        super(message);
        this.severity = severity;
        this.requirement = requirement;

        this.maR = requiredMajor;
        this.miR = requiredMinor;

        this.maA = availableMajor;
        this.miA = availableMinor;
    }

    /**
     * @return A human readable version string describing the required version
     */
    public String getRequiredVersionString() {
        return maR + "." + miR;
    }

    /**
     * @return A human readable version string describing the available version
     */
    public String getAvailableVesionString() {
        return maA + "." + miA;
    }

    public int getSeverity() {
        return severity;
    }

    public int getRequirementCode() {
        return requirement;
    }

    public boolean isDuplicateException() {
        return this.isDuplicateApp;
    }
}

@@ -188,44 +188,8 @@
 ent;
-%0A    private boolean isDuplicateApp;
 %0A%0A  
@@ -595,215 +595,8 @@
  %7D%0A%0A
-    public UnfullfilledRequirementsException(String message, int severity, boolean isDuplicateApp) %7B%0A        this(message, severity, -1, -1, -1, -1, -1);%0A        this.isDuplicateApp = isDuplicateApp;%0A    %7D%0A%0A
     
@@ -1864,94 +1864,7 @@
    %7D
-%0A%0A    public boolean isDuplicateException() %7B%0A        return this.isDuplicateApp;%0A    %7D
 %0A%7D%0A

revert accidental changes on master