Giter Site home page Giter Site logo

osgiworlds's Introduction

OsgiWorlds

OsgiWorlds is a set of Java files to allow a Vaadin OSGi application running on a Domino server running OpenNTF Domino API (release 2.0.0 +). There is a configuration file that allows production mode to pull from a setting in the web.xml to define the current user.

The application expects org.openntf.domino.xsp plugin to be running on the server. It requires at least version 2.0.0 - there is additional functionality for checking whether ODAPlatform is started (it should be automatically as part of XPages runtime).

Detailed Explanation of Packages

The org.openntf.osgiworlds package provides four files:

  • ApplicationConfiguration.java is an interface defining variables expected in the web.xml for signer, default developmentMode user and session identity. It also defines the contract for certain methods expected by any implementation of the interface.
  • BaseApplicationConfigurator is an implementation of the ApplicationConfiguration interface. This adds some basic implementations of methods, but will need extending for any actual configuration.
  • DefaultDominoApplicationConfig is a default, working configurator, adding devMode, user, signer and server org.openntf.domino.Sessions.
  • ODA_VaadinServlet is an extension to VaadinServlet that wraps a Domino and ODA session for every HTTPServletRequest.

The org.openntf.osgiworlds.model package contains Domino-specific wrappers for Vaadin, e.g. Calendar, ViewEntry.

The com.timtripcony package is based on Tim Tripcony's SmartDocumentModel code demoed on NotesIn9. It has also been extended to provide additional functionality like using case insensitive checks on field names, to support historical data where LotusScript did not require case sensitivity when interacting with the document.

Setup

  1. Copy the Java files into your OSGi application's source code folder. This assumes your OSGi application already includes all Vaadin jar files required.
  2. In your WebContent\WEB-INF\web.xml file, the following configuration can be used:
  • A context-param with the name "osgiworlds.developermode" and the value "true" should be added to set developerMode.
  • A context-param with the name "org.openntf.osgiworlds.devtimename" and a value mapping to a valid, hierarchical Notes Name (e.g. "CN=Mickey Mouse/O=Disney") should be added to define a specific developer name to use.
  • In the servlet definition, the servlet-class should map to the ODA_VaadinServlet class or any extension you use. So the relevant settings might look like:
    <context-param>
    <param-name>osgiworlds.developermode</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>org.openntf.osgiworlds.devtimename</param-name>
    <param-value>CN=Micky Mouse/O=Disney</param-value>
    </context-param>
    <servlet>
    <servlet-name>KeyDatesServlet</servlet-name>
    <servlet-class>org.openntf.osgiworlds.ODA_VaadinServlet</servlet-class>
    <init-param>
    <param-name>UI</param-name>
    <param-value>uk.co.intec.keyDatesApp.MainUI</param-value>
    </init-param>
    </servlet>
  1. In the plugin.xml, org.openntf.domino and org.openntf.domino.xsp will need to be added as required plugins.

You should then be good to go.

Using with CrossWorlds

CrossWorlds already includes all the relevant HTTPServletWrappers. For CrossWorlds, developermode is set at server level. The web.xml configuration for devtime name are virtually identical, just org.openntf.crossworlds.devtimename. The com.timtripcony and org.openntf.osgiworlds.model packages can be copied from here into a CrossWorlds Vaadin app to add those model classes. No changes to the packages is required.

Pull Requests

If you add additional functionality or build additional model classes you would like to contribute back, please do so. The aim of this project is to make it easier for Domino developers to use Vaadin in OSGi applications or web applications on Websphere Liberty running CrossWorlds.

osgiworlds's People

Contributors

paulswithers avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.