Class PrefabInstallerImpl
- java.lang.Object
-
- com.wavemaker.runtime.prefab.impl.PrefabInstallerImpl
-
- All Implemented Interfaces:
PrefabInstaller,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.web.context.ServletContextAware
@Service public class PrefabInstallerImpl extends java.lang.Object implements PrefabInstaller, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware
Default implementation ofPrefabInstaller. Hooks to theApplicationContextof the prefab servlet for installing/uninstalling the beans of thePrefab. Uses Spring event handling to communicate prefab state changes.
-
-
Constructor Summary
Constructors Constructor Description PrefabInstallerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrefabManagergetPrefabManager()PrefabRegistrygetPrefabRegistry()voidinstallPrefab(Prefab prefab)Installs the givenPrefabby adding to the context of the prefab servlet.voidinstallPrefabs()(Re)installs all available prefabs.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetPrefabManager(PrefabManager prefabManager)Sets thePrefabManagerfor reading the prefabs.voidsetPrefabRegistry(PrefabRegistry prefabRegistry)Sets thePrefabRegistryvoidsetServletContext(javax.servlet.ServletContext servletContext)voiduninstallPrefabs()Uninstalls all prefabs.
-
-
-
Method Detail
-
installPrefab
public void installPrefab(Prefab prefab)
Description copied from interface:PrefabInstallerInstalls the givenPrefabby adding to the context of the prefab servlet.- Specified by:
installPrefabin interfacePrefabInstaller- Parameters:
prefab-Prefabto be installed
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
setServletContext
public void setServletContext(javax.servlet.ServletContext servletContext)
- Specified by:
setServletContextin interfaceorg.springframework.web.context.ServletContextAware
-
setPrefabManager
public void setPrefabManager(PrefabManager prefabManager)
Sets thePrefabManagerfor reading the prefabs.
-
setPrefabRegistry
public void setPrefabRegistry(PrefabRegistry prefabRegistry)
Sets thePrefabRegistry
-
getPrefabManager
public PrefabManager getPrefabManager()
- Returns:
- the prefabManager
-
getPrefabRegistry
public PrefabRegistry getPrefabRegistry()
- Returns:
- the prefabRegistry
-
installPrefabs
public void installPrefabs()
(Re)installs all available prefabs.- Specified by:
installPrefabsin interfacePrefabInstaller
-
uninstallPrefabs
public void uninstallPrefabs()
Uninstalls all prefabs.- Specified by:
uninstallPrefabsin interfacePrefabInstaller
-
-