|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kex.controller.ExampleManager
public final class ExampleManager
This class manages the import and export in kex. It represents the bridge from kex.ui to kex code.
Method Summary | |
---|---|
void |
export(Map<ExampleElement,Object> properties)
Exports a given example. |
void |
generateProject(IPath resourcePath)
Checks if an project is accessible. |
static ExampleManager |
get()
Singleton call of ExampleManager . |
List<String> |
getCategories()
Creates a resultlist with categories of collectors. |
Example |
getExample(SourceType type,
String exampleTitle)
searches the examplepool of a source for a special example. |
Map<String,Example> |
getExamples()
Adds all examples of a the collectors to the result map. |
List<String> |
importExamples(IPath selectedResource,
List<Example> selectedExamples,
boolean checkDuplicate)
This method calls an validate and uses the ExampleImport to import examples. |
void |
load(boolean forceLoad)
Loads examples, if not loaded before. |
InputStream |
loadOverviewPic(Example example)
Loads the preview picture. |
InputStream |
loadStandardPic()
Loads the standard picture. |
List<String> |
quickStartImport(Example quickStarter)
Imports a quickstart example. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ExampleManager get()
ExampleManager
.
ExampleManager
public void load(boolean forceLoad) throws KielerException
forceLoad
- , set this parameter to force loading of examples
KielerException
- , can be thrown by load()
.public Example getExample(SourceType type, String exampleTitle) throws KielerException
type
- , SourceType
exampleTitle
- , String
Example
KielerException
- , can be thrown by PluginExampleCollector
.getExample(...)
and if the example found example is null.public Map<String,Example> getExamples()
Map
with String
as key and Example
as value.public List<String> getCategories()
List
of String
.public List<String> importExamples(IPath selectedResource, List<Example> selectedExamples, boolean checkDuplicate) throws KielerException
ExampleImport
to import examples.
selectedResource
- , IPath
selectedExamples
- , List
of Example
checkDuplicate
- , boolean
List
of String
KielerException
- , if ExampleImport.validate(...) or ExampleImport.importExamples(...) throws it.public void export(Map<ExampleElement,Object> properties) throws KielerException
properties
- , Map
with ExampleElement
as key and Object
as value.
KielerException
- , can be thrown at several places.public InputStream loadOverviewPic(Example example) throws KielerException
example
- , Example
InputStream
KielerException
- , if ExampleImport.loadOverviewPic(...) throws it.public InputStream loadStandardPic()
InputStream
public List<String> quickStartImport(Example quickStarter) throws KielerException
quickStarter
- , Example
KielerException
- , if anything goes wrong at ExampleImport.importExamples(...).public void generateProject(IPath resourcePath)
resourcePath
- , IPath of import location.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |