01: /*
02: * Copyright 2006 JBoss Inc
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.drools.lang.dsl;
18:
19: import java.util.List;
20:
21: import org.drools.lang.dsl.DSLMappingEntry.Section;
22:
23: /**
24: * An interface that represents a DSL Mapping
25: *
26: * @author etirelli
27: */
28: public interface DSLMapping {
29:
30: /**
31: * Returns the string identifier for this mapping
32: * @return
33: */
34: public String getIdentifier();
35:
36: /**
37: * Sets the identifier for this mapping
38: * @param identifier
39: */
40: public void setIdentifier(String identifier);
41:
42: /**
43: * Returns a String description of this mapping
44: * @return
45: */
46: public String getDescription();
47:
48: /**
49: * Sets the description for this mapping
50: * @param description
51: */
52: public void setDescription(String description);
53:
54: /**
55: * Returns the list of entries in this mapping
56: * @return
57: */
58: public List getEntries();
59:
60: /**
61: * Add one entry to the list of the entries
62: * @param entry
63: */
64: public void addEntry(DSLMappingEntry entry);
65:
66: /**
67: * Adds all entries in the given list to this DSL Mapping
68: * @param entries
69: */
70: public void addEntries(List entries);
71:
72: /**
73: * Removes the given entry from the list of entries
74: * @param entry
75: */
76: public void removeEntry(DSLMappingEntry entry);
77:
78: /**
79: * Returns the list of mappings for the given section
80: * @param section
81: * @return
82: */
83: public List getEntries(Section section);
84:
85: }
|