01: /*
02: * Copyright 2006-2007 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt.
07: *
08: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
09: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
10: * the license for the specific language governing your rights and limitations.
11: *
12: * Additional Contributor(s): Martin Schmid gridvision engineering GmbH
13: */
14: package org.pentaho.reportdesigner.crm.report.util;
15:
16: import org.jetbrains.annotations.NotNull;
17: import org.pentaho.reportdesigner.crm.report.model.ReportElement;
18:
19: /**
20: * User: Martin
21: * Date: 16.03.2007
22: * Time: 18:49:10
23: */
24: public class ElementNameDefinition {
25: @NotNull
26: private ReportElement definingElement;
27: @NotNull
28: private String name;
29:
30: public ElementNameDefinition(@NotNull
31: ReportElement definingElement, @NotNull
32: String name) {
33: //noinspection ConstantConditions
34: if (definingElement == null) {
35: throw new IllegalArgumentException(
36: "definingElement must not be null");
37: }
38: //noinspection ConstantConditions
39: if (name == null) {
40: throw new IllegalArgumentException("name must not be null");
41: }
42: this .definingElement = definingElement;
43: this .name = name;
44: }
45:
46: @NotNull
47: public ReportElement getDefiningElement() {
48: return definingElement;
49: }
50:
51: @NotNull
52: public String getElementName() {
53: return name;
54: }
55: }
|