|
||||||||||
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<Category> |
getCategories()
Creates a resultlist with categories of collectors. |
InputStream |
getEmptyPic()
Loads a default picture. |
Example |
getExample(SourceType type,
String exampleId)
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> |
importExample(IPath destination,
Example example,
boolean checkDuplicate)
Validates the import and imports the given example. |
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. |
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)
forceLoad
- , set this parameter to force loading of examplespublic Example getExample(SourceType type, String exampleId)
type
- , SourceType
exampleId
- , String
Example
public Map<String,Example> getExamples()
Map
with String
as key and Example
as value.public List<Category> getCategories()
List
of String
.public List<String> importExamples(IPath selectedResource, List<Example> selectedExamples, boolean checkDuplicate) throws Exception
ExampleImport
to import examples.
selectedResource
- , IPath
selectedExamples
- , List
of Example
checkDuplicate
- , boolean
List
of String
Exception
- if anything goes wrong.public List<String> importExample(IPath destination, Example example, boolean checkDuplicate) throws Exception
destination
- path to import the example to.example
- the example to import.checkDuplicate
- whether to check for import duplicates or not.
Exception
- if anything goes wrong.public void export(Map<ExampleElement,Object> properties)
properties
- , Map
with ExampleElement
as key and Object
as value.public InputStream getEmptyPic()
InputStream
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 |