de.cau.cs.kieler.kex.controller.util
Class ExampleExport

java.lang.Object
  extended by de.cau.cs.kieler.kex.controller.util.ExampleExport

public final class ExampleExport
extends Object

A collection of example export functions.

Rating red

Method Summary
static void checkDuplicate(String exampleTitle, ExampleCollector... collectors)
          checks the collectors for given exampleTitle.
static void exportInPlugin(Map<ExampleElement,Object> properties, PluginExampleCreator extensionCreator)
          extends a plugin with a new example.
static Example mapToExample(Map<ExampleElement,Object> properties)
          mapping of properties onto an example.
static void validate(Map<ExampleElement,Object> map, ExampleCollector... collectors)
          Method for validating given map elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

validate

public static void validate(Map<ExampleElement,Object> map,
                            ExampleCollector... collectors)
                     throws KielerException
Method for validating given map elements. This contains minimumlengths- and duplicate-checks.

Parameters:
map - , Map of ExampleElement and an arbitrary Object.
collectors - , ExampleCollectors
Throws:
KielerException - , if any check fail a KielerException will throw.

checkDuplicate

public static void checkDuplicate(String exampleTitle,
                                  ExampleCollector... collectors)
                           throws KielerException
checks the collectors for given exampleTitle. If exists, a KielerException will thrown.

Parameters:
exampleTitle - , String
collectors - , ExampleCollector...
Throws:
KielerException - , throws if duplicate found.

exportInPlugin

public static void exportInPlugin(Map<ExampleElement,Object> properties,
                                  PluginExampleCreator extensionCreator)
                           throws KielerException
extends a plugin with a new example.

Parameters:
properties - , Map with ExampleElement as key and an Object as value.
extensionCreator - , PluginExampleCreator
Throws:
KielerException - , will be caused if some errors occurs.

mapToExample

public static Example mapToExample(Map<ExampleElement,Object> properties)
mapping of properties onto an example.

Parameters:
properties - , Map
rootResource -
Returns:
Example