Skip to content
mnawalany edited this page Jul 26, 2012 · 9 revisions

Prelude

This document will provide you with detailed documentation about creating Mobeelizer client application on Java platform.

In this document we assumes that you are familiar with:

  • JAVA language
  • Key concepts of Mobeelizer platform (see)

Prepare your application

To work with Mobeelizer cloud first you have to add Mobeelizer SDK to your application.

If you have use Maven to build your application simply add new dependency:

<dependencies>   
    <dependency>       
        <groupid>com.mobeelizer</groupid>
        <artifactid>java-sdk</artifactid>       
        <version>1.1.0</version>
</dependency>
</dependencies>
<repositories>   
    <repository>        
        <id>qcadoo-releases-repository</id>       
        <url>http://nexus.qcadoo.org/content/repositories/releases</url>
    </repository>
</repositories>

Otherwise download Mobeelizer SDK and its dependencies (commons-logging.commons-logging 1.1.1, org.apache.httpcomponents.httpcore 4.1.3, org.apache.httpcomponents.httpclient 4.1.3, org.apache.httpcomponents.httpmime 4.1.3, org.json.json 20090211, org.slf4j.slf4j-api 1.6.4) and include them into your application classpath.

Next, download XML file of your application created in App Designer and put it in your application directory.

Create model classes

Please see create model classes for more information.

Initialize Mobeelizer

To initialize Mobeelizer SDK you have to have the instance of MobeelizerConfiguration class. This configuration is pass to the Mobeelizer object.

MobeelizerConfiguration configuration = new MobeelizerConfiguration();
configuration.setDefinition(definition);
configuration.setDevice("device");
configuration.setDeviceIdentifier("deviceIdentifier");
configuration.setPackageName("packageName");
configuration.setMode(MobeelizerMode.PRODUCTION);
configuration.setInstance("instance");
configuration.setUser("user");
configuration.setPassword("password");
Mobeelizer mobeelizer = new Mobeelizer(configuration)

Configuration fields are:

<dependency>
  <groupId>com.tinkerpop.gremlin</groupId>
  <artifactId>gremlin-java</artifactId>
  <version>??</version>
</dependency>

Making Use of GremlinPipeline in Java

The example below demonstrates how to use the GremlinPipeline chaining/combinator approach to defining a Gremlin-style graph traversal.

Clone this wiki locally