Class RuntimeModelRegistryImpl
- java.lang.Object
-
- org.dashbuilder.backend.services.impl.RuntimeModelRegistryImpl
-
- All Implemented Interfaces:
RuntimeModelRegistry
@ApplicationScoped public class RuntimeModelRegistryImpl extends Object implements RuntimeModelRegistry
-
-
Constructor Summary
Constructors Constructor Description RuntimeModelRegistryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>availableModels()List all models that are currently available.voidclear()Remove all registered models.Optional<RuntimeModel>get(String id)Get a previously registered import model.DashbuilderRuntimeModegetMode()Returns the registry modevoidinit()voidinternalRemove(String modelId, boolean deleteFile)booleanisEmpty()Returns if this registry has at least one model.Optional<RuntimeModel>register(String id, InputStream fileStream)Optional<RuntimeModel>registerFile(String fileName)Store the import from a File path;voidremove(String modelId)Removes a runtime model.voidsetMode(DashbuilderRuntimeMode mode)Sets this runtime mode.Optional<RuntimeModel>single()Returns the first model available.voidunregister(String id)Unregister a model from memory-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dashbuilder.shared.service.RuntimeModelRegistry
acceptingNewImports
-
-
-
-
Method Detail
-
init
@PostConstruct public void init()
-
single
public Optional<RuntimeModel> single()
Description copied from interface:RuntimeModelRegistryReturns the first model available.- Specified by:
singlein interfaceRuntimeModelRegistry- Returns:
-
get
public Optional<RuntimeModel> get(String id)
Description copied from interface:RuntimeModelRegistryGet a previously registered import model.- Specified by:
getin interfaceRuntimeModelRegistry- Returns:
-
registerFile
public Optional<RuntimeModel> registerFile(String fileName)
Description copied from interface:RuntimeModelRegistryStore the import from a File path;- Specified by:
registerFilein interfaceRuntimeModelRegistry- Parameters:
fileName- The path to the file.
-
setMode
public void setMode(DashbuilderRuntimeMode mode)
Description copied from interface:RuntimeModelRegistrySets this runtime mode.- Specified by:
setModein interfaceRuntimeModelRegistry- Parameters:
mode- The mode to be used.
-
isEmpty
public boolean isEmpty()
Description copied from interface:RuntimeModelRegistryReturns if this registry has at least one model.- Specified by:
isEmptyin interfaceRuntimeModelRegistry- Returns:
-
getMode
public DashbuilderRuntimeMode getMode()
Description copied from interface:RuntimeModelRegistryReturns the registry mode- Specified by:
getModein interfaceRuntimeModelRegistry- Returns:
-
remove
public void remove(String modelId)
Description copied from interface:RuntimeModelRegistryRemoves a runtime model.- Specified by:
removein interfaceRuntimeModelRegistry- Parameters:
modelId- The id of the runtime model to be removed.
-
register
public Optional<RuntimeModel> register(String id, InputStream fileStream)
-
availableModels
public Collection<String> availableModels()
Description copied from interface:RuntimeModelRegistryList all models that are currently available.- Specified by:
availableModelsin interfaceRuntimeModelRegistry
-
clear
public void clear()
Description copied from interface:RuntimeModelRegistryRemove all registered models.- Specified by:
clearin interfaceRuntimeModelRegistry
-
unregister
public void unregister(String id)
Description copied from interface:RuntimeModelRegistryUnregister a model from memory- Specified by:
unregisterin interfaceRuntimeModelRegistry- Parameters:
id- The id of the runtime model to be unregistered.
-
internalRemove
public void internalRemove(String modelId, boolean deleteFile)
-
-