Skip to content

Request Presentation Develop

Nikos Kefalakis edited this page Oct 15, 2013 · 2 revisions

Deploy from source

Start JBoss Enterprise Application Platform 6 or JBoss AS 7.1 with the Web Profile:

  • Open a command line and navigate to the root of the JBoss server directory.
  • The following shows the command line to start the server with the web profile:
    • For Linux: JBOSS_HOME/bin/standalone.sh
    • For Windows: JBOSS_HOME\bin\standalone.bat

Download and install/deploy dependencies

NOTE: The following build commands assume that you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line.

  • Download and deploy the Scheduler and Service Delivery & Utility Manager
  • Download and install ui.requestCommons
    • Open a command line and navigate to the root directory of the request commons Project.
    • Type the following command to build and install: mvn clean package install

Build and Deploy the request presentation web application

NOTE: The following build command assumes you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line.

  • Make sure you have started the JBoss Server as described above.
  • Open a command line and navigate to the root directory of the request presentation Project.
  • Type this command to build and deploy the archive: mvn clean package jboss-as:deploy

This will deploy target/ui.requestPresentation.war to the running instance of the server.

Access the application

The application will be running at the following URL: http://servername:8080/ui.requestPresentation/

Undeploy the Archive

  • Make sure you have started the JBoss Server as described above.
  • Open a command line and navigate to the root directory of the request Presentation Project.
  • When you are finished testing, type this command to undeploy the archive: mvn jboss-as:undeploy

Programming

Adding a new sink node widget renderer

All widget implementations should be placed under the org.openiot.ui.request.presentation.web.model.nodes.impl package and should implement the VisualizationWidget interface. This interface defines three methods:

  • createWidget. This method receives as input the list of presentation attributes that were filled in by the user during the service design and returns a JSF component instance that handles the widget view. The implementation is responsible for generating the widget wrapper (dashboard panel) and the actual widget renderer.
  • processData. This method is invoked when new data is available for processing. The method receives a SdumSeviceResultSet as its input. The implementation is responsible for parsing the result set and updating its view accordingly.
  • clearData. This method is invoked when the user clicks the widget's clear data button. The implementation is responsible for cleaning up any collected data and updating its view.

Localization support

The request presentation application has full i18n localization support via property files. These files are placed under the org.openiot.ui.request.presentation.web.i18n package.

Clone this wiki locally