public boolean visit(BandVisitor bandVisitor) { if (bandVisitor.visit(this)) { return true; } for (BandData child : getChildrenList()) { if (child.visit(bandVisitor)) { return true; } } return false; }
public BandData findBandRecursively(String name) { BandNameVisitor visitor = new BandNameVisitor(name); visit(visitor); return visitor.foundBand; }
/** * Method checks instance inheritance of ProxyWrapper and unwrapping their real instance * * @param obj - instance of any object * @return unwrapped instance (if proxied) or same object */ static<T> T unwrap(T obj) { return obj != null && obj instanceof ProxyWrapper ? (T)((ProxyWrapper)obj).unwrap() : obj; } }
protected void writeTemplates(Report report, Element root) { Map<String, ReportTemplate> reportTemplates = report.getReportTemplates(); Element reportTemplatesElement = root.addElement("templates"); for (ReportTemplate reportTemplate : reportTemplates.values()) { Element reportTemplateElement = reportTemplatesElement.addElement("template"); reportTemplateElement.addAttribute("code", reportTemplate.getCode()); reportTemplateElement.addAttribute("documentName", reportTemplate.getDocumentName()); reportTemplateElement.addAttribute("documentPath", reportTemplate.getDocumentPath()); reportTemplateElement.addAttribute("outputType", reportTemplate.getOutputType().getId()); reportTemplateElement.addAttribute("outputNamePattern", reportTemplate.getOutputNamePattern()); } }
public ReportQueryImpl(ReportQuery reportQuery) { this(reportQuery.getName(), reportQuery.getScript(), reportQuery.getLoaderType(), reportQuery.getLinkParameterName(), reportQuery.getAdditionalParams()); }
protected void writeValueFormats(Report report, Element root) { Element reportTemplatesElement = root.addElement("formats"); for (ReportFieldFormat reportFieldFormat : report.getReportFieldFormats()) { Element reportTemplateElement = reportTemplatesElement.addElement("format"); reportTemplateElement.addAttribute("name", reportFieldFormat.getName()); reportTemplateElement.addAttribute("format", reportFieldFormat.getFormat()); } }
public String getFullName() { String fullName = name; BandData upBand = parentBand; while ((upBand != null) && (upBand.level > 1)) { fullName = upBand.getName() + "." + fullName; upBand = upBand.parentBand; } return fullName; }
protected String getFormatString(String parameterName, String fullParameterName) { Map<String, ReportFieldFormat> formats = rootBand.getReportFieldFormats(); String formatString = null; if (formats != null) { if (formats.containsKey(fullParameterName)) { formatString = formats.get(fullParameterName).getFormat(); } else if (formats.containsKey(parameterName)) { formatString = formats.get(parameterName).getFormat(); } } return formatString; }
public void addChildren(List<BandData> bands) { for (BandData band : bands) addChild(band); }
protected boolean isEmptyBand(BandData parentBand) { return parentBand != null && parentBand.getData() == Collections.EMPTY_MAP; } }
private Object readResolve() throws ObjectStreamException { return getOutputTypeById(id); } }
protected void writeTemplates(Report report, Element root) { Map<String, ReportTemplate> reportTemplates = report.getReportTemplates(); Element reportTemplatesElement = root.addElement("templates"); for (ReportTemplate reportTemplate : reportTemplates.values()) { Element reportTemplateElement = reportTemplatesElement.addElement("template"); reportTemplateElement.addAttribute("code", reportTemplate.getCode()); reportTemplateElement.addAttribute("documentName", reportTemplate.getDocumentName()); reportTemplateElement.addAttribute("documentPath", reportTemplate.getDocumentPath()); reportTemplateElement.addAttribute("outputType", reportTemplate.getOutputType().getId()); reportTemplateElement.addAttribute("outputNamePattern", reportTemplate.getOutputNamePattern()); } }
public boolean visit(BandVisitor bandVisitor) { if (bandVisitor.visit(this)) { return true; } for (BandData child : getChildrenList()) { if (child.visit(bandVisitor)) { return true; } } return false; }
protected void writeValueFormats(Report report, Element root) { Element reportTemplatesElement = root.addElement("formats"); for (ReportFieldFormat reportFieldFormat : report.getReportFieldFormats()) { Element reportTemplateElement = reportTemplatesElement.addElement("format"); reportTemplateElement.addAttribute("name", reportFieldFormat.getName()); reportTemplateElement.addAttribute("format", reportFieldFormat.getFormat()); } }
public BandData findBandRecursively(String name) { BandNameVisitor visitor = new BandNameVisitor(name); visit(visitor); return visitor.foundBand; }
public String getFullName() { String fullName = name; BandData upBand = parentBand; while ((upBand != null) && (upBand.level > 1)) { fullName = upBand.getName() + "." + fullName; upBand = upBand.parentBand; } return fullName; }
protected String getFormatString(String parameterName, String fullParameterName) { Map<String, ReportFieldFormat> formats = rootBand.getReportFieldFormats(); String formatString = null; if (formats != null) { if (formats.containsKey(fullParameterName)) { formatString = formats.get(fullParameterName).getFormat(); } else if (formats.containsKey(parameterName)) { formatString = formats.get(parameterName).getFormat(); } } return formatString; }
public void addChildren(List<BandData> bands) { for (BandData band : bands) addChild(band); }
protected boolean isEmptyBand(BandData parentBand) { return parentBand != null && parentBand.getData() == Collections.EMPTY_MAP; } }
/** * Method checks instance inheritance of ProxyWrapper and unwrapping their real instance * * @param obj - instance of any object * @return unwrapped instance (if proxied) or same object */ static<T> T unwrap(T obj) { return obj != null && obj instanceof ProxyWrapper ? (T)((ProxyWrapper)obj).unwrap() : obj; } }