Class Registration
- java.lang.Object
-
- net.ssehub.easy.instantiation.serializer.xml.Registration
-
- All Implemented Interfaces:
ModelInitializer.IModelInitializer,IRegistration
public class Registration extends java.lang.Object implements IRegistration, ModelInitializer.IModelInitializer
Registers the serialization additions to VIL.- Author:
- Aike Sass
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanregistered
-
Constructor Summary
Constructors Constructor Description Registration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidactivate(org.osgi.service.component.ComponentContext context)Private method to activate plugin.voidaddLocation(java.io.File location, ProgressObserver observer)Adds a model location to the end of the list of existing locations.voidaddLocationToFront(java.io.File location, ProgressObserver observer)Adds a model location to the beginning of the list of existing locations.protected voiddeactivate(org.osgi.service.component.ComponentContext context)Private method to to de-activate plugin.static voidregister()Registers the model serialization and instantiators.voidregisterLoader(ProgressObserver observer)Registers the default model loader instance.voidremoveLocation(java.io.File location, ProgressObserver observer)Adds a model location.voidunregisterLoader(ProgressObserver observer)Unregisters the default model loader.
-
-
-
Method Detail
-
register
public static final void register()
Registers the model serialization and instantiators.
-
activate
protected void activate(org.osgi.service.component.ComponentContext context)
Private method to activate plugin.- Parameters:
context- Context.
-
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext context)
Private method to to de-activate plugin.- Parameters:
context- Context.
-
addLocation
public void addLocation(java.io.File location, ProgressObserver observer) throws ModelManagementExceptionDescription copied from interface:ModelInitializer.IModelInitializerAdds a model location to the end of the list of existing locations.- Specified by:
addLocationin interfaceModelInitializer.IModelInitializer- Parameters:
location- the model location. Basically, this is a folder but for serializers, this may be a file.observer- the progress observer- Throws:
ModelManagementException- in case of problems registering the location
-
addLocationToFront
public void addLocationToFront(java.io.File location, ProgressObserver observer) throws ModelManagementExceptionDescription copied from interface:ModelInitializer.IModelInitializerAdds a model location to the beginning of the list of existing locations.- Specified by:
addLocationToFrontin interfaceModelInitializer.IModelInitializer- Parameters:
location- the model location. Basically, this is a folder but for serializers, this may be a file.observer- the progress observer- Throws:
ModelManagementException- in case of problems registering the location
-
removeLocation
public void removeLocation(java.io.File location, ProgressObserver observer) throws ModelManagementExceptionDescription copied from interface:ModelInitializer.IModelInitializerAdds a model location.- Specified by:
removeLocationin interfaceModelInitializer.IModelInitializer- Parameters:
location- the model location. Basically, this is a folder but for serializers, this may be a file.observer- the progress observer- Throws:
ModelManagementException- in case of problems registering the location
-
registerLoader
public void registerLoader(ProgressObserver observer) throws ModelManagementException
Description copied from interface:ModelInitializer.IModelInitializerRegisters the default model loader instance.- Specified by:
registerLoaderin interfaceModelInitializer.IModelInitializer- Parameters:
observer- the progress observer- Throws:
ModelManagementException- in case of problems registering the location
-
unregisterLoader
public void unregisterLoader(ProgressObserver observer) throws ModelManagementException
Description copied from interface:ModelInitializer.IModelInitializerUnregisters the default model loader.- Specified by:
unregisterLoaderin interfaceModelInitializer.IModelInitializer- Parameters:
observer- the progress observer- Throws:
ModelManagementException- in case of problems registering the location
-
-