public class TopLevelModelAccessor
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TopLevelModelAccessor.AbstractDefaultModelAccessor<M extends IModel>
Implements the register methods empty.
|
static class |
TopLevelModelAccessor.AbstractModelAccessor<M extends IModel>
Basic implementation of
TopLevelModelAccessor.IModelAccessor performing model loader registration and location registration. |
static interface |
TopLevelModelAccessor.IModelAccessor<M extends IModel>
Defines the interface for the model accessor.
|
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.String,TopLevelModelAccessor.IModelAccessor<?>> |
ACCESSORS |
| Modifier | Constructor and Description |
|---|---|
private |
TopLevelModelAccessor()
Prevents external instantiation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLocation(java.io.File location,
ProgressObserver observer,
boolean failOnFirst)
Called to add a model location (optional).
|
static TopLevelModelAccessor.IModelAccessor<?> |
getAccessor(java.lang.String extension)
Returns the registered accessor for
extension. |
static int |
getRegisteredCount()
Returns the number of registered accessors.
|
static ModelInfo<?> |
getTopLevelModel(java.lang.String extension,
java.lang.String projectName,
java.lang.Object project)
Returns the top-level model info through a registered accessor for
extension. |
static void |
register(java.lang.String extension,
TopLevelModelAccessor.IModelAccessor<?> accessor)
Registers an accessor via the model file extension / id.
|
static java.lang.Iterable<TopLevelModelAccessor.IModelAccessor<?>> |
registered()
Returns the registered accessors.
|
static void |
registerLoader(ProgressObserver observer,
boolean failOnFirst)
Called to register the model loader (optional).
|
void |
removeLocation(java.io.File location,
ProgressObserver observer,
boolean failOnFirst)
Called to remove a model location (optional).
|
static void |
unregister(java.lang.String extension)
Removes a registered accessor.
|
void |
unregisterLoader(ProgressObserver observer,
boolean failOnFirst)
Called to unregister the model loader (optional).
|
private static final java.util.Map<java.lang.String,TopLevelModelAccessor.IModelAccessor<?>> ACCESSORS
private TopLevelModelAccessor()
public static void register(java.lang.String extension,
TopLevelModelAccessor.IModelAccessor<?> accessor)
extension - the model extensionaccessor - the model accessorpublic static void unregister(java.lang.String extension)
extension - the model extension / idpublic static java.lang.Iterable<TopLevelModelAccessor.IModelAccessor<?>> registered()
public static int getRegisteredCount()
public static TopLevelModelAccessor.IModelAccessor<?> getAccessor(java.lang.String extension)
extension.extension - the model extension / idpublic static ModelInfo<?> getTopLevelModel(java.lang.String extension, java.lang.String projectName, java.lang.Object project)
extension.extension - the model extension / idproject - an optional instance to access the top level model from some EASy instanceprojectName - the name of the containing project (EASy convention)public static void registerLoader(ProgressObserver observer, boolean failOnFirst) throws ModelManagementException
observer - the progress observerfailOnFirst - if true, bulk stops on first exception thrown and that exception is also thrown
by this method, if false try all bulk operations and throw only the first exception occurredModelManagementException - in case of failurespublic void unregisterLoader(ProgressObserver observer, boolean failOnFirst) throws ModelManagementException
observer - the progress observerfailOnFirst - if true, bulk stops on first exception thrown and that exception is also thrown
by this method, if false try all bulk operations and throw only the first exception occurredModelManagementException - in case of failurespublic void addLocation(java.io.File location,
ProgressObserver observer,
boolean failOnFirst)
throws ModelManagementException
location - the locationobserver - the progress observerfailOnFirst - if true, bulk stops on first exception thrown and that exception is also thrown
by this method, if false try all bulk operations and throw only the first exception occurredModelManagementException - in case of failurespublic void removeLocation(java.io.File location,
ProgressObserver observer,
boolean failOnFirst)
throws ModelManagementException
location - the locationobserver - the progress observerfailOnFirst - if true, bulk stops on first exception thrown and that exception is also thrown
by this method, if false try all bulk operations and throw only the first exception occurredModelManagementException - in case of failuresCopyright © 2009 - 2018 SSE. All Rights Reserved.