Class BundleListConlet
java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jgrapes.webconsole.base.AbstractConlet<BundleListConlet.BundleListModel>
org.jgrapes.webconsole.base.freemarker.FreeMarkerConlet<BundleListConlet.BundleListModel>
org.jgrapes.osgi.webconlet.bundles.BundleListConlet
- All Implemented Interfaces:
Iterable<ComponentType>
,EventListener
,Channel
,ComponentType
,Eligible
,Manager
,BundleListener
public class BundleListConlet
extends org.jgrapes.webconsole.base.freemarker.FreeMarkerConlet<BundleListConlet.BundleListModel>
implements BundleListener
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Wraps an OSGiBundleEvent
.class
The bundle’s model.Nested classes/interfaces inherited from class org.jgrapes.webconsole.base.AbstractConlet
org.jgrapes.webconsole.base.AbstractConlet.ConletTrackingInfo
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default
-
Field Summary
Fields inherited from class org.jgrapes.webconsole.base.AbstractConlet
TYPE_INSTANCE_SEPARATOR
-
Constructor Summary
ConstructorDescriptionBundleListConlet
(Channel componentChannel, BundleContext context, Map<?, ?> properties) Creates a new component with its channel set to the given channel. -
Method Summary
Modifier and TypeMethodDescriptionvoid
bundleChanged
(BundleEvent event) Translates the OSGiBundleEvent
to a JGrapes event and fires it on all known console session channels.protected Optional
<BundleListConlet.BundleListModel> createNewState
(org.jgrapes.webconsole.base.events.AddConletRequest event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId) protected Set
<org.jgrapes.webconsole.base.Conlet.RenderMode> doRenderConlet
(org.jgrapes.webconsole.base.events.RenderConletRequestBase<?> event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId, BundleListConlet.BundleListModel conletModel) protected boolean
doSetLocale
(org.jgrapes.webconsole.base.events.SetLocale event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId) protected void
doUpdateConletState
(org.jgrapes.webconsole.base.events.NotifyConletModel event, org.jgrapes.webconsole.base.ConsoleConnection channel, BundleListConlet.BundleListModel conletState) void
onBundleChanged
(BundleListConlet.BundleChanged event, org.jgrapes.webconsole.base.ConsoleConnection channel) Handles aBundleListConlet.BundleChanged
event by updating the information in the console sessions.void
onConsoleReady
(org.jgrapes.webconsole.base.events.ConsoleReady event, org.jgrapes.webconsole.base.ConsoleConnection channel) OnConsoleReady
, fire theAddConletType
.Methods inherited from class org.jgrapes.webconsole.base.freemarker.FreeMarkerConlet
doGetResource, fmConletModel, fmModel, fmModel, fmSessionModel, fmTypeModel, freemarkerConfig, processTemplate, processTemplate
Methods inherited from class org.jgrapes.webconsole.base.AbstractConlet
afterOnClosed, conletIds, conletIdsByConsoleConnection, conletViews, createStateRepresentation, doConletDeleted, doRemoveConletType, generateInstanceId, l10nBundles, localizations, onAddConletRequest, onClosed, onConletDeleted, onConletResourceRequest, onDetached, onNotifyConletModel, onRenderConletRequest, onSetLocale, putInSession, readContent, readContent, recreateState, removeState, resourceBundle, setPeriodicRefresh, stateFromSession, statesFromSession, supportedLocales, trackConlet, trackedConnections, type, typeFromId
Methods inherited from class org.jgrapes.core.Component
channel, component, defaultCriterion, isEligibleFor, setName
Methods inherited from class org.jgrapes.core.internal.ComponentVertex
activeEventPipeline, addHandler, attach, channelReplacements, children, componentPath, componentVertex, detach, fire, initComponentsHandlers, iterator, name, newEventPipeline, newEventPipeline, parent, registerAsGenerator, root, toString, unregisterAsGenerator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
BundleListConlet
Creates a new component with its channel set to the given channel.- Parameters:
componentChannel
- the channel that the component’s handlers listen on by default and thatManager.fire(Event, Channel...)
sends the event to
-
-
Method Details
-
onConsoleReady
@Handler public void onConsoleReady(org.jgrapes.webconsole.base.events.ConsoleReady event, org.jgrapes.webconsole.base.ConsoleConnection channel) throws freemarker.template.TemplateNotFoundException, freemarker.template.MalformedTemplateNameException, freemarker.core.ParseException, IOException OnConsoleReady
, fire theAddConletType
.- Parameters:
event
- the eventchannel
- the channel- Throws:
freemarker.template.TemplateNotFoundException
- the template not found exceptionfreemarker.template.MalformedTemplateNameException
- the malformed template name exceptionfreemarker.core.ParseException
- the parse exceptionIOException
- Signals that an I/O exception has occurred.
-
createNewState
protected Optional<BundleListConlet.BundleListModel> createNewState(org.jgrapes.webconsole.base.events.AddConletRequest event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId) throws Exception - Overrides:
createNewState
in classorg.jgrapes.webconsole.base.AbstractConlet<BundleListConlet.BundleListModel>
- Throws:
Exception
-
doRenderConlet
protected Set<org.jgrapes.webconsole.base.Conlet.RenderMode> doRenderConlet(org.jgrapes.webconsole.base.events.RenderConletRequestBase<?> event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId, BundleListConlet.BundleListModel conletModel) throws Exception - Specified by:
doRenderConlet
in classorg.jgrapes.webconsole.base.AbstractConlet<BundleListConlet.BundleListModel>
- Throws:
Exception
-
doUpdateConletState
protected void doUpdateConletState(org.jgrapes.webconsole.base.events.NotifyConletModel event, org.jgrapes.webconsole.base.ConsoleConnection channel, BundleListConlet.BundleListModel conletState) throws Exception - Overrides:
doUpdateConletState
in classorg.jgrapes.webconsole.base.AbstractConlet<BundleListConlet.BundleListModel>
- Throws:
Exception
-
bundleChanged
Translates the OSGiBundleEvent
to a JGrapes event and fires it on all known console session channels.- Specified by:
bundleChanged
in interfaceBundleListener
- Parameters:
event
- the event
-
onBundleChanged
@Handler public void onBundleChanged(BundleListConlet.BundleChanged event, org.jgrapes.webconsole.base.ConsoleConnection channel) Handles aBundleListConlet.BundleChanged
event by updating the information in the console sessions.- Parameters:
event
- the event
-
doSetLocale
protected boolean doSetLocale(org.jgrapes.webconsole.base.events.SetLocale event, org.jgrapes.webconsole.base.ConsoleConnection channel, String conletId) throws Exception - Overrides:
doSetLocale
in classorg.jgrapes.webconsole.base.AbstractConlet<BundleListConlet.BundleListModel>
- Throws:
Exception
-