private Object readResolve() throws ObjectStreamException { return getOutputTypeById(id); } }
private Object readResolve() throws ObjectStreamException { return getOutputTypeById(id); } }
protected Map<String, ReportTemplate> parseTemplates(Element rootElement) throws IOException { Element templatesElement = rootElement.element("templates"); List<Element> templates = templatesElement.elements("template"); Map<String, ReportTemplate> templateMap = new HashMap<String, ReportTemplate>(); for (Element template : templates) { String code = template.attribute("code").getText(); String documentName = template.attribute("documentName").getText(); String documentPath = template.attribute("documentPath").getText(); String outputType = template.attribute("outputType").getText(); String outputNamePattern = template.attribute("outputNamePattern").getText(); ReportTemplate reportTemplate = new ReportTemplateBuilder() .code(code) .documentName(documentName) .documentPath(documentPath) .documentContent(getDocumentContent(documentPath)) .outputType(ReportOutputType.getOutputTypeById(outputType)) .outputNamePattern(outputNamePattern).build(); templateMap.put(reportTemplate.getCode(), reportTemplate); } return templateMap; }
protected Map<String, ReportTemplate> parseTemplates(Element rootElement) throws IOException { Element templatesElement = rootElement.element("templates"); List<Element> templates = templatesElement.elements("template"); Map<String, ReportTemplate> templateMap = new HashMap<String, ReportTemplate>(); for (Element template : templates) { String code = template.attribute("code").getText(); String documentName = template.attribute("documentName").getText(); String documentPath = template.attribute("documentPath").getText(); String outputType = template.attribute("outputType").getText(); String outputNamePattern = template.attribute("outputNamePattern").getText(); ReportTemplate reportTemplate = new ReportTemplateBuilder() .code(code) .documentName(documentName) .documentPath(documentPath) .documentContent(getDocumentContent(documentPath)) .outputType(ReportOutputType.getOutputTypeById(outputType)) .outputNamePattern(outputNamePattern).build(); templateMap.put(reportTemplate.getCode(), reportTemplate); } return templateMap; }