org.drools.lang.dsl
Class DefaultDSLMapping

java.lang.Object
  extended by org.drools.lang.dsl.DefaultDSLMapping
All Implemented Interfaces:
DSLMapping

public class DefaultDSLMapping
extends Object
implements DSLMapping

This is a default implementation of the DSL Mapping interface capable of storing a list of DSLMappingEntries and managing it.


Constructor Summary
DefaultDSLMapping()
           
DefaultDSLMapping(String identifier)
           
 
Method Summary
 void addEntries(List<DSLMappingEntry> entries)
          Adds all entries in the given list to this DSL Mapping
 void addEntry(DSLMappingEntry entry)
          Add one entry to the list of the entries
 String getDescription()
          Returns a String description of this mapping
 List<DSLMappingEntry> getEntries()
          Returns an unmodifiable list of entries
 List<DSLMappingEntry> getEntries(DSLMappingEntry.Section section)
          Returns the list of mappings for the given section
 String getIdentifier()
          Returns the identifier for this mapping
 boolean getOption(String option)
          Retrieves an an expansion option.
 void removeEntry(DSLMappingEntry entry)
          Removes the given entry from the list of entries
 void setDescription(String description)
          Sets the description for this mapping
 void setIdentifier(String identifier)
          Sets the identifier for this mapping
 void setOptions(Collection<String> option)
          Sets an expansion option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDSLMapping

public DefaultDSLMapping()

DefaultDSLMapping

public DefaultDSLMapping(String identifier)
Method Detail

addEntry

public void addEntry(DSLMappingEntry entry)
Add one entry to the list of the entries

Specified by:
addEntry in interface DSLMapping
Parameters:
entry -

addEntries

public void addEntries(List<DSLMappingEntry> entries)
Adds all entries in the given list to this DSL Mapping

Specified by:
addEntries in interface DSLMapping
Parameters:
entries -

getEntries

public List<DSLMappingEntry> getEntries()
Returns an unmodifiable list of entries

Specified by:
getEntries in interface DSLMapping
Returns:

getEntries

public List<DSLMappingEntry> getEntries(DSLMappingEntry.Section section)
Returns the list of mappings for the given section

Specified by:
getEntries in interface DSLMapping
Parameters:
section -
Returns:

getIdentifier

public String getIdentifier()
Returns the identifier for this mapping

Specified by:
getIdentifier in interface DSLMapping
Returns:

removeEntry

public void removeEntry(DSLMappingEntry entry)
Description copied from interface: DSLMapping
Removes the given entry from the list of entries

Specified by:
removeEntry in interface DSLMapping

getDescription

public String getDescription()
Description copied from interface: DSLMapping
Returns a String description of this mapping

Specified by:
getDescription in interface DSLMapping
Returns:

setDescription

public void setDescription(String description)
Description copied from interface: DSLMapping
Sets the description for this mapping

Specified by:
setDescription in interface DSLMapping

setIdentifier

public void setIdentifier(String identifier)
Description copied from interface: DSLMapping
Sets the identifier for this mapping

Specified by:
setIdentifier in interface DSLMapping

setOptions

public void setOptions(Collection<String> option)
Description copied from interface: DSLMapping
Sets an expansion option.

Specified by:
setOptions in interface DSLMapping

getOption

public boolean getOption(String option)
Description copied from interface: DSLMapping
Retrieves an an expansion option.

Specified by:
getOption in interface DSLMapping
Returns:
true if option is set.


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.