Class ExternalObject

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAUT_MIME_TYPE
      Default MIME type
    • Constructor Summary

      Constructors 
      Constructor Description
      ExternalObject()  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addChartjs()
      Add Chart.js® components
      void addExtraCSS​(java.lang.String extracss)
      Set extra CSS file
      void addExtraCSS​(java.lang.String[] extracss)
      Set extra CSS files
      void addExtraJS​(java.lang.String extrajs)
      Add extra JS file
      void addExtraJS​(java.lang.String[] extrajs)
      Add extra JS files
      void addFullCalendar​(java.lang.String lang)
      Add FullCalendar® components Needs sysparam FULLCALENDAR_VERSION = 3 or 4 (3 as default for backward compatibility)
      void addJQPlot()
      Add JQPlot® components
      void addMarkdown()
      Add Markdown components
      void addMustache()
      Add Mustache® components
      void addSharedScript​(SharedScript s)
      Add a shared code
      void addVue()
      Add Vue® components
      void appendChartjs()
      Same as addChartjs (for syntax compatibility with com.simplicite.webapp.WebPage)
      void appendCSSInclude​(java.lang.String extracss)
      Same as addExtraCSS (for syntax compatibility with com.simplicite.webapp.WebPage)
      void appendCSSIncludes​(java.lang.String[] extracss)
      Same as addExtraCSS (for syntax compatibility with com.simplicite.webapp.WebPage)
      void appendFullCalendar​(java.lang.String lang)
      Same as addFullCalendar (for syntax compatibility with com.simplicite.webapp.WebPage)
      void appendJQPlot()
      Same as addJQPlot (for syntax compatibility with com.simplicite.webapp.WebPage)
      void appendJSInclude​(java.lang.String extrajs)
      Same as addExtraJS (for syntax compatibility with com.simplicite.webapp.WebPage)
      void appendJSIncludes​(java.lang.String[] extrajs)
      Same as addExtraJS (for syntax compatibility with com.simplicite.webapp.WebPage)
      void appendMarkdown()
      Same as addMarkdown (for syntax compatibility with com.simplicite.webapp.WebPage)
      void appendMustache()
      Same as addMustache (for syntax compatibility with com.simplicite.webapp.WebPage)
      void appendVue()
      Same as addVue (for syntax compatibility with com.simplicite.webapp.WebPage)
      java.lang.Object display​(Parameters params)
      Display method
      void enableGC​(boolean enabled)
      Empty, always disabled
      java.lang.Object evalExpression​(java.lang.String expr, java.util.Map<java.lang.String,​java.lang.Object> in, java.util.Map<java.lang.String,​java.lang.Object> out)
      Prepare and evaluate an expression (see prepareExpression for details on tokens)
      boolean garbageCollection()
      Empty, external object are not managed
      boolean getBooleanParameter​(java.lang.String name, boolean def)
      Gets one boolean parameter
      java.lang.String getCacheKey​(Grant g)
      Get object unique cache key
      java.lang.String getClassName()
      Get external object class name
      Console getConsole()
      Get console
      java.lang.String getContentDisposition()
      Get content disposition
      java.util.List<java.lang.String> getCSSResources()
      Get CSS resource codes
      java.lang.String getDesc()
      Get description
      java.lang.String getDisplay()
      Get display label
      double getDoubleParameter​(java.lang.String name, double def)
      Gets one double parameter
      java.lang.String[] getExtraCSS()
      Get extra CSS files
      java.lang.String[] getExtraJS()
      Get extra JS files
      boolean getFlagParameter​(java.lang.String name)
      Gets one boolean flag parameter
      float getFloatParameter​(java.lang.String name, float def)
      Gets one float parameter
      Grant getGrant()
      Get grant
      java.lang.String getHelp()
      Get help
      java.lang.String getHTML()
      Get HTML
      java.util.List<java.lang.String> getHTMLResources()
      Get HTML resource codes
      int getHTTPStatus()
      Get HTTP status
      java.lang.String getIconCode()
      Get icon code
      java.lang.String getId()
      Get external object definition ID
      java.util.List<java.lang.String> getImageResources()
      Get images resource codes
      int getIntParameter​(java.lang.String name, int def)
      Gets one integer parameter
      java.util.List<java.lang.String> getJSResources()
      Get JavaScript resource codes
      java.lang.String getLabel()
      Get display label (alias to getDisplay)
      long getLongParameter​(java.lang.String name, long def)
      Gets one long parameter
      int getMaxAge()
      Get max age
      java.lang.String getMimeType()
      Deprecated.
      Use getMIMEType
      java.lang.String getMIMEType()
      Get MIME type
      java.lang.String getModuleId()
      Get external object module ID
      java.lang.String getModuleName()
      Get external object module name
      java.lang.String getName()
      Get name
      java.lang.Object getObjectParameter​(java.lang.String name)
      Gets one object parameter
      java.lang.String getParameter​(java.lang.String name)
      Gets a text parameter
      java.lang.String getParameter​(java.lang.String name, java.lang.String def)
      Gets a text parameter
      byte[] getResourceContent​(java.lang.String type, java.lang.String code)
      Get external object's Resource content
      java.lang.String getResourceCSSContent​(java.lang.String code)
      Get external object's CSS Resource content
      java.lang.String getResourceCSSURL​(java.lang.String code)
      Get external object's CSS Resource URL
      java.lang.String getResourceHTMLContent​(java.lang.String code)
      Get external object's HTML Resource content
      java.lang.String getResourceHTMLURL​(java.lang.String code)
      Get external object's HTML Resource URL
      java.lang.String getResourceJSContent​(java.lang.String code)
      Get external object's JS Resource content
      java.lang.String getResourceJSURL​(java.lang.String code)
      Get external object's JS Resource URL
      byte[] getResourcePDFContent​(java.lang.String code)
      Get external object's PDF Resource content
      java.lang.String getResourcePDFURL​(java.lang.String code)
      Get external object's PDF Resource URL
      java.util.List<Resource> getResources()
      Get all resources
      java.lang.String getResourceURL​(java.lang.String type, java.lang.String code)
      Get external object's Resource URL
      java.lang.String getRoot()
      Get root
      java.lang.String getScriptId()
      Get server script document ID
      java.util.List<SharedScript> getSharedScripts()
      Get all shared codes
      java.lang.String getTarget()
      Get target
      java.lang.String getURL()
      Get URL
      boolean hasDecoration()
      Has decoration ?
      boolean hasJSGlobals()
      Has JS parameters ?
      boolean hasJSParameters()
      Has JS parameters ?
      boolean hasResources()
      Has resources automatic inclusion?
      boolean hasTitle()
      Has title?
      java.lang.String invokeAction​(Action action)
      Action call without parameters
      java.lang.String invokeAction​(Action action, java.util.Map<java.lang.String,​java.lang.String> params)
      Action call with optional parameters
      java.lang.String invokeAction​(java.lang.String actionName)
      Action call without parameters
      java.lang.String invokeAction​(java.lang.String actionName, java.util.Map<java.lang.String,​java.lang.String> params)
      Action call with optional parameters * @param actionName Action name
      boolean isJavaImplemented()
      Is implemented in Java?
      boolean isPublic()
      Is running in public zone
      java.lang.String javascript​(java.lang.String js)
      Generate a JavaScript statement to be returned by the display method (alias to sendJavaScript)
      long lastUsage​(boolean update)
      Returns -1 = no internal GC
      java.lang.String prepareExpression​(java.lang.String expr)
      Prepares an expression applying following token substitutions:
      - [OBJECTID] : the current object ID
      - [OBJECT] : the current object
      - [OBJECTNAME] or [OBJNAME] : the current object name
      - [OBJECTLABEL] or [OBJLABEL] : the current object label
      - [PARAM:<parameter name>]: object parameter value
      NB: It first calls Grant.prepareExpression() for grant level token substitutions.
      java.lang.String readScript​(boolean force)
      Read server script document content (read using getScriptId())
      java.lang.String redirect​(java.lang.String url)
      Generate a redirect statement to be returned by the display method (alias to sendRedirect)
      void removeParameter​(java.lang.String name)
      Unsets a parameter
      void removeParameters​(java.lang.String prefix)
      Unsets parameters starting with prefix
      java.lang.String sendJavaScript​(java.lang.String js)
      Generate a JavaScript statement to be returned by the display method
      java.lang.String sendRedirect​(java.lang.String url)
      Generate a redirect statement to be returned by the display method
      void setClassName​(java.lang.String cls)
      Set external object class name
      void setConsole​(Console console)
      Set console
      void setContentDisposition​(java.lang.String disp, java.lang.String filename)
      Set content disposition
      void setCSVMIMEType()
      Set CSV MIME type shorthand
      void setDecoration​(boolean d)
      Set decoration
      void setDisplay​(java.lang.String d)
      Set display label
      void setGrant​(Grant g)
      Set grant
      void setHelp​(java.lang.String h)
      Set help
      void setHTML​(java.lang.String html)
      Set HTML
      void setHTMLMIMEType()
      Set HTML MIME type shorthand
      void setHTTPStatus​(int s)
      Set HTTP status
      void setIconCode​(java.lang.String i)
      Set icon code
      void setId​(java.lang.String id)
      Set external object definition ID
      void setJavaImplemented​(boolean b)
      Set implemented in Java
      void setJSGlobals​(boolean g)
      Set JS globals
      void setJSONMIMEType()
      Set JSON MIME type shorthand
      void setJSParameters​(boolean p)
      Set JS parameters
      void setLabel​(java.lang.String d)
      Set display label (alias to setDisplay)
      void setMaxAge​(int m)
      Set max age
      void setMimeType​(java.lang.String m)
      Deprecated.
      Use setMIMEType
      void setMIMEType​(java.lang.String m)
      Set MIME type
      void setModuleId​(java.lang.String id)
      Set external object module ID
      void setModuleName​(java.lang.String mdl)
      Set external object module name
      void setMSExcelMIMEType()
      Set Microsoft Excel MIME type shorthand
      void setMSPowerPointMIMEType()
      Set Microsoft PowerPoint MIME type shorthand
      void setMSWordMIMEType()
      Set Microsoft Word MIME type shorthand
      void setName​(java.lang.String n)
      Set external object name
      void setParameter​(java.lang.String name, boolean b)
      Set parameter
      void setParameter​(java.lang.String name, double d)
      Set parameter
      void setParameter​(java.lang.String name, float f)
      Set parameter
      void setParameter​(java.lang.String name, int i)
      Set parameter
      void setParameter​(java.lang.String name, long l)
      Set parameter
      void setParameter​(java.lang.String name, java.lang.Object value)
      Sets one parameter in the object instance (useful, for instance, to store data thru different pages and contexts)
      void setPDFMIMEType()
      Set PDF MIME type shorthand
      void setPublic​(boolean p)
      Set as running in public zone
      void setResources​(boolean d)
      Set resources automatic inclusion
      void setRoot​(java.lang.String r)
      Set root
      void setScriptId​(java.lang.String id)
      Set server script document ID
      void setTarget​(java.lang.String t)
      Set target
      void setTextMIMEType()
      Set XML MIME type shorthand
      void setTitle​(boolean t)
      Set title
      void setTSVMIMEType()
      Set TSV MIME type shorthand
      void setURL​(java.lang.String u)
      Set URL
      void setUseCalculator​(boolean u)
      Set use calculator
      void setUseCalendar​(boolean u)
      Set use calendar
      void setUseCharts​(boolean u)
      Set use charts
      void setUseCompletion​(boolean u)
      Set use completion
      void setUseHTMLEditor​(boolean u)
      Set use HTML editor
      void setUseTreeview​(boolean u)
      Set use treeview
      void setXMLMIMEType()
      Set XML MIME type shorthand
      void setZIPMIMEType()
      Set ZIP MIME type shorthand
      org.json.JSONObject toJSONObject()
      Generates a JSON object representation of the business object
      java.lang.String toString()
      Generates a string representation of the business object
      java.lang.String unitTests()
      Unit tests
      boolean useCalculator()
      Use calculator?
      boolean useCalendar()
      Use calendar?
      boolean useCharts()
      Use charts?
      boolean useCompletion()
      Use completion?
      boolean useHTMLEditor()
      Use HTML editor?
      boolean useTreeview()
      Use treeview?
      • Methods inherited from class java.lang.Object

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

      • DEFAUT_MIME_TYPE

        public static final java.lang.String DEFAUT_MIME_TYPE
        Default MIME type
    • Constructor Detail

      • ExternalObject

        public ExternalObject()
    • Method Detail

      • setId

        public void setId​(java.lang.String id)
        Set external object definition ID
        Parameters:
        id - external object definition ID
      • getId

        public java.lang.String getId()
        Get external object definition ID
        Returns:
        external object definition ID
      • setName

        public void setName​(java.lang.String n)
        Set external object name
        Parameters:
        n - external object name
      • getName

        public java.lang.String getName()
        Get name
        Specified by:
        getName in interface CacheInterface
        Returns:
        name
      • setModuleId

        public void setModuleId​(java.lang.String id)
        Set external object module ID
        Parameters:
        id - external object module ID
      • getModuleId

        public java.lang.String getModuleId()
        Get external object module ID
        Returns:
        external object module ID
      • setModuleName

        public void setModuleName​(java.lang.String mdl)
        Set external object module name
        Parameters:
        mdl - external object module name
      • getModuleName

        public java.lang.String getModuleName()
        Get external object module name
        Returns:
        external object module name
      • setClassName

        public void setClassName​(java.lang.String cls)
        Set external object class name
        Parameters:
        cls - external object class name
      • getClassName

        public java.lang.String getClassName()
        Get external object class name
        Returns:
        external object class name
      • isJavaImplemented

        public boolean isJavaImplemented()
        Is implemented in Java?
        Specified by:
        isJavaImplemented in interface CacheInterface
        Returns:
        True if implemented in Java
      • setJavaImplemented

        public void setJavaImplemented​(boolean b)
        Set implemented in Java
        Parameters:
        b - Implemented in Java?
      • getConsole

        public Console getConsole()
        Get console
      • setConsole

        public void setConsole​(Console console)
        Set console
      • setDisplay

        public void setDisplay​(java.lang.String d)
        Set display label
        Parameters:
        d - Display Label
      • setLabel

        public void setLabel​(java.lang.String d)
        Set display label (alias to setDisplay)
        Parameters:
        d - Display label
      • getDisplay

        public java.lang.String getDisplay()
        Get display label
        Returns:
        Display label
      • getLabel

        public java.lang.String getLabel()
        Get display label (alias to getDisplay)
        Returns:
        Display label
      • setHelp

        public void setHelp​(java.lang.String h)
        Set help
        Parameters:
        h - help
      • getHelp

        public java.lang.String getHelp()
        Get help
        Returns:
        help
      • setIconCode

        public void setIconCode​(java.lang.String i)
        Set icon code
        Parameters:
        i - icon code
      • getIconCode

        public java.lang.String getIconCode()
        Get icon code
        Returns:
        icon code
      • getDesc

        public java.lang.String getDesc()
        Get description
        Returns:
        Description
      • setScriptId

        public void setScriptId​(java.lang.String id)
        Set server script document ID
        Parameters:
        id - server script document ID
      • getScriptId

        public java.lang.String getScriptId()
        Get server script document ID
        Returns:
        server script document id
      • readScript

        public java.lang.String readScript​(boolean force)
        Read server script document content (read using getScriptId())
        Parameters:
        force - force ?
        Returns:
        server script
      • getSharedScripts

        public java.util.List<SharedScript> getSharedScripts()
        Get all shared codes
        Returns:
        all shared codes
      • addSharedScript

        public void addSharedScript​(SharedScript s)
        Add a shared code
        Parameters:
        s - shared code
      • setURL

        public void setURL​(java.lang.String u)
        Set URL
        Parameters:
        u - URL
      • getURL

        public java.lang.String getURL()
        Get URL
        Returns:
        URL
      • setTarget

        public void setTarget​(java.lang.String t)
        Set target
        Parameters:
        t - target
      • getTarget

        public java.lang.String getTarget()
        Get target
        Returns:
        target
      • setPublic

        public void setPublic​(boolean p)
        Set as running in public zone
        Parameters:
        p - public zone ?
      • isPublic

        public boolean isPublic()
        Is running in public zone
        Returns:
        Is running in public zone
      • setRoot

        public void setRoot​(java.lang.String r)
        Set root
        Parameters:
        r - Root
      • getRoot

        public java.lang.String getRoot()
        Get root
        Returns:
        Root
      • setGrant

        public void setGrant​(Grant g)
        Set grant
        Parameters:
        g - Grant
      • getGrant

        public Grant getGrant()
        Get grant
        Returns:
        Grant
      • getCacheKey

        public java.lang.String getCacheKey​(Grant g)
        Get object unique cache key
        Specified by:
        getCacheKey in interface CacheInterface
        Parameters:
        g - Grant
        Returns:
        Unique cache key
      • enableGC

        public void enableGC​(boolean enabled)
        Empty, always disabled
        Specified by:
        enableGC in interface CacheInterface
        Parameters:
        enabled - false to disable internal GC
      • lastUsage

        public long lastUsage​(boolean update)
        Returns -1 = no internal GC
        Specified by:
        lastUsage in interface CacheInterface
        Parameters:
        update - true to update the last usage date of object
        Returns:
        last usage date in milliseconds
      • garbageCollection

        public boolean garbageCollection()
        Empty, external object are not managed
        Specified by:
        garbageCollection in interface CacheInterface
        Returns:
        True if something has been cleared
      • setMimeType

        @Deprecated
        public final void setMimeType​(java.lang.String m)
        Deprecated.
        Use setMIMEType
      • setMIMEType

        public void setMIMEType​(java.lang.String m)
        Set MIME type
        Parameters:
        m - MIME type
      • getMimeType

        @Deprecated
        public final java.lang.String getMimeType()
        Deprecated.
        Use getMIMEType
      • getMIMEType

        public java.lang.String getMIMEType()
        Get MIME type
        Returns:
        MIME type
      • setHTMLMIMEType

        public void setHTMLMIMEType()
        Set HTML MIME type shorthand
      • setJSONMIMEType

        public void setJSONMIMEType()
        Set JSON MIME type shorthand
      • setXMLMIMEType

        public void setXMLMIMEType()
        Set XML MIME type shorthand
      • setTextMIMEType

        public void setTextMIMEType()
        Set XML MIME type shorthand
      • setCSVMIMEType

        public void setCSVMIMEType()
        Set CSV MIME type shorthand
      • setTSVMIMEType

        public void setTSVMIMEType()
        Set TSV MIME type shorthand
      • setPDFMIMEType

        public void setPDFMIMEType()
        Set PDF MIME type shorthand
      • setMSExcelMIMEType

        public void setMSExcelMIMEType()
        Set Microsoft Excel MIME type shorthand
      • setMSWordMIMEType

        public void setMSWordMIMEType()
        Set Microsoft Word MIME type shorthand
      • setMSPowerPointMIMEType

        public void setMSPowerPointMIMEType()
        Set Microsoft PowerPoint MIME type shorthand
      • setZIPMIMEType

        public void setZIPMIMEType()
        Set ZIP MIME type shorthand
      • setContentDisposition

        public void setContentDisposition​(java.lang.String disp,
                                          java.lang.String filename)
        Set content disposition
        Parameters:
        disp - disposition
        filename - file
      • getContentDisposition

        public java.lang.String getContentDisposition()
        Get content disposition
        Returns:
        content disposition
      • setMaxAge

        public void setMaxAge​(int m)
        Set max age
        Parameters:
        m - max age
      • getMaxAge

        public int getMaxAge()
        Get max age
        Returns:
        max age
      • setHTTPStatus

        public void setHTTPStatus​(int s)
        Set HTTP status
        Parameters:
        s - HTTP status
      • getHTTPStatus

        public int getHTTPStatus()
        Get HTTP status
        Returns:
        HTTP status
      • setDecoration

        public void setDecoration​(boolean d)
        Set decoration
        Parameters:
        d - decoration
      • hasDecoration

        public boolean hasDecoration()
        Has decoration ?
        Returns:
        Has decoration
      • setResources

        public void setResources​(boolean d)
        Set resources automatic inclusion
        Parameters:
        d - resources automatic inclusion
      • hasResources

        public boolean hasResources()
        Has resources automatic inclusion?
        Returns:
        Has resources?
      • setTitle

        public void setTitle​(boolean t)
        Set title
        Parameters:
        t - title
      • hasTitle

        public boolean hasTitle()
        Has title?
        Returns:
        Has title?
      • setJSGlobals

        public void setJSGlobals​(boolean g)
        Set JS globals
        Parameters:
        g - JS globals
      • hasJSGlobals

        public boolean hasJSGlobals()
        Has JS parameters ?
        Returns:
        Has JS parameters
      • setJSParameters

        public void setJSParameters​(boolean p)
        Set JS parameters
        Parameters:
        p - JS parameters
      • hasJSParameters

        public boolean hasJSParameters()
        Has JS parameters ?
        Returns:
        Has JS parameters
      • addExtraJS

        public void addExtraJS​(java.lang.String extrajs)
        Add extra JS file
        Parameters:
        extrajs - extra JS file
      • appendJSInclude

        public void appendJSInclude​(java.lang.String extrajs)
        Same as addExtraJS (for syntax compatibility with com.simplicite.webapp.WebPage)
        Parameters:
        extrajs - extra JS files
      • addExtraJS

        public void addExtraJS​(java.lang.String[] extrajs)
        Add extra JS files
        Parameters:
        extrajs - extra JS files
      • appendJSIncludes

        public void appendJSIncludes​(java.lang.String[] extrajs)
        Same as addExtraJS (for syntax compatibility with com.simplicite.webapp.WebPage)
        Parameters:
        extrajs - extra JS files
      • getExtraJS

        public java.lang.String[] getExtraJS()
        Get extra JS files
        Returns:
        extra JS files
      • setUseCalendar

        public void setUseCalendar​(boolean u)
        Set use calendar
        Parameters:
        u - Use calendar?
      • useCalendar

        public boolean useCalendar()
        Use calendar?
        Returns:
        True if use calendar
      • setUseCalculator

        public void setUseCalculator​(boolean u)
        Set use calculator
        Parameters:
        u - Use calculator?
      • useCalculator

        public boolean useCalculator()
        Use calculator?
        Returns:
        True if use calculator
      • setUseHTMLEditor

        public void setUseHTMLEditor​(boolean u)
        Set use HTML editor
        Parameters:
        u - Use HTML editor?
      • useHTMLEditor

        public boolean useHTMLEditor()
        Use HTML editor?
        Returns:
        True is use HTML editor
      • setUseTreeview

        public void setUseTreeview​(boolean u)
        Set use treeview
        Parameters:
        u - Use treeview?
      • useTreeview

        public boolean useTreeview()
        Use treeview?
        Returns:
        True if use treeview
      • setUseCompletion

        public void setUseCompletion​(boolean u)
        Set use completion
        Parameters:
        u - Use completion?
      • useCompletion

        public boolean useCompletion()
        Use completion?
        Returns:
        True if use completion
      • setUseCharts

        public void setUseCharts​(boolean u)
        Set use charts
        Parameters:
        u - Use charts?
      • useCharts

        public boolean useCharts()
        Use charts?
        Returns:
        True if use charts
      • addExtraCSS

        public void addExtraCSS​(java.lang.String extracss)
        Set extra CSS file
        Parameters:
        extracss - extra CSS files
      • appendCSSInclude

        public void appendCSSInclude​(java.lang.String extracss)
        Same as addExtraCSS (for syntax compatibility with com.simplicite.webapp.WebPage)
        Parameters:
        extracss - extra CSS files
      • addExtraCSS

        public void addExtraCSS​(java.lang.String[] extracss)
        Set extra CSS files
        Parameters:
        extracss - extra CSS files
      • appendCSSIncludes

        public void appendCSSIncludes​(java.lang.String[] extracss)
        Same as addExtraCSS (for syntax compatibility with com.simplicite.webapp.WebPage)
        Parameters:
        extracss - extra CSS files
      • getExtraCSS

        public java.lang.String[] getExtraCSS()
        Get extra CSS files
        Returns:
        extra CSS files
      • addMarkdown

        public void addMarkdown()
        Add Markdown components
      • appendMarkdown

        public void appendMarkdown()
        Same as addMarkdown (for syntax compatibility with com.simplicite.webapp.WebPage)
      • addMustache

        public void addMustache()
        Add Mustache® components
      • appendMustache

        public void appendMustache()
        Same as addMustache (for syntax compatibility with com.simplicite.webapp.WebPage)
      • addVue

        public void addVue()
        Add Vue® components
      • appendVue

        public void appendVue()
        Same as addVue (for syntax compatibility with com.simplicite.webapp.WebPage)
      • addJQPlot

        public void addJQPlot()
        Add JQPlot® components
      • appendJQPlot

        public void appendJQPlot()
        Same as addJQPlot (for syntax compatibility with com.simplicite.webapp.WebPage)
      • addChartjs

        public void addChartjs()
        Add Chart.js® components
      • appendChartjs

        public void appendChartjs()
        Same as addChartjs (for syntax compatibility with com.simplicite.webapp.WebPage)
      • addFullCalendar

        public void addFullCalendar​(java.lang.String lang)
        Add FullCalendar® components Needs sysparam FULLCALENDAR_VERSION = 3 or 4 (3 as default for backward compatibility)
      • appendFullCalendar

        public void appendFullCalendar​(java.lang.String lang)
        Same as addFullCalendar (for syntax compatibility with com.simplicite.webapp.WebPage)
      • setHTML

        public void setHTML​(java.lang.String html)
        Set HTML
        Parameters:
        html - HTML
      • getHTML

        public java.lang.String getHTML()
        Get HTML
        Returns:
        HTML
      • display

        public java.lang.Object display​(Parameters params)
        Display method
        Parameters:
        params - Parameters
        Returns:
        Content to display (either as String for text content or as byte array for binary content)
      • getResourceURL

        public java.lang.String getResourceURL​(java.lang.String type,
                                               java.lang.String code)
        Get external object's Resource URL
        Parameters:
        type - Resource type
        code - Resource code
        Returns:
        Resource URL
      • getResourceContent

        public byte[] getResourceContent​(java.lang.String type,
                                         java.lang.String code)
        Get external object's Resource content
        Parameters:
        type - Resource type
        code - Resource code
        Returns:
        Resource content (as byte array)
      • getResourceHTMLURL

        public java.lang.String getResourceHTMLURL​(java.lang.String code)
        Get external object's HTML Resource URL
        Parameters:
        code - Resource code
        Returns:
        Resource URL
      • getResourceHTMLContent

        public java.lang.String getResourceHTMLContent​(java.lang.String code)
        Get external object's HTML Resource content
        Parameters:
        code - Resource code
        Returns:
        Resource content (as string)
      • getResourceJSURL

        public java.lang.String getResourceJSURL​(java.lang.String code)
        Get external object's JS Resource URL
        Parameters:
        code - Resource code
        Returns:
        Resource URL
      • getResourceJSContent

        public java.lang.String getResourceJSContent​(java.lang.String code)
        Get external object's JS Resource content
        Parameters:
        code - Resource code
        Returns:
        Resource content (as string)
      • getResourceCSSURL

        public java.lang.String getResourceCSSURL​(java.lang.String code)
        Get external object's CSS Resource URL
        Parameters:
        code - Resource code
        Returns:
        Resource URL
      • getResourceCSSContent

        public java.lang.String getResourceCSSContent​(java.lang.String code)
        Get external object's CSS Resource content
        Parameters:
        code - Resource code
        Returns:
        Resource content (as string)
      • getResourcePDFURL

        public java.lang.String getResourcePDFURL​(java.lang.String code)
        Get external object's PDF Resource URL
        Parameters:
        code - Resource code
        Returns:
        Resource URL
      • getResourcePDFContent

        public byte[] getResourcePDFContent​(java.lang.String code)
        Get external object's PDF Resource content
        Parameters:
        code - Resource code
        Returns:
        Resource content (as byte array)
      • sendRedirect

        public java.lang.String sendRedirect​(java.lang.String url)
        Generate a redirect statement to be returned by the display method
        Parameters:
        url - URL to redirect to
      • redirect

        public java.lang.String redirect​(java.lang.String url)
        Generate a redirect statement to be returned by the display method (alias to sendRedirect)
        Parameters:
        url - URL to redirect to
      • sendJavaScript

        public java.lang.String sendJavaScript​(java.lang.String js)
        Generate a JavaScript statement to be returned by the display method
        Parameters:
        js - JavaScript statement
      • javascript

        public java.lang.String javascript​(java.lang.String js)
        Generate a JavaScript statement to be returned by the display method (alias to sendJavaScript)
        Parameters:
        js - JavaScript statement
      • setParameter

        public void setParameter​(java.lang.String name,
                                 boolean b)
        Set parameter
        Parameters:
        name - Name
        b - Value
      • setParameter

        public void setParameter​(java.lang.String name,
                                 int i)
        Set parameter
        Parameters:
        name - Name
        i - Value
      • setParameter

        public void setParameter​(java.lang.String name,
                                 long l)
        Set parameter
        Parameters:
        name - Name
        l - Value
      • setParameter

        public void setParameter​(java.lang.String name,
                                 float f)
        Set parameter
        Parameters:
        name - Name
        f - Value
      • setParameter

        public void setParameter​(java.lang.String name,
                                 double d)
        Set parameter
        Parameters:
        name - Name
        d - Value
      • setParameter

        public void setParameter​(java.lang.String name,
                                 java.lang.Object value)
        Sets one parameter in the object instance (useful, for instance, to store data thru different pages and contexts)
        Parameters:
        name - Parameter name
        value - Parameter value, if null the parameter name is removed
      • removeParameter

        public void removeParameter​(java.lang.String name)
        Unsets a parameter
        Parameters:
        name - Parameter name
      • removeParameters

        public void removeParameters​(java.lang.String prefix)
        Unsets parameters starting with prefix
        Parameters:
        prefix - Parameter prefix
      • getParameter

        public java.lang.String getParameter​(java.lang.String name)
        Gets a text parameter
        Parameters:
        name - Parameter name
        Returns:
        Object parameter value (null if not found)
      • getParameter

        public java.lang.String getParameter​(java.lang.String name,
                                             java.lang.String def)
        Gets a text parameter
        Parameters:
        name - Parameter name
        def - Default value
        Returns:
        Object parameter value
      • getObjectParameter

        public java.lang.Object getObjectParameter​(java.lang.String name)
        Gets one object parameter
        Parameters:
        name - Parameter name
        Returns:
        Object parameter
      • getIntParameter

        public int getIntParameter​(java.lang.String name,
                                   int def)
        Gets one integer parameter
        Parameters:
        name - Parameter name
        def - Default value if parsing fails
        Returns:
        Integer parameter value
      • getLongParameter

        public long getLongParameter​(java.lang.String name,
                                     long def)
        Gets one long parameter
        Parameters:
        name - Parameter name
        def - Default value if parsing fails
        Returns:
        Long parameter value
      • getFloatParameter

        public float getFloatParameter​(java.lang.String name,
                                       float def)
        Gets one float parameter
        Parameters:
        name - Parameter name
        def - Default value if parsing fails
        Returns:
        Float parameter value
      • getDoubleParameter

        public double getDoubleParameter​(java.lang.String name,
                                         double def)
        Gets one double parameter
        Parameters:
        name - Parameter name
        def - Default value if parsing fails
        Returns:
        Double parameter value
      • getBooleanParameter

        public boolean getBooleanParameter​(java.lang.String name,
                                           boolean def)
        Gets one boolean parameter
        Parameters:
        name - Parameter name
        def - Default value if parsing fails
        Returns:
        Boolean parameter value
      • getFlagParameter

        public boolean getFlagParameter​(java.lang.String name)
        Gets one boolean flag parameter
        Parameters:
        name - Parameter name
        Returns:
        Boolean flag parameter value (defaults to false)
      • evalExpression

        public java.lang.Object evalExpression​(java.lang.String expr,
                                               java.util.Map<java.lang.String,​java.lang.Object> in,
                                               java.util.Map<java.lang.String,​java.lang.Object> out)
                                        throws ScriptException
        Prepare and evaluate an expression (see prepareExpression for details on tokens)
        Parameters:
        expr - Expression
        in - Input variables to set before expression evaluation
        out - Output variables to retrieve after expression evaluation
        Returns:
        Expression evaluation result
        Throws:
        ScriptException - ScriptException
      • prepareExpression

        public java.lang.String prepareExpression​(java.lang.String expr)
                                           throws ScriptException
        Prepares an expression applying following token substitutions:
        - [OBJECTID] : the current object ID
        - [OBJECT] : the current object
        - [OBJECTNAME] or [OBJNAME] : the current object name
        - [OBJECTLABEL] or [OBJLABEL] : the current object label
        - [PARAM:<parameter name>]: object parameter value
        NB: It first calls Grant.prepareExpression() for grant level token substitutions.
        Parameters:
        expr - Expression including tokens to substitute
        Returns:
        Prepared expression
        Throws:
        ScriptException - ScriptException
      • invokeAction

        public final java.lang.String invokeAction​(java.lang.String actionName)
                                            throws java.lang.Exception
        Action call without parameters
        Parameters:
        actionName - Action name
        Returns:
        Action result
        Throws:
        java.lang.Exception
      • invokeAction

        public final java.lang.String invokeAction​(java.lang.String actionName,
                                                   java.util.Map<java.lang.String,​java.lang.String> params)
                                            throws java.lang.Exception
        Action call with optional parameters * @param actionName Action name
        Parameters:
        params - Optional parameters
        Returns:
        Action result
        Throws:
        java.lang.Exception
      • invokeAction

        public java.lang.String invokeAction​(Action action,
                                             java.util.Map<java.lang.String,​java.lang.String> params)
                                      throws GrantException,
                                             ActionException
        Action call with optional parameters
        Parameters:
        action - Action
        params - Optional parameters
        Returns:
        Action result
        Throws:
        GrantException
        ActionException
      • getImageResources

        public java.util.List<java.lang.String> getImageResources()
        Get images resource codes
        Returns:
        images resource codes
      • getJSResources

        public java.util.List<java.lang.String> getJSResources()
        Get JavaScript resource codes
        Returns:
        javascript resource codes
      • getCSSResources

        public java.util.List<java.lang.String> getCSSResources()
        Get CSS resource codes
        Returns:
        css resource codes
      • getHTMLResources

        public java.util.List<java.lang.String> getHTMLResources()
        Get HTML resource codes
        Returns:
        HTML resources
      • getResources

        public java.util.List<Resource> getResources()
        Get all resources
        Returns:
        All resources
      • unitTests

        public java.lang.String unitTests()
        Unit tests
        Returns:
        Unit tests results
      • toJSONObject

        public org.json.JSONObject toJSONObject()
        Generates a JSON object representation of the business object
        Returns:
        business object as JSON object
      • toString

        public java.lang.String toString()
        Generates a string representation of the business object
        Overrides:
        toString in class java.lang.Object
        Returns:
        business object as string