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

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

public final class ExampleImport
extends Object

Contains all Elements for an import of examples.

Rating red

Method Summary
static List<String> importExamples(IPath selectedResource, List<Example> selectedExamples, boolean checkDuplicate)
          This method contains all functions to import an example.
static InputStream loadOverviewPic(Example example)
          Loads the preview pic of an example.
static InputStream loadStandardPic()
          loads the standard picture of an example.
static void validate(IPath selectedResource, List<Example> selectedExamples, boolean checkDuplicate)
          validates the selected examples.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

importExamples

public static List<String> importExamples(IPath selectedResource,
                                          List<Example> selectedExamples,
                                          boolean checkDuplicate)
                                   throws KielerException
This method contains all functions to import an example.

Parameters:
selectedResource - , destination resource of type IPath.
selectedExamples - , List of Examples.
Returns:
directopens, List of String.
Throws:
KielerException - , will throw if any error occurs.

loadOverviewPic

public static InputStream loadOverviewPic(Example example)
                                   throws KielerException
Loads the preview pic of an example.

Parameters:
example - , Example
Returns:
InputStream
Throws:
KielerException - , if anything goes wrong.

loadStandardPic

public static InputStream loadStandardPic()
loads the standard picture of an example.

Returns:
InputStream

validate

public static void validate(IPath selectedResource,
                            List<Example> selectedExamples,
                            boolean checkDuplicate)
                     throws KielerException
validates the selected examples.

Parameters:
selectedResource - , IPath
selectedExamples - , List of Example
checkDuplicate - , boolean
Throws:
KielerException - , if any error occurs.