Java 类javax.print.attribute.standard.Severity 实例源码

项目:openapi-parser    文件:ValidatorBase.java   
private void checkUrl(String url, ValidationResults results, boolean allowVars, Severity severity, String crumb) {
    // TODO Q: Any help from spec in being able to validate URLs with vars? E.g is our treatment here valid? We
    // assume vars can only appear where simple text can appear, so handling vars means relacing {.*} with "1" and
    // testing for URL validity. We use a digit instead of a letter because it covers vars in the port, and
    // elsewhere digits are always allowed where letters are.
    String origUrl = url;
    if (allowVars) {
        url = url.replaceAll("\\{[^}]+\\}", "1");
        if (url.startsWith("1:")) {
            // "1" is not a valid scheme name, so we need to replace it with special scheme, for which we provide a
            // do-nothing protocol handler implementation
            url = SPECIAL_SCHEME + url.substring(1);
            if (!specialSchemeInited) {
                // register protocol handler for special scheme
                initSpecialScheme();
            }
        }
    }
    try {
        new URL(url);
    } catch (MalformedURLException e) {
        results.addError(m.msg("BadUrl|Invalid URL", origUrl, e.toString()), crumb);
    }
}
项目:openapi-parser    文件:ValidatorBase.java   
public void validateUrl(final String value, final ValidationResults results, boolean required, String crumb,
        final boolean allowVars, final Severity severity) {
    validateString(value, results, required, (Pattern) null, crumb);
    if (value != null) {
        checkUrl(value, results, allowVars, severity, crumb);
    }
}
项目:OpenJSharp    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:OpenJSharp    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:jdk8u-jdk    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:jdk8u-jdk    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openjdk-jdk10    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openjdk-jdk10    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openjdk9    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openjdk9    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:jdk8u_jdk    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:jdk8u_jdk    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:infobip-open-jdk-8    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:infobip-open-jdk-8    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:jdk8u-dev-jdk    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:jdk8u-dev-jdk    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:jdk7-jdk    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:jdk7-jdk    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openjdk-source-code-learn    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openjdk-source-code-learn    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:OLD-OpenJDK8    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:OLD-OpenJDK8    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openjdk-jdk7u-jdk    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openjdk-jdk7u-jdk    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openjdk-icedtea7    文件:Win32PrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openjdk-icedtea7    文件:UnixPrintService.java   
private PrinterStateReasons getPrinterStateReasons() {
    if (isInvalid) {
        PrinterStateReasons psr = new PrinterStateReasons();
        psr.put(PrinterStateReason.SHUTDOWN, Severity.ERROR);
        return psr;
    } else {
        return null;
    }
}
项目:openapi-parser    文件:XmlValidator.java   
@Override
public void validateObject(Xml xml, ValidationResults results) {
    // no validation for: name, prefix, attribute, wrapped
    validateUrl(xml.getNamespace(false), results, false, "namespace", false, Severity.WARNING);
    validateExtensions(xml.getExtensions(false), results);
}
项目:openapi-parser    文件:ValidatorBase.java   
public void validateUrl(String value, ValidationResults results, boolean required, String crumb,
        boolean allowVars) {
    validateUrl(value, results, required, crumb, allowVars, Severity.ERROR);
}