-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 67acf01
Showing
78 changed files
with
6,581 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>WURFL-CLOUD-API-JAVA</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
</buildSpec> | ||
<natures> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
1.0.3 | ||
Open source release | ||
|
||
1.0.2 | ||
Add: specific headers filtering to avoid network errors | ||
|
||
1.0.1 | ||
Add: cloud client now supports proxy configuration |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
net.sf.ehcache:ehcache-core:jar:2.5.1 | ||
The open source Ehcache project is licensed under the Apache 2.0 License. | ||
http://ehcache.org/about/license | ||
|
||
org.slf4j:slf4j-api:jar:1.6.4 | ||
SLF4J source code and binaries are distributed under the MIT license. | ||
http://www.slf4j.org/license.html | ||
|
||
ch.qos.logback:logback-core:jar:1.0.0 | ||
ch.qos.logback:logback-classic:jar:1.0.0 | ||
LGPL 2.1 | ||
http://logback.qos.ch/license.html | ||
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html | ||
|
||
org.codehaus.jackson:jackson-core-asl:jar:1.9.5 | ||
org.codehaus.jackson:jackson-mapper-asl:jar:1.9.5 | ||
Jackson can be used for any purpose, but to (re)distribute it, distributors | ||
(such as libraries and frameworks that use Jackson) will need to | ||
choose which License they want to apply to distribution, and to use appropriate | ||
jars that enclose license documentation. | ||
No work needed beyond choosing the appropriate jar(s). | ||
Currently two Open Source licenses are available for use: | ||
* Apache License 2.0 (AL 2.0) | ||
* Lesser/Library General Public License (LGPL 2.1) | ||
|
||
org.mockito:mockito-core:jar:1.9.0 | ||
The MIT License | ||
http://code.google.com/p/mockito/wiki/License | ||
|
||
org.hamcrest:hamcrest-core:jar:1.1 | ||
New BSD License | ||
http://www.opensource.org/licenses/bsd-license.php | ||
|
||
org.objenesis:objenesis:jar:1.0 | ||
Objenesis is open source, under the Apache 2.0 license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# ScientiaMobile WURFL Cloud Client for Java | ||
|
||
The WURFL Cloud Service by ScientiaMobile, Inc., is a cloud-based | ||
mobile device detection service that can quickly and accurately | ||
detect over 500 capabilities of visiting devices. It can differentiate | ||
between portable mobile devices, desktop devices, SmartTVs and any | ||
other types of devices that have a web browser. | ||
|
||
This is the Java Client for accessing the WURFL Cloud Service, and | ||
it requires a free or paid WURFL Cloud account from ScientiaMobile: | ||
http://www.scientiamobile.com/cloud | ||
|
||
Installation | ||
------------ | ||
|
||
If you're reading this, you've probably already extracted the Cloud Client files. | ||
You should put them somewhere on your server that is accessible from your web application. | ||
|
||
Setup a Development Environment | ||
------------------------------- | ||
|
||
* Download and Install a Java JDK version 1.5 or greater | ||
* Download and Install Apache Tomcat version 6 or greater | ||
* Download and Install Apache Ant version 1.8 or greater | ||
|
||
Create a `JAVA_HOME` Environment Variable which points to the location of your | ||
Java JDK installation (`eq: C:\Program Files (x86)\Java \jdk1.6.0_31`). | ||
|
||
Create a `ANT_HOME` Environment Variable which points to the location of your | ||
Ant installation (`eq: C:\apache-ant-1.8.3`). Add `%ANT_HOME%/bin` to your | ||
`PATH` System Variable. | ||
|
||
*Note for Windows users: If you are setting your environment variables | ||
using a terminal window (`cmd.exe`), you must quit and restart the Command Prompt | ||
utility for the environment variables you have defined to be recognized.* | ||
|
||
Build a Sample Client | ||
------------------- | ||
|
||
To build and test the sample code you will first need to edit two files which | ||
came with the WURFL Cloud Client. | ||
|
||
Locate the `MyCloudClientServlet.java` file and open it with a text editor. | ||
|
||
Change the value of the `TEST_API_KEY` variable to your API Key. You can retrieve | ||
your API Key in your Scientiamobile account. Save and close the file. | ||
|
||
Locate the `build.properties` file and open it with a text editor. Set the value of | ||
`tomcat.home` to the location of your tomcat installation and other settings as | ||
explained. Save and close the file. | ||
|
||
*Note: Please observe that this step assumes that Tomcat is configured | ||
to 'talk' to other applications. Tomcat must be running and you must have | ||
configured an user with 'manager-script' role. For this step, please read | ||
how-to in `<tomcat-home>/conf/tomcat-users.xml`. If this is not the case, | ||
you can skip this step and deploy/copy the '.war' (more later) following | ||
the procedure that you normally follow to install web applications on your | ||
Java application server.* | ||
|
||
If your Tomcat installation is accessible from Ant, the `ant install` | ||
command will deploy the cloud client automatically. | ||
|
||
*Warning: manager paths are slightly different between [Tomcat 6](http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant) and [Tomcat 7](http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Executing%20Manager%20Commands%20With%20Ant).* | ||
|
||
Open a terminal window and change to the WURFL Cloud Client directory. Type | ||
`ant` and hit enter. This builds a `.war` file in `dist` folder. | ||
|
||
Assuming you are using Tomcat, copy the '.war' file in the dist directory to | ||
the tomcat webapps directory. For other application servers, simply follow | ||
the normal procedure to deploy `.war` files. | ||
|
||
If not already started, start Tomcat. | ||
|
||
Test the WURFL Cloud Client | ||
--------------------------- | ||
|
||
Assuming you have installed Tomcat and all of the traditional defaults apply, | ||
you can access the Cloud Client from your browser at one of the following URLs: | ||
|
||
*Please Note that it may take a few minutes from the time that you signup | ||
for your WURFL Cloud API Key to become active.* | ||
|
||
`http://localhost:8080/cloud-client-example-1.0/` | ||
|
||
(or, if you have hot-deployed with ant) | ||
|
||
`http://localhost:8080/cloud-client-example)` | ||
|
||
*Note: if your application server is not tomcat or you changed some of the | ||
defaults, you will need to adjust your URLs accordingly.* | ||
|
||
Integration | ||
----------- | ||
|
||
You should review the included example code (`MyCloudClientServlet.java` and `response.jsp`) | ||
to get a feel for the Client API, and how best to use it in your application. | ||
|
||
**2015 ScientiaMobile Incorporated** | ||
|
||
**All Rights Reserved.** | ||
|
||
**NOTICE**: All information contained herein is, and remains the property of | ||
ScientiaMobile Incorporated and its suppliers, if any. The intellectual | ||
and technical concepts contained herein are proprietary to ScientiaMobile | ||
Incorporated and its suppliers and may be covered by U.S. and Foreign | ||
Patents, patents in process, and are protected by trade secret or copyright | ||
law. Dissemination of this information or reproduction of this material is | ||
strictly forbidden unless prior written permission is obtained from | ||
ScientiaMobile Incorporated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/*.classpath | ||
/*.project | ||
/target/ | ||
/.settings/ | ||
/logs/ | ||
/test-output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false"> | ||
<output url="file://$MODULE_DIR$/target/classes" /> | ||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" /> | ||
<excludeFolder url="file://$MODULE_DIR$/target" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:servlet-api:2.4" level="project" /> | ||
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache-core:2.5.1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.4" level="project" /> | ||
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.5" level="project" /> | ||
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.5" level="project" /> | ||
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-core:1.0.0" level="project" /> | ||
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-classic:1.0.0" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:5.14.10" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.12" level="project" /> | ||
<orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.6" level="project" /> | ||
<orderEntry type="library" name="Maven: org.mockito:mockito-core:1.9.0" level="project" /> | ||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" /> | ||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:1.0" level="project" /> | ||
</component> | ||
</module> | ||
|
Oops, something went wrong.