Class ModelWidget

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String enableBoundaryCommentsParam
      The parameter name used to control widget boundary comments.
      static java.lang.String module  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ModelWidget​(java.lang.String name)
      Derived classes must call this constructor.
      protected ModelWidget​(org.w3c.dom.Element widgetElement)
      Derived classes must call this constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void accept​(ModelWidgetVisitor visitor)  
      java.lang.String getBoundaryCommentName()
      Returns the widget's name to be used in boundary comments.
      java.lang.String getName()
      Returns the widget's name.
      int getStartColumn()
      Returns the column where this widget was defined, in it's containing xml file.
      int getStartLine()
      Returns the line where this widget was defined, in it's containing xml file.
      java.lang.String getSystemId()
      Returns the url as a string, from where this widget was defined.
      java.lang.String toString()  
      static boolean widgetBoundaryCommentsEnabled​(java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Returns true if widget boundary comments are enabled.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
      • enableBoundaryCommentsParam

        public static final java.lang.String enableBoundaryCommentsParam
        The parameter name used to control widget boundary comments. Currently set to "widgetVerbose".
        See Also:
        Constant Field Values
    • Constructor Detail

      • ModelWidget

        protected ModelWidget​(java.lang.String name)
        Derived classes must call this constructor.
        Parameters:
        name - The widget name
      • ModelWidget

        protected ModelWidget​(org.w3c.dom.Element widgetElement)
        Derived classes must call this constructor.
        Parameters:
        widgetElement - The XML Element for the widget
    • Method Detail

      • accept

        public abstract void accept​(ModelWidgetVisitor visitor)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getName

        public java.lang.String getName()
        Returns the widget's name.
        Returns:
        Widget's name
      • getSystemId

        public java.lang.String getSystemId()
        Returns the url as a string, from where this widget was defined.
        Returns:
        url
      • getStartColumn

        public int getStartColumn()
        Returns the column where this widget was defined, in it's containing xml file.
        Returns:
        start column
      • getStartLine

        public int getStartLine()
        Returns the line where this widget was defined, in it's containing xml file.
        Returns:
        start line
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getBoundaryCommentName

        public java.lang.String getBoundaryCommentName()
        Returns the widget's name to be used in boundary comments. The default action is to return the widget's name. Derived classes can override this method to return a customized name.
        Returns:
        Name to be used in boundary comments
      • widgetBoundaryCommentsEnabled

        public static boolean widgetBoundaryCommentsEnabled​(java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Returns true if widget boundary comments are enabled. Widget boundary comments are enabled by setting widget.verbose=true in the widget.properties file. The true setting can be overridden in web.xml or in the screen rendering context. If widget.verbose is set to false in the widget.properties file, then that setting will override all other settings and disable all widget boundary comments.
        Parameters:
        context - Optional context Map