Class WidgetProvider

    • Constructor Detail

      • WidgetProvider

        protected WidgetProvider()
    • Method Detail

      • getWidgetClassDefinition

        public org.codehaus.jettison.json.JSONObject getWidgetClassDefinition()
      • addDefaultWidgetProperties

        protected void addDefaultWidgetProperties​(org.codehaus.jettison.json.JSONObject jsonObject,
                                                  WidgetInstance widgetInstance)
                                           throws org.codehaus.jettison.json.JSONException
      • getClientSideWidgetClassName

        public String getClientSideWidgetClassName()
      • generate

        public String generate()
        As a default will generate javascript which extends the OBShowParameterWidget widget.
      • getWidgetInstanceDefinition

        public org.codehaus.jettison.json.JSONObject getWidgetInstanceDefinition​(WidgetInstance widgetInstance)
      • setParameters

        public void setParameters​(Map<String,​Object> parameters)
      • setWidgetClass

        public void setWidgetClass​(WidgetClass widgetClass)
      • validate

        public boolean validate()
        Override this method to make validations on widget classes. If this method returns false the widget class won't be available for users to add new instances.
        true if the widget class definition is valid.