Skip to content

Package: ReportService

ReportService

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2015 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Edgar Mueller - initial API and implementation
13: * Eugen Neufeld - deprecated getReports and clearReports
14: ******************************************************************************/
15: package org.eclipse.emfforms.spi.common.report;
16:
17: import java.util.List;
18:
19: /**
20: * Service for reporting and aggregating errors.
21: *
22: * @author emueller
23: * @since 1.5
24: */
25: public interface ReportService {
26:
27:         /**
28:          * Report an {@link AbstractReport} to the service.
29:          *
30:          * @param reportEntity
31:          * the report entity
32:          */
33:         void report(AbstractReport reportEntity);
34:
35:         /**
36:          * Returns all ReportEntities.
37:          *
38:          * @return all ReportEntries
39:          * @deprecated If you want to track all reports use {@link #addConsumer(ReportServiceConsumer)}, in order to add an
40:          * report use {@link #report(AbstractReport)}. This method will be removed with the next release.
41:          */
42:         @Deprecated
43:         List<AbstractReport> getReports();
44:
45:         /**
46:          * Discards all ReportEntities.
47:          *
48:          * @deprecated Calling this method doesn't have any effect. It will also be removed with the next release.
49:          */
50:         @Deprecated
51:         void clearReports();
52:
53:         /**
54:          * Adds a {@link ReportServiceConsumer} that consumes {@code ReportEntities}.
55:          *
56:          * @param consumer
57:          * a {@link ReportServiceConsumer}
58:          */
59:         void addConsumer(ReportServiceConsumer consumer);
60:
61:         /**
62:          * Removes a {@link ReportServiceConsumer}.
63:          *
64:          * @param consumer
65:          * the consumer to be removed
66:          */
67:         void removeConsumer(ReportServiceConsumer consumer);
68:
69: }