Package org.jtalks.jcommune.plugin.auth.poulpe.dto

Examples of org.jtalks.jcommune.plugin.auth.poulpe.dto.Errors


     * @throws java.io.IOException
     */
    private Map<String, String> parseErrors(Representation repr, Locale locale) throws IOException, JAXBException {
        JAXBContext context = JAXBContext.newInstance(Errors.class);
        Unmarshaller unmarshaller = context.createUnmarshaller();
        Errors errorsRepr = (Errors) unmarshaller.unmarshal(repr.getStream());

        Map<String, String> errors = new HashMap<>();
        ResourceBundle resourceBundle = ResourceBundle.getBundle("ValidationMessages", locale);
        for (org.jtalks.jcommune.plugin.auth.poulpe.dto.Error error : errorsRepr.getErrorList()) {
            if (error.getCode() != null && !error.getCode().isEmpty()) {
                Map.Entry<String, String> errorEntry = parseErrorCode(error.getCode(), resourceBundle);
                if (errorEntry != null) {
                    errors.put(errorEntry.getKey(), errorEntry.getValue());
                }
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.plugin.auth.poulpe.dto.Errors

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.