| package org.eclipse.osbp.ui.api.report; |
| |
| import java.io.InputStream; |
| import java.util.Map; |
| |
| import org.eclipse.osbp.ui.api.customfields.IBlobService; |
| import org.eclipse.osbp.ui.api.metadata.IDSLMetadataService; |
| import org.eclipse.osbp.ui.api.themes.IThemeResourceService; |
| import org.eclipse.osbp.ui.api.user.IUser; |
| |
| public interface IReportProvider { |
| public final static String APPCONTEXT_REPORT = "AppContext_Report"; |
| public final static String APPCONTEXT_THEMERESOURCESERVICE = "ThemeResourceService_Report"; |
| public final static String APPCONTEXT_DSLMETADATASERVICE = "DSLMetadataService_Report"; |
| public final static String APPCONTEXT_BLOBSERVICE = "BlobService_Report"; |
| |
| public final static String APPCONTEXT_USER = "User_Report"; |
| public final static String APPCONTEXT_DATAMARTINSTANCE = "DatamartInstance_Report"; |
| public final static String APPCONTEXT_FILTERMAP = "FilterMap_Report"; |
| public final static String APPCONTEXT_PROPERTYLOOKUP = "PropertyLookup_Report"; |
| |
| public enum Rendering { |
| PDF_FILE(false, true, true, false, false), PDF_STREAM(false, true, false, true, false), |
| /** @see {@link http://www.eclipse.org/forums/index.php/t/204085/} */ |
| PDF_PRINT_STREAM(false, true, false, true, true), HTML_FILE(true, false, true, false, false), HTML_STREAM(true, false, false, true, false); |
| |
| public boolean asHtml() { |
| return fAsHtml; |
| } |
| |
| public boolean asPdf() { |
| return fAsPdf; |
| } |
| |
| public boolean asFile() { |
| return fAsFile; |
| } |
| |
| public boolean asStream() { |
| return fAsStream; |
| } |
| |
| public boolean forPrinting() { |
| return fForPrinting; |
| } |
| |
| private final boolean fAsHtml; |
| private final boolean fAsPdf; |
| private final boolean fAsFile; |
| private final boolean fAsStream; |
| private final boolean fForPrinting; |
| |
| Rendering(boolean asHtml, boolean asPdf, boolean asFile, boolean asStream, boolean forPrinting) { |
| fAsHtml = asHtml; |
| fAsPdf = asPdf; |
| fAsFile = asFile; |
| fAsStream = asStream; |
| fForPrinting = forPrinting; |
| } |
| } |
| |
| void printReportAsPdf(String reportId, IUser user, IDSLMetadataService dslMetadataService, IBlobService blobService, |
| Map<String, String> filterMap); |
| |
| InputStream get(String reportId, IUser user, IDSLMetadataService dslMetadataService, IBlobService blobService, |
| Map<String, String> filterMap); |
| |
| InputStream get(String reportId, IUser user, IDSLMetadataService dslMetadataService, Map<String, String> filterMap, |
| Rendering renderer, IThemeResourceService themeResourceService, IBlobService blobService, |
| String outputPath); |
| |
| } |