Package org.onosproject.ui
Class UiExtension.Builder
- java.lang.Object
-
- org.onosproject.ui.UiExtension.Builder
-
- Enclosing class:
- UiExtension
public static class UiExtension.Builder extends java.lang.ObjectUI Extension Builder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UiExtensionbuild()Builds the user interface extension.UiExtension.BuilderlionBundles(java.util.List<LionBundle> bundles)Sets the localization bundles (akaLionBundles) that this UI extension is contributing.UiExtension.BuildermessageHandlerFactory(UiMessageHandlerFactory mhFactory)Sets the message handler factory for this extension.UiExtension.BuilderresourcePath(java.lang.String path)Set the resource path.UiExtension.Buildertopo2OverlayFactory(UiTopo2OverlayFactory to2Factory)Sets the topology-2 overlay factory for this extension.UiExtension.BuildertopoMapFactory(UiTopoMapFactory tmFactory)Sets the topology map factory for this extension.UiExtension.BuildertopoOverlayFactory(UiTopoOverlayFactory toFactory)Sets the topology overlay factory for this extension.UiExtension.Builderui2()Marks this as ui2valid for Ui2.
-
-
-
Constructor Detail
-
Builder
public Builder(java.lang.ClassLoader cl, java.util.List<UiView> views)Create a builder with the given class loader. Resource path defaults to "". Views defaults to an empty list. MessageHandler, TopoOverlay, and TopoMap factories default to null.- Parameters:
cl- the class loaderviews- list of views contributed by this extension
-
-
Method Detail
-
lionBundles
public UiExtension.Builder lionBundles(java.util.List<LionBundle> bundles)
Sets the localization bundles (akaLionBundles) that this UI extension is contributing.- Parameters:
bundles- the bundles to register- Returns:
- self, for chaining
-
resourcePath
public UiExtension.Builder resourcePath(java.lang.String path)
Set the resource path. That is, the path to where the CSS and JS files are located.- Parameters:
path- resource path- Returns:
- self, for chaining
-
messageHandlerFactory
public UiExtension.Builder messageHandlerFactory(UiMessageHandlerFactory mhFactory)
Sets the message handler factory for this extension.- Parameters:
mhFactory- message handler factory- Returns:
- self, for chaining
-
topoOverlayFactory
public UiExtension.Builder topoOverlayFactory(UiTopoOverlayFactory toFactory)
Sets the topology overlay factory for this extension.- Parameters:
toFactory- topology overlay factory- Returns:
- self, for chaining
-
topo2OverlayFactory
public UiExtension.Builder topo2OverlayFactory(UiTopo2OverlayFactory to2Factory)
Sets the topology-2 overlay factory for this extension.- Parameters:
to2Factory- topology-2 overlay factory- Returns:
- self, for chaining
-
topoMapFactory
public UiExtension.Builder topoMapFactory(UiTopoMapFactory tmFactory)
Sets the topology map factory for this extension.- Parameters:
tmFactory- topology map factory- Returns:
- self, for chaining
-
ui2
public UiExtension.Builder ui2()
Marks this as ui2valid for Ui2. This is because Ui2 does not include the same layout of embedded html, js and css- Returns:
- self, for chaining
-
build
public UiExtension build()
Builds the user interface extension.- Returns:
- UI extension instance
-
-