diff --git a/.gitignore b/.gitignore index 591eb6595f..393925e736 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ /modules/org.restlet.ext.apispark/bin /modules/org.restlet.ext.atom/bin /modules/org.restlet.ext.crypto/bin -/modules/org.restlet.ext.e4/bin /modules/org.restlet.ext.emf/bin /modules/org.restlet.ext.fileupload/bin /modules/org.restlet.ext.freemarker/bin @@ -35,7 +34,6 @@ /modules/org.restlet.ext.guice/bin /modules/org.restlet.ext.gwt/bin /modules/org.restlet.ext.html/bin -/modules/org.restlet.ext.httpclient/bin /modules/org.restlet.ext.jaas/bin /modules/org.restlet.ext.jackson/bin /modules/org.restlet.ext.javamail/bin @@ -46,11 +44,12 @@ /modules/org.restlet.ext.jibx/bin /modules/org.restlet.ext.json/bin /modules/org.restlet.ext.lucene/bin -/modules/org.restlet.ext.nio/bin +/modules/org.restlet.ext.netty/bin /modules/org.restlet.ext.oauth/bin /modules/org.restlet.ext.odata/bin /modules/org.restlet.ext.openid/bin /modules/org.restlet.ext.osgi/bin +/modules/org.restlet.ext.raml/bin /modules/org.restlet.ext.rdf/bin /modules/org.restlet.ext.rome/bin /modules/org.restlet.ext.sdc/bin @@ -70,6 +69,10 @@ /modules/org.restlet.test/bin /modules/org.restlet.test/velocity.log /modules/org.restlet.test/velocity.log.1 +/modules/org.restlet.ext.apispark-swagger-annotations-1_2/bin/ +/modules/org.restlet.ext.apispark-swagger-annotations-2_0/bin/ /build/velocity.log /build/build.number +.DS_Store *.iml +.DS_Store diff --git a/README.md b/README.md index e938639495..eabb7472a7 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,28 @@ # Restlet Framework -## The leading RESTful web API framework for Java +## The first REST API framework for Java -Do you want to blend your web services, web sites and web clients into unified web applications exposing and consuming RESTful web APIs? +Thanks to Restlet Framework's powerful routing and filtering capabilities, unified client and server Java API, developers can build secure and scalable RESTful web APIs. -Leverage the open source Restlet Framework and its unique Java API available in six consistent editions: Java SE, Java EE, OSGi, GAE, Android and GWT! +It is available in editions for all major platforms (Java SE/EE, Google App Engine, OSGi, GWT, Android) and offers numerous extensions to fit the needs of all developers. -http://restlet.com +It is available under the terms of either the Apache Software License 2.0 or the Eclipse Public License 1.0. -Copyright 2014 Restlet +http://restlet.talend.com -[![Build Status](https://travis-ci.org/restlet/restlet-framework-java.png?branch=master)](https://travis-ci.org/restlet/restlet-framework-java) +## Learn more + +To learn more about Restlet Framework, please have a look at the following resources: + +* [User Guide](https://restlet.talend.com/documentation/user-guide/2.4/) +* [Tutorials](https://restlet.talend.com/documentation/tutorials/2.4/) +* [JavaDocs](https://restlet.talend.com/documentation/javadocs/2.4/) +* [Change Log](https://restlet.talend.com/documentation/2.4/changelog) +* [Download](https://restlet.talend.com/downloads/current/) +* [Issue Tracker](https://github.com/restlet/restlet-framework-java/issues) +* [Mailing List](https://groups.google.com/a/restlet.org/forum/#!forum/framework-discuss) +* [Stack Overflow](http://stackoverflow.com/questions/tagged/restlet) + +Copyright 2024 Qlik + +[![Build Status](https://travis-ci.org/restlet/restlet-framework-java.svg?branch=master)](https://travis-ci.org/restlet/restlet-framework-java) diff --git a/build/bin/conf/wrapper.conf b/build/bin/conf/wrapper.conf deleted file mode 100644 index 2ab864d539..0000000000 --- a/build/bin/conf/wrapper.conf +++ /dev/null @@ -1,101 +0,0 @@ -#******************************************************************** -# Wrapper Properties -#******************************************************************** -# Java Application -wrapper.java.command=java - -# Java Main class. This class must implement the WrapperListener interface -# or guarantee that the WrapperManager class is initialized. Helper -# classes are provided to do this for you. See the Integration section -# of the documentation for details. -wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp - -# Java Classpath (include wrapper.jar) Add class path elements as -# needed starting from 1 -wrapper.java.classpath.1=../../lib/org.tanukisoftware.wrapper_3.2/wrapper.jar -wrapper.java.classpath.2=../../lib/org.restlet.jar - -# Remember to append the Restlet extensions that you need to the classpath -# For example to use the Simple HTTP server connector: -wrapper.java.classpath.3=../../lib/org.simpleframework_3.1/org.simpleframework.jar -wrapper.java.classpath.4=../../lib/org.restlet.ext.simple_3.1.jar -wrapper.java.classpath.5=../../lib/org.restlet.example.jar - -# Java Library Path (location of Wrapper.DLL or libwrapper.so) -wrapper.java.library.path.1=../../lib/org.tanukisoftware.wrapper_3.2 - -# Java Additional Parameters -#wrapper.java.additional.1= - -# Initial Java Heap Size (in MB) -#wrapper.java.initmemory=3 - -# Maximum Java Heap Size (in MB) -#wrapper.java.maxmemory=64 - -# Application parameters. Add parameters as needed starting from 1 -wrapper.app.parameter.1=org.restlet.example.tutorial.Part03 - -#******************************************************************** -# Wrapper Logging Properties -#******************************************************************** -# Format of output for the console. (See docs for formats) -wrapper.console.format=PM - -# Log Level for console output. (See docs for log levels) -wrapper.console.loglevel=INFO - -# Log file to use for wrapper output logging. -wrapper.logfile=../logs/wrapper.log - -# Format of output for the log file. (See docs for formats) -wrapper.logfile.format=LPTM - -# Log Level for log file output. (See docs for log levels) -wrapper.logfile.loglevel=INFO - -# Maximum size that the log file will be allowed to grow to before -# the log is rolled. Size is specified in bytes. The default value -# of 0, disables log rolling. May abbreviate with the 'k' (kb) or -# 'm' (mb) suffix. For example: 10m = 10 megabytes. -wrapper.logfile.maxsize=0 - -# Maximum number of rolled log files which will be allowed before old -# files are deleted. The default value of 0 implies no limit. -wrapper.logfile.maxfiles=0 - -# Log Level for sys/event log output. (See docs for log levels) -wrapper.syslog.loglevel=NONE - -#******************************************************************** -# Wrapper Windows Properties -#******************************************************************** -# Title to use when running as a console -wrapper.console.title=Restlet site - -#******************************************************************** -# Wrapper Windows NT/2000/XP Service Properties -#******************************************************************** -# WARNING - Do not modify any of these properties when an application -# using this configuration file has been installed as a service. -# Please uninstall the service before modifying this section. The -# service can then be reinstalled. - -# Name of the service -wrapper.ntservice.name=Restlet - -# Display name of the service -wrapper.ntservice.displayname=Restlet site - -# Description of the service -wrapper.ntservice.description=Restlet site - -# Service dependencies. Add dependencies as needed starting from 1 -wrapper.ntservice.dependency.1= - -# Mode in which the service is installed. AUTO_START or DEMAND_START -wrapper.ntservice.starttype=AUTO_START - -# Allow the service to interact with the desktop. -wrapper.ntservice.interactive=false - diff --git a/build/bin/linux/restlet.sh b/build/bin/linux/restlet.sh deleted file mode 100644 index b998592f32..0000000000 --- a/build/bin/linux/restlet.sh +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh - -# -# Copyright (c) 1999, 2006 Tanuki Software Inc. -# -# Java Service Wrapper sh script. Suitable for starting and stopping -# wrapped Java applications on UNIX platforms. -# - -#----------------------------------------------------------------------------- -# These settings can be modified to fit the needs of your application - -# Application -APP_NAME="restlet" -APP_LONG_NAME="Restlet site" - -# Wrapper -WRAPPER_CMD="./wrapper" -WRAPPER_CONF="../conf/wrapper.conf" - -# Priority at which to run the wrapper. See "man nice" for valid priorities. -# nice is only used if a priority is specified. -PRIORITY= - -# Location of the pid file. -PIDDIR="." - -# If uncommented, causes the Wrapper to be shutdown using an anchor file. -# When launched with the 'start' command, it will also ignore all INT and -# TERM signals. -#IGNORE_SIGNALS=true - -# If specified, the Wrapper will be run as the specified user. -# IMPORTANT - Make sure that the user has the required privileges to write -# the PID file and wrapper.log files. Failure to be able to write the log -# file will cause the Wrapper to exit without any way to write out an error -# message. -# NOTE - This will set the user which is used to run the Wrapper as well as -# the JVM and is not useful in situations where a privileged resource or -# port needs to be allocated prior to the user being changed. -#RUN_AS_USER= - -# The following two lines are used by the chkconfig command. Change as is -# appropriate for your application. They should remain commented. -# chkconfig: 2345 20 80 -# description: Restlet site - -# Do not modify anything beyond this point -#----------------------------------------------------------------------------- - -# Get the fully qualified path to the script -case $0 in - /*) - SCRIPT="$0" - ;; - *) - PWD=`pwd` - SCRIPT="$PWD/$0" - ;; -esac - -# Resolve the true real path without any sym links. -CHANGED=true -while [ "X$CHANGED" != "X" ] -do - # Change spaces to ":" so the tokens can be parsed. - SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'` - # Get the real path to this script, resolving any symbolic links - TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'` - REALPATH= - for C in $TOKENS; do - REALPATH="$REALPATH/$C" - while [ -h "$REALPATH" ] ; do - LS="`ls -ld "$REALPATH"`" - LINK="`expr "$LS" : '.*-> \(.*\)$'`" - if expr "$LINK" : '/.*' > /dev/null; then - REALPATH="$LINK" - else - REALPATH="`dirname "$REALPATH"`""/$LINK" - fi - done - done - # Change ":" chars back to spaces. - REALPATH=`echo $REALPATH | sed -e 's;:; ;g'` - - if [ "$REALPATH" = "$SCRIPT" ] - then - CHANGED="" - else - SCRIPT="$REALPATH" - fi -done - -# Change the current directory to the location of the script -cd "`dirname "$REALPATH"`" -REALDIR=`pwd` - -# If the PIDDIR is relative, set its value relative to the full REALPATH to avoid problems if -# the working directory is later changed. -FIRST_CHAR=`echo $PIDDIR | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - PIDDIR=$REALDIR/$PIDDIR -fi -# Same test for WRAPPER_CMD -FIRST_CHAR=`echo $WRAPPER_CMD | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CMD=$REALDIR/$WRAPPER_CMD -fi -# Same test for WRAPPER_CONF -FIRST_CHAR=`echo $WRAPPER_CONF | cut -c1,1` -if [ "$FIRST_CHAR" != "/" ] -then - WRAPPER_CONF=$REALDIR/$WRAPPER_CONF -fi - -# Process ID -ANCHORFILE="$PIDDIR/$APP_NAME.anchor" -PIDFILE="$PIDDIR/$APP_NAME.pid" -LOCKDIR="/var/lock/subsys" -LOCKFILE="$LOCKDIR/$APP_NAME" -pid="" - -# Resolve the location of the 'ps' command -PSEXE="/usr/bin/ps" -if [ ! -x $PSEXE ] -then - PSEXE="/bin/ps" - if [ ! -x $PSEXE ] - then - echo "Unable to locate 'ps'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi -fi - -# Resolve the os -DIST_OS=`uname -s | tr [:upper:] [:lower:] | tr -d [:blank:]` -case "$DIST_OS" in - 'sunos') - DIST_OS="solaris" - ;; - 'hp-ux' | 'hp-ux64') - DIST_OS="hpux" - ;; - 'darwin') - DIST_OS="macosx" - ;; - 'unix_sv') - DIST_OS="unixware" - ;; -esac - -# Resolve the architecture -DIST_ARCH=`uname -p | tr [:upper:] [:lower:] | tr -d [:blank:]` -if [ "$DIST_ARCH" = "unknown" ] -then - DIST_ARCH=`uname -m | tr [:upper:] [:lower:] | tr -d [:blank:]` -fi -case "$DIST_ARCH" in - 'amd64' | 'ia32' | 'ia64' | 'i386' | 'i486' | 'i586' | 'i686' | 'x86_64') - DIST_ARCH="x86" - ;; - 'ip27') - DIST_ARCH="mips" - ;; - 'power' | 'powerpc' | 'power_pc' | 'ppc64') - DIST_ARCH="ppc" - ;; - 'pa_risc' | 'pa-risc') - DIST_ARCH="parisc" - ;; - 'sun4u' | 'sparcv9') - DIST_ARCH="sparc" - ;; - '9000/800') - DIST_ARCH="parisc" - ;; -esac - -# Decide on the wrapper binary to use. -# If a 32-bit wrapper binary exists then it will work on 32 or 64 bit -# platforms, if the 64-bit binary exists then the distribution most -# likely wants to use long names. Otherwise, look for the default. -# For macosx, we also want to look for universal binaries. -WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" -if [ -x $WRAPPER_TEST_CMD ] -then - WRAPPER_CMD="$WRAPPER_TEST_CMD" -else - if [ "$DIST_OS" = "macosx" ] - then - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-32" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-universal-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-universal-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD-$DIST_OS-universal-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi - fi - else - WRAPPER_TEST_CMD="$WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - if [ -x $WRAPPER_TEST_CMD ] - then - WRAPPER_CMD="$WRAPPER_TEST_CMD" - else - if [ ! -x $WRAPPER_CMD ] - then - echo "Unable to locate any of the following binaries:" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-32" - echo " $WRAPPER_CMD-$DIST_OS-$DIST_ARCH-64" - echo " $WRAPPER_CMD" - exit 1 - fi - fi - fi -fi - -# Build the nice clause -if [ "X$PRIORITY" = "X" ] -then - CMDNICE="" -else - CMDNICE="nice -$PRIORITY" -fi - -# Build the anchor file clause. -if [ "X$IGNORE_SIGNALS" = "X" ] -then - ANCHORPROP= - IGNOREPROP= -else - ANCHORPROP=wrapper.anchorfile=$ANCHORFILE - IGNOREPROP=wrapper.ignore_signals=TRUE -fi - -# Build the lock file clause. Only create a lock file if the lock directory exists on this platform. -if [ -d $LOCKDIR ] -then - LOCKPROP=wrapper.lockfile=$LOCKFILE -else - LOCKPROP= -fi - -checkUser() { - # Check the configured user. If necessary rerun this script as the desired user. - if [ "X$RUN_AS_USER" != "X" ] - then - # Resolve the location of the 'id' command - IDEXE="/usr/xpg4/bin/id" - if [ ! -x $IDEXE ] - then - IDEXE="/usr/bin/id" - if [ ! -x $IDEXE ] - then - echo "Unable to locate 'id'." - echo "Please report this message along with the location of the command on your system." - exit 1 - fi - fi - - if [ "`$IDEXE -u -n`" = "$RUN_AS_USER" ] - then - # Already running as the configured user. Avoid password prompts by not calling su. - RUN_AS_USER="" - fi - fi - if [ "X$RUN_AS_USER" != "X" ] - then - # If LOCKPROP and $RUN_AS_USER are defined then the new user will most likely not be - # able to create the lock file. The Wrapper will be able to update this file once it - # is created but will not be able to delete it on shutdown. If $2 is defined then - # the lock file should be created for the current command - if [ "X$LOCKPROP" != "X" ] - then - if [ "X$2" != "X" ] - then - # Resolve the primary group - RUN_AS_GROUP=`groups $RUN_AS_USER | awk '{print $3}' | tail -1` - if [ "X$RUN_AS_GROUP" = "X" ] - then - RUN_AS_GROUP=RUN_AS_USER - fi - touch $LOCKFILE - chown $RUN_AS_USER:$RUN_AS_GROUP $LOCKFILE - fi - fi - - # Still want to change users, recurse. This means that the user will only be - # prompted for a password once. - su -m $RUN_AS_USER -c "$REALPATH $1" - - # Now that we are the original user again, we may need to clean up the lock file. - if [ "X$LOCKPROP" != "X" ] - then - getpid - if [ "X$pid" = "X" ] - then - # Wrapper is not running so make sure the lock file is deleted. - if [ -f $LOCKFILE ] - then - rm $LOCKFILE - fi - fi - fi - - exit 0 - fi -} - -getpid() { - if [ -f $PIDFILE ] - then - if [ -r $PIDFILE ] - then - pid=`cat $PIDFILE` - if [ "X$pid" != "X" ] - then - # It is possible that 'a' process with the pid exists but that it is not the - # correct process. This can happen in a number of cases, but the most - # common is during system startup after an unclean shutdown. - # The ps statement below looks for the specific wrapper command running as - # the pid. If it is not found then the pid file is considered to be stale. - pidtest=`$PSEXE -p $pid -o args | grep $WRAPPER_CMD | tail -1` - if [ "X$pidtest" = "X" ] - then - # This is a stale pid file. - rm -f $PIDFILE - echo "Removed stale pid file: $PIDFILE" - pid="" - fi - fi - else - echo "Cannot read $PIDFILE." - exit 1 - fi - fi -} - -testpid() { - pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1` - if [ "X$pid" = "X" ] - then - # Process is gone so remove the pid file. - rm -f $PIDFILE - pid="" - fi -} - -console() { - echo "Running $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE $ANCHORPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -start() { - echo "Starting $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - COMMAND_LINE="$CMDNICE $WRAPPER_CMD $WRAPPER_CONF wrapper.syslog.ident=$APP_NAME wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE $ANCHORPROP $IGNOREPROP $LOCKPROP" - exec $COMMAND_LINE - else - echo "$APP_LONG_NAME is already running." - exit 1 - fi -} - -stopit() { - echo "Stopping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - else - if [ "X$IGNORE_SIGNALS" = "X" ] - then - # Running so try to stop it. - kill $pid - if [ $? -ne 0 ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - else - rm -f $ANCHORFILE - if [ -f $ANCHORFILE ] - then - # An explanation for the failure should have been given - echo "Unable to stop $APP_LONG_NAME." - exit 1 - fi - fi - - # We can not predict how long it will take for the wrapper to - # actually stop as it depends on settings in wrapper.conf. - # Loop until it does. - savepid=$pid - CNT=0 - TOTCNT=0 - while [ "X$pid" != "X" ] - do - # Show a waiting message every 5 seconds. - if [ "$CNT" -lt "5" ] - then - CNT=`expr $CNT + 1` - else - echo "Waiting for $APP_LONG_NAME to exit..." - CNT=0 - fi - TOTCNT=`expr $TOTCNT + 1` - - sleep 1 - - testpid - done - - pid=$savepid - testpid - if [ "X$pid" != "X" ] - then - echo "Failed to stop $APP_LONG_NAME." - exit 1 - else - echo "Stopped $APP_LONG_NAME." - fi - fi -} - -status() { - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME is not running." - exit 1 - else - echo "$APP_LONG_NAME is running ($pid)." - exit 0 - fi -} - -dump() { - echo "Dumping $APP_LONG_NAME..." - getpid - if [ "X$pid" = "X" ] - then - echo "$APP_LONG_NAME was not running." - - else - kill -3 $pid - - if [ $? -ne 0 ] - then - echo "Failed to dump $APP_LONG_NAME." - exit 1 - else - echo "Dumped $APP_LONG_NAME." - fi - fi -} - -case "$1" in - - 'console') - checkUser $1 touchlock - console - ;; - - 'start') - checkUser $1 touchlock - start - ;; - - 'stop') - checkUser $1 - stopit - ;; - - 'restart') - checkUser $1 touchlock - stopit - start - ;; - - 'status') - checkUser $1 - status - ;; - - 'dump') - checkUser $1 - dump - ;; - - *) - echo "Usage: $0 { console | start | stop | restart | status | dump }" - exit 1 - ;; -esac - -exit 0 diff --git a/build/bin/linux/wrapper b/build/bin/linux/wrapper deleted file mode 100644 index 7e0064596e..0000000000 Binary files a/build/bin/linux/wrapper and /dev/null differ diff --git a/build/bin/readme.txt b/build/bin/readme.txt deleted file mode 100644 index 7a6a0f0baa..0000000000 --- a/build/bin/readme.txt +++ /dev/null @@ -1,25 +0,0 @@ - -==================== -Running applications -==================== - - -A common requirement for server-side Restlet applications is the ability to run -as a system service. For this purpose, the Restlet project recommmands the use -of the powerful Java Service Wrapper project developped by Tanuki Software: -http://wrapper.tanukisoftware.org - -This wrapper is based on a single multi-platform configuration file, a wrapper -JAR file and a set of platform-specific binary files to launch, install and -uninstall your service. See the Java Service Wrapper web site for details. - -A sample configuration file can be found under "./conf/wrapper.conf". This -file must be customized to provided your application's main class, its -parameters and all the classpath entries. - -Java Service Wrapper binaries are provided for the Windows x86-32 (see ./win) -and Linux x86-32 (see ./linux) platforms but several other platforms are -supported as well. See the Java Service Wrapper web site for details. - -Thanks to Malcolm Sparks for suggesting the use of this great wrapper tool and -to Daniel Einspanjer for the feed-back. diff --git a/build/bin/win/InstallRestlet-NT.bat b/build/bin/win/InstallRestlet-NT.bat deleted file mode 100644 index db23bd1b81..0000000000 --- a/build/bin/win/InstallRestlet-NT.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off -setlocal - -rem Copyright (c) 1999, 2006 Tanuki Software Inc. -rem -rem Java Service Wrapper general NT service install script -rem - -if "%OS%"=="Windows_NT" goto nt -echo This script only works with NT-based versions of Windows. -goto :eof - -:nt -rem -rem Find the application home. -rem -rem %~dp0 is location of current script under NT -set _REALPATH=%~dp0 - -rem Decide on the wrapper binary. -set _WRAPPER_BASE=wrapper -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe -if exist %_WRAPPER_EXE% goto conf -echo Unable to locate a Wrapper executable using any of the following names: -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -echo %_REALPATH%%_WRAPPER_BASE%.exe -pause -goto :eof - -rem -rem Find the wrapper.conf -rem -:conf -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="%_REALPATH%..\conf\wrapper.conf" - -rem -rem Install the Wrapper as an NT service. -rem -:startup -"%_WRAPPER_EXE%" -i %_WRAPPER_CONF% -if not errorlevel 1 goto :eof -pause - diff --git a/build/bin/win/Restlet.bat b/build/bin/win/Restlet.bat deleted file mode 100644 index 25c74b5b89..0000000000 --- a/build/bin/win/Restlet.bat +++ /dev/null @@ -1,55 +0,0 @@ -@echo off -setlocal - -rem Copyright (c) 1999, 2006 Tanuki Software Inc. -rem -rem Java Service Wrapper general startup script -rem - -rem -rem Resolve the real path of the wrapper.exe -rem For non NT systems, the _REALPATH and _WRAPPER_CONF values -rem can be hard-coded below and the following test removed. -rem -if "%OS%"=="Windows_NT" goto nt -echo This script only works with NT-based versions of Windows. -goto :eof - -:nt -rem -rem Find the application home. -rem -rem %~dp0 is location of current script under NT -set _REALPATH=%~dp0 - -rem Decide on the wrapper binary. -set _WRAPPER_BASE=wrapper -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe -if exist %_WRAPPER_EXE% goto conf -echo Unable to locate a Wrapper executable using any of the following names: -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -echo %_REALPATH%%_WRAPPER_BASE%.exe -pause -goto :eof - -rem -rem Find the wrapper.conf -rem -:conf -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="%_REALPATH%..\conf\wrapper.conf" - -rem -rem Start the Wrapper -rem -:startup -"%_WRAPPER_EXE%" -c %_WRAPPER_CONF% -if not errorlevel 1 goto :eof -pause - diff --git a/build/bin/win/UninstallRestlet-NT.bat b/build/bin/win/UninstallRestlet-NT.bat deleted file mode 100644 index 38497a3bf1..0000000000 --- a/build/bin/win/UninstallRestlet-NT.bat +++ /dev/null @@ -1,50 +0,0 @@ -@echo off -setlocal - -rem Copyright (c) 1999, 2006 Tanuki Software Inc. -rem -rem Java Service Wrapper general NT service uninstall script -rem - -if "%OS%"=="Windows_NT" goto nt -echo This script only works with NT-based versions of Windows. -goto :eof - -:nt -rem -rem Find the application home. -rem -rem %~dp0 is location of current script under NT -set _REALPATH=%~dp0 - -rem Decide on the wrapper binary. -set _WRAPPER_BASE=wrapper -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -if exist %_WRAPPER_EXE% goto conf -set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe -if exist %_WRAPPER_EXE% goto conf -echo Unable to locate a Wrapper executable using any of the following names: -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe -echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe -echo %_REALPATH%%_WRAPPER_BASE%.exe -pause -goto :eof - -rem -rem Find the wrapper.conf -rem -:conf -set _WRAPPER_CONF="%~f1" -if not %_WRAPPER_CONF%=="" goto startup -set _WRAPPER_CONF="%_REALPATH%..\conf\wrapper.conf" - -rem -rem Uninstall the Wrapper as an NT service. -rem -:startup -"%_WRAPPER_EXE%" -r %_WRAPPER_CONF% -if not errorlevel 1 goto :eof -pause - diff --git a/build/bin/win/wrapper.exe b/build/bin/win/wrapper.exe deleted file mode 100644 index b4cfc557c0..0000000000 Binary files a/build/bin/win/wrapper.exe and /dev/null differ diff --git a/build/build.properties b/build/build.properties index 56553ffee7..951fbae4c0 100644 --- a/build/build.properties +++ b/build/build.properties @@ -3,8 +3,8 @@ # ======================================================================= # The version numbers -major-number: 2 -minor-number: 3 +major-number: 3 +minor-number: 0 # the last figure of the real release number: e.g. 1 in "2.2m1", "2.3rc1", "2.4.1" release-number: # choose among: final, snapshot, rc, milestone diff --git a/build/build.xml b/build/build.xml index 7a087ff629..502db2eb98 100644 --- a/build/build.xml +++ b/build/build.xml @@ -1,4 +1,4 @@ - + - + +--> @@ -200,7 +200,7 @@ @@ -223,7 +223,7 @@ diff --git a/build/tmpl/bundles/bndModule.tmpl b/build/tmpl/bundles/bndModule.tmpl old mode 100755 new mode 100644 diff --git a/build/tmpl/eclipse/eclipseproject.tmpl b/build/tmpl/eclipse/eclipseproject.tmpl old mode 100755 new mode 100644 diff --git a/build/tmpl/eclipse/formatter.xml b/build/tmpl/eclipse/formatter.xml index 0e6cc196c0..fc90288947 100644 --- a/build/tmpl/eclipse/formatter.xml +++ b/build/tmpl/eclipse/formatter.xml @@ -1,264 +1,291 @@ - - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + - + + + + + + + - - - - - - - + + + + + - + - - - - - - + + + + + + + + + + + + + - - + + + + + + + + + + + + + + - - - - + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + - - - + + + + + + + + + + + + + + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - + + + + - + + - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - + + - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + - - - - - - - - - + diff --git a/build/tmpl/eclipse/library.build.properties.tmpl b/build/tmpl/eclipse/library.build.properties.tmpl old mode 100755 new mode 100644 diff --git a/build/tmpl/eclipse/library.classpath.tmpl b/build/tmpl/eclipse/library.classpath.tmpl old mode 100755 new mode 100644 diff --git a/build/tmpl/eclipse/library.project.tmpl b/build/tmpl/eclipse/library.project.tmpl old mode 100755 new mode 100644 diff --git a/build/tmpl/eclipse/module.project.tmpl b/build/tmpl/eclipse/module.project.tmpl old mode 100755 new mode 100644 diff --git a/build/tmpl/editions/build.xml b/build/tmpl/editions/build.xml index 7b4391ed02..bd875a3722 100644 --- a/build/tmpl/editions/build.xml +++ b/build/tmpl/editions/build.xml @@ -1,4 +1,4 @@ - + + + @@ -825,16 +831,29 @@ - See the JUnit log file for more details: ${temp}/test/TEST-org.restlet.test.RestletTestSuite.txt. - + See the JUnit log file for more details: ${temp}/test/TEST-org.restlet.test.RestletTestSuite.xml. + - - + + + + + + + + + + + + + + + @@ -875,17 +894,6 @@ - - - - - - - - - - - diff --git a/build/tmpl/editions/gaeJdkClassesWhiteList.txt b/build/tmpl/editions/gaeJdkClassesWhiteList.txt index bbf1d4db4c..7050454d31 100644 --- a/build/tmpl/editions/gaeJdkClassesWhiteList.txt +++ b/build/tmpl/editions/gaeJdkClassesWhiteList.txt @@ -31,6 +31,7 @@ java.beans.PropertyEditorManager java.beans.PropertyEditorSupport java.beans.PropertyVetoException java.beans.SimpleBeanInfo +java.beans.Transient java.beans.VetoableChangeListener java.beans.VetoableChangeListenerProxy java.beans.VetoableChangeSupport @@ -137,7 +138,9 @@ java.lang.ArithmeticException java.lang.ArrayIndexOutOfBoundsException java.lang.ArrayStoreException java.lang.AssertionError +java.lang.AutoCloseable java.lang.Boolean +java.lang.BootstrapMethodError java.lang.Byte java.lang.CharSequence java.lang.Character @@ -147,6 +150,7 @@ java.lang.ClassCircularityError java.lang.ClassFormatError java.lang.ClassLoader java.lang.ClassNotFoundException +java.lang.ClassValue java.lang.CloneNotSupportedException java.lang.Cloneable java.lang.Comparable @@ -191,10 +195,12 @@ java.lang.Override java.lang.Package java.lang.Process java.lang.Readable +java.lang.ReflectiveOperationException java.lang.Runnable java.lang.Runtime java.lang.RuntimeException java.lang.RuntimePermission +java.lang.SafeVarargs java.lang.SecurityException java.lang.SecurityManager java.lang.Short @@ -230,6 +236,16 @@ java.lang.annotation.Inherited java.lang.annotation.Retention java.lang.annotation.RetentionPolicy java.lang.annotation.Target +java.lang.invoke.CallSite +java.lang.invoke.ConstantCallSite +java.lang.invoke.MethodHandle +java.lang.invoke.MethodHandleProxies +java.lang.invoke.MethodHandles +java.lang.invoke.MethodType +java.lang.invoke.MutableCallSite +java.lang.invoke.SwitchPoint +java.lang.invoke.VolatileCallSite +java.lang.invoke.WrongMethodTypeException java.lang.ref.PhantomReference java.lang.ref.Reference java.lang.ref.ReferenceQueue @@ -268,6 +284,9 @@ java.net.ConnectException java.net.ContentHandler java.net.ContentHandlerFactory java.net.CookieHandler +java.net.DatagramPacket +java.net.DatagramSocket +java.net.DatagramSocketImpl java.net.DatagramSocketImplFactory java.net.FileNameMap java.net.HttpCookie @@ -277,6 +296,7 @@ java.net.IDN java.net.Inet4Address java.net.Inet6Address java.net.InetAddress +java.net.InetSocketAddress java.net.JarURLConnection java.net.MalformedURLException java.net.NetPermission @@ -285,11 +305,19 @@ java.net.NoRouteToHostException java.net.PasswordAuthentication java.net.PortUnreachableException java.net.ProtocolException +java.net.ProtocolFamily +java.net.Proxy +java.net.Socket +java.net.SocketAddress java.net.SocketException +java.net.SocketImpl java.net.SocketImplFactory +java.net.SocketOption java.net.SocketOptions java.net.SocketPermission java.net.SocketTimeoutException +java.net.StandardProtocolFamily +java.net.StandardSocketOptions java.net.URI java.net.URISyntaxException java.net.URL @@ -297,7 +325,6 @@ java.net.URLClassLoader java.net.URLConnection java.net.URLDecoder java.net.URLEncoder -java.net.URLStreamHandler java.net.URLStreamHandlerFactory java.net.UnknownHostException java.net.UnknownServiceException @@ -338,6 +365,7 @@ java.nio.channels.NotYetConnectedException java.nio.channels.OverlappingFileLockException java.nio.channels.ReadableByteChannel java.nio.channels.ScatteringByteChannel +java.nio.channels.SeekableByteChannel java.nio.channels.SelectableChannel java.nio.channels.SelectionKey java.nio.channels.Selector @@ -357,6 +385,7 @@ java.nio.charset.CoderResult java.nio.charset.CodingErrorAction java.nio.charset.IllegalCharsetNameException java.nio.charset.MalformedInputException +java.nio.charset.StandardCharsets java.nio.charset.UnmappableCharacterException java.nio.charset.UnsupportedCharsetException java.nio.charset.spi.CharsetProvider @@ -441,6 +470,7 @@ java.security.acl.Owner java.security.acl.Permission java.security.cert.CRL java.security.cert.CRLException +java.security.cert.CRLReason java.security.cert.CRLSelector java.security.cert.CertPath java.security.cert.CertPathBuilder @@ -465,13 +495,16 @@ java.security.cert.CertificateFactory java.security.cert.CertificateFactorySpi java.security.cert.CertificateNotYetValidException java.security.cert.CertificateParsingException +java.security.cert.CertificateRevokedException java.security.cert.CollectionCertStoreParameters +java.security.cert.Extension java.security.cert.LDAPCertStoreParameters java.security.cert.PKIXBuilderParameters java.security.cert.PKIXCertPathBuilderResult java.security.cert.PKIXCertPathChecker java.security.cert.PKIXCertPathValidatorResult java.security.cert.PKIXParameters +java.security.cert.PKIXReason java.security.cert.PolicyNode java.security.cert.PolicyQualifierInfo java.security.cert.TrustAnchor @@ -537,6 +570,7 @@ java.sql.DriverPropertyInfo java.sql.NClob java.sql.ParameterMetaData java.sql.PreparedStatement +java.sql.PseudoColumnUsage java.sql.Ref java.sql.ResultSet java.sql.ResultSetMetaData @@ -636,6 +670,7 @@ java.util.IllegalFormatException java.util.IllegalFormatFlagsException java.util.IllegalFormatPrecisionException java.util.IllegalFormatWidthException +java.util.IllformedLocaleException java.util.InputMismatchException java.util.InvalidPropertiesFormatException java.util.Iterator @@ -653,6 +688,7 @@ java.util.MissingResourceException java.util.NavigableMap java.util.NavigableSet java.util.NoSuchElementException +java.util.Objects java.util.Observable java.util.Observer java.util.PriorityQueue @@ -692,6 +728,7 @@ java.util.concurrent.Callable java.util.concurrent.CancellationException java.util.concurrent.CompletionService java.util.concurrent.ConcurrentHashMap +java.util.concurrent.ConcurrentLinkedDeque java.util.concurrent.ConcurrentLinkedQueue java.util.concurrent.ConcurrentMap java.util.concurrent.ConcurrentNavigableMap @@ -709,11 +746,18 @@ java.util.concurrent.Executor java.util.concurrent.ExecutorCompletionService java.util.concurrent.ExecutorService java.util.concurrent.Executors +java.util.concurrent.ForkJoinPool +java.util.concurrent.ForkJoinTask +java.util.concurrent.ForkJoinWorkerThread java.util.concurrent.Future java.util.concurrent.FutureTask java.util.concurrent.LinkedBlockingDeque java.util.concurrent.LinkedBlockingQueue +java.util.concurrent.LinkedTransferQueue +java.util.concurrent.Phaser java.util.concurrent.PriorityBlockingQueue +java.util.concurrent.RecursiveAction +java.util.concurrent.RecursiveTask java.util.concurrent.RejectedExecutionException java.util.concurrent.RejectedExecutionHandler java.util.concurrent.RunnableFuture @@ -724,9 +768,11 @@ java.util.concurrent.ScheduledThreadPoolExecutor java.util.concurrent.Semaphore java.util.concurrent.SynchronousQueue java.util.concurrent.ThreadFactory +java.util.concurrent.ThreadLocalRandom java.util.concurrent.ThreadPoolExecutor java.util.concurrent.TimeUnit java.util.concurrent.TimeoutException +java.util.concurrent.TransferQueue java.util.concurrent.atomic.AtomicBoolean java.util.concurrent.atomic.AtomicInteger java.util.concurrent.atomic.AtomicIntegerArray @@ -764,7 +810,6 @@ java.util.logging.LogRecord java.util.logging.Logger java.util.logging.LoggingMXBean java.util.logging.LoggingPermission -java.util.logging.LogManager java.util.logging.MemoryHandler java.util.logging.SimpleFormatter java.util.logging.StreamHandler @@ -903,7 +948,19 @@ javax.crypto.spec.PSource javax.crypto.spec.RC2ParameterSpec javax.crypto.spec.RC5ParameterSpec javax.crypto.spec.SecretKeySpec +javax.jws.HandlerChain +javax.jws.Oneway +javax.jws.WebMethod +javax.jws.WebParam +javax.jws.WebResult +javax.jws.WebService +javax.jws.soap.InitParam +javax.jws.soap.SOAPBinding +javax.jws.soap.SOAPMessageHandler +javax.jws.soap.SOAPMessageHandlers +javax.lang.model.AnnotatedConstruct javax.lang.model.SourceVersion +javax.lang.model.UnknownEntityException javax.lang.model.element.AnnotationMirror javax.lang.model.element.AnnotationValue javax.lang.model.element.AnnotationValueVisitor @@ -915,6 +972,8 @@ javax.lang.model.element.Modifier javax.lang.model.element.Name javax.lang.model.element.NestingKind javax.lang.model.element.PackageElement +javax.lang.model.element.Parameterizable +javax.lang.model.element.QualifiedNameable javax.lang.model.element.TypeElement javax.lang.model.element.TypeParameterElement javax.lang.model.element.UnknownAnnotationValueException @@ -934,20 +993,67 @@ javax.lang.model.type.TypeKind javax.lang.model.type.TypeMirror javax.lang.model.type.TypeVariable javax.lang.model.type.TypeVisitor +javax.lang.model.type.UnionType javax.lang.model.type.UnknownTypeException javax.lang.model.type.WildcardType javax.lang.model.util.AbstractAnnotationValueVisitor6 +javax.lang.model.util.AbstractAnnotationValueVisitor7 javax.lang.model.util.AbstractElementVisitor6 +javax.lang.model.util.AbstractElementVisitor7 javax.lang.model.util.AbstractTypeVisitor6 +javax.lang.model.util.AbstractTypeVisitor7 javax.lang.model.util.ElementFilter javax.lang.model.util.ElementKindVisitor6 +javax.lang.model.util.ElementKindVisitor7 javax.lang.model.util.ElementScanner6 +javax.lang.model.util.ElementScanner7 javax.lang.model.util.Elements javax.lang.model.util.SimpleAnnotationValueVisitor6 +javax.lang.model.util.SimpleAnnotationValueVisitor7 javax.lang.model.util.SimpleElementVisitor6 +javax.lang.model.util.SimpleElementVisitor7 javax.lang.model.util.SimpleTypeVisitor6 +javax.lang.model.util.SimpleTypeVisitor7 javax.lang.model.util.TypeKindVisitor6 +javax.lang.model.util.TypeKindVisitor7 javax.lang.model.util.Types +javax.net.DefaultSocketFactory +javax.net.SocketFactory +javax.net.ssl.CertPathTrustManagerParameters +javax.net.ssl.DefaultSSLServerSocketFactory +javax.net.ssl.DefaultSSLSocketFactory +javax.net.ssl.HandshakeCompletedEvent +javax.net.ssl.HandshakeCompletedListener +javax.net.ssl.HostnameVerifier +javax.net.ssl.HttpsURLConnection +javax.net.ssl.KeyManager +javax.net.ssl.KeyManagerFactory +javax.net.ssl.KeyManagerFactorySpi +javax.net.ssl.KeyStoreBuilderParameters +javax.net.ssl.ManagerFactoryParameters +javax.net.ssl.SSLContext +javax.net.ssl.SSLContextSpi +javax.net.ssl.SSLEngine +javax.net.ssl.SSLEngineResult +javax.net.ssl.SSLException +javax.net.ssl.SSLHandshakeException +javax.net.ssl.SSLKeyException +javax.net.ssl.SSLParameters +javax.net.ssl.SSLPeerUnverifiedException +javax.net.ssl.SSLPermission +javax.net.ssl.SSLProtocolException +javax.net.ssl.SSLSession +javax.net.ssl.SSLSessionBindingEvent +javax.net.ssl.SSLSessionBindingListener +javax.net.ssl.SSLSessionContext +javax.net.ssl.SSLSocket +javax.net.ssl.SSLSocketFactory +javax.net.ssl.TrustManager +javax.net.ssl.TrustManagerFactory +javax.net.ssl.TrustManagerFactorySpi +javax.net.ssl.X509ExtendedKeyManager +javax.net.ssl.X509KeyManager +javax.net.ssl.X509TrustManager javax.script.AbstractScriptEngine javax.script.Bindings javax.script.Compilable @@ -1041,6 +1147,7 @@ javax.sql.rowset.JdbcRowSet javax.sql.rowset.JoinRowSet javax.sql.rowset.Joinable javax.sql.rowset.Predicate +javax.sql.rowset.RowSetFactory javax.sql.rowset.RowSetMetaDataImpl javax.sql.rowset.RowSetWarning javax.sql.rowset.WebRowSet @@ -1079,6 +1186,7 @@ javax.xml.bind.JAXBContext javax.xml.bind.JAXBElement javax.xml.bind.JAXBException javax.xml.bind.JAXBIntrospector +javax.xml.bind.JAXBPermission javax.xml.bind.MarshalException javax.xml.bind.Marshaller javax.xml.bind.NotIdentifiableEvent @@ -1149,6 +1257,61 @@ javax.xml.bind.helpers.ValidationEventLocatorImpl javax.xml.bind.util.JAXBResult javax.xml.bind.util.JAXBSource javax.xml.bind.util.ValidationEventCollector +javax.xml.crypto.AlgorithmMethod +javax.xml.crypto.Data +javax.xml.crypto.KeySelector +javax.xml.crypto.KeySelectorException +javax.xml.crypto.KeySelectorResult +javax.xml.crypto.MarshallException +javax.xml.crypto.NoSuchMechanismException +javax.xml.crypto.NodeSetData +javax.xml.crypto.OctetStreamData +javax.xml.crypto.URIDereferencer +javax.xml.crypto.URIReference +javax.xml.crypto.URIReferenceException +javax.xml.crypto.XMLCryptoContext +javax.xml.crypto.XMLStructure +javax.xml.crypto.dom.DOMCryptoContext +javax.xml.crypto.dom.DOMStructure +javax.xml.crypto.dom.DOMURIReferecne +javax.xml.crypto.dsig.CanonicalizationMethod +javax.xml.crypto.dsig.DigestMethod +javax.xml.crypto.dsig.Manifest +javax.xml.crypto.dsig.Reference +javax.xml.crypto.dsig.SignatureMethod +javax.xml.crypto.dsig.SignatureProperties +javax.xml.crypto.dsig.SignatureProperty +javax.xml.crypto.dsig.SignedInfo +javax.xml.crypto.dsig.Transform +javax.xml.crypto.dsig.TransformException +javax.xml.crypto.dsig.TransformService +javax.xml.crypto.dsig.XMLObject +javax.xml.crypto.dsig.XMLSignContext +javax.xml.crypto.dsig.XMLSignature +javax.xml.crypto.dsig.XMLSignatureException +javax.xml.crypto.dsig.XMLSignatureFactory +javax.xml.crypto.dsig.XMLValidateContext +javax.xml.crypto.dsig.dom.DOMSignContext +javax.xml.crypto.dsig.dom.DOMValidateContext +javax.xml.crypto.dsig.keyinfo.KeyInfo +javax.xml.crypto.dsig.keyinfo.KeyInfoFactory +javax.xml.crypto.dsig.keyinfo.KeyName +javax.xml.crypto.dsig.keyinfo.KeyValue +javax.xml.crypto.dsig.keyinfo.PGPData +javax.xml.crypto.dsig.keyinfo.RetrievalMethod +javax.xml.crypto.dsig.keyinfo.X509Data +javax.xml.crypto.dsig.keyinfo.X509IssuerSerial +javax.xml.crypto.dsig.spec.C14NMethodParameterSpec +javax.xml.crypto.dsig.spec.DigestMethodParameterSpec +javax.xml.crypto.dsig.spec.ExcC14NParameterSpec +javax.xml.crypto.dsig.spec.HMACParameterSpec +javax.xml.crypto.dsig.spec.SignatureMethodParameterSpec +javax.xml.crypto.dsig.spec.TransformParameterSpec +javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec +javax.xml.crypto.dsig.spec.XPathFilterParameterSpec +javax.xml.crypto.dsig.spec.XPathType +javax.xml.crypto.dsig.spec.XPathType.Filter +javax.xml.crypto.dsig.spec.XSLTTransformParameterSpec javax.xml.datatype.DatatypeConfigurationException javax.xml.datatype.DatatypeConstants javax.xml.datatype.DatatypeFactory @@ -1252,6 +1415,60 @@ javax.xml.validation.SchemaFactoryLoader javax.xml.validation.TypeInfoProvider javax.xml.validation.Validator javax.xml.validation.ValidatorHandler +javax.xml.ws.Action +javax.xml.ws.AsyncHandler +javax.xml.ws.Binding +javax.xml.ws.BindingProvider +javax.xml.ws.BindingType +javax.xml.ws.Dispatch +javax.xml.ws.Endpoint +javax.xml.ws.EndpointContext +javax.xml.ws.EndpointReference +javax.xml.ws.FaultAction +javax.xml.ws.Holder +javax.xml.ws.LogicalMessage +javax.xml.ws.ProtocolException +javax.xml.ws.Provider +javax.xml.ws.RequestWrapper +javax.xml.ws.RespectBinding +javax.xml.ws.RespectBindingFeature +javax.xml.ws.Response +javax.xml.ws.ResponseWrapper +javax.xml.ws.Service +javax.xml.ws.ServiceMode +javax.xml.ws.WebEndpoint +javax.xml.ws.WebFault +javax.xml.ws.WebServiceClient +javax.xml.ws.WebServiceContext +javax.xml.ws.WebServiceException +javax.xml.ws.WebServiceFeature +javax.xml.ws.WebServicePermission +javax.xml.ws.WebServiceProvider +javax.xml.ws.WebServiceRef +javax.xml.ws.WebServiceRefs +javax.xml.ws.handler.Handler +javax.xml.ws.handler.HandlerResolver +javax.xml.ws.handler.LogicalHandler +javax.xml.ws.handler.LogicalMessageContext +javax.xml.ws.handler.MessageContext +javax.xml.ws.handler.PortInfo +javax.xml.ws.handler.soap.SOAPHandler +javax.xml.ws.handler.soap.SOAPMessageContext +javax.xml.ws.soap.Addressing +javax.xml.ws.soap.AddressingFeature +javax.xml.ws.soap.MTOM +javax.xml.ws.soap.MTOMFeature +javax.xml.ws.soap.SOAPBinding +javax.xml.ws.soap.SOAPFaultException +javax.xml.ws.spi.Invoker +javax.xml.ws.spi.Provider +javax.xml.ws.spi.ServiceDelegate +javax.xml.ws.spi.WebServiceFeatureAnnotation +javax.xml.ws.spi.http.HttpContext +javax.xml.ws.spi.http.HttpExchange +javax.xml.ws.spi.http.HttpHandler +javax.xml.ws.wsaddressing.W3CEndpointReference +javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder javax.xml.xpath.XPath javax.xml.xpath.XPathConstants javax.xml.xpath.XPathException @@ -1438,3 +1655,4 @@ org.xml.sax.helpers.ParserFactory org.xml.sax.helpers.XMLFilterImpl org.xml.sax.helpers.XMLReaderAdapter org.xml.sax.helpers.XMLReaderFactory + diff --git a/build/tmpl/editions/libraries.properties b/build/tmpl/editions/libraries.properties index 3516844992..0704e9f90f 100644 --- a/build/tmpl/editions/libraries.properties +++ b/build/tmpl/editions/libraries.properties @@ -13,7 +13,7 @@ lib-${package.id}-version: ${library.minorVersion} <#if library.homeUri??>lib-${package.id}-home-uri: ${library.homeUri} <#if library.downloadUri??>lib-${package.id}-download-uri: ${library.downloadUri} lib-${package.id}-maven-groupId: org.restlet.${edition.id} -lib-${package.id}-maven-artifactId: <#if library.distributions?seq_contains("maven")>org.restlet.lib.<#if package.mavenArtifactId??>${package.mavenArtifactId}<#else>${package.name} +lib-${package.id}-maven-artifactId: ${package.mavenArtifactId} lib-${package.id}-maven-version: <#if package.mavenVersion??>${package.mavenVersion}<#else>${library.minorVersion}<#if library.versionSuffix??>.${library.versionSuffix} diff --git a/build/tmpl/editions/org.restlet.parent.pom.tmpl b/build/tmpl/editions/org.restlet.parent.pom.tmpl index 972f7a272e..5a7e5ed59a 100644 --- a/build/tmpl/editions/org.restlet.parent.pom.tmpl +++ b/build/tmpl/editions/org.restlet.parent.pom.tmpl @@ -38,11 +38,6 @@ Restlet repository http://maven.restlet.org - - maven-db4o - Db4o repository - https://source.db4o.com/maven/ - @@ -111,4 +106,4 @@ - \ No newline at end of file + diff --git a/build/tmpl/editions/pom.tmpl b/build/tmpl/editions/pom.tmpl index cf63d937e7..25cb69749a 100644 --- a/build/tmpl/editions/pom.tmpl +++ b/build/tmpl/editions/pom.tmpl @@ -7,7 +7,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 org.restlet.${edition.id} - org.restlet.lib.<#if package.mavenArtifactId??>${package.mavenArtifactId}<#else>${package.name} + ${package.mavenArtifactId} <#if package.mavenVersion??> ${package.mavenVersion} <#else> @@ -30,7 +30,7 @@ <#if dependency.library.distributions?contains("maven")> org.restlet.${edition.id} - org.restlet.lib.<#if package.mavenArtifactId??>${package.mavenArtifactId}<#else>${package.name} + ${package.mavenArtifactId} ${dependency.library.minorVersion}<#if dependency.library.versionSuffix??>.${dependency.library.versionSuffix} <#else> ${package.mavenGroupId} @@ -82,16 +82,12 @@ ${package.name} - <#if dependency.library.distributions?contains("maven")>org.restlet.lib.<#if package.mavenArtifactId??>${package.mavenArtifactId}<#else>${package.name} - <#if dependency.library.distributions?contains("maven")> - <#noparse>${lib-${dependency.library.id}-version} - <#else> - <#if package.mavenVersion??> + ${package.mavenArtifactId} + <#if package.mavenVersion??> ${package.mavenVersion} - <#else> + <#else> ${dependency.library.minorVersion}<#if dependency.library.versionSuffix??>.${dependency.library.versionSuffix} - - + <#if dependency.mavenScope??>${dependency.mavenScope} diff --git a/build/tmpl/poms/org.restlet.parent.pom b/build/tmpl/poms/org.restlet.parent.pom index cf31eb53aa..f9a5ab56bf 100644 --- a/build/tmpl/poms/org.restlet.parent.pom +++ b/build/tmpl/poms/org.restlet.parent.pom @@ -64,11 +64,6 @@ Restlet repository http://maven.restlet.org - - maven-db4o - Db4o repository - https://source.db4o.com/maven/ - @@ -160,4 +155,4 @@ - \ No newline at end of file + diff --git a/build/tmpl/poms/org.restlet.parent.pom.tmpl b/build/tmpl/poms/org.restlet.parent.pom.tmpl index bd3e61c9a7..65a66fe795 100644 --- a/build/tmpl/poms/org.restlet.parent.pom.tmpl +++ b/build/tmpl/poms/org.restlet.parent.pom.tmpl @@ -60,11 +60,6 @@ Restlet repository http://maven.restlet.org - - maven-db4o - Db4o repository - https://source.db4o.com/maven/ - @@ -124,4 +119,4 @@ - \ No newline at end of file + diff --git a/build/tmpl/poms/pom.tmpl b/build/tmpl/poms/pom.tmpl index 910e14bfb9..a61c1f56b3 100644 --- a/build/tmpl/poms/pom.tmpl +++ b/build/tmpl/poms/pom.tmpl @@ -31,7 +31,7 @@ ${package.name} - <#if dependency.library.distributions?contains("maven")>org.restlet.lib.<#if package.mavenArtifactId??>${package.mavenArtifactId}<#else>${package.name} + ${package.mavenArtifactId} <#if dependency.library.distributions?contains("maven")> <#noparse>${lib-${dependency.library.id}-version} <#else> @@ -63,4 +63,4 @@ - \ No newline at end of file + diff --git a/build/tmpl/text/changes.txt b/build/tmpl/text/changes.txt index 08ad3005e8..61843176aa 100644 --- a/build/tmpl/text/changes.txt +++ b/build/tmpl/text/changes.txt @@ -4,96 +4,43 @@ Changes log =========== - @version-full@ (@release-date@) - - New features - - - - - Enhancements - - Updated agent.properties file with recent Opera user agent signature. - - Added Resource#toRepresentation(Object, MediaType) convenience method. - - Added ConverterService#toRepresentation(Object, MediaType) convenience method. - - Added ConverterService#toRepresentation(Object, Variant) convenience method. - - Added static Resource#toInteger, toFloat, toByte, toLong, toDouble, toBoolean - methods accepting 'null' string values to facilitate the processing of path - variables and query parameters. - - Renamed StatusService methods from getRepresentation(...) and getStatus(...) to - toRepresentation(...) and toStatus(...), added additional parameters to allow - access to throwable and converter service if available. - - Aligned behavior of StatusService (underlying StatusFilter) with the behavior of - the ServerResource#doCatch() method in case a throwable is intercepted. - - Added org.restlet.resource.@Status annotation type to automatically convert - Throwable Java classes between HTTP statuses and error response entities. - NOTE: implementation is in progress. - - StatusService.toStatus(Throwable, ...) methods now support @Status annotations - to set the proper code. - - - Bug fixed - - ObjectRepresentation wasn't closing a Decoder in case reading exceptions occured. - - ServerResource#doCatch() method wasn't invoking StatusService to set the error - representation if empty. - -- 2.3 Milestone 2 (05/06/2014) - - New features - - APISpark extension now includes an Introspector service (see main method) that - can analyze a Restlet Application, introspect its web API definition and push - it to APISpark.com PaaS for online and intuive documentation. Added user guide - page to describe the process and parameters. API contract can be created or - updated (replaced) remotely. - + - API changes + - Enhanced HTML extension (moved StatusInfoConverter). Issue #1005. + - Reference scheme reverts to http when using https. Issue #998. + Reported by Stephen C. Pope. + - Removed previous attempts to add asynchronous representation + handling to make room for simpler solution based on Netty. + - Removed WebDAV methods in Method class and engine. + - Removed deprecated StatusService from Component. Please use the + StatusService in Application instead. + - Added bytes array support in DefaultConverter and Representation + (via getBytes() method). - Enhancements - - Added HTTPS support to Jetty connector. Issue #793. - Contributed by Tal Liron. - - ServletWarEntity and ZipEntryEntity ignore the timeToLive parameter. Issue #866. - Reported and contributed by Jeremy Gustie. - - ServletWarEntity is limited to file system modification dates. Issue #868. - Reported and contributed by Jeremy Gustie. - - - Bug fixed - - Added copy of Servlet request parameters to the Restlet request attributes. Issue #741. - Reported by Steve Rowe and contributed by Jeremy Gustie. - - Stripped Servlet container generated "jsessionid" matrix parameter. Issue #770 - Reported and contributed by Jeremy Gustie. - - Fixed CompositeHelper.handle fails when Component has no inbound filters. Issue #865. - Reported and contributed by Jeremy Gustie. - - Fixed missing internal FTP client connector registration. - - Fixed missing internal HTTPS server isn't properly registered. - Reported by Roy Olsen. - - Fixed forgotten traces to the console #911, #905, #904. - Reported by Emanuele Massara. - - Fixed missing default values for DefaultSslContextFactory attributes, issue #903. - - Prevented NPE in org.httpclient.internal.HttpMethodCall.getStatusCode, issue #871. - Reported by Claus Ibsen. - - Stabilized Swagger documentation for JAX-RS applications. Issue #827. - + - Added Netty connector. + - Bugs + - Reintroduced registration by default of the internal HTTP server + connectors in JEE edition. + - FormDataSet not properly serializing text/plain files. Issue #1006. + Reported by John Aylward. + - Fixed fileupload extension for GAE and JEE editions. + - Fixed potential NPE. Issue #1004. + Reported by Philippe Perrault. + - Fixed malformed JSON in the JsonpRepresentation. + Reported by Wagner Correa Ramos. + - Fixed NPE when OAuth refresh token request when no scope is provided. + Issue #1080. Reported by Gernot Pansy. - Misc - - Removed unecessary ".properties" files from the distributions, issue #892. - - Added mention of edition and version in Javadoc header. - - Lowered trace level from 'info' to 'fine' for OBAP pseudo client. + - Completed the Javadocs for query parameter declarations inside + HTTP method annotations such as @Get("json?param=val). + - Removed lesser used/maintained extensions (e4, XDB) + - Removed connectors that will be replaced by the Netty connector + (Apache HTTP Client, Simple, NIO). + - Removed NIO related classes from Restlet Engine packages to save + space (we will now rely on Netty). + - Removed deprecated XML configuration classes. -- 2.3 Milestone 1 (03/27/2014) - - New features - - Added initial APISpark extension. Issue #875. - - Added Jetty client for HTTP and HTTPS. Issue #512. - Contributed by Tal Liron. - - - Enhancements - - Upgraded project to Java 7. Issue #874. - - Upgraded Jetty connector to version 9.1.3. Issue #793. - Contributed by Tal Liron. - - Upgraded Servlet API to version 3.1. - - Upgraded JAX-RS API to version 2.0. - - Added JBoss RESTEasy library version 3.0.6. - - Added Reference constructor taking two URI instances. - - Added Message#getHeaders() method to facilitate raw HTTP - headers manipulation. Issue #879. - Suggested by Robert Fischer, Jack Jones and others. - - Moved Header class to org.restlet.util package. - - Integration of new Guice extension, issue #489. - Reported and contributed by Tim Peierls. +- 3.0 M1 (12/19/2014) + - API changes + - Removed lesser used/maintained extensions (JDBC, JiBX, jSSLUtils, + ROME, SIP, WebDAV, XStream). - - Misc - - Refactored test cases to test all combinations of connectors - including server (Internal, Jetty, NIO, Simple) and - client (Apache, Internal, Jetty, NIO) - - Started integration of Restlet JAX-RS extension with RESTEasy. - - Removed AJP (Tomcat protocol) support from the Jetty extension. - Not supported anymore by Eclipse Jetty 9.1. diff --git a/build/tmpl/text/editionsMatrix.txt b/build/tmpl/text/editionsMatrix.txt old mode 100755 new mode 100644 diff --git a/build/tmpl/text/license.txt b/build/tmpl/text/license.txt index a53b04eaf0..b764ef00f1 100644 --- a/build/tmpl/text/license.txt +++ b/build/tmpl/text/license.txt @@ -6,10 +6,9 @@ License agreement Version 6.3, January 2012 -This software distribution, including the "Restlet API" and the "Restlet Framework", -is provided to you under either the Apache license version 2.0 or the LGPL license -version 3.0 or the LGPL license version 2.1 or the CDDL license version 1.0 or the -EPL license version 1.0. +This software distribution, including the "Restlet API" and the "Restlet Framework", +is provided to you under either the Apache license version 2.0 or the EPL license +version 1.0. In addition, we want to expressly mention that Restlet, the only copyright holder of the whole source code, has no intention to release future @@ -199,1024 +198,6 @@ not on behalf of any other Contributor, and only if You agree to indemnify, defe and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -_______________________________________________________________________ - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - -_______________________________________________________________________ - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - -_______________________________________________________________________ - - -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - - - 1. Definitions. - - 1.1. "Contributor" means each individual or entity that - creates or contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the - Original Software, prior Modifications used by a - Contributor (if any), and the Modifications made by that - particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or - (b) Modifications, or (c) the combination of files - containing Original Software with files containing - Modifications, in each case including portions thereof. - - 1.4. "Executable" means the Covered Software in any form - other than Source Code. - - 1.5. "Initial Developer" means the individual or entity - that first makes Original Software available under this - License. - - 1.6. "Larger Work" means a work which combines Covered - Software or portions thereof with code not governed by the - terms of this License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the - maximum extent possible, whether at the time of the initial - grant or subsequently acquired, any and all of the rights - conveyed herein. - - 1.9. "Modifications" means the Source Code and Executable - form of any of the following: - - A. Any file that results from an addition to, - deletion from or modification of the contents of a - file containing Original Software or previous - Modifications; - - B. Any new file that contains any part of the - Original Software or previous Modification; or - - C. Any new file that is contributed or otherwise made - available under the terms of this License. - - 1.10. "Original Software" means the Source Code and - Executable form of computer software code that is - originally released under this License. - - 1.11. "Patent Claims" means any patent claim(s), now owned - or hereafter acquired, including without limitation, - method, process, and apparatus claims, in any patent - Licensable by grantor. - - 1.12. "Source Code" means (a) the common form of computer - software code in which modifications are made and (b) - associated documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal - entity exercising rights under, and complying with all of - the terms of, this License. For legal entities, "You" - includes any entity which controls, is controlled by, or is - under common control with You. For purposes of this - definition, "control" means (a) the power, direct or - indirect, to cause the direction or management of such - entity, whether by contract or otherwise, or (b) ownership - of more than fifty percent (50%) of the outstanding shares - or beneficial ownership of such entity. - - 2. License Grants. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and - subject to third party intellectual property claims, the - Initial Developer hereby grants You a world-wide, - royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than - patent or trademark) Licensable by Initial Developer, - to use, reproduce, modify, display, perform, - sublicense and distribute the Original Software (or - portions thereof), with or without Modifications, - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, - using or selling of Original Software, to make, have - made, use, practice, sell, and offer for sale, and/or - otherwise dispose of the Original Software (or - portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) - are effective on the date Initial Developer first - distributes or otherwise makes the Original Software - available to a third party under the terms of this - License. - - (d) Notwithstanding Section 2.1(b) above, no patent - license is granted: (1) for code that You delete from - the Original Software, or (2) for infringements - caused by: (i) the modification of the Original - Software, or (ii) the combination of the Original - Software with other software or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and - subject to third party intellectual property claims, each - Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - (a) under intellectual property rights (other than - patent or trademark) Licensable by Contributor to - use, reproduce, modify, display, perform, sublicense - and distribute the Modifications created by such - Contributor (or portions thereof), either on an - unmodified basis, with other Modifications, as - Covered Software and/or as part of a Larger Work; and - - - (b) under Patent Claims infringed by the making, - using, or selling of Modifications made by that - Contributor either alone and/or in combination with - its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, - have made, and/or otherwise dispose of: (1) - Modifications made by that Contributor (or portions - thereof); and (2) the combination of Modifications - made by that Contributor with its Contributor Version - (or portions of such combination). - - (c) The licenses granted in Sections 2.2(a) and - 2.2(b) are effective on the date Contributor first - distributes or otherwise makes the Modifications - available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent - license is granted: (1) for any code that Contributor - has deleted from the Contributor Version; (2) for - infringements caused by: (i) third party - modifications of Contributor Version, or (ii) the - combination of Modifications made by that Contributor - with other software (except as part of the - Contributor Version) or other devices; or (3) under - Patent Claims infringed by Covered Software in the - absence of Modifications made by that Contributor. - - 3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make - available in Executable form must also be made available in - Source Code form and that Source Code form must be - distributed only under the terms of this License. You must - include a copy of this License with every copy of the - Source Code form of the Covered Software You distribute or - otherwise make available. You must inform recipients of any - such Covered Software in Executable form as to how they can - obtain such Covered Software in Source Code form in a - reasonable manner on or through a medium customarily used - for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You - contribute are governed by the terms of this License. You - represent that You believe Your Modifications are Your - original creation(s) and/or You have sufficient rights to - grant the rights conveyed by this License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications - that identifies You as the Contributor of the Modification. - You may not remove or alter any copyright, patent or - trademark notices contained within the Covered Software, or - any notices of licensing or any descriptive text giving - attribution to any Contributor or the Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered - Software in Source Code form that alters or restricts the - applicable version of this License or the recipients? - rights hereunder. You may choose to offer, and to charge a - fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Software. - However, you may do so only on Your own behalf, and not on - behalf of the Initial Developer or any Contributor. You - must make it absolutely clear that any such warranty, - support, indemnity or liability obligation is offered by - You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred - by the Initial Developer or such Contributor as a result of - warranty, support, indemnity or liability terms You offer. - - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered - Software under the terms of this License or under the terms - of a license of Your choice, which may contain terms - different from this License, provided that You are in - compliance with the terms of this License and that the - license for the Executable form does not attempt to limit - or alter the recipient?s rights in the Source Code form - from the rights set forth in this License. If You - distribute the Covered Software in Executable form under a - different license, You must make it absolutely clear that - any terms which differ from this License are offered by You - alone, not by the Initial Developer or Contributor. You - hereby agree to indemnify the Initial Developer and every - Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms - You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software - with other code not governed by the terms of this License - and distribute the Larger Work as a single product. In such - a case, You must make sure the requirements of this License - are fulfilled for the Covered Software. - - 4. Versions of the License. - - 4.1. New Versions. - - Sun Microsystems, Inc. is the initial license steward and - may publish revised and/or new versions of this License - from time to time. Each version will be given a - distinguishing version number. Except as provided in - Section 4.3, no one other than the license steward has the - right to modify this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise - make the Covered Software available under the terms of the - version of the License under which You originally received - the Covered Software. If the Initial Developer includes a - notice in the Original Software prohibiting it from being - distributed or otherwise made available under any - subsequent version of the License, You must distribute and - make the Covered Software available under the terms of the - version of the License under which You originally received - the Covered Software. Otherwise, You may also choose to - use, distribute or otherwise make the Covered Software - available under the terms of any subsequent version of the - License published by the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a - new license for Your Original Software, You may create and - use a modified version of this License if You: (a) rename - the license and remove any references to the name of the - license steward (except to note that the license differs - from this License); and (b) otherwise make it clear that - the license contains terms which differ from this License. - - - 5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" - BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED - SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR - PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND - PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY - COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE - INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF - ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF - WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS - DISCLAIMER. - - 6. TERMINATION. - - 6.1. This License and the rights granted hereunder will - terminate automatically if You fail to comply with terms - herein and fail to cure such breach within 30 days of - becoming aware of the breach. Provisions which, by their - nature, must remain in effect beyond the termination of - this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or - a Contributor (the Initial Developer or Contributor against - whom You assert such claim is referred to as "Participant") - alleging that the Participant Software (meaning the - Contributor Version where the Participant is a Contributor - or the Original Software where the Participant is the - Initial Developer) directly or indirectly infringes any - patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial - Developer (if the Initial Developer is not the Participant) - and all Contributors under Sections 2.1 and/or 2.2 of this - License shall, upon 60 days notice from Participant - terminate prospectively and automatically at the expiration - of such 60 day notice period, unless if within such 60 day - period You withdraw Your claim with respect to the - Participant Software against such Participant either - unilaterally or pursuant to a written agreement with - Participant. - - 6.3. In the event of termination under Sections 6.1 or 6.2 - above, all end user licenses that have been validly granted - by You or any distributor hereunder prior to termination - (excluding licenses granted to You by any distributor) - shall survive termination. - - 7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE - LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR - CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT - LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK - STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL - INJURY RESULTING FROM SUCH PARTY?S NEGLIGENCE TO THE EXTENT - APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO - NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR - CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT - APPLY TO YOU. - - 8. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is - defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial - computer software" (as that term is defined at 48 C.F.R. ? - 252.227-7014(a)(1)) and "commercial computer software - documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. - 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 - through 227.7202-4 (June 1995), all U.S. Government End Users - acquire Covered Software with only those rights set forth herein. - This U.S. Government Rights clause is in lieu of, and supersedes, - any other FAR, DFAR, or other clause or provision that addresses - Government rights in computer software under this License. - - 9. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the - extent necessary to make it enforceable. This License shall be - governed by the law of the jurisdiction specified in a notice - contained within the Original Software (except to the extent - applicable law, if any, provides otherwise), excluding such - jurisdiction?s conflict-of-law provisions. Any litigation - relating to this License shall be subject to the jurisdiction of - the courts located in the jurisdiction and venue specified in a - notice contained within the Original Software, with the losing - party responsible for costs, including, without limitation, court - costs and reasonable attorneys? fees and expenses. The - application of the United Nations Convention on Contracts for the - International Sale of Goods is expressly excluded. Any law or - regulation which provides that the language of a contract shall - be construed against the drafter shall not apply to this License. - You agree that You alone are responsible for compliance with the - United States export administration regulations (and the export - control laws and regulation of any other countries) when You use, - distribute or otherwise make available any Covered Software. - - 10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or - indirectly, out of its utilization of rights under this License - and You agree to work with Initial Developer and Contributors to - distribute such responsibility on an equitable basis. Nothing - herein is intended or shall be deemed to constitute any admission - of liability. _______________________________________________________________________ diff --git a/build/tools/bnd/biz.aQute.bnd.jar b/build/tools/bnd/biz.aQute.bnd.jar old mode 100755 new mode 100644 diff --git a/build/tools/bnd/biz.aQute.bndlib.jar b/build/tools/bnd/biz.aQute.bndlib.jar old mode 100755 new mode 100644 diff --git a/build/tools/findbugs/bin/findbugs.bat b/build/tools/findbugs/bin/findbugs.bat old mode 100644 new mode 100755 diff --git a/build/tools/forge/forge.jar b/build/tools/forge/forge.jar index 0e581bf857..d2e4d66580 100644 Binary files a/build/tools/forge/forge.jar and b/build/tools/forge/forge.jar differ diff --git a/incubator/org.restlet.ext.webdav/.classpath b/incubator/org.restlet.ext.webdav/.classpath deleted file mode 100644 index bef28e3828..0000000000 --- a/incubator/org.restlet.ext.webdav/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/incubator/org.restlet.ext.webdav/.project b/incubator/org.restlet.ext.webdav/.project deleted file mode 100644 index b26c199065..0000000000 --- a/incubator/org.restlet.ext.webdav/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.restlet.ext.webdav - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/incubator/org.restlet.ext.webdav/export.jardesc b/incubator/org.restlet.ext.webdav/export.jardesc deleted file mode 100644 index 2b7ada48dc..0000000000 --- a/incubator/org.restlet.ext.webdav/export.jardesc +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/incubator/org.restlet.ext.webdav/module.xml b/incubator/org.restlet.ext.webdav/module.xml deleted file mode 100644 index 555ab23922..0000000000 --- a/incubator/org.restlet.ext.webdav/module.xml +++ /dev/null @@ -1,14 +0,0 @@ - - Restlet Extension - WebDAV - - Support for Web-based Distributed Authoring and Versioning (WebDAV). - - - - - - - - - \ No newline at end of file diff --git a/incubator/org.restlet.ext.webdav/pom.xml b/incubator/org.restlet.ext.webdav/pom.xml deleted file mode 100644 index cb34592e68..0000000000 --- a/incubator/org.restlet.ext.webdav/pom.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - 4.0.0 - - org.restlet.dev - org.restlet.incubator - 2.2-SNAPSHOT - - - org.restlet.ext.webdav - Restlet Extension: WebDAV - Support for WebDAV. - - - org.restlet.dev - org.restlet - ${project.version} - - - diff --git a/incubator/org.restlet.ext.webdav/src/META-INF/services/org.restlet.engine.ProtocolHelper b/incubator/org.restlet.ext.webdav/src/META-INF/services/org.restlet.engine.ProtocolHelper deleted file mode 100644 index 5aee9e0e35..0000000000 --- a/incubator/org.restlet.ext.webdav/src/META-INF/services/org.restlet.engine.ProtocolHelper +++ /dev/null @@ -1 +0,0 @@ -org.restlet.ext.webdav.internal.WebDavProtocolHelper diff --git a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Copy.java b/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Copy.java deleted file mode 100644 index 3949e1ad35..0000000000 --- a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Copy.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright 2005-2011 Noelios Technologies. - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine - * - * Restlet is a registered trademark of Noelios Technologies. - */ - -package org.restlet.ext.webdav; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.restlet.engine.connector.Method; -import org.restlet.service.MetadataService; - -/** - * Annotation for methods that copy a resource from one URI to another. Its - * semantics is equivalent to a WebDAV COPY method. - * - * @author Jerome Louvel - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Method("COPY") -public @interface Copy { - - /** - * Specifies the media type extension of the response entity. If several - * media types are supported, their extension can be specified separated by - * "|" characters. Note that this isn't the full MIME type value, just the - * extension name declared in {@link MetadataService}. For a list of all - * predefined extensions, please check - * {@link MetadataService#addCommonExtensions()}. New extension can be - * registered using - * {@link MetadataService#addExtension(String, org.restlet.data.Metadata)} - * method. - * - * @return The result media types. - */ - String value() default ""; - -} diff --git a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Lock.java b/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Lock.java deleted file mode 100644 index 67b849d3d2..0000000000 --- a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Lock.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright 2005-2011 Noelios Technologies. - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine - * - * Restlet is a registered trademark of Noelios Technologies. - */ - -package org.restlet.ext.webdav; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.restlet.engine.connector.Method; -import org.restlet.service.MetadataService; - -/** - * Annotation for methods that put a lock on a resource. Its semantics is - * equivalent to a WebDAV LOCK method. - * - * @author Jerome Louvel - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Method("LOCK") -public @interface Lock { - - /** - * Specifies the media type extension of the response entity. If several - * media types are supported, their extension can be specified separated by - * "|" characters. Note that this isn't the full MIME type value, just the - * extension name declared in {@link MetadataService}. For a list of all - * predefined extensions, please check - * {@link MetadataService#addCommonExtensions()}. New extension can be - * registered using - * {@link MetadataService#addExtension(String, org.restlet.data.Metadata)} - * method. - * - * @return The result media types. - */ - String value() default ""; - -} diff --git a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/MkCol.java b/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/MkCol.java deleted file mode 100644 index 58223d8745..0000000000 --- a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/MkCol.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright 2005-2011 Noelios Technologies. - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine - * - * Restlet is a registered trademark of Noelios Technologies. - */ - -package org.restlet.ext.webdav; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.restlet.engine.connector.Method; -import org.restlet.service.MetadataService; - -/** - * Annotation for methods that create collections. Its semantics is equivalent - * to a WebDAV MKCOL method. - * - * @author Jerome Louvel - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Method("MKCOL") -public @interface MkCol { - - /** - * Specifies the media type extension of the response entity. If several - * media types are supported, their extension can be specified separated by - * "|" characters. Note that this isn't the full MIME type value, just the - * extension name declared in {@link MetadataService}. For a list of all - * predefined extensions, please check - * {@link MetadataService#addCommonExtensions()}. New extension can be - * registered using - * {@link MetadataService#addExtension(String, org.restlet.data.Metadata)} - * method. - * - * @return The result media types. - */ - String value() default ""; - -} diff --git a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Move.java b/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Move.java deleted file mode 100644 index 3f39ce27a6..0000000000 --- a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Move.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright 2005-2011 Noelios Technologies. - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine - * - * Restlet is a registered trademark of Noelios Technologies. - */ - -package org.restlet.ext.webdav; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.restlet.engine.connector.Method; -import org.restlet.service.MetadataService; - -/** - * Annotation for methods that create collections. Its semantics is equivalent - * to a WebDAV MKCOL method. - * - * @author Jerome Louvel - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Method("MKCOL") -public @interface Move { - - /** - * Specifies the media type extension of the response entity. If several - * media types are supported, their extension can be specified separated by - * "|" characters. Note that this isn't the full MIME type value, just the - * extension name declared in {@link MetadataService}. For a list of all - * predefined extensions, please check - * {@link MetadataService#addCommonExtensions()}. New extension can be - * registered using - * {@link MetadataService#addExtension(String, org.restlet.data.Metadata)} - * method. - * - * @return The result media types. - */ - String value() default ""; - -} diff --git a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/PropFind.java b/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/PropFind.java deleted file mode 100644 index 4bf5bf7777..0000000000 --- a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/PropFind.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright 2005-2011 Noelios Technologies. - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine - * - * Restlet is a registered trademark of Noelios Technologies. - */ - -package org.restlet.ext.webdav; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.restlet.engine.connector.Method; -import org.restlet.service.MetadataService; - -/** - * Annotation for methods that retrieve properties. Its semantics is equivalent - * to a WebDAV PROPFIND method. - * - * @author Jerome Louvel - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Method("PROPFIND") -public @interface PropFind { - - /** - * Specifies the media type extension of the response entity. If several - * media types are supported, their extension can be specified separated by - * "|" characters. Note that this isn't the full MIME type value, just the - * extension name declared in {@link MetadataService}. For a list of all - * predefined extensions, please check - * {@link MetadataService#addCommonExtensions()}. New extension can be - * registered using - * {@link MetadataService#addExtension(String, org.restlet.data.Metadata)} - * method. - * - * @return The result media types. - */ - String value() default ""; - -} diff --git a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/PropPatch.java b/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/PropPatch.java deleted file mode 100644 index ebdd0e37bd..0000000000 --- a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/PropPatch.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright 2005-2011 Noelios Technologies. - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine - * - * Restlet is a registered trademark of Noelios Technologies. - */ - -package org.restlet.ext.webdav; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.restlet.engine.connector.Method; -import org.restlet.service.MetadataService; - -/** - * Annotation for methods that change and delete multiple properties on a - * resource at the same time. Its semantics is equivalent to a WebDAV PROPPATCH - * method. - * - * @author Jerome Louvel - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Method("PROPPATCH") -public @interface PropPatch { - - /** - * Specifies the media type extension of the response entity. If several - * media types are supported, their extension can be specified separated by - * "|" characters. Note that this isn't the full MIME type value, just the - * extension name declared in {@link MetadataService}. For a list of all - * predefined extensions, please check - * {@link MetadataService#addCommonExtensions()}. New extension can be - * registered using - * {@link MetadataService#addExtension(String, org.restlet.data.Metadata)} - * method. - * - * @return The result media types. - */ - String value() default ""; - -} diff --git a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Unlock.java b/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Unlock.java deleted file mode 100644 index 5f92f3932d..0000000000 --- a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/Unlock.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright 2005-2011 Noelios Technologies. - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine - * - * Restlet is a registered trademark of Noelios Technologies. - */ - -package org.restlet.ext.webdav; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.restlet.engine.connector.Method; -import org.restlet.service.MetadataService; - -/** - * Annotation for methods that remove a lock on a resource. Its semantics is - * equivalent to a WebDAV UNLOCK method. - * - * @author Jerome Louvel - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -@Method("UNLOCK") -public @interface Unlock { - - /** - * Specifies the media type extension of the response entity. If several - * media types are supported, their extension can be specified separated by - * "|" characters. Note that this isn't the full MIME type value, just the - * extension name declared in {@link MetadataService}. For a list of all - * predefined extensions, please check - * {@link MetadataService#addCommonExtensions()}. New extension can be - * registered using - * {@link MetadataService#addExtension(String, org.restlet.data.Metadata)} - * method. - * - * @return The result media types. - */ - String value() default ""; - -} diff --git a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/WebDavMethod.java b/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/WebDavMethod.java deleted file mode 100644 index 44230d33fe..0000000000 --- a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/WebDavMethod.java +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Copyright 2005-2011 Noelios Technologies. - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine - * - * Restlet is a registered trademark of Noelios Technologies. - */ - -package org.restlet.ext.webdav; - -import org.restlet.data.Method; - -/** - * Constants for WebDAV methods. - * - * @author Jerome Louvel - */ -public final class WebDavMethod { - - private static final String BASE_WEBDAV = "http://tools.ietf.org/html/rfc4918"; - - /** - * Retrieves the properties defined on the resource. - * - * @see WebDAV RFC - * - 9.1 PROPFIND - */ - public static final Method PROPFIND = new Method("PROPFIND", - "Retrieve properties", BASE_WEBDAV + "#section-9.1", true, true); - - /** - * Sets and/or removes properties defined on the resource. - * - * @see WebDAV RFC - * - 9.2 PROPPATCH - */ - public static final Method PROPPATCH = new Method("PROPPATCH", - "Sets and/or removes properties", BASE_WEBDAV + "#section-9.2", - false, true); - - /** - * Creates a new collection resource. - * - * @see WebDAV RFC - * - 9.3 MKCOL - */ - public static final Method MKCOL = new Method("MKCOL", - "Creates a new collection resource", BASE_WEBDAV + "#section-9.3", - false, true); - - /** - * Creates a duplicate of the source resource identified in the destination - * resource. - * - * @see WebDAV RFC - * - 9.8 COPY - */ - public static final Method COPY = new Method("COPY", - "Creates a duplicate resource", BASE_WEBDAV + "#section-9.8", - false, true); - - /** - * Moves the source resource identified in the destination resource. - * - * @see WebDAV RFC - * - 9.9 MOVE - */ - public static final Method MOVE = new Method("MOVE", "Moves the resource", - BASE_WEBDAV + "#section-9.9", false, true); - - /** - * Takes out a lock of any access type or refreshes an existing lock. - * - * @see WebDAV RFC - * - 9.10 LOCK - */ - public static final Method LOCK = new Method("LOCK", - "Takes out or refreshes a lock", BASE_WEBDAV + "#section-9.10", - false, false); - - /** - * Removes the lock on the resource. - * - * @see WebDAV RFC - * - 9.11 UNLOCK - */ - public static final Method UNLOCK = new Method("UNLOCK", - "Removes the lock", BASE_WEBDAV + "#section-9.11", false, true); - - /** - * Returns the method associated to a given method name. If an existing - * constant exists then it is returned, otherwise a new instance is created. - * - * @param name - * The method name. - * @return The associated method. - */ - public static Method valueOf(final String name) { - Method result = null; - - if ((name != null) && !name.equals("")) { - if (name.equalsIgnoreCase(PROPFIND.getName())) { - result = PROPFIND; - } else if (name.equalsIgnoreCase(PROPPATCH.getName())) { - result = PROPPATCH; - } else if (name.equalsIgnoreCase(MKCOL.getName())) { - result = MKCOL; - } else if (name.equalsIgnoreCase(COPY.getName())) { - result = COPY; - } else if (name.equalsIgnoreCase(MOVE.getName())) { - result = MOVE; - } else if (name.equalsIgnoreCase(LOCK.getName())) { - result = LOCK; - } else if (name.equalsIgnoreCase(UNLOCK.getName())) { - result = UNLOCK; - } else { - result = new Method(name); - } - } - - return result; - } -} diff --git a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/internal/WebDavProtocolHelper.java b/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/internal/WebDavProtocolHelper.java deleted file mode 100644 index 3f06946392..0000000000 --- a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/internal/WebDavProtocolHelper.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright 2005-2011 Noelios Technologies. - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine - * - * Restlet is a registered trademark of Noelios Technologies. - */ - -package org.restlet.ext.webdav.internal; - -import org.restlet.data.Method; -import org.restlet.engine.connector.ProtocolHelper; -import org.restlet.ext.webdav.WebDavMethod; - -/** - * Protocol helper for the WebDAV protocol. - * - * @author Jerome Louvel - */ -public class WebDavProtocolHelper extends ProtocolHelper { - - @Override - public void registerMethods() { - Method.register(WebDavMethod.COPY); - Method.register(WebDavMethod.LOCK); - Method.register(WebDavMethod.MKCOL); - Method.register(WebDavMethod.MOVE); - Method.register(WebDavMethod.PROPFIND); - Method.register(WebDavMethod.PROPPATCH); - Method.register(WebDavMethod.UNLOCK); - } - -} diff --git a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/package.html b/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/package.html deleted file mode 100644 index 3ffb5b4bd9..0000000000 --- a/incubator/org.restlet.ext.webdav/src/org/restlet/ext/webdav/package.html +++ /dev/null @@ -1,10 +0,0 @@ - - -Support for Web-based Distributed Authoring and Versioning (WebDAV). -

- -@since Restlet 2.0 -@see WebDAV -@see User Guide - WebDAV extension - - diff --git a/libraries/com.db4o_7.12/.classpath b/libraries/com.db4o_7.12/.classpath deleted file mode 100644 index 009ac37878..0000000000 --- a/libraries/com.db4o_7.12/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/libraries/com.db4o_7.12/com.db4o.instrumentation.jar b/libraries/com.db4o_7.12/com.db4o.instrumentation.jar deleted file mode 100644 index 0ec438cfff..0000000000 Binary files a/libraries/com.db4o_7.12/com.db4o.instrumentation.jar and /dev/null differ diff --git a/libraries/com.db4o_7.12/com.db4o.jar b/libraries/com.db4o_7.12/com.db4o.jar deleted file mode 100644 index e7d2c16cf4..0000000000 Binary files a/libraries/com.db4o_7.12/com.db4o.jar and /dev/null differ diff --git a/libraries/com.db4o_7.12/com.db4o.nativequery.jar b/libraries/com.db4o_7.12/com.db4o.nativequery.jar deleted file mode 100644 index ec65bf48c7..0000000000 Binary files a/libraries/com.db4o_7.12/com.db4o.nativequery.jar and /dev/null differ diff --git a/libraries/com.db4o_7.12/com.db4o.optional.jar b/libraries/com.db4o_7.12/com.db4o.optional.jar deleted file mode 100644 index 112e1a8dd5..0000000000 Binary files a/libraries/com.db4o_7.12/com.db4o.optional.jar and /dev/null differ diff --git a/libraries/com.db4o_7.12/com.db4o.ta.jar b/libraries/com.db4o_7.12/com.db4o.ta.jar deleted file mode 100644 index 5e0809ccc3..0000000000 Binary files a/libraries/com.db4o_7.12/com.db4o.ta.jar and /dev/null differ diff --git a/libraries/com.db4o_7.12/com.db4o.tools.jar b/libraries/com.db4o_7.12/com.db4o.tools.jar deleted file mode 100644 index 32e5f8904c..0000000000 Binary files a/libraries/com.db4o_7.12/com.db4o.tools.jar and /dev/null differ diff --git a/libraries/com.db4o_7.12/library.xml b/libraries/com.db4o_7.12/library.xml deleted file mode 100644 index ccb9177ad6..0000000000 --- a/libraries/com.db4o_7.12/library.xml +++ /dev/null @@ -1,44 +0,0 @@ - - Db4o - object database framework - Db4o - object database framework. - 7.12 - 132 - http://www.db4o.com/ - http://developer.db4o.com/Downloads.aspx - Versant - - - - com.db4o - - - - - com.db4o - - - - - com.db4o - - - - - com.db4o - - - - - com.db4o - - - - - com.db4o - - - - - - - diff --git a/libraries/com.db4o_7.12/license.txt b/libraries/com.db4o_7.12/license.txt deleted file mode 100644 index daef9efc37..0000000000 --- a/libraries/com.db4o_7.12/license.txt +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. - diff --git a/libraries/com.db4o_7.12/readme.txt b/libraries/com.db4o_7.12/readme.txt deleted file mode 100644 index e6ce2ac7a6..0000000000 --- a/libraries/com.db4o_7.12/readme.txt +++ /dev/null @@ -1,16 +0,0 @@ ------------------------------------- -db4o - Native object database engine ------------------------------------- - -"db4o is the open source object database that enables Java and .NET developers -to slash development time and costs and achieve unprecedented levels of -performance. The unique design of db4o's native object database engine makes -it the ideal choice to be embedded in equipment and devices, in packaged -software running on mobile or desktop platforms, or in real-time control -systems - in short: in all Java and .NET environments, where no database -administrator (DBA) is present." - -Distributed under a dual license: GPL or commercial. - -For more information: -http://www.db4o.com/ diff --git a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.annotations.jar b/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.annotations.jar deleted file mode 100644 index b62c87d7ed..0000000000 Binary files a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.annotations.jar and /dev/null differ diff --git a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.core.jar b/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.core.jar deleted file mode 100644 index 24318a4640..0000000000 Binary files a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.core.jar and /dev/null differ diff --git a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.csv.jar b/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.csv.jar deleted file mode 100644 index 7a46918a6a..0000000000 Binary files a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.csv.jar and /dev/null differ diff --git a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.databind.jar b/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.databind.jar deleted file mode 100644 index 8545084786..0000000000 Binary files a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.databind.jar and /dev/null differ diff --git a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.jaxb.jar b/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.jaxb.jar deleted file mode 100644 index 946de9f68b..0000000000 Binary files a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.jaxb.jar and /dev/null differ diff --git a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.smile.jar b/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.smile.jar deleted file mode 100644 index 0e4986a3dd..0000000000 Binary files a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.smile.jar and /dev/null differ diff --git a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.xml.jar b/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.xml.jar deleted file mode 100644 index 34067f1e2f..0000000000 Binary files a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.xml.jar and /dev/null differ diff --git a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.yaml.jar b/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.yaml.jar deleted file mode 100644 index e1efd310f5..0000000000 Binary files a/libraries/com.fasterxml.jackson_2.2/com.fasterxml.jackson.yaml.jar and /dev/null differ diff --git a/libraries/com.fasterxml.jackson_2.2/.classpath b/libraries/com.fasterxml.jackson_2.4/.classpath similarity index 84% rename from libraries/com.fasterxml.jackson_2.2/.classpath rename to libraries/com.fasterxml.jackson_2.4/.classpath index e10c5be0c5..f4b11c9948 100644 --- a/libraries/com.fasterxml.jackson_2.2/.classpath +++ b/libraries/com.fasterxml.jackson_2.4/.classpath @@ -9,5 +9,7 @@ + + diff --git a/libraries/org.json4s_2.10/.gitignore b/libraries/com.fasterxml.jackson_2.4/.gitignore similarity index 100% rename from libraries/org.json4s_2.10/.gitignore rename to libraries/com.fasterxml.jackson_2.4/.gitignore diff --git a/libraries/com.fasterxml.jackson_2.2/.project b/libraries/com.fasterxml.jackson_2.4/.project similarity index 100% rename from libraries/com.fasterxml.jackson_2.2/.project rename to libraries/com.fasterxml.jackson_2.4/.project diff --git a/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.annotations.jar b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.annotations.jar new file mode 100644 index 0000000000..4779188a9f Binary files /dev/null and b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.annotations.jar differ diff --git a/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.cbor.jar b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.cbor.jar new file mode 100644 index 0000000000..8a536d2b80 Binary files /dev/null and b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.cbor.jar differ diff --git a/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.core.jar b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.core.jar new file mode 100644 index 0000000000..da2a877f18 Binary files /dev/null and b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.core.jar differ diff --git a/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.csv.jar b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.csv.jar new file mode 100644 index 0000000000..f561dc10ff Binary files /dev/null and b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.csv.jar differ diff --git a/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.databind.jar b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.databind.jar new file mode 100644 index 0000000000..e945e5e800 Binary files /dev/null and b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.databind.jar differ diff --git a/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.jaxb.jar b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.jaxb.jar new file mode 100644 index 0000000000..96955b099f Binary files /dev/null and b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.jaxb.jar differ diff --git a/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.jsonschema.jar b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.jsonschema.jar new file mode 100644 index 0000000000..25a3a306da Binary files /dev/null and b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.jsonschema.jar differ diff --git a/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.smile.jar b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.smile.jar new file mode 100644 index 0000000000..2a6b285190 Binary files /dev/null and b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.smile.jar differ diff --git a/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.xml.jar b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.xml.jar new file mode 100644 index 0000000000..8f0fa34d09 Binary files /dev/null and b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.xml.jar differ diff --git a/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.yaml.jar b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.yaml.jar new file mode 100644 index 0000000000..7770cb9184 Binary files /dev/null and b/libraries/com.fasterxml.jackson_2.4/com.fasterxml.jackson.yaml.jar differ diff --git a/libraries/com.fasterxml.jackson_2.2/library.xml b/libraries/com.fasterxml.jackson_2.4/library.xml similarity index 82% rename from libraries/com.fasterxml.jackson_2.2/library.xml rename to libraries/com.fasterxml.jackson_2.4/library.xml index d850eb072f..6a1033b360 100644 --- a/libraries/com.fasterxml.jackson_2.2/library.xml +++ b/libraries/com.fasterxml.jackson_2.4/library.xml @@ -1,8 +1,8 @@ High-performance JSON processor High-performance JSON processor - 2.2 - 3 + 2.4 + 4 http://jackson.codehaus.org/ http://wiki.fasterxml.com/JacksonDownload The Codehaus foundation @@ -37,6 +37,12 @@ jackson-dataformat-smile + + + com.fasterxml.jackson.dataformat + jackson-dataformat-cbor + + com.fasterxml.jackson.dataformat @@ -55,6 +61,12 @@ jackson-module-jaxb-annotations + + + com.fasterxml.jackson.module + jackson-module-jsonSchema + + diff --git a/libraries/com.fasterxml.jackson_2.2/license.txt b/libraries/com.fasterxml.jackson_2.4/license.txt similarity index 100% rename from libraries/com.fasterxml.jackson_2.2/license.txt rename to libraries/com.fasterxml.jackson_2.4/license.txt diff --git a/libraries/com.fasterxml.jackson_2.2/readme.txt b/libraries/com.fasterxml.jackson_2.4/readme.txt similarity index 100% rename from libraries/com.fasterxml.jackson_2.2/readme.txt rename to libraries/com.fasterxml.jackson_2.4/readme.txt diff --git a/libraries/com.google.appengine_1.4/.classpath b/libraries/com.google.appengine_1.9/.classpath similarity index 100% rename from libraries/com.google.appengine_1.4/.classpath rename to libraries/com.google.appengine_1.9/.classpath diff --git a/libraries/com.google.appengine_1.4/.project b/libraries/com.google.appengine_1.9/.project similarity index 100% rename from libraries/com.google.appengine_1.4/.project rename to libraries/com.google.appengine_1.9/.project diff --git a/libraries/com.google.appengine_1.4/com.google.appengine.jar b/libraries/com.google.appengine_1.9/com.google.appengine.jar similarity index 52% rename from libraries/com.google.appengine_1.4/com.google.appengine.jar rename to libraries/com.google.appengine_1.9/com.google.appengine.jar index 9fbb3a28e5..d7cb68954d 100644 Binary files a/libraries/com.google.appengine_1.4/com.google.appengine.jar and b/libraries/com.google.appengine_1.9/com.google.appengine.jar differ diff --git a/libraries/com.google.appengine_1.4/library.xml b/libraries/com.google.appengine_1.9/library.xml similarity index 91% rename from libraries/com.google.appengine_1.4/library.xml rename to libraries/com.google.appengine_1.9/library.xml index 4a6fe254a1..de8445a040 100644 --- a/libraries/com.google.appengine_1.4/library.xml +++ b/libraries/com.google.appengine_1.9/library.xml @@ -1,8 +1,8 @@ Google App Engine API Google App Engine API. - 1.4 - 3 + 1.9 + 15 http://code.google.com/appengine/ http://code.google.com/appengine/downloads.html#Google_App_Engine_SDK_for_Java Google Inc. diff --git a/libraries/com.google.appengine_1.4/license.txt b/libraries/com.google.appengine_1.9/license.txt similarity index 100% rename from libraries/com.google.appengine_1.4/license.txt rename to libraries/com.google.appengine_1.9/license.txt diff --git a/libraries/com.google.appengine_1.4/readme.txt b/libraries/com.google.appengine_1.9/readme.txt similarity index 100% rename from libraries/com.google.appengine_1.4/readme.txt rename to libraries/com.google.appengine_1.9/readme.txt diff --git a/libraries/com.google.collections_1.0/.project b/libraries/com.google.collections_1.0/.project deleted file mode 100644 index a17f5e593d..0000000000 --- a/libraries/com.google.collections_1.0/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - com.google.collections - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/libraries/com.google.collections_1.0/com.google.collections.jar b/libraries/com.google.collections_1.0/com.google.collections.jar deleted file mode 100644 index 9f971b011c..0000000000 Binary files a/libraries/com.google.collections_1.0/com.google.collections.jar and /dev/null differ diff --git a/libraries/com.google.collections_1.0/library.xml b/libraries/com.google.collections_1.0/library.xml deleted file mode 100644 index ffb6127381..0000000000 --- a/libraries/com.google.collections_1.0/library.xml +++ /dev/null @@ -1,17 +0,0 @@ - - Google Collections - Google collections. - 1.0 - http://code.google.com/p/google-collections/ - Google Inc. - - - - com.google.collections - google-collections - - - - - - diff --git a/libraries/com.google.collections_1.0/readme.txt b/libraries/com.google.collections_1.0/readme.txt deleted file mode 100644 index 229289706d..0000000000 --- a/libraries/com.google.collections_1.0/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ ------------------------------------------------------------ -Google-collections - Google Collections Library ------------------------------------------------------------ - -"The Google Collections Library 1.0 is a set of new collection -types, implementations and related goodness for Java 5 -and higher, brought to you by Google." - -For more information: -http://code.google.com/p/google-collections/ \ No newline at end of file diff --git a/libraries/com.google.gson_2.2/com.google.gson.jar b/libraries/com.google.gson_2.2/com.google.gson.jar deleted file mode 100644 index 9478253e8c..0000000000 Binary files a/libraries/com.google.gson_2.2/com.google.gson.jar and /dev/null differ diff --git a/libraries/com.google.gson_2.2/.classpath b/libraries/com.google.gson_2.3/.classpath similarity index 100% rename from libraries/com.google.gson_2.2/.classpath rename to libraries/com.google.gson_2.3/.classpath diff --git a/libraries/com.google.gson_2.2/.project b/libraries/com.google.gson_2.3/.project similarity index 95% rename from libraries/com.google.gson_2.2/.project rename to libraries/com.google.gson_2.3/.project index d855f368a5..cf54f47192 100644 --- a/libraries/com.google.gson_2.2/.project +++ b/libraries/com.google.gson_2.3/.project @@ -1,17 +1,17 @@ - - - com.google.gson - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + com.google.gson + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/libraries/com.google.gson_2.3/com.google.gson.jar b/libraries/com.google.gson_2.3/com.google.gson.jar new file mode 100644 index 0000000000..250132c197 Binary files /dev/null and b/libraries/com.google.gson_2.3/com.google.gson.jar differ diff --git a/libraries/com.google.gson_2.2/library.xml b/libraries/com.google.gson_2.3/library.xml similarity index 83% rename from libraries/com.google.gson_2.2/library.xml rename to libraries/com.google.gson_2.3/library.xml index 50038b14e0..fcea404fee 100644 --- a/libraries/com.google.gson_2.2/library.xml +++ b/libraries/com.google.gson_2.3/library.xml @@ -1,8 +1,8 @@ Google GSon Google GSon. - 2.2 - 4 + 2.3 + 1 http://code.google.com/p/google-gson/ http://code.google.com/p/google-gson/downloads/list Google Inc. @@ -10,7 +10,7 @@ com.google.code.gson - gson + gson diff --git a/libraries/com.google.collections_1.0/license.txt b/libraries/com.google.gson_2.3/license.txt similarity index 100% rename from libraries/com.google.collections_1.0/license.txt rename to libraries/com.google.gson_2.3/license.txt diff --git a/libraries/com.google.gson_2.2/readme.txt b/libraries/com.google.gson_2.3/readme.txt similarity index 97% rename from libraries/com.google.gson_2.2/readme.txt rename to libraries/com.google.gson_2.3/readme.txt index 7f27e4cb91..794621f764 100644 --- a/libraries/com.google.gson_2.2/readme.txt +++ b/libraries/com.google.gson_2.3/readme.txt @@ -1,13 +1,13 @@ ------------------------------------------------------------ -GSon - A Java library to convert JSON to Java objects - and vice-versa ------------------------------------------------------------ - -"Gson is a Java library that can be used to convert Java -Objects into their JSON representation. It can also be used - to convert a JSON string to an equivalent Java object. -Gson can work with arbitrary Java objects including -pre-existing objects that you do not have source-code of. " - -For more information: +----------------------------------------------------------- +GSon - A Java library to convert JSON to Java objects + and vice-versa +----------------------------------------------------------- + +"Gson is a Java library that can be used to convert Java +Objects into their JSON representation. It can also be used + to convert a JSON string to an equivalent Java object. +Gson can work with arbitrary Java objects including +pre-existing objects that you do not have source-code of. " + +For more information: http://code.google.com/p/google-gson/ \ No newline at end of file diff --git a/libraries/org.tanukisoftware.wrapper_3.2/.classpath b/libraries/com.google.guava_16.0/.classpath similarity index 77% rename from libraries/org.tanukisoftware.wrapper_3.2/.classpath rename to libraries/com.google.guava_16.0/.classpath index 3baa1eb709..c978188e37 100644 --- a/libraries/org.tanukisoftware.wrapper_3.2/.classpath +++ b/libraries/com.google.guava_16.0/.classpath @@ -1,6 +1,6 @@ - - - - - - + + + + + + diff --git a/libraries/com.google.guava_16.0/.gitignore b/libraries/com.google.guava_16.0/.gitignore new file mode 100644 index 0000000000..5e56e040ec --- /dev/null +++ b/libraries/com.google.guava_16.0/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/libraries/com.sun.rowset_1.0/.project b/libraries/com.google.guava_16.0/.project similarity index 87% rename from libraries/com.sun.rowset_1.0/.project rename to libraries/com.google.guava_16.0/.project index 10ae2380ec..c914e26eea 100644 --- a/libraries/com.sun.rowset_1.0/.project +++ b/libraries/com.google.guava_16.0/.project @@ -1,6 +1,6 @@ - com.sun.rowset + com.google.guava diff --git a/libraries/com.google.guava_16.0/build.properties b/libraries/com.google.guava_16.0/build.properties new file mode 100644 index 0000000000..86a2a7bf67 --- /dev/null +++ b/libraries/com.google.guava_16.0/build.properties @@ -0,0 +1,2 @@ +bin.includes = META-INF/,\ + com.google.guava.jar diff --git a/libraries/com.google.guava_16.0/com.google.guava.jar b/libraries/com.google.guava_16.0/com.google.guava.jar new file mode 100644 index 0000000000..2c8127d164 Binary files /dev/null and b/libraries/com.google.guava_16.0/com.google.guava.jar differ diff --git a/libraries/com.google.guava_16.0/library.xml b/libraries/com.google.guava_16.0/library.xml new file mode 100644 index 0000000000..80558a22ac --- /dev/null +++ b/libraries/com.google.guava_16.0/library.xml @@ -0,0 +1,18 @@ + + Google Guava + Google Guava. + 16.0 + 1 + http://code.google.com/p/guava/ + Google Inc. + + + + com.google.guava + guava + + + + + + diff --git a/libraries/com.google.gson_2.2/license.txt b/libraries/com.google.guava_16.0/license.txt similarity index 100% rename from libraries/com.google.gson_2.2/license.txt rename to libraries/com.google.guava_16.0/license.txt diff --git a/libraries/com.google.guava_16.0/readme.txt b/libraries/com.google.guava_16.0/readme.txt new file mode 100644 index 0000000000..a09802f138 --- /dev/null +++ b/libraries/com.google.guava_16.0/readme.txt @@ -0,0 +1,11 @@ +------------------------------------------- +Guava - Google Core Libraries for Java 1.6+ +------------------------------------------- + +"The Guava project contains several of Google's core libraries that we rely on +in our Java-based projects: collections, caching, primitives support, +concurrency libraries, common annotations, string processing, I/O, and so +forth." + +For more information: +https://code.google.com/p/guava-libraries/ \ No newline at end of file diff --git a/libraries/com.google.gwt.server_2.3/.classpath b/libraries/com.google.gwt.server_2.3/.classpath old mode 100755 new mode 100644 diff --git a/libraries/com.google.gwt.server_2.3/.project b/libraries/com.google.gwt.server_2.3/.project old mode 100755 new mode 100644 diff --git a/libraries/com.google.gwt.server_2.3/library.xml b/libraries/com.google.gwt.server_2.3/library.xml old mode 100755 new mode 100644 diff --git a/libraries/com.google.gwt.server_2.3/license.txt b/libraries/com.google.gwt.server_2.3/license.txt old mode 100755 new mode 100644 diff --git a/libraries/com.google.gwt.server_2.3/readme.txt b/libraries/com.google.gwt.server_2.3/readme.txt old mode 100755 new mode 100644 diff --git a/libraries/com.google.sdc_1.3/library.xml b/libraries/com.google.sdc_1.3/library.xml index d85411a40c..461fb35972 100644 --- a/libraries/com.google.sdc_1.3/library.xml +++ b/libraries/com.google.sdc_1.3/library.xml @@ -19,7 +19,7 @@ - + diff --git a/libraries/com.sun.rowset_1.0/com.sun.rowset.jar b/libraries/com.sun.rowset_1.0/com.sun.rowset.jar deleted file mode 100644 index 91bca8893a..0000000000 Binary files a/libraries/com.sun.rowset_1.0/com.sun.rowset.jar and /dev/null differ diff --git a/libraries/com.sun.rowset_1.0/library.xml b/libraries/com.sun.rowset_1.0/library.xml deleted file mode 100644 index fc26c788b2..0000000000 --- a/libraries/com.sun.rowset_1.0/library.xml +++ /dev/null @@ -1,13 +0,0 @@ - - JDBC Rowset Implementation - JDBC Rowset Implementation. - 1.0 - http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136101.html - http://java.sun.com/products/jdbc/download.html - Sun Microsystems Inc. - - - - - - diff --git a/libraries/com.sun.rowset_1.0/license.txt b/libraries/com.sun.rowset_1.0/license.txt deleted file mode 100644 index f2bbf0e67f..0000000000 --- a/libraries/com.sun.rowset_1.0/license.txt +++ /dev/null @@ -1,201 +0,0 @@ -Sun Microsystems, Inc. Binary Code License Agreement - -READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED -SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT") -CAREFULLY BEFORE OPENING THE SOFTWARE MEDIA PACKAGE. BY -OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS -OF THIS AGREEMENT. IF YOU ARE ACCESSING THE SOFTWARE -ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY -SELECTING THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT. -IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN THE -UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR, -IF THE SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE -"DECLINE" BUTTON AT THE END OF THIS AGREEMENT. - -1. LICENSE TO USE. Sun grants you a non-exclusive and -non-transferable license for the internal use only of the -accompanying software and documentation and any error -corrections provided by Sun (collectively "Software"), by -the number of users and the class of computer hardware for -which the corresponding fee has been paid. - -2. RESTRICTIONS. Software is confidential and copyrighted. -Title to Software and all associated intellectual property -rights is retained by Sun and/or its licensors. Except as -specifically authorized in any Supplemental License Terms, -you may not make copies of Software, other than a single -copy of Software for archival purposes. Unless enforcement -is prohibited by applicable law, you may not modify, -decompile, or reverse engineer Software. Licensee -acknowledges that Licensed Software is not designed or -intended for use in the design, construction, operation or -maintenance of any nuclear facility. Sun Microsystems, Inc. -disclaims any express or implied warranty of fitness for -such uses. No right, title or interest in or to any -trademark, service mark, logo or trade name of Sun or its -licensors is granted under this Agreement. - -3. LIMITED WARRANTY. Sun warrants to you that for a period -of ninety (90) days from the date of purchase, as evidenced -by a copy of the receipt, the media on which Software is -furnished (if any) will be free of defects in materials and -workmanship under normal use. Except for the foregoing, -Software is provided "AS IS". Your exclusive remedy and -Sun's entire liability under this limited warranty will be -at Sun's option to replace Software media or refund the fee -paid for Software. - -4. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS -AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS, -REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED -WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE -EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY -INVALID. - -5. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY -LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR -ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, -CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER -CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT -OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, -EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. In no event will Sun's liability to you, whether -in contract, tort (including negligence), or otherwise, -exceed the amount paid by you for Software under this -Agreement. The foregoing limitations will apply even if the -above stated warranty fails of its essential purpose. - -6. Termination. This Agreement is effective until -terminated. You may terminate this Agreement at any time by -destroying all copies of Software. This Agreement will -terminate immediately without notice from Sun if you fail -to comply with any provision of this Agreement. Upon -Termination, you must destroy all copies of Software. - -7. Export Regulations. All Software and technical data -delivered under this Agreement are subject to US export -control laws and may be subject to export or import -regulations in other countries. You agree to comply -strictly with all such laws and regulations and acknowledge -that you have the responsibility to obtain such licenses to -export, re-export, or import as may be required after -delivery to you. - -8. U.S. Government Restricted Rights. If Software is being -acquired by or on behalf of the U.S. Government or by a -U.S. Government prime contractor or subcontractor (at any -tier), then the Government's rights in Software and -accompanying documentation will be only as set forth in -this Agreement; this is in accordance with 48 CFR 227.7201 -through 227.7202-4 (for Department of Defense (DOD) -acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD -acquisitions). - -9. Governing Law. Any action related to this Agreement will -be governed by California law and controlling U.S. federal -law. No choice of law rules of any jurisdiction will -apply. - -10. Severability. If any provision of this Agreement is -held to be unenforceable, this Agreement will remain in -effect with the provision omitted, unless omission would -frustrate the intent of the parties, in which case this -Agreement will immediately terminate. - -11. Integration. This Agreement is the entire agreement -between you and Sun relating to its subject matter. It -supersedes all prior or contemporaneous oral or written -communications, proposals, representations and warranties -and prevails over any conflicting or additional terms of -any quote, order, acknowledgment, or other communication -between the parties relating to its subject matter during -the term of this Agreement. No modification of this -Agreement will be binding, unless in writing and signed by -an authorized representative of each party. - -JAVA(TM) INTERFACE CLASSES JDBC(TM) ROWSET IMPLEMENTATIONS -1.0.1 SUPPLEMENTAL LICENSE TERMS - -These supplemental license terms ("Supplemental Terms") add -to or modify the terms of the Binary Code License Agreement -(collectively, the "Agreement"). Capitalized terms not -defined in these Supplemental Terms shall have the same -meanings ascribed to them in the Agreement. These -Supplemental Terms shall supersede any inconsistent or -conflicting terms in the Agreement, or in any license -contained within the Software. - -1. Software Internal Use and Development License Grant. -Subject to the terms and conditions of this Agreement, -including, but not limited to Section 3 (Java(TM) -Technology Restrictions) of these Supplemental Terms, Sun -grants you a non-exclusive, non-transferable, limited -license to reproduce internally and use internally the -binary form of the Software, complete and unmodified, for -the sole purpose of designing, developing and testing your -Java applets and applications ("Programs"). - -2. License to Distribute Software. In addition to the -license granted in Section 1 (Software Internal Use and -Development License Grant) of these Supplemental Terms, -subject to the terms and conditions of this Agreement, -including but not limited to Section 3 (Java Technology -Restrictions), Sun grants you a non-exclusive, -non-transferable, limited license to reproduce and -distribute the Software in binary form only, provided that -you (i) distribute the Software complete and unmodified and -only bundled as part of your Programs, (ii) do not -distribute additional software intended to replace any -component(s) of the Software, (iii) do not remove or alter -any proprietary legends or notices contained in the -Software, (iv) only distribute the Software subject to a -license agreement that protects Sun's interests consistent -with the terms contained in this Agreement, and (v) agree -to defend and indemnify Sun and its licensors from and -against any damages, costs, liabilities, settlement amounts -and/or expenses (includ - -3. Java Technology Restrictions. You may not modify the -Java Platform Interface ("JPI", identified as classes -contained within the "java" package or any subpackages of -the "java" package), by creating additional classes within -the JPI or otherwise causing the addition to or -modification of the classes in the JPI. In the event that -you create an additional class and associated API(s) which -(i) extends the functionality of the Java Platform, and -(ii) is exposed to third party software developers for the -purpose of developing additional software which invokes -such additional API, you must promptly publish broadly an -accurate specification for such API for free use by all -developers. You may not create, or authorize your licensees -to create additional classes, interfaces, or subpackages -that are in any way identified as "java", "javax", "sun" or -similar convention as specified by Sun in any naming -convention designation. - -4. Trademarks and Logos. You acknowledge and agree as -between you and Sun that Sun owns the SUN, SOLARIS, JAVA, -JINI, FORTE, and iPLANET trademarks and all SUN, SOLARIS, -JAVA, JINI, FORTE, and iPLANET-related trademarks, service -marks, logos and other brand designations ("Sun Marks"), -and you agree to comply with the Sun Trademark and Logo -Usage Requirements currently located at -http://www.sun.com/policies/trademarks. Any use you make of -the Sun Marks inures to Sun's benefit. - -5. Source Code. Software may contain source code that is -provided solely for reference purposes pursuant to the -terms of this Agreement. Source code may not be -redistributed unless expressly provided for in this -Agreement. - -6.Termination for Infringement. Either party may terminate -this Agreement immediately should any Software become, or -in either party's opinion be likely to become, the subject -of a claim of infringement of any intellectual property -right. - -For inquiries please contact: Sun Microsystems, Inc. 4150 -Network Circle, Santa Clara, California 95054. -(LFI#141263/Form ID#011801) \ No newline at end of file diff --git a/libraries/com.sun.rowset_1.0/readme.txt b/libraries/com.sun.rowset_1.0/readme.txt deleted file mode 100644 index 5065379b68..0000000000 --- a/libraries/com.sun.rowset_1.0/readme.txt +++ /dev/null @@ -1,16 +0,0 @@ --------------------------------------- -JDBC Rowset - Reference Implementation --------------------------------------- - -"A RowSet object is a container for tabular data, encapsulating -a set of zero or more rows that have been retrieved from a data -source. In a basic implementation of the RowSet interface, the -rows are retrieved from a JDBC data source, but a rowset may be -customized so that its data can also be from a spreadsheet, a flat -file, or any other data source with a tabular format. A RowSet -object extends the ResultSet interface, which means that it can be -scrollable, can be updatable, and can do anything a ResultSet -object can do." - -For more information: -http://java.sun.com/products/jdbc/download.html diff --git a/libraries/com.sun.syndication_1.0/.project b/libraries/com.sun.syndication_1.0/.project deleted file mode 100644 index b4583d31a5..0000000000 --- a/libraries/com.sun.syndication_1.0/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - com.sun.syndication - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/libraries/com.sun.syndication_1.0/com.sun.syndication.jar b/libraries/com.sun.syndication_1.0/com.sun.syndication.jar deleted file mode 100644 index 7138baaca1..0000000000 Binary files a/libraries/com.sun.syndication_1.0/com.sun.syndication.jar and /dev/null differ diff --git a/libraries/com.sun.syndication_1.0/library.xml b/libraries/com.sun.syndication_1.0/library.xml deleted file mode 100644 index 792866980b..0000000000 --- a/libraries/com.sun.syndication_1.0/library.xml +++ /dev/null @@ -1,15 +0,0 @@ - - Rome - Rome. - 1.0 - http://java.net/projects/rome/ - http://java.net/projects/rome/downloads - Sun Microsystems Inc. - - - - rome - rome - - - diff --git a/libraries/com.sun.syndication_1.0/license.txt b/libraries/com.sun.syndication_1.0/license.txt deleted file mode 100644 index f43cdb1cbc..0000000000 --- a/libraries/com.sun.syndication_1.0/license.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2004 Sun Microsystems, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - diff --git a/libraries/com.sun.syndication_1.0/readme.txt b/libraries/com.sun.syndication_1.0/readme.txt deleted file mode 100644 index 4ec2160814..0000000000 --- a/libraries/com.sun.syndication_1.0/readme.txt +++ /dev/null @@ -1,15 +0,0 @@ ------------------------------------------------------------- -ROME - Parsing, generating and publishing RSS and Atom feeds ------------------------------------------------------------- - -"ROME is an set of open source Java tools for parsing, generating and -publishing RSS and Atom feeds. The core ROME library depends only on the -JDOM XML parser and supports parsing, generating and converting all of -the popular RSS and Atom formats including RSS 0.90, RSS 0.91 Netscape, -RSS 0.91 Userland, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, -Atom 0.3, and Atom 1.0. You can parse to an RSS object model, an Atom -object model or an abstract SyndFeed model that can model either family -of formats." - -For more information: -https://rome.dev.java.net/ \ No newline at end of file diff --git a/libraries/org.apache.httpclient_4.3/.classpath b/libraries/com.wordnik.swagger.annotations_1.3/.classpath similarity index 74% rename from libraries/org.apache.httpclient_4.3/.classpath rename to libraries/com.wordnik.swagger.annotations_1.3/.classpath index ba8fc0c4ec..29ed17d0ea 100644 --- a/libraries/org.apache.httpclient_4.3/.classpath +++ b/libraries/com.wordnik.swagger.annotations_1.3/.classpath @@ -1,6 +1,6 @@ - - - - - - + + + + + + diff --git a/libraries/com.wordnik.swagger.annotations_1.3/.gitignore b/libraries/com.wordnik.swagger.annotations_1.3/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/libraries/com.wordnik.swagger.annotations_1.3/.project b/libraries/com.wordnik.swagger.annotations_1.3/.project new file mode 100644 index 0000000000..fc3a82607e --- /dev/null +++ b/libraries/com.wordnik.swagger.annotations_1.3/.project @@ -0,0 +1,17 @@ + + + com.wordnik.swagger.annotations_1.3 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/libraries/com.wordnik.swagger.annotations_1.3/com.wordnik.swagger.annotations.jar b/libraries/com.wordnik.swagger.annotations_1.3/com.wordnik.swagger.annotations.jar new file mode 100644 index 0000000000..cea562c1a0 Binary files /dev/null and b/libraries/com.wordnik.swagger.annotations_1.3/com.wordnik.swagger.annotations.jar differ diff --git a/libraries/com.wordnik.swagger.annotations_1.3/library.xml b/libraries/com.wordnik.swagger.annotations_1.3/library.xml new file mode 100644 index 0000000000..9a8fdeaf5f --- /dev/null +++ b/libraries/com.wordnik.swagger.annotations_1.3/library.xml @@ -0,0 +1,20 @@ + + Swagger + Swagger document your API with style. Swagger spec compatibility: 1.2 + 1.3 + https://helloreverb.com/developers/swagger + https://github.com/wordnik/swagger-core/wiki/Downloads + + Reverb Technologies, Inc + + + + com.wordnik + swagger-annotations + 1.3.10 + + + + + + diff --git a/libraries/com.wordnik.swagger_2.9/license.txt b/libraries/com.wordnik.swagger.annotations_1.3/license.txt similarity index 100% rename from libraries/com.wordnik.swagger_2.9/license.txt rename to libraries/com.wordnik.swagger.annotations_1.3/license.txt diff --git a/libraries/com.wordnik.swagger_2.9/readme.txt b/libraries/com.wordnik.swagger.annotations_1.3/readme.txt similarity index 81% rename from libraries/com.wordnik.swagger_2.9/readme.txt rename to libraries/com.wordnik.swagger.annotations_1.3/readme.txt index 1c9993c61e..cc92a82c58 100644 --- a/libraries/com.wordnik.swagger_2.9/readme.txt +++ b/libraries/com.wordnik.swagger.annotations_1.3/readme.txt @@ -2,12 +2,14 @@ Swagger - Document your API with style -------------------------------------- -"Swagger is a specification and complete framework implementation for -describing, producing, consuming, and visualizing RESTful web services. -The overarching goal of Swagger is to enable client and documentation systems -to update at the same pace as the server. The documentation of methods, -parameters and models are tightly integrated into the server code, +"Swagger is a specification and complete framework implementation for +describing, producing, consuming, and visualizing RESTful web services. +The overarching goal of Swagger is to enable client and documentation systems +to update at the same pace as the server. The documentation of methods, +parameters and models are tightly integrated into the server code, allowing APIs to always stay in sync." For more information: -https://helloreverb.com/developers/swagger \ No newline at end of file +https://helloreverb.com/developers/swagger + +Swagger spec compatibility: 1.2 diff --git a/libraries/com.sun.syndication_1.0/.classpath b/libraries/com.wordnik.swagger.annotations_1.5/.classpath similarity index 74% rename from libraries/com.sun.syndication_1.0/.classpath rename to libraries/com.wordnik.swagger.annotations_1.5/.classpath index acc4b36939..29ed17d0ea 100644 --- a/libraries/com.sun.syndication_1.0/.classpath +++ b/libraries/com.wordnik.swagger.annotations_1.5/.classpath @@ -1,6 +1,6 @@ - + diff --git a/libraries/com.wordnik.swagger.annotations_1.5/.gitignore b/libraries/com.wordnik.swagger.annotations_1.5/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/libraries/com.wordnik.swagger.annotations_1.5/.project b/libraries/com.wordnik.swagger.annotations_1.5/.project new file mode 100644 index 0000000000..a543b7f19c --- /dev/null +++ b/libraries/com.wordnik.swagger.annotations_1.5/.project @@ -0,0 +1,17 @@ + + + com.wordnik.swagger.annotations_1.5 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/libraries/com.wordnik.swagger.annotations_1.5/com.wordnik.swagger.annotations.jar b/libraries/com.wordnik.swagger.annotations_1.5/com.wordnik.swagger.annotations.jar new file mode 100644 index 0000000000..af7d12bc5f Binary files /dev/null and b/libraries/com.wordnik.swagger.annotations_1.5/com.wordnik.swagger.annotations.jar differ diff --git a/libraries/com.wordnik.swagger.annotations_1.5/library.xml b/libraries/com.wordnik.swagger.annotations_1.5/library.xml new file mode 100644 index 0000000000..0f850d5d6f --- /dev/null +++ b/libraries/com.wordnik.swagger.annotations_1.5/library.xml @@ -0,0 +1,21 @@ + + Swagger + Swagger document your API with style. Swagger spec compatibility: 2.0 + 1.5 + 3-M1 + https://helloreverb.com/developers/swagger + https://github.com/wordnik/swagger-core/wiki/Downloads + + Reverb Technologies, Inc + + + + com.wordnik + swagger-annotations + + + + + + + diff --git a/libraries/org.eclipse.jetty_9.1/license.txt b/libraries/com.wordnik.swagger.annotations_1.5/license.txt similarity index 100% rename from libraries/org.eclipse.jetty_9.1/license.txt rename to libraries/com.wordnik.swagger.annotations_1.5/license.txt diff --git a/libraries/com.wordnik.swagger.annotations_1.5/readme.txt b/libraries/com.wordnik.swagger.annotations_1.5/readme.txt new file mode 100644 index 0000000000..10f827fadb --- /dev/null +++ b/libraries/com.wordnik.swagger.annotations_1.5/readme.txt @@ -0,0 +1,15 @@ +-------------------------------------- +Swagger - Document your API with style +-------------------------------------- + +"Swagger is a specification and complete framework implementation for +describing, producing, consuming, and visualizing RESTful web services. +The overarching goal of Swagger is to enable client and documentation systems +to update at the same pace as the server. The documentation of methods, +parameters and models are tightly integrated into the server code, +allowing APIs to always stay in sync." + +For more information: +https://helloreverb.com/developers/swagger + +Swagger spec compatibility: 2.0 diff --git a/libraries/com.sun.rowset_1.0/.classpath b/libraries/com.wordnik.swagger.core_1.5/.classpath similarity index 75% rename from libraries/com.sun.rowset_1.0/.classpath rename to libraries/com.wordnik.swagger.core_1.5/.classpath index 8d24fcf59d..61702f7d5f 100644 --- a/libraries/com.sun.rowset_1.0/.classpath +++ b/libraries/com.wordnik.swagger.core_1.5/.classpath @@ -1,6 +1,6 @@ - - - - - - + + + + + + diff --git a/libraries/com.wordnik.swagger.core_1.5/.gitignore b/libraries/com.wordnik.swagger.core_1.5/.gitignore new file mode 100644 index 0000000000..5e56e040ec --- /dev/null +++ b/libraries/com.wordnik.swagger.core_1.5/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/libraries/com.db4o_7.12/.project b/libraries/com.wordnik.swagger.core_1.5/.project similarity index 88% rename from libraries/com.db4o_7.12/.project rename to libraries/com.wordnik.swagger.core_1.5/.project index 7b7e983936..98a7e39993 100644 --- a/libraries/com.db4o_7.12/.project +++ b/libraries/com.wordnik.swagger.core_1.5/.project @@ -1,17 +1,17 @@ - - - com.db4o - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + com.wordnik.swagger.core_1.5 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/libraries/com.wordnik.swagger.core_1.5/com.wordnik.swagger.core.jar b/libraries/com.wordnik.swagger.core_1.5/com.wordnik.swagger.core.jar new file mode 100644 index 0000000000..c035ae761e Binary files /dev/null and b/libraries/com.wordnik.swagger.core_1.5/com.wordnik.swagger.core.jar differ diff --git a/libraries/com.wordnik.swagger.core_1.5/library.xml b/libraries/com.wordnik.swagger.core_1.5/library.xml new file mode 100644 index 0000000000..e6ca1d8bc2 --- /dev/null +++ b/libraries/com.wordnik.swagger.core_1.5/library.xml @@ -0,0 +1,20 @@ + + Swagger + Swagger document your API with style. Swagger spec compatibility: 2.0 + 1.5 + 3-M1 + https://helloreverb.com/developers/swagger + https://github.com/wordnik/swagger-core/wiki/Downloads + + Reverb Technologies, Inc + + + + com.wordnik + swagger-core + + + + + + diff --git a/libraries/org.apache.httpmime_4.3/license.txt b/libraries/com.wordnik.swagger.core_1.5/license.txt similarity index 98% rename from libraries/org.apache.httpmime_4.3/license.txt rename to libraries/com.wordnik.swagger.core_1.5/license.txt index 75b52484ea..d645695673 100644 --- a/libraries/org.apache.httpmime_4.3/license.txt +++ b/libraries/com.wordnik.swagger.core_1.5/license.txt @@ -1,202 +1,202 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/libraries/com.wordnik.swagger.core_1.5/readme.txt b/libraries/com.wordnik.swagger.core_1.5/readme.txt new file mode 100644 index 0000000000..524a5debef --- /dev/null +++ b/libraries/com.wordnik.swagger.core_1.5/readme.txt @@ -0,0 +1,17 @@ +-------------------------------------- +Swagger - Document your API with style +-------------------------------------- + +"Swagger is a specification and complete framework implementation for +describing, producing, consuming, and visualizing RESTful web services. +The overarching goal of Swagger is to enable client and documentation systems +to update at the same pace as the server. The documentation of methods, +parameters and models are tightly integrated into the server code, +allowing APIs to always stay in sync." + +For more information: +https://helloreverb.com/developers/swagger + +Swagger spec compatibility: 2.0 + +Built from tag v1.5.3-M1 diff --git a/libraries/com.google.collections_1.0/.classpath b/libraries/com.wordnik.swagger.models_1.5/.classpath similarity index 75% rename from libraries/com.google.collections_1.0/.classpath rename to libraries/com.wordnik.swagger.models_1.5/.classpath index 6b3103c0a6..78078bbe07 100644 --- a/libraries/com.google.collections_1.0/.classpath +++ b/libraries/com.wordnik.swagger.models_1.5/.classpath @@ -1,6 +1,6 @@ - + diff --git a/libraries/com.wordnik.swagger.models_1.5/.gitignore b/libraries/com.wordnik.swagger.models_1.5/.gitignore new file mode 100644 index 0000000000..5e56e040ec --- /dev/null +++ b/libraries/com.wordnik.swagger.models_1.5/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/libraries/org.jibx_1.2/.project b/libraries/com.wordnik.swagger.models_1.5/.project similarity index 88% rename from libraries/org.jibx_1.2/.project rename to libraries/com.wordnik.swagger.models_1.5/.project index ed4655e973..aede7c4578 100644 --- a/libraries/org.jibx_1.2/.project +++ b/libraries/com.wordnik.swagger.models_1.5/.project @@ -1,17 +1,17 @@ - - - org.jibx - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + com.wordnik.swagger.models_1.5 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/libraries/com.wordnik.swagger.models_1.5/com.wordnik.swagger.models.jar b/libraries/com.wordnik.swagger.models_1.5/com.wordnik.swagger.models.jar new file mode 100644 index 0000000000..f98b5ca8a8 Binary files /dev/null and b/libraries/com.wordnik.swagger.models_1.5/com.wordnik.swagger.models.jar differ diff --git a/libraries/com.wordnik.swagger.models_1.5/library.xml b/libraries/com.wordnik.swagger.models_1.5/library.xml new file mode 100644 index 0000000000..063ae84678 --- /dev/null +++ b/libraries/com.wordnik.swagger.models_1.5/library.xml @@ -0,0 +1,20 @@ + + Swagger + Swagger document your API with style. Swagger spec compatibility: 2.0 + 1.5 + 3-M1 + https://helloreverb.com/developers/swagger + https://github.com/wordnik/swagger-core/wiki/Downloads + + Reverb Technologies, Inc + + + + com.wordnik + swagger-models + + + + + + diff --git a/libraries/org.json4s_2.10/license.txt b/libraries/com.wordnik.swagger.models_1.5/license.txt similarity index 98% rename from libraries/org.json4s_2.10/license.txt rename to libraries/com.wordnik.swagger.models_1.5/license.txt index 75b52484ea..d645695673 100644 --- a/libraries/org.json4s_2.10/license.txt +++ b/libraries/com.wordnik.swagger.models_1.5/license.txt @@ -1,202 +1,202 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/libraries/com.wordnik.swagger.models_1.5/readme.txt b/libraries/com.wordnik.swagger.models_1.5/readme.txt new file mode 100644 index 0000000000..524a5debef --- /dev/null +++ b/libraries/com.wordnik.swagger.models_1.5/readme.txt @@ -0,0 +1,17 @@ +-------------------------------------- +Swagger - Document your API with style +-------------------------------------- + +"Swagger is a specification and complete framework implementation for +describing, producing, consuming, and visualizing RESTful web services. +The overarching goal of Swagger is to enable client and documentation systems +to update at the same pace as the server. The documentation of methods, +parameters and models are tightly integrated into the server code, +allowing APIs to always stay in sync." + +For more information: +https://helloreverb.com/developers/swagger + +Swagger spec compatibility: 2.0 + +Built from tag v1.5.3-M1 diff --git a/libraries/com.wordnik.swagger_2.9/.classpath b/libraries/com.wordnik.swagger_2.9/.classpath deleted file mode 100644 index 4a7feb9208..0000000000 --- a/libraries/com.wordnik.swagger_2.9/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/libraries/com.wordnik.swagger_2.9/com.wordnik.swagger.annotations.jar b/libraries/com.wordnik.swagger_2.9/com.wordnik.swagger.annotations.jar deleted file mode 100644 index e128d0a5ae..0000000000 Binary files a/libraries/com.wordnik.swagger_2.9/com.wordnik.swagger.annotations.jar and /dev/null differ diff --git a/libraries/com.wordnik.swagger_2.9/com.wordnik.swagger.jar b/libraries/com.wordnik.swagger_2.9/com.wordnik.swagger.jar deleted file mode 100644 index 128dd18a79..0000000000 Binary files a/libraries/com.wordnik.swagger_2.9/com.wordnik.swagger.jar and /dev/null differ diff --git a/libraries/com.wordnik.swagger_2.9/library.xml b/libraries/com.wordnik.swagger_2.9/library.xml deleted file mode 100644 index c4d3df5571..0000000000 --- a/libraries/com.wordnik.swagger_2.9/library.xml +++ /dev/null @@ -1,25 +0,0 @@ - - Swagger - Swagger document your API with style. - 2.9 - https://helloreverb.com/developers/swagger - https://github.com/wordnik/swagger-core/wiki/Downloads - - Reverb Technologies, Inc - - - - com.wordnik - swagger-core_2.9.1 - 1.2.5 - - - - - com.wordnik - swagger-annotations_2.9.1 - 1.2.5 - - - - diff --git a/libraries/org.apache.httpcore_4.3/.classpath b/libraries/io.netty_4.1/.classpath similarity index 75% rename from libraries/org.apache.httpcore_4.3/.classpath rename to libraries/io.netty_4.1/.classpath index 54e1b04664..ad0f92db2e 100644 --- a/libraries/org.apache.httpcore_4.3/.classpath +++ b/libraries/io.netty_4.1/.classpath @@ -1,6 +1,6 @@ - - - - - - + + + + + + diff --git a/libraries/org.json4s_2.10/.project b/libraries/io.netty_4.1/.project similarity index 93% rename from libraries/org.json4s_2.10/.project rename to libraries/io.netty_4.1/.project index 9e53857a03..9fd915e0a1 100644 --- a/libraries/org.json4s_2.10/.project +++ b/libraries/io.netty_4.1/.project @@ -1,6 +1,6 @@ - org.json4s + io.netty diff --git a/libraries/io.netty_4.1/io.netty.jar b/libraries/io.netty_4.1/io.netty.jar new file mode 100644 index 0000000000..e534aab7b0 Binary files /dev/null and b/libraries/io.netty_4.1/io.netty.jar differ diff --git a/libraries/io.netty_4.1/library.xml b/libraries/io.netty_4.1/library.xml new file mode 100644 index 0000000000..d10ea51b2a --- /dev/null +++ b/libraries/io.netty_4.1/library.xml @@ -0,0 +1,22 @@ + + Netty + Netty project. + 4.1 + http://netty.io + http://netty.io/downloads.html + The Netty project + + + + io.netty + netty-all + 4.1.0.Beta4 + + + + + + + + + diff --git a/libraries/org.apache.httpcore_4.3/license.txt b/libraries/io.netty_4.1/license.txt similarity index 98% rename from libraries/org.apache.httpcore_4.3/license.txt rename to libraries/io.netty_4.1/license.txt index 75b52484ea..d645695673 100644 --- a/libraries/org.apache.httpcore_4.3/license.txt +++ b/libraries/io.netty_4.1/license.txt @@ -1,202 +1,202 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/libraries/io.netty_4.1/readme.txt b/libraries/io.netty_4.1/readme.txt new file mode 100644 index 0000000000..927bd9270d --- /dev/null +++ b/libraries/io.netty_4.1/readme.txt @@ -0,0 +1,20 @@ +--------------------------------------------------------------- +Netty - Asynchronous event-driven network application framework +--------------------------------------------------------------- + +"Netty is a NIO client server framework which enables quick and +easy development of network applications such as protocol +servers and clients. It greatly simplifies and streamlines +network programming such as TCP and UDP socket server. + +'Quick and easy' doesn't mean that a resulting application will +suffer from a maintainability or a performance issue. Netty has +been designed carefully with the experiences earned from the +implementation of a lot of protocols such as FTP, SMTP, HTTP, +and various binary and text-based legacy protocols. As a +result, Netty has succeeded to find a way to achieve ease of +development, performance, stability, and flexibility without a +compromise." + +For more information: +http://netty.io/ diff --git a/libraries/javax.inject_1.0/.classpath b/libraries/javax.inject_1.0/.classpath index 2ce85fc979..9fb9646eb1 100644 --- a/libraries/javax.inject_1.0/.classpath +++ b/libraries/javax.inject_1.0/.classpath @@ -1,6 +1,6 @@ - + diff --git a/libraries/javax.ws.rs_2.0/javax.ws.rs-api-2.0-sources.jar b/libraries/javax.ws.rs_2.0/javax.ws.rs-api-2.0-sources.jar new file mode 100644 index 0000000000..b3c6a7076c Binary files /dev/null and b/libraries/javax.ws.rs_2.0/javax.ws.rs-api-2.0-sources.jar differ diff --git a/libraries/javax.ws.rs_2.0/library.xml b/libraries/javax.ws.rs_2.0/library.xml index e91a553f1f..b598e3f875 100644 --- a/libraries/javax.ws.rs_2.0/library.xml +++ b/libraries/javax.ws.rs_2.0/library.xml @@ -2,7 +2,6 @@ JAX-RS API JAX-RS (JSR 339) API 2.0 - 0 https://jax-rs-spec.java.net/ http://download.java.net/maven/2/javax/ws/rs/jsr311-api/ Oracle Inc. diff --git a/libraries/org.aopalliance_1.0/.classpath b/libraries/org.aopalliance_1.0/.classpath index 4a202a21ca..a5c131fdf8 100644 --- a/libraries/org.aopalliance_1.0/.classpath +++ b/libraries/org.aopalliance_1.0/.classpath @@ -1,6 +1,6 @@ - + diff --git a/libraries/org.apache.httpclient_4.3/.project b/libraries/org.apache.httpclient_4.3/.project deleted file mode 100644 index af8a2659b6..0000000000 --- a/libraries/org.apache.httpclient_4.3/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.apache.httpclient - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/libraries/org.apache.httpclient_4.3/library.xml b/libraries/org.apache.httpclient_4.3/library.xml deleted file mode 100644 index 5b45d23f9d..0000000000 --- a/libraries/org.apache.httpclient_4.3/library.xml +++ /dev/null @@ -1,22 +0,0 @@ - - Apache HTTP Components Client - Apache HTTP Components Client - 4.3 - 2 - http://hc.apache.org/httpcomponents-client/ - http://hc.apache.org/httpcomponents-client/download.html - Apache Software Foundation - - - - org.apache.httpcomponents - httpclient - - - - - - - - - diff --git a/libraries/org.apache.httpclient_4.3/org.apache.httpclient.jar b/libraries/org.apache.httpclient_4.3/org.apache.httpclient.jar deleted file mode 100644 index 904409dac8..0000000000 Binary files a/libraries/org.apache.httpclient_4.3/org.apache.httpclient.jar and /dev/null differ diff --git a/libraries/org.apache.httpclient_4.3/readme.txt b/libraries/org.apache.httpclient_4.3/readme.txt deleted file mode 100644 index 8d4efd8bd8..0000000000 --- a/libraries/org.apache.httpclient_4.3/readme.txt +++ /dev/null @@ -1,13 +0,0 @@ ------------------------------ -Apache HTTP Components Client ------------------------------ - -"HttpClient is a HTTP/1.1 compliant HTTP agent implementation based on -HttpCore. It also provides reusable components for client-side -authentication, HTTP state management, and HTTP connection management. -HttpComponents Client is a successor of and replacement for Commons -HttpClient 3.x. Users of Commons HttpClient are strongly encouraged to -upgrade." - -For more information: -http://hc.apache.org/httpcomponents-client/ diff --git a/libraries/org.apache.httpcore_4.3/.project b/libraries/org.apache.httpcore_4.3/.project deleted file mode 100644 index 0afaee32dc..0000000000 --- a/libraries/org.apache.httpcore_4.3/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.apache.httpcore - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/libraries/org.apache.httpcore_4.3/library.xml b/libraries/org.apache.httpcore_4.3/library.xml deleted file mode 100644 index b9843b0d24..0000000000 --- a/libraries/org.apache.httpcore_4.3/library.xml +++ /dev/null @@ -1,22 +0,0 @@ - - Apache HTTP Components Core - Apache HTTP Components Core - 4.3 - 1 - http://hc.apache.org/httpcomponents-core/ - http://hc.apache.org/httpcomponents-core/download.html - Apache Software Foundation - - - - org.apache.httpcomponents - httpcore - - - - - - - - - diff --git a/libraries/org.apache.httpcore_4.3/org.apache.httpcore.jar b/libraries/org.apache.httpcore_4.3/org.apache.httpcore.jar deleted file mode 100644 index c2b043b08b..0000000000 Binary files a/libraries/org.apache.httpcore_4.3/org.apache.httpcore.jar and /dev/null differ diff --git a/libraries/org.apache.httpcore_4.3/readme.txt b/libraries/org.apache.httpcore_4.3/readme.txt deleted file mode 100644 index e0c9f3ad9d..0000000000 --- a/libraries/org.apache.httpcore_4.3/readme.txt +++ /dev/null @@ -1,12 +0,0 @@ ---------------------------- -Apache HTTP Components Core ---------------------------- - -"HttpCore is a set of low level HTTP transport components that can -be used to build custom client and server side HTTP services with a -minimal footprint. HttpCore supports two I/O models: blocking I/O -model based on the classic Java I/O and non-blocking, event driven -I/O model based on Java NIO." - -For more information: -http://hc.apache.org/httpcomponents-core/ diff --git a/libraries/org.apache.httpmime_4.3/.classpath b/libraries/org.apache.httpmime_4.3/.classpath deleted file mode 100644 index 1acd478650..0000000000 --- a/libraries/org.apache.httpmime_4.3/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/libraries/org.apache.httpmime_4.3/.project b/libraries/org.apache.httpmime_4.3/.project deleted file mode 100644 index 438d2d7903..0000000000 --- a/libraries/org.apache.httpmime_4.3/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.apache.httpmime - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/libraries/org.apache.httpmime_4.3/library.xml b/libraries/org.apache.httpmime_4.3/library.xml deleted file mode 100644 index 970a34185c..0000000000 --- a/libraries/org.apache.httpmime_4.3/library.xml +++ /dev/null @@ -1,21 +0,0 @@ - - Apache HTTP Components MIME - Apache HTTP Components MIME - 4.3 - http://hc.apache.org/httpcomponents-client/httpmime/ - http://hc.apache.org/httpcomponents-client/download.html - Apache Software Foundation - - - - org.apache.httpcomponents - httpmime - - - - - - - - - diff --git a/libraries/org.apache.httpmime_4.3/org.apache.httpmime.jar b/libraries/org.apache.httpmime_4.3/org.apache.httpmime.jar deleted file mode 100644 index f562d56458..0000000000 Binary files a/libraries/org.apache.httpmime_4.3/org.apache.httpmime.jar and /dev/null differ diff --git a/libraries/org.apache.httpmime_4.3/readme.txt b/libraries/org.apache.httpmime_4.3/readme.txt deleted file mode 100644 index edff498b1a..0000000000 --- a/libraries/org.apache.httpmime_4.3/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ ---------------------------- -Apache HTTP Components MIME ---------------------------- - -"This library extends Apache James Mime4j library with some HTTP -specific functionality and integrates it with the HttpComponents -framework." - -For more information: -http://hc.apache.org/httpcomponents-client/httpmime/ \ No newline at end of file diff --git a/libraries/org.apache.velocity_1.7/.classpath b/libraries/org.apache.velocity_1.7/.classpath index 2ef1e69749..5ecf020053 100644 --- a/libraries/org.apache.velocity_1.7/.classpath +++ b/libraries/org.apache.velocity_1.7/.classpath @@ -1,6 +1,6 @@ - - - - - - + + + + + + diff --git a/libraries/org.codehaus.woodstox_4.2/org.codehaus.woodstox.stax2api.jar b/libraries/org.codehaus.woodstox_4.2/org.codehaus.woodstox.stax2api.jar deleted file mode 100644 index 8d0aeef6db..0000000000 Binary files a/libraries/org.codehaus.woodstox_4.2/org.codehaus.woodstox.stax2api.jar and /dev/null differ diff --git a/libraries/org.codehaus.woodstox_4.2/.classpath b/libraries/org.codehaus.woodstox_4.3/.classpath similarity index 100% rename from libraries/org.codehaus.woodstox_4.2/.classpath rename to libraries/org.codehaus.woodstox_4.3/.classpath diff --git a/libraries/org.codehaus.woodstox_4.2/.project b/libraries/org.codehaus.woodstox_4.3/.project similarity index 95% rename from libraries/org.codehaus.woodstox_4.2/.project rename to libraries/org.codehaus.woodstox_4.3/.project index 2258c3c7a3..1cee353ed7 100644 --- a/libraries/org.codehaus.woodstox_4.2/.project +++ b/libraries/org.codehaus.woodstox_4.3/.project @@ -1,17 +1,17 @@ - - - org.codehaus.woodstox - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + org.codehaus.woodstox + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/libraries/org.codehaus.woodstox_4.2/library.xml b/libraries/org.codehaus.woodstox_4.3/library.xml similarity index 93% rename from libraries/org.codehaus.woodstox_4.2/library.xml rename to libraries/org.codehaus.woodstox_4.3/library.xml index 4b60e845f2..3de9de7afe 100644 --- a/libraries/org.codehaus.woodstox_4.2/library.xml +++ b/libraries/org.codehaus.woodstox_4.3/library.xml @@ -1,7 +1,7 @@ Woodstox Woodstox. - 4.2 + 4.3 0 woodstox.codehaus.org/ http://woodstox.codehaus.org/Download @@ -16,7 +16,7 @@ org.codehaus.woodstox stax2-api - 3.1.3 + 3.1.4 diff --git a/libraries/org.codehaus.woodstox_4.2/license.txt b/libraries/org.codehaus.woodstox_4.3/license.txt similarity index 100% rename from libraries/org.codehaus.woodstox_4.2/license.txt rename to libraries/org.codehaus.woodstox_4.3/license.txt diff --git a/libraries/org.codehaus.woodstox_4.2/org.codehaus.woodstox.core.jar b/libraries/org.codehaus.woodstox_4.3/org.codehaus.woodstox.core.jar similarity index 66% rename from libraries/org.codehaus.woodstox_4.2/org.codehaus.woodstox.core.jar rename to libraries/org.codehaus.woodstox_4.3/org.codehaus.woodstox.core.jar index 8ca96d52a9..f0dd996677 100644 Binary files a/libraries/org.codehaus.woodstox_4.2/org.codehaus.woodstox.core.jar and b/libraries/org.codehaus.woodstox_4.3/org.codehaus.woodstox.core.jar differ diff --git a/libraries/org.codehaus.woodstox_4.3/org.codehaus.woodstox.stax2api.jar b/libraries/org.codehaus.woodstox_4.3/org.codehaus.woodstox.stax2api.jar new file mode 100644 index 0000000000..dded036928 Binary files /dev/null and b/libraries/org.codehaus.woodstox_4.3/org.codehaus.woodstox.stax2api.jar differ diff --git a/libraries/org.codehaus.woodstox_4.2/readme.txt b/libraries/org.codehaus.woodstox_4.3/readme.txt similarity index 97% rename from libraries/org.codehaus.woodstox_4.2/readme.txt rename to libraries/org.codehaus.woodstox_4.3/readme.txt index 027423abd0..22642a0e8b 100644 --- a/libraries/org.codehaus.woodstox_4.2/readme.txt +++ b/libraries/org.codehaus.woodstox_4.3/readme.txt @@ -1,13 +1,13 @@ ------------------------------------------------------------ -Woodstox - Stax2 implementation ------------------------------------------------------------ - -"StAX2 is an experimental API that is intended to extend -basic StAX specifications in a way that allows implementations -to experiment with features before they end up in the actual -StAX specification (if they do). As such, it is intended to -be freely implementable by all StAX implementations same way -as StAX, but without going through a formal JCP process." - -For more information: +----------------------------------------------------------- +Woodstox - Stax2 implementation +----------------------------------------------------------- + +"StAX2 is an experimental API that is intended to extend +basic StAX specifications in a way that allows implementations +to experiment with features before they end up in the actual +StAX specification (if they do). As such, it is intended to +be freely implementable by all StAX implementations same way +as StAX, but without going through a formal JCP process." + +For more information: http://woodstox.codehaus.org/StAX2 \ No newline at end of file diff --git a/libraries/org.eclipse.e4_0.12/.classpath b/libraries/org.eclipse.e4_0.12/.classpath deleted file mode 100644 index 39e087180a..0000000000 --- a/libraries/org.eclipse.e4_0.12/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/libraries/org.eclipse.e4_0.12/.project b/libraries/org.eclipse.e4_0.12/.project deleted file mode 100644 index 6e368550c5..0000000000 --- a/libraries/org.eclipse.e4_0.12/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.e4 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/libraries/org.eclipse.e4_0.12/library.xml b/libraries/org.eclipse.e4_0.12/library.xml deleted file mode 100644 index 3beb514261..0000000000 --- a/libraries/org.eclipse.e4_0.12/library.xml +++ /dev/null @@ -1,23 +0,0 @@ - - Eclipse - e4 core - Eclipse - e4 core. - 0.12 - RC1 - http://eclipse.org/ - http://download.eclipse.org/e4/downloads/ - Eclipse - - - - org.eclipse.e4 - - - - - org.eclipse.e4 - - - - - - diff --git a/libraries/org.eclipse.e4_0.12/license.txt b/libraries/org.eclipse.e4_0.12/license.txt deleted file mode 100644 index 16cc69a523..0000000000 --- a/libraries/org.eclipse.e4_0.12/license.txt +++ /dev/null @@ -1,87 +0,0 @@ -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and - -b) in the case of each subsequent Contributor: - -i) changes to the Program, and - -ii) additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. - -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and - -b) its license agreement: - -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; - -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; - -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and - -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and - -b) a copy of this Agreement must be included with each copy of the Program. - -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/libraries/org.eclipse.e4_0.12/org.eclipse.e4.core.contexts.jar b/libraries/org.eclipse.e4_0.12/org.eclipse.e4.core.contexts.jar deleted file mode 100644 index 64e52b742a..0000000000 Binary files a/libraries/org.eclipse.e4_0.12/org.eclipse.e4.core.contexts.jar and /dev/null differ diff --git a/libraries/org.eclipse.e4_0.12/org.eclipse.e4.core.di.jar b/libraries/org.eclipse.e4_0.12/org.eclipse.e4.core.di.jar deleted file mode 100644 index 30836d5aa4..0000000000 Binary files a/libraries/org.eclipse.e4_0.12/org.eclipse.e4.core.di.jar and /dev/null differ diff --git a/libraries/org.eclipse.e4_0.12/readme.txt b/libraries/org.eclipse.e4_0.12/readme.txt deleted file mode 100644 index cd7477b28a..0000000000 --- a/libraries/org.eclipse.e4_0.12/readme.txt +++ /dev/null @@ -1,18 +0,0 @@ ------------ -Eclipse E4 ------------ - -"The mission of the e4 project is to build a next generation platform for -pervasive, component-based applications and tools. - -The Eclipse platform was first targeted at building an extensible IDE -component framework. It has since grown to include a Rich Client Platform, -enabling whole new categories of scenarios and domains. As the software -landscape changes, so must the Eclipse platform in order to remain relevant -and vibrant. These trend lines point to web technologies, new user interface -metaphors, and distributed infrastructure. Now is the time to rethink elements -of the platform so that Eclipse may remain at the forefront of application -development. " - -For more information: -http://www.eclipse.org/e4/ \ No newline at end of file diff --git a/libraries/org.eclipse.jetty_9.1/library.xml b/libraries/org.eclipse.jetty_9.1/library.xml deleted file mode 100644 index 4cd559f159..0000000000 --- a/libraries/org.eclipse.jetty_9.1/library.xml +++ /dev/null @@ -1,46 +0,0 @@ - - Jetty HTTP server - Jetty HTTP server - 9.1 - 3.v20140225 - http://www.eclipse.org/jetty/ - http://download.eclipse.org/jetty/ - The Eclipse Foundation - - - - org.eclipse.jetty - jetty-continuation - - - - - org.eclipse.jetty - jetty-http - - - - - org.eclipse.jetty - jetty-io - - - - - org.eclipse.jetty - jetty-server - - - - - org.eclipse.jetty - jetty-util - - - - - - - - - diff --git a/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.client.jar b/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.client.jar deleted file mode 100644 index b6514387d4..0000000000 Binary files a/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.client.jar and /dev/null differ diff --git a/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.http.jar b/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.http.jar deleted file mode 100644 index f0fc4f9f85..0000000000 Binary files a/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.http.jar and /dev/null differ diff --git a/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.io.jar b/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.io.jar deleted file mode 100644 index 1d0d53c2fb..0000000000 Binary files a/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.io.jar and /dev/null differ diff --git a/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.server.jar b/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.server.jar deleted file mode 100644 index 71b4e97618..0000000000 Binary files a/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.server.jar and /dev/null differ diff --git a/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.util.jar b/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.util.jar deleted file mode 100644 index 4a66076045..0000000000 Binary files a/libraries/org.eclipse.jetty_9.1/org.eclipse.jetty.util.jar and /dev/null differ diff --git a/libraries/org.eclipse.jetty_9.1/.classpath b/libraries/org.eclipse.jetty_9.2/.classpath similarity index 59% rename from libraries/org.eclipse.jetty_9.1/.classpath rename to libraries/org.eclipse.jetty_9.2/.classpath index b75e4b55cb..6177d1db79 100644 --- a/libraries/org.eclipse.jetty_9.1/.classpath +++ b/libraries/org.eclipse.jetty_9.2/.classpath @@ -1,10 +1,15 @@ - - - + + + + + + + + diff --git a/libraries/org.eclipse.jetty_9.1/.project b/libraries/org.eclipse.jetty_9.2/.project similarity index 100% rename from libraries/org.eclipse.jetty_9.1/.project rename to libraries/org.eclipse.jetty_9.2/.project diff --git a/libraries/org.eclipse.jetty_9.2/library.xml b/libraries/org.eclipse.jetty_9.2/library.xml new file mode 100644 index 0000000000..b806a4a679 --- /dev/null +++ b/libraries/org.eclipse.jetty_9.2/library.xml @@ -0,0 +1,76 @@ + + Jetty HTTP server + Jetty HTTP server + 9.2 + 6.v20141205 + http://www.eclipse.org/jetty/ + http://download.eclipse.org/jetty/ + The Eclipse Foundation + + + + org.eclipse.jetty + jetty-client + + + + + org.eclipse.jetty + jetty-http + + + + + org.eclipse.jetty + jetty-io + + + + + org.eclipse.jetty + jetty-server + + + + + org.eclipse.jetty.spdy + spdy-client + + + + + org.eclipse.jetty.spdy + spdy-core + + + + + org.eclipse.jetty.spdy + spdy-http-common + + + + + org.eclipse.jetty.spdy + spdy-http-server + + + + + org.eclipse.jetty.spdy + spdy-server + + + + + org.eclipse.jetty + jetty-util + + + + + + + + + diff --git a/libraries/org.apache.httpclient_4.3/license.txt b/libraries/org.eclipse.jetty_9.2/license.txt similarity index 98% rename from libraries/org.apache.httpclient_4.3/license.txt rename to libraries/org.eclipse.jetty_9.2/license.txt index 75b52484ea..d645695673 100644 --- a/libraries/org.apache.httpclient_4.3/license.txt +++ b/libraries/org.eclipse.jetty_9.2/license.txt @@ -1,202 +1,202 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.client.jar b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.client.jar new file mode 100644 index 0000000000..27739e5b02 Binary files /dev/null and b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.client.jar differ diff --git a/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.http.jar b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.http.jar new file mode 100644 index 0000000000..f1738417c7 Binary files /dev/null and b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.http.jar differ diff --git a/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.io.jar b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.io.jar new file mode 100644 index 0000000000..8ec3a5346b Binary files /dev/null and b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.io.jar differ diff --git a/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.server.jar b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.server.jar new file mode 100644 index 0000000000..857f16d3de Binary files /dev/null and b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.server.jar differ diff --git a/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.client.jar b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.client.jar new file mode 100644 index 0000000000..31be8e4f2e Binary files /dev/null and b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.client.jar differ diff --git a/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.core.jar b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.core.jar new file mode 100644 index 0000000000..c2629428d9 Binary files /dev/null and b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.core.jar differ diff --git a/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.http.common.jar b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.http.common.jar new file mode 100644 index 0000000000..23ea517780 Binary files /dev/null and b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.http.common.jar differ diff --git a/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.http.server.jar b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.http.server.jar new file mode 100644 index 0000000000..5b0df22334 Binary files /dev/null and b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.http.server.jar differ diff --git a/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.server.jar b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.server.jar new file mode 100644 index 0000000000..c27b5903ed Binary files /dev/null and b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.spdy.server.jar differ diff --git a/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.util.jar b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.util.jar new file mode 100644 index 0000000000..a530b929c5 Binary files /dev/null and b/libraries/org.eclipse.jetty_9.2/org.eclipse.jetty.util.jar differ diff --git a/libraries/org.eclipse.jetty_9.1/readme.txt b/libraries/org.eclipse.jetty_9.2/readme.txt similarity index 100% rename from libraries/org.eclipse.jetty_9.1/readme.txt rename to libraries/org.eclipse.jetty_9.2/readme.txt diff --git a/libraries/org.jdom_1.1/library.xml b/libraries/org.jdom_1.1/library.xml deleted file mode 100644 index b208842052..0000000000 --- a/libraries/org.jdom_1.1/library.xml +++ /dev/null @@ -1,14 +0,0 @@ - - JDOM - JDOM - 1.1 - http://www.jdom.org/ - http://www.jdom.org/dist/binary/ - Jason Hunter and Brett McLaughlin - - - - jdom - - - diff --git a/libraries/org.jdom_1.1/license.txt b/libraries/org.jdom_1.1/license.txt deleted file mode 100644 index 5a75e93592..0000000000 --- a/libraries/org.jdom_1.1/license.txt +++ /dev/null @@ -1,56 +0,0 @@ -/*-- - - $Id: LICENSE.txt,v 1.11 2004/02/06 09:32:57 jhunter Exp $ - - Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions, and the disclaimer that follows - these conditions in the documentation and/or other materials - provided with the distribution. - - 3. The name "JDOM" must not be used to endorse or promote products - derived from this software without prior written permission. For - written permission, please contact . - - 4. Products derived from this software may not be called "JDOM", nor - may "JDOM" appear in their name, without prior written permission - from the JDOM Project Management . - - In addition, we request (but do not require) that you include in the - end-user documentation provided with the redistribution and/or in the - software itself an acknowledgement equivalent to the following: - "This product includes software developed by the - JDOM Project (http://www.jdom.org/)." - Alternatively, the acknowledgment may be graphical using the logos - available at http://www.jdom.org/images/logos. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - This software consists of voluntary contributions made by many - individuals on behalf of the JDOM Project and was originally - created by Jason Hunter and - Brett McLaughlin . For more information - on the JDOM Project, please see . - - */ - diff --git a/libraries/org.jdom_1.1/org.jdom.jar b/libraries/org.jdom_1.1/org.jdom.jar deleted file mode 100644 index 97c85f564e..0000000000 Binary files a/libraries/org.jdom_1.1/org.jdom.jar and /dev/null differ diff --git a/libraries/org.jdom_1.1/readme.txt b/libraries/org.jdom_1.1/readme.txt deleted file mode 100644 index d062bd6c8c..0000000000 --- a/libraries/org.jdom_1.1/readme.txt +++ /dev/null @@ -1,12 +0,0 @@ ------------------------------------------------------- -JDOM - Solution for using XML as simple as Java itself ------------------------------------------------------- - -"There is no compelling reason for a Java API to manipulate XML to be -complex, tricky, unintuitive, or a pain in the neck. JDOMTM is both -Java-centric and Java-optimized. It behaves like Java, it uses Java -collections, it is completely natural API for current Java developers, -and it provides a low-cost entry point for using XML." - -For more information: -http://www.jdom.org/ \ No newline at end of file diff --git a/libraries/org.jibx_1.2/.classpath b/libraries/org.jibx_1.2/.classpath deleted file mode 100644 index ee07b64d1f..0000000000 --- a/libraries/org.jibx_1.2/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/libraries/org.jibx_1.2/library.xml b/libraries/org.jibx_1.2/library.xml deleted file mode 100644 index 552a77d1e5..0000000000 --- a/libraries/org.jibx_1.2/library.xml +++ /dev/null @@ -1,22 +0,0 @@ - - JiBX: Binding XML to Java Code - JiBX: Binding XML to Java Code - 1.2 - 5 - http://jibx.sourceforge.net/ - http://sourceforge.net/project/showfiles.php?group_id=69358 - Dennis M. Sosnoski - - - - org.jibx - jibx-run - - - - - - - - - diff --git a/libraries/org.jibx_1.2/license.txt b/libraries/org.jibx_1.2/license.txt deleted file mode 100644 index 95e2104c15..0000000000 --- a/libraries/org.jibx_1.2/license.txt +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2003-2007, Dennis M. Sosnoski -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of JiBX nor the names of its contributors may be used - to endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/libraries/org.jibx_1.2/org.jibx.runtime.jar b/libraries/org.jibx_1.2/org.jibx.runtime.jar deleted file mode 100644 index 6ce3100245..0000000000 Binary files a/libraries/org.jibx_1.2/org.jibx.runtime.jar and /dev/null differ diff --git a/libraries/org.jibx_1.2/readme.txt b/libraries/org.jibx_1.2/readme.txt deleted file mode 100644 index 3b5b33744a..0000000000 --- a/libraries/org.jibx_1.2/readme.txt +++ /dev/null @@ -1,13 +0,0 @@ ------------------------------- -JiBX: Binding XML to Java Code ------------------------------- - -"JiBX is a framework for binding XML data to Java objects. It lets you work -with data from XML documents using your own class structures. The JiBX -framework handles all the details of converting your data to and from XML -based on your instructions. JiBX is designed to perform the translation between -internal data structures and XML with very high efficiency, but still allows -you a high degree of control over the translation process." - -For more information: -http://jibx.sourceforge.net/ diff --git a/libraries/org.json4s_2.10/.classpath b/libraries/org.json4s_2.10/.classpath deleted file mode 100644 index e77d1b53e0..0000000000 --- a/libraries/org.json4s_2.10/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/libraries/org.json4s_2.10/json4s-ast.jar b/libraries/org.json4s_2.10/json4s-ast.jar deleted file mode 100644 index 20fee157ac..0000000000 Binary files a/libraries/org.json4s_2.10/json4s-ast.jar and /dev/null differ diff --git a/libraries/org.json4s_2.10/json4s-core.jar b/libraries/org.json4s_2.10/json4s-core.jar deleted file mode 100644 index 6c3467599d..0000000000 Binary files a/libraries/org.json4s_2.10/json4s-core.jar and /dev/null differ diff --git a/libraries/org.json4s_2.10/json4s-ext.jar b/libraries/org.json4s_2.10/json4s-ext.jar deleted file mode 100644 index 2e7714575b..0000000000 Binary files a/libraries/org.json4s_2.10/json4s-ext.jar and /dev/null differ diff --git a/libraries/org.json4s_2.10/json4s-jackson.jar b/libraries/org.json4s_2.10/json4s-jackson.jar deleted file mode 100644 index 6c62123846..0000000000 Binary files a/libraries/org.json4s_2.10/json4s-jackson.jar and /dev/null differ diff --git a/libraries/org.json4s_2.10/json4s-native.jar b/libraries/org.json4s_2.10/json4s-native.jar deleted file mode 100644 index 3134a979ce..0000000000 Binary files a/libraries/org.json4s_2.10/json4s-native.jar and /dev/null differ diff --git a/libraries/org.json4s_2.10/library.xml b/libraries/org.json4s_2.10/library.xml deleted file mode 100644 index 98d5c41977..0000000000 --- a/libraries/org.json4s_2.10/library.xml +++ /dev/null @@ -1,44 +0,0 @@ - - Json4s - Json4s library. - 2.10 - https://github.com/json4s/json4s - https://github.com/json4s/json4s - EPFL - - - - org.json4s - json4s-ast_2.10 - 3.2.4 - - - - - org.json4s - json4s-core_2.10 - 3.2.4 - - - - - org.json4s - json4s-ext_2.10 - 3.2.4 - - - - - org.json4s - json4s-jackson_2.10 - 3.2.4 - - - - - org.json4s - json4s-native_2.10 - 3.2.4 - - - diff --git a/libraries/org.json4s_2.10/readme.txt b/libraries/org.json4s_2.10/readme.txt deleted file mode 100644 index b59de8683b..0000000000 --- a/libraries/org.json4s_2.10/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ ----------------------------------------- -Scala - Object-Oriented Meets Functional ----------------------------------------- - -"Have the best of both worlds. Construct elegant class hierarchies for maximum -code reuse and extensibility, implement their behavior using higher-order -functions. Or anything in-between." - -For more information: -www.scala-lang.org/ \ No newline at end of file diff --git a/libraries/org.jsslutils_1.0/.classpath b/libraries/org.jsslutils_1.0/.classpath deleted file mode 100644 index 0a719c753c..0000000000 --- a/libraries/org.jsslutils_1.0/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/libraries/org.jsslutils_1.0/.project b/libraries/org.jsslutils_1.0/.project deleted file mode 100644 index 97c15e4988..0000000000 --- a/libraries/org.jsslutils_1.0/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.jsslutils - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/libraries/org.jsslutils_1.0/library.xml b/libraries/org.jsslutils_1.0/library.xml deleted file mode 100644 index e608645e78..0000000000 --- a/libraries/org.jsslutils_1.0/library.xml +++ /dev/null @@ -1,18 +0,0 @@ - - Java SSL utilities - Java SSL utilities - 1.0 - 5 - http://code.google.com/p/jsslutils/ - http://code.google.com/p/jsslutils/downloads/list - Bruno Harbulot, The University of Manchester. - - - - jsslutils - - - - - - diff --git a/libraries/org.jsslutils_1.0/license.txt b/libraries/org.jsslutils_1.0/license.txt deleted file mode 100644 index b4e0fa7960..0000000000 --- a/libraries/org.jsslutils_1.0/license.txt +++ /dev/null @@ -1,30 +0,0 @@ - This file is part of the jSSLutils library. - -Copyright (c) 2008-2010, The University of Manchester, United Kingdom. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the The University of Manchester nor the names of - its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - Author: Bruno Harbulot diff --git a/libraries/org.jsslutils_1.0/org.jsslutils.jar b/libraries/org.jsslutils_1.0/org.jsslutils.jar deleted file mode 100644 index 2c87c5e3e9..0000000000 Binary files a/libraries/org.jsslutils_1.0/org.jsslutils.jar and /dev/null differ diff --git a/libraries/org.jsslutils_1.0/readme.txt b/libraries/org.jsslutils_1.0/readme.txt deleted file mode 100644 index c93f158b1d..0000000000 --- a/libraries/org.jsslutils_1.0/readme.txt +++ /dev/null @@ -1,11 +0,0 @@ --------------------------------------- -jsslutils - set of utilities for Java --------------------------------------- - -"This project aims to provide a set of utilities regarding the use of SSL in Java." - -Distributed under the New BSD License. - -For more information: -http://code.google.com/p/jsslutils/ -http://www.opensource.org/licenses/bsd-license.php diff --git a/libraries/org.junit_4.11/.classpath b/libraries/org.junit_4.11/.classpath index 71df74caf3..df61e809df 100644 --- a/libraries/org.junit_4.11/.classpath +++ b/libraries/org.junit_4.11/.classpath @@ -1,6 +1,6 @@ - - - - - - + + + + + + diff --git a/libraries/org.openid4java_0.9/library.xml b/libraries/org.openid4java_0.9/library.xml index e42714f75e..0d1f060dcb 100644 --- a/libraries/org.openid4java_0.9/library.xml +++ b/libraries/org.openid4java_0.9/library.xml @@ -15,5 +15,4 @@ - diff --git a/libraries/org.jdom_1.1/.classpath b/libraries/org.raml_0.8/.classpath similarity index 77% rename from libraries/org.jdom_1.1/.classpath rename to libraries/org.raml_0.8/.classpath index 4df703733f..7182bc740d 100644 --- a/libraries/org.jdom_1.1/.classpath +++ b/libraries/org.raml_0.8/.classpath @@ -1,6 +1,6 @@ - + diff --git a/libraries/org.jdom_1.1/.project b/libraries/org.raml_0.8/.project similarity index 89% rename from libraries/org.jdom_1.1/.project rename to libraries/org.raml_0.8/.project index b3d37dd40a..3607d810ad 100644 --- a/libraries/org.jdom_1.1/.project +++ b/libraries/org.raml_0.8/.project @@ -1,6 +1,6 @@ - org.jdom + org.raml diff --git a/libraries/org.raml_0.8/library.xml b/libraries/org.raml_0.8/library.xml new file mode 100644 index 0000000000..47b71769a2 --- /dev/null +++ b/libraries/org.raml_0.8/library.xml @@ -0,0 +1,35 @@ + + Raml parser + Java implementation of the raml parser + 0.8 + 7 + http://raml.org + http://raml.org + Mule Soft + + + org.raml + raml-parser + 0.8.7 + + + + + + + + + + + + mulesoft-releases + MuleSoft Releases Repository + https://repository-master.mulesoft.org/releases/ + + + mulesoft-snapshots + MuleSoft Snapshots Repository + https://repository-master.mulesoft.org/snapshots/ + + + diff --git a/libraries/org.raml_0.8/license.txt b/libraries/org.raml_0.8/license.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/libraries/org.raml_0.8/license.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/libraries/org.raml_0.8/org.raml.parser.jar b/libraries/org.raml_0.8/org.raml.parser.jar new file mode 100644 index 0000000000..29fa5aa267 Binary files /dev/null and b/libraries/org.raml_0.8/org.raml.parser.jar differ diff --git a/libraries/org.raml_0.8/readme.txt b/libraries/org.raml_0.8/readme.txt new file mode 100644 index 0000000000..2c317ee3d4 --- /dev/null +++ b/libraries/org.raml_0.8/readme.txt @@ -0,0 +1,14 @@ +------------------------------------ +RAML - RESTful API Modeling Language +------------------------------------ + +"RESTful API Modeling Language (RAML) is a simple and succinct way of +describing practically-RESTful APIs. It encourages reuse, enables discovery +and pattern-sharing, and aims for merit-based emergence of best practices. The +goal is to help our current API ecosystem by solving immediate problems and +then encourage ever-better API patterns. RAML is built on broadly-used +standards such as YAML and JSON and is a non-proprietary, vendor-neutral open +spec." + +For more information: +http://raml.org/ diff --git a/libraries/org.scala_2.9/.classpath b/libraries/org.scala_2.9/.classpath index 3de9b08119..233201f0e3 100644 --- a/libraries/org.scala_2.9/.classpath +++ b/libraries/org.scala_2.9/.classpath @@ -1,6 +1,6 @@ - + diff --git a/libraries/org.scala_2.9/library.xml b/libraries/org.scala_2.9/library.xml index 573e0e9c08..767cc3d466 100644 --- a/libraries/org.scala_2.9/library.xml +++ b/libraries/org.scala_2.9/library.xml @@ -20,4 +20,7 @@ 2.9.1 + + + diff --git a/libraries/org.simpleframework_5.1/.classpath b/libraries/org.simpleframework.xml_2.7/.classpath similarity index 94% rename from libraries/org.simpleframework_5.1/.classpath rename to libraries/org.simpleframework.xml_2.7/.classpath index 923e28ea79..03429424d3 100644 --- a/libraries/org.simpleframework_5.1/.classpath +++ b/libraries/org.simpleframework.xml_2.7/.classpath @@ -1,6 +1,6 @@ - + diff --git a/libraries/org.simpleframework.xml_2.7/.gitignore b/libraries/org.simpleframework.xml_2.7/.gitignore new file mode 100644 index 0000000000..5e56e040ec --- /dev/null +++ b/libraries/org.simpleframework.xml_2.7/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/modules/org.restlet.ext.e4/.project b/libraries/org.simpleframework.xml_2.7/.project similarity index 90% rename from modules/org.restlet.ext.e4/.project rename to libraries/org.simpleframework.xml_2.7/.project index fcea8397c6..420f43f308 100644 --- a/modules/org.restlet.ext.e4/.project +++ b/libraries/org.simpleframework.xml_2.7/.project @@ -1,6 +1,6 @@ - org.restlet.ext.e4 + org.simpleframework.xml diff --git a/libraries/org.simpleframework.xml_2.7/library.xml b/libraries/org.simpleframework.xml_2.7/library.xml new file mode 100644 index 0000000000..1178b178af --- /dev/null +++ b/libraries/org.simpleframework.xml_2.7/library.xml @@ -0,0 +1,23 @@ + + Simple XML + Simple XML. + 2.7 + 1 + http://simple.sourceforge.net/ + http://simple.sourceforge.net/download.php + Niall Gallagher + + + + org.simpleframework + simple-xml + 2.7.1 + + + + + + + + + diff --git a/libraries/org.simpleframework_5.1/licence.txt b/libraries/org.simpleframework.xml_2.7/licence.txt similarity index 100% rename from libraries/org.simpleframework_5.1/licence.txt rename to libraries/org.simpleframework.xml_2.7/licence.txt diff --git a/libraries/org.simpleframework.xml_2.7/org.simpleframework.xml.jar b/libraries/org.simpleframework.xml_2.7/org.simpleframework.xml.jar new file mode 100644 index 0000000000..913725de7d Binary files /dev/null and b/libraries/org.simpleframework.xml_2.7/org.simpleframework.xml.jar differ diff --git a/libraries/org.simpleframework.xml_2.7/readme.txt b/libraries/org.simpleframework.xml_2.7/readme.txt new file mode 100644 index 0000000000..31544eab82 --- /dev/null +++ b/libraries/org.simpleframework.xml_2.7/readme.txt @@ -0,0 +1,14 @@ +---------------- +Simple Framework +---------------- + +"Simple is a high performance XML serialization and configuration framework for + Java. Its goal is to provide an XML framework that enables rapid development + of XML configuration and communication systems. This framework aids the + development of XML systems with minimal effort and reduced errors. It offers + full object serialization and deserialization, maintaining each reference + encountered. In essence it is similar to C# XML serialization for the Java + platform, but offers additional features for interception and manipulation." + +For more information: +http://simple.sourceforge.net/ \ No newline at end of file diff --git a/libraries/org.simpleframework_5.1/library.xml b/libraries/org.simpleframework_5.1/library.xml deleted file mode 100644 index 0bc497f53e..0000000000 --- a/libraries/org.simpleframework_5.1/library.xml +++ /dev/null @@ -1,21 +0,0 @@ - - Simple framework - Simple framework. - 5.1 - 6 - http://simpleweb.sourceforge.net/ - http://www.simpleframework.org/download/ - Niall Gallagher - - - - simple - - - - - - - - - diff --git a/libraries/org.simpleframework_5.1/org.simpleframework.jar b/libraries/org.simpleframework_5.1/org.simpleframework.jar deleted file mode 100644 index 04d5c454f5..0000000000 Binary files a/libraries/org.simpleframework_5.1/org.simpleframework.jar and /dev/null differ diff --git a/libraries/org.simpleframework_5.1/readme.txt b/libraries/org.simpleframework_5.1/readme.txt deleted file mode 100644 index 89ae77fc69..0000000000 --- a/libraries/org.simpleframework_5.1/readme.txt +++ /dev/null @@ -1,17 +0,0 @@ ----------------- -Simple Framework ----------------- - -"The goal of Simple is to bring the power of simplicity to the world of server -side Java. The primary focus of the project is to provide a truly embeddable -Java based HTTP engine capable of handling enormous loads. It also provides -a component based framework for extendability, which is used to facilitate -loadable services similar to Java Servlets. Simple has consistently out -performed both commercial and open source Java Servlet engines and has a fully -comprehensive API that is as usable for experienced Java developers as it is -for beginners. Best of all, Simple is completely free, and is released under -the terms of the GNU Lesser General Public License, LGPL, which ensures its -availability for use by open source and proprietary developers alike." - -For more information: -http://www.simpleframework.org/ \ No newline at end of file diff --git a/libraries/org.slf4j_1.7/library.xml b/libraries/org.slf4j_1.7/library.xml index 6a1e464900..46a8c7b612 100644 --- a/libraries/org.slf4j_1.7/library.xml +++ b/libraries/org.slf4j_1.7/library.xml @@ -12,4 +12,7 @@ slf4j-api + + + diff --git a/libraries/org.tanukisoftware.wrapper_3.2/.project b/libraries/org.tanukisoftware.wrapper_3.2/.project deleted file mode 100644 index 076cc607a5..0000000000 --- a/libraries/org.tanukisoftware.wrapper_3.2/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.tanukisoftware.wrapper - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - diff --git a/libraries/org.tanukisoftware.wrapper_3.2/library.xml b/libraries/org.tanukisoftware.wrapper_3.2/library.xml deleted file mode 100644 index d9a45817e8..0000000000 --- a/libraries/org.tanukisoftware.wrapper_3.2/library.xml +++ /dev/null @@ -1,15 +0,0 @@ - - Java Service Wrapper Plug-in - Java Service Wrapper Plug-in - 3.2 - 3 - http://wrapper.tanukisoftware.org/doc/english/introduction.html - http://wrapper.tanukisoftware.org/doc/english/download.jsp - Tanuki Software - - - - - - - diff --git a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-linux-ppc-64.so b/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-linux-ppc-64.so deleted file mode 100644 index 55708b336c..0000000000 Binary files a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-linux-ppc-64.so and /dev/null differ diff --git a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-linux-x86-32.so b/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-linux-x86-32.so deleted file mode 100644 index 2cc4ab3ceb..0000000000 Binary files a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-linux-x86-32.so and /dev/null differ diff --git a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-linux-x86-64.so b/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-linux-x86-64.so deleted file mode 100644 index 24197bf6e2..0000000000 Binary files a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-linux-x86-64.so and /dev/null differ diff --git a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-macosx-ppc-32.jnilib b/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-macosx-ppc-32.jnilib deleted file mode 100644 index 422711d56f..0000000000 Binary files a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-macosx-ppc-32.jnilib and /dev/null differ diff --git a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-macosx-universal-32.jnilib b/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-macosx-universal-32.jnilib deleted file mode 100644 index 2b10f10082..0000000000 Binary files a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-macosx-universal-32.jnilib and /dev/null differ diff --git a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-solaris-sparc-32.so b/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-solaris-sparc-32.so deleted file mode 100644 index 409326265d..0000000000 Binary files a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-solaris-sparc-32.so and /dev/null differ diff --git a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-solaris-sparc-64.so b/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-solaris-sparc-64.so deleted file mode 100644 index 008bef6181..0000000000 Binary files a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-solaris-sparc-64.so and /dev/null differ diff --git a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-solaris-x86-32.so b/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-solaris-x86-32.so deleted file mode 100644 index 963ff498f9..0000000000 Binary files a/libraries/org.tanukisoftware.wrapper_3.2/libwrapper-solaris-x86-32.so and /dev/null differ diff --git a/libraries/org.tanukisoftware.wrapper_3.2/license.txt b/libraries/org.tanukisoftware.wrapper_3.2/license.txt deleted file mode 100644 index 0f41b85b68..0000000000 --- a/libraries/org.tanukisoftware.wrapper_3.2/license.txt +++ /dev/null @@ -1,40 +0,0 @@ -Copyright (c) 1999, 2005 Tanuki Software Inc. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of the Java Service Wrapper and associated -documentation files (the "Software"), to deal in the Software -without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sub-license, -and/or sell copies of the Software, and to permit persons to -whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -Portions of the Software have been derived from source code -developed by Silver Egg Technology under the following license: - -Copyright (c) 2001 Silver Egg Technology - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sub-license, and/or -sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. \ No newline at end of file diff --git a/libraries/org.tanukisoftware.wrapper_3.2/org.tanukisoftware.wrapper.jar b/libraries/org.tanukisoftware.wrapper_3.2/org.tanukisoftware.wrapper.jar deleted file mode 100644 index 4db355bc34..0000000000 Binary files a/libraries/org.tanukisoftware.wrapper_3.2/org.tanukisoftware.wrapper.jar and /dev/null differ diff --git a/libraries/org.tanukisoftware.wrapper_3.2/readme.txt b/libraries/org.tanukisoftware.wrapper_3.2/readme.txt deleted file mode 100644 index 7435de1397..0000000000 --- a/libraries/org.tanukisoftware.wrapper_3.2/readme.txt +++ /dev/null @@ -1,16 +0,0 @@ --------------------- -Java Service Wrapper --------------------- - -"The Java Service Wrapper is an application which has evolved out of a desire -to solve a number of problems common to many Java applications: - * Run as a Windows Service or Unix Daemon - * Application Reliability - * Standard, Out of the Box Scripting - * On Demand Restarts - * Flexible Configuration - * Ease Application Installations - * Logging" - -For more information: -http://wrapper.tanukisoftware.org/ \ No newline at end of file diff --git a/libraries/org.tanukisoftware.wrapper_3.2/wrapper-windows-x86-32.dll b/libraries/org.tanukisoftware.wrapper_3.2/wrapper-windows-x86-32.dll deleted file mode 100644 index cb553c1234..0000000000 Binary files a/libraries/org.tanukisoftware.wrapper_3.2/wrapper-windows-x86-32.dll and /dev/null differ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/module.xml b/modules/org.restlet.example.book.restlet.ch08.gae/module.xml deleted file mode 100644 index 31c451d76b..0000000000 --- a/modules/org.restlet.example.book.restlet.ch08.gae/module.xml +++ /dev/null @@ -1,10 +0,0 @@ - - Restlet examples - Book examples (ch08-gae) - - - - - - - \ No newline at end of file diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountRepresentation.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountRepresentation.java index a592ef6858..660bfb2a4c 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountResource.java index 567e2be0dc..5c03e5c464 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -48,7 +39,7 @@ public interface AccountResource { * @return The account representation. */ @Get - public AccountRepresentation represent(); + AccountRepresentation represent(); /** * Stores the new value for the identified account. @@ -57,12 +48,12 @@ public interface AccountResource { * The identified account. */ @Put - public void store(AccountRepresentation account); + void store(AccountRepresentation account); /** * Deletes the identified account by setting its value to null. */ @Delete - public void remove(); + void remove(); } diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountsResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountsResource.java index c94e58934e..77d41593a0 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountsResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/AccountsResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -47,7 +38,7 @@ public interface AccountsResource { * @return The list of accounts. */ @Get - public String represent(); + String represent(); /** * Add the given account to the list and returns its position as an @@ -58,6 +49,6 @@ public interface AccountsResource { * @return The account identifier. */ @Post - public String add(AccountRepresentation account); + String add(AccountRepresentation account); } diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactRepresentation.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactRepresentation.java index 9a0b34e1d5..5993bece2b 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactResource.java index f3501b86eb..bdbb0d061a 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -41,6 +32,6 @@ public interface ContactResource { @Get - public ContactRepresentation retrieve(); + ContactRepresentation retrieve(); } diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactsRepresentation.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactsRepresentation.java index 842a9a16fb..f738451ed8 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactsRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactsRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactsResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactsResource.java index 413819387d..aa3c8629d0 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactsResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/ContactsResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -42,9 +33,9 @@ public interface ContactsResource { @Get - public ContactsRepresentation retrieve(); + ContactsRepresentation retrieve(); @Post - public void add(ContactRepresentation contact); + void add(ContactRepresentation contact); } diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/FeedRepresentation.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/FeedRepresentation.java index c3dcfee8f2..c98ad9a008 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/FeedRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/FeedRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailRepresentation.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailRepresentation.java index 90e98b37ab..11bd27e89d 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailResource.java index 5ca5642fed..4e95b9fc70 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -42,9 +33,9 @@ public interface MailResource { @Get - public MailRepresentation retrieve(); + MailRepresentation retrieve(); @Put - public void store(MailRepresentation mail); + void store(MailRepresentation mail); } diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailsRepresentation.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailsRepresentation.java index add47793e3..cee0108ccf 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailsRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailsRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailsResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailsResource.java index db7e229876..e6e1ecc098 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailsResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/MailsResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -42,9 +33,9 @@ public interface MailsResource { @Get - public MailsRepresentation retrieve(); + MailsRepresentation retrieve(); @Post - public void add(MailRepresentation mail); + void add(MailRepresentation mail); } diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/RootResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/RootResource.java index a587de1614..92f80222f7 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/RootResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/RootResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -46,6 +37,6 @@ public interface RootResource { * @return The root representation. */ @Get - public String represent(); + String represent(); } diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/TagRepresentation.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/TagRepresentation.java index 3b2bdfe5fd..9419730318 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/TagRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/common/TagRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/AccountServerResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/AccountServerResource.java index 4e5c83a7d6..a54e575062 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/AccountServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/AccountServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/AccountsServerResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/AccountsServerResource.java index c5294d6f65..1109f36994 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/AccountsServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/AccountsServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/ContactServerResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/ContactServerResource.java index 716c2ab35f..3463820910 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/ContactServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/ContactServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/ContactsServerResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/ContactsServerResource.java index 50e8c60f96..96e8de7488 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/ContactsServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/ContactsServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerApplication.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerApplication.java index 6972b13bb6..ac6dc99248 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerApplication.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerApplication.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerResource.java index ccb5814ca5..a04e6b6bba 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailsServerResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailsServerResource.java index b0d475dc55..8084cf01be 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailsServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/MailsServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/RootServerResource.java b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/RootServerResource.java index 158b5ce6c8..8ad1e162e9 100644 --- a/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/RootServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch08.gae/src/org/restlet/example/book/restlet/ch08/gae/server/RootServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch08.odata/module.xml b/modules/org.restlet.example.book.restlet.ch08.odata/module.xml deleted file mode 100644 index 8dfbdd6b37..0000000000 --- a/modules/org.restlet.example.book.restlet.ch08.odata/module.xml +++ /dev/null @@ -1,14 +0,0 @@ - - Restlet examples - Book examples (ch08-odata) - - - - - - - - - - - \ No newline at end of file diff --git a/modules/org.restlet.example.book.restlet.ch08.odata/src/OdataDemoService.java b/modules/org.restlet.example.book.restlet.ch08.odata/src/OdataDemoService.java index 6a222a645c..02c9f0e6c7 100644 --- a/modules/org.restlet.example.book.restlet.ch08.odata/src/OdataDemoService.java +++ b/modules/org.restlet.example.book.restlet.ch08.odata/src/OdataDemoService.java @@ -1,31 +1,25 @@ /** - * Copyright 2005-2010 Noelios Technologies. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php + * http://www.opensource.org/licenses/eclipse-1.0 * * See the Licenses for the specific language governing permissions and * limitations under the Licenses. * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine + * http://restlet.com/products/restlet-framework * - * Restlet is a registered trademark of Noelios Technologies. + * Restlet is a registered trademark of Restlet S.A.S. */ import org.restlet.ext.odata.Query; @@ -115,4 +109,4 @@ public Query createSupplierQuery(String subpath) { } -} \ No newline at end of file +} diff --git a/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Address.java b/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Address.java index 5d187a7542..1616eb7ee2 100644 --- a/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Address.java +++ b/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Address.java @@ -1,31 +1,25 @@ /** - * Copyright 2005-2010 Noelios Technologies. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php + * http://www.opensource.org/licenses/eclipse-1.0 * * See the Licenses for the specific language governing permissions and * limitations under the Licenses. * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine + * http://restlet.com/products/restlet-framework * - * Restlet is a registered trademark of Noelios Technologies. + * Restlet is a registered trademark of Restlet S.A.S. */ package odatademo; @@ -149,4 +143,4 @@ public void setZipCode(String zipCode) { this.zipCode = zipCode; } -} \ No newline at end of file +} diff --git a/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Category.java b/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Category.java index 9cf03efd62..c50822205f 100644 --- a/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Category.java +++ b/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Category.java @@ -1,31 +1,25 @@ /** - * Copyright 2005-2010 Noelios Technologies. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php + * http://www.opensource.org/licenses/eclipse-1.0 * * See the Licenses for the specific language governing permissions and * limitations under the Licenses. * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine + * http://restlet.com/products/restlet-framework * - * Restlet is a registered trademark of Noelios Technologies. + * Restlet is a registered trademark of Restlet S.A.S. */ package odatademo; @@ -118,4 +112,4 @@ public void setProducts(List products) { this.products = products; } -} \ No newline at end of file +} diff --git a/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Product.java b/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Product.java index c1ceb0e797..323e833a43 100644 --- a/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Product.java +++ b/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Product.java @@ -1,31 +1,25 @@ /** - * Copyright 2005-2010 Noelios Technologies. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php + * http://www.opensource.org/licenses/eclipse-1.0 * * See the Licenses for the specific language governing permissions and * limitations under the Licenses. * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine + * http://restlet.com/products/restlet-framework * - * Restlet is a registered trademark of Noelios Technologies. + * Restlet is a registered trademark of Restlet S.A.S. */ package odatademo; @@ -229,4 +223,4 @@ public void setSupplier(Supplier supplier) { this.supplier = supplier; } -} \ No newline at end of file +} diff --git a/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Supplier.java b/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Supplier.java index 6eddd374a8..6791c46f8d 100644 --- a/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Supplier.java +++ b/modules/org.restlet.example.book.restlet.ch08.odata/src/odatademo/Supplier.java @@ -1,33 +1,26 @@ /** - * Copyright 2005-2010 Noelios Technologies. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL 1.0 (the - * "Licenses"). You can select the license that you prefer but you may not use - * this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0.html - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1.php - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1.php + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0.php + * http://www.opensource.org/licenses/eclipse-1.0 * * See the Licenses for the specific language governing permissions and * limitations under the Licenses. * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.noelios.com/products/restlet-engine + * http://restlet.com/products/restlet-framework * - * Restlet is a registered trademark of Noelios Technologies. + * Restlet is a registered trademark of Restlet S.A.S. */ - package odatademo; @@ -155,4 +148,4 @@ public void setProducts(List products) { this.products = products; } -} \ No newline at end of file +} diff --git a/modules/org.restlet.example.book.restlet.ch09.android/module.xml b/modules/org.restlet.example.book.restlet.ch09.android/module.xml deleted file mode 100644 index 9973afd816..0000000000 --- a/modules/org.restlet.example.book.restlet.ch09.android/module.xml +++ /dev/null @@ -1,10 +0,0 @@ - - Restlet examples - Book examples (ch09-android) - - - - - - - \ No newline at end of file diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/constants/NumberConstantsImpl_.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/constants/NumberConstantsImpl_.java index d46727c690..593e6da91e 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/constants/NumberConstantsImpl_.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/constants/NumberConstantsImpl_.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.i18n.client.constants; public class NumberConstantsImpl_ implements com.google.gwt.i18n.client.constants.NumberConstantsImpl { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/impl/LocaleInfoImpl_.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/impl/LocaleInfoImpl_.java index ee365b669f..5c556cc6d3 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/impl/LocaleInfoImpl_.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/impl/LocaleInfoImpl_.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.i18n.client.impl; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/impl/LocaleInfoImpl_shared.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/impl/LocaleInfoImpl_shared.java index 63f0464e86..8d8daf70e3 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/impl/LocaleInfoImpl_shared.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/i18n/client/impl/LocaleInfoImpl_shared.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.i18n.client.impl; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/DocumentModeAsserter_DocumentModeProperty.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/DocumentModeAsserter_DocumentModeProperty.java index def2454b7e..95ff4f3f8f 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/DocumentModeAsserter_DocumentModeProperty.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/DocumentModeAsserter_DocumentModeProperty.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client; import com.google.gwt.user.client.DocumentModeAsserter.Severity; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplGecko1_8.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplGecko1_8.java index 6fa2b49c86..a8cd2f94bb 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplGecko1_8.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplGecko1_8.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client; public class UserAgentAsserter_UserAgentPropertyImplGecko1_8 implements com.google.gwt.user.client.UserAgentAsserter.UserAgentProperty { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe6.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe6.java index f601fe6819..b9d5788a1f 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe6.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe6.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client; public class UserAgentAsserter_UserAgentPropertyImplIe6 implements com.google.gwt.user.client.UserAgentAsserter.UserAgentProperty { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe8.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe8.java index 2bac0f60b2..089e2b0784 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe8.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe8.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client; public class UserAgentAsserter_UserAgentPropertyImplIe8 implements com.google.gwt.user.client.UserAgentAsserter.UserAgentProperty { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe9.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe9.java index 3d02c312eb..f146996a54 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe9.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplIe9.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client; public class UserAgentAsserter_UserAgentPropertyImplIe9 implements com.google.gwt.user.client.UserAgentAsserter.UserAgentProperty { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplOpera.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplOpera.java index ed5f1c76a5..df1ef6dbe9 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplOpera.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplOpera.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client; public class UserAgentAsserter_UserAgentPropertyImplOpera implements com.google.gwt.user.client.UserAgentAsserter.UserAgentProperty { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplSafari.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplSafari.java index f3484859aa..379425352d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplSafari.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/UserAgentAsserter_UserAgentPropertyImplSafari.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client; public class UserAgentAsserter_UserAgentPropertyImplSafari implements com.google.gwt.user.client.UserAgentAsserter.UserAgentProperty { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/impl/WindowImplIE_Resources_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/impl/WindowImplIE_Resources_default_InlineClientBundleGenerator.java index 8871af3a4e..9761fab370 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/impl/WindowImplIE_Resources_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/impl/WindowImplIE_Resources_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.impl; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/impl/WindowImplIE_Resources_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/impl/WindowImplIE_Resources_default_StaticClientBundleGenerator.java index 822db8a648..c51981db09 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/impl/WindowImplIE_Resources_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/impl/WindowImplIE_Resources_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.impl; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/rpc/core/java/lang/String_FieldSerializer.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/rpc/core/java/lang/String_FieldSerializer.java index d25a3b385e..b0e82fb474 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/rpc/core/java/lang/String_FieldSerializer.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/rpc/core/java/lang/String_FieldSerializer.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.rpc.core.java.lang; import com.google.gwt.user.client.rpc.SerializationException; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/rpc/core/java/util/ArrayList_FieldSerializer.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/rpc/core/java/util/ArrayList_FieldSerializer.java index 20331ef668..065ca8df10 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/rpc/core/java/util/ArrayList_FieldSerializer.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/rpc/core/java/util/ArrayList_FieldSerializer.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.rpc.core.java.util; import com.google.gwt.user.client.rpc.SerializationException; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Composite_HTMLTemplatesImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Composite_HTMLTemplatesImpl.java index cf1a4dec15..e1f4b386ec 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Composite_HTMLTemplatesImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Composite_HTMLTemplatesImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.ui; public class Composite_HTMLTemplatesImpl implements com.google.gwt.user.client.ui.Composite.HTMLTemplates { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/DisclosurePanel_DefaultImages_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/DisclosurePanel_DefaultImages_default_InlineClientBundleGenerator.java index 4e4a255ef9..2501e89339 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/DisclosurePanel_DefaultImages_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/DisclosurePanel_DefaultImages_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.ui; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/DisclosurePanel_DefaultImages_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/DisclosurePanel_DefaultImages_default_StaticClientBundleGenerator.java index 4e2a505247..a4296564d0 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/DisclosurePanel_DefaultImages_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/DisclosurePanel_DefaultImages_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.ui; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/MenuBar_Resources_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/MenuBar_Resources_default_InlineClientBundleGenerator.java index 633b53266a..4c534c2ef5 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/MenuBar_Resources_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/MenuBar_Resources_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.ui; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/MenuBar_Resources_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/MenuBar_Resources_default_StaticClientBundleGenerator.java index 22042f4703..caf4db75a9 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/MenuBar_Resources_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/MenuBar_Resources_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.ui; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Tree_Resources_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Tree_Resources_default_InlineClientBundleGenerator.java index aa8791d336..08231b5dce 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Tree_Resources_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Tree_Resources_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.ui; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Tree_Resources_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Tree_Resources_default_StaticClientBundleGenerator.java index ed49b1a436..a056ef271f 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Tree_Resources_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/Tree_Resources_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.ui; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/impl/ClippedImageImpl_TemplateImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/impl/ClippedImageImpl_TemplateImpl.java index b686a3105a..0292401a08 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/impl/ClippedImageImpl_TemplateImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/com/google/gwt/user/client/ui/impl/ClippedImageImpl_TemplateImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package com.google.gwt.user.client.ui.impl; public class ClippedImageImpl_TemplateImpl implements com.google.gwt.user.client.ui.impl.ClippedImageImpl.Template { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl.java index 0d21db1f07..046c641f2f 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle.java index 1ca68db476..eee351daea 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.ClientBundle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java index f2c4e2e1ba..9cec090982 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java index 0966378fcb..a12cd1620b 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenCss_style.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenCss_style.java index 5f11a8fcc5..a94b38e999 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenCss_style.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_GenCss_style.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.CssResource; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_TemplateImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_TemplateImpl.java index 7e8afa6716..7f0c1ffbe5 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_TemplateImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/AboutDialog_BinderImpl_TemplateImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; public class AboutDialog_BinderImpl_TemplateImpl implements org.restlet.example.book.restlet.ch09.client.AboutDialog_BinderImpl.Template { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxyImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxyImpl.java index c987a82766..65c0295791 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxyImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxyImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxy_TypeSerializer.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxy_TypeSerializer.java index 48983d48c2..82fd081dde 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxy_TypeSerializer.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxy_TypeSerializer.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl.java index 844d4fe402..db851ca606 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle.java index e75ddbe892..5244aaff65 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.ClientBundle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java index 116d9270d7..17cf6ef39e 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java index 01a50f5bb1..7ce203d6ac 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenCss_style.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenCss_style.java index 0c96b3f514..cde1305b32 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenCss_style.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_BinderImpl_GenCss_style.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import org.restlet.example.book.restlet.ch09.client.Contacts.Style; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl.java index 057ccf232c..bc348bdb2c 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle.java index b328d1dbd3..12c57d3d4d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.ClientBundle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java index 6577268eba..18ab505d0f 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java index 088044ac8a..7396faa257 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenCss_style.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenCss_style.java index 54caecd981..bb3965882a 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenCss_style.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_GenCss_style.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.CssResource; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_TemplateImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_TemplateImpl.java index 379929b547..10e5fa6f84 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_TemplateImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Contacts_ContactPopup_BinderImpl_TemplateImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; public class Contacts_ContactPopup_BinderImpl_TemplateImpl implements org.restlet.example.book.restlet.ch09.client.Contacts_ContactPopup_BinderImpl.Template { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl.java index 7d192c0e7c..c5bb43eef2 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle.java index 3f0ad74f7c..90b42e7ce5 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.ClientBundle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java index 4fb38279d8..3652b1b36d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java index 52a3f31d24..71dfde303f 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenCss_style.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenCss_style.java index f7c7ac9c0b..95c0442367 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenCss_style.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_GenCss_style.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.CssResource; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_TemplateImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_TemplateImpl.java index 5190458fc4..8920f107f5 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_TemplateImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailDetail_BinderImpl_TemplateImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; public class MailDetail_BinderImpl_TemplateImpl implements org.restlet.example.book.restlet.ch09.client.MailDetail_BinderImpl.Template { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl.java index db992f9dea..968224c03d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle.java index cf96a228c0..846bce89b4 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.ClientBundle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java index 84896ae6fe..f60c841dac 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java index 638fc67f55..99859918ae 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenCss_selectionStyle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenCss_selectionStyle.java index 6bddad2d1a..5ec6a0d3b2 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenCss_selectionStyle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenCss_selectionStyle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import org.restlet.example.book.restlet.ch09.client.MailList.SelectionStyle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenCss_style.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenCss_style.java index a991afbded..12e6f9f43f 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenCss_style.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/MailList_BinderImpl_GenCss_style.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.CssResource; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl.java index 3b7700f20e..3fb0a2ed3d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle.java index 1c4a1a8226..f1f4230a28 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.ClientBundle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java index 98bd7ad864..210d12ae03 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java index 27deaa71dd..9331bfaf07 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_GlobalResources_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_GlobalResources_default_InlineClientBundleGenerator.java index 71b02b0c92..dc410b1647 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_GlobalResources_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_GlobalResources_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_GlobalResources_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_GlobalResources_default_StaticClientBundleGenerator.java index d253d54543..415ee69178 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_GlobalResources_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mail_GlobalResources_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mailboxes_Images_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mailboxes_Images_default_InlineClientBundleGenerator.java index 9910b83f04..c096e9244c 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mailboxes_Images_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mailboxes_Images_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mailboxes_Images_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mailboxes_Images_default_StaticClientBundleGenerator.java index 681064734e..e005f12b03 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mailboxes_Images_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Mailboxes_Images_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl.java index 95f2b975ee..fd9b8d118a 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle.java index 3ec5ccfbf3..156ca0d5df 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.ClientBundle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java index a584055527..7ca4beb07d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java index fc7372a96a..8fd8f6029c 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenCss_style.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenCss_style.java index 1d8d6d3225..74feacafb4 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenCss_style.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_GenCss_style.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.CssResource; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_TemplateImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_TemplateImpl.java index d28c2164b6..bf4d079213 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_TemplateImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/NavBar_BinderImpl_TemplateImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; public class NavBar_BinderImpl_TemplateImpl implements org.restlet.example.book.restlet.ch09.client.NavBar_BinderImpl.Template { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl.java index 764fa0cc2d..e3c0ff02db 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle.java index 3f572858b5..63e26d04d4 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.ClientBundle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_gecko1_8_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_gecko1_8_default_InlineClientBundleGenerator.java index 4e45795da1..56b3ae5898 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_gecko1_8_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_gecko1_8_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie6_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie6_default_StaticClientBundleGenerator.java index 5d2687a434..3513078133 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie6_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie6_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie8_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie8_default_InlineClientBundleGenerator.java index fffaa55449..a5625a6a38 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie8_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie8_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie9_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie9_default_InlineClientBundleGenerator.java index 1dd4dcd9db..ec1575e309 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie9_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_ie9_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_opera_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_opera_default_InlineClientBundleGenerator.java index de71d56c28..e9fa9bf5ce 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_opera_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_opera_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_safari_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_safari_default_InlineClientBundleGenerator.java index 6880108f8d..70f0363509 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_safari_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenBundle_safari_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenCss_style.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenCss_style.java index 7447d6358e..9cd8ab2b1d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenCss_style.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_GenCss_style.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.CssResource; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_TemplateImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_TemplateImpl.java index 1a507b87b5..c8f1de1614 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_TemplateImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Shortcuts_BinderImpl_TemplateImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; public class Shortcuts_BinderImpl_TemplateImpl implements org.restlet.example.book.restlet.ch09.client.Shortcuts_BinderImpl.Template { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl.java index 6731e77a28..d84459fdb1 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle.java index 1746b7a520..74972f626c 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.ClientBundle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java index 251064ffa4..8fe7f2557a 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java index d4d2299904..052b122267 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenBundle_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenCss_style.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenCss_style.java index 6e2cf47a18..2a6ce2efd1 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenCss_style.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_GenCss_style.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.CssResource; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_TemplateImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_TemplateImpl.java index 04a7dd7373..65fe745180 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_TemplateImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/Tasks_BinderImpl_TemplateImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; public class Tasks_BinderImpl_TemplateImpl implements org.restlet.example.book.restlet.ch09.client.Tasks_BinderImpl.Template { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl.java index 78d1cf94be..e6d7afb7dc 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle.java index 770206d04b..70226f9dd7 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.ClientBundle; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_gecko1_8_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_gecko1_8_default_InlineClientBundleGenerator.java index b565872344..cb4651487a 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_gecko1_8_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_gecko1_8_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie6_default_StaticClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie6_default_StaticClientBundleGenerator.java index fc3da36deb..36c4bf0819 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie6_default_StaticClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie6_default_StaticClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie8_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie8_default_InlineClientBundleGenerator.java index 57b1fa1a02..35a5adb568 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie8_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie8_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie9_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie9_default_InlineClientBundleGenerator.java index 528df958e3..062b7b4074 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie9_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_ie9_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_opera_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_opera_default_InlineClientBundleGenerator.java index 55be991a91..20a0d423ed 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_opera_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_opera_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_safari_default_InlineClientBundleGenerator.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_safari_default_InlineClientBundleGenerator.java index 81a3966988..b15c08be7b 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_safari_default_InlineClientBundleGenerator.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenBundle_safari_default_InlineClientBundleGenerator.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenCss_style.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenCss_style.java index d9ebe1a6d9..89e1f65357 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenCss_style.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_GenCss_style.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.resources.client.CssResource; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_TemplateImpl.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_TemplateImpl.java index 43015a656b..435c5a5d87 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_TemplateImpl.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/client/TopPanel_BinderImpl_TemplateImpl.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.client; public class TopPanel_BinderImpl_TemplateImpl implements org.restlet.example.book.restlet.ch09.client.TopPanel_BinderImpl.Template { diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/common/ContactRepresentation_FieldSerializer.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/common/ContactRepresentation_FieldSerializer.java index f82c5a68e0..4901889b6a 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/common/ContactRepresentation_FieldSerializer.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/common/ContactRepresentation_FieldSerializer.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.common; import com.google.gwt.user.client.rpc.SerializationException; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/common/ContactsRepresentation_FieldSerializer.java b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/common/ContactsRepresentation_FieldSerializer.java index 546d1b98e2..38cea3f4bd 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/common/ContactsRepresentation_FieldSerializer.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-gen/org/restlet/example/book/restlet/ch09/common/ContactsRepresentation_FieldSerializer.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch09.common; import com.google.gwt.user.client.rpc.SerializationException; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389C036EEE b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389C036EEE index 2f03556c2a..f6a80cb211 100644 Binary files a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389C036EEE and b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389C036EEE differ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389C06F3E1 b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389C06F3E1 index 3740a10448..74e9738b02 100644 Binary files a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389C06F3E1 and b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389C06F3E1 differ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389E2069B4 b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389E2069B4 index 32d4246d48..dcb5626af0 100644 Binary files a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389E2069B4 and b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389E2069B4 differ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389FDABA41 b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389FDABA41 index a1d6a1e9b5..b03542e4f2 100644 Binary files a/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389FDABA41 and b/modules/org.restlet.example.book.restlet.ch09.gwt/gwt-unitCache/gwt-unitCache-000001389FDABA41 differ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/module.xml b/modules/org.restlet.example.book.restlet.ch09.gwt/module.xml deleted file mode 100644 index f2e9024578..0000000000 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/module.xml +++ /dev/null @@ -1,9 +0,0 @@ - - Restlet examples - Book examples (ch09-gwt) - - - - - - \ No newline at end of file diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/AboutDialog.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/AboutDialog.java index 95386b15c8..b0a4d245f3 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/AboutDialog.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/AboutDialog.java @@ -1,18 +1,27 @@ -/* - * Copyright 2007 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Contacts.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Contacts.java index c8e63a0300..402e1b7d65 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Contacts.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Contacts.java @@ -1,18 +1,27 @@ -/* - * Copyright 2007 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import org.restlet.client.Request; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxy.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxy.java index e85cf55239..4f5237b86d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxy.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/ContactsResourceProxy.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -46,9 +37,9 @@ public interface ContactsResourceProxy extends ClientProxy { @Get - public void retrieve(Result result); + void retrieve(Result result); @Post - public void add(ContactRepresentation contact, Result result); + void add(ContactRepresentation contact, Result result); } diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Mail.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Mail.java index 670764bf43..f9904a1281 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Mail.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Mail.java @@ -1,18 +1,27 @@ -/* - * Copyright 2007 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.EntryPoint; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailDetail.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailDetail.java index e20a5ab528..edd279f9df 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailDetail.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailDetail.java @@ -1,18 +1,27 @@ -/* - * Copyright 2007 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailItem.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailItem.java index 43c78768b4..9801ffc3c7 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailItem.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailItem.java @@ -1,18 +1,27 @@ -/* - * Copyright 2007 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; /** diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailItems.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailItems.java index 8c7dae0e96..cb18166c45 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailItems.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailItems.java @@ -1,18 +1,27 @@ -/* - * Copyright 2007 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import java.util.ArrayList; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailList.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailList.java index 7a51086847..fde8903fc1 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailList.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/MailList.java @@ -1,18 +1,27 @@ -/* - * Copyright 2007 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Mailboxes.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Mailboxes.java index 106889a553..1b61bd9bb2 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Mailboxes.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Mailboxes.java @@ -1,18 +1,27 @@ -/* - * Copyright 2007 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/NavBar.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/NavBar.java index a64c767dae..9be889660a 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/NavBar.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/NavBar.java @@ -1,18 +1,27 @@ -/* - * Copyright 2009 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Shortcuts.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Shortcuts.java index 2cc47afae2..43725b6e9d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Shortcuts.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Shortcuts.java @@ -1,18 +1,27 @@ -/* - * Copyright 2008 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Tasks.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Tasks.java index 6dfb72559c..06136ab3ed 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Tasks.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/Tasks.java @@ -1,18 +1,27 @@ -/* - * Copyright 2007 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/TopPanel.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/TopPanel.java index ecb030c0e7..36ba8a75bb 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/TopPanel.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/client/TopPanel.java @@ -1,18 +1,27 @@ -/* - * Copyright 2007 Google Inc. +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 * - * http://www.apache.org/licenses/LICENSE-2.0 + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. */ + package org.restlet.example.book.restlet.ch09.client; import com.google.gwt.core.client.GWT; diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountRepresentation.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountRepresentation.java index dc5c30d411..bd40a8c3ff 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountResource.java index 280cf2a5b6..42a60899dd 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -48,7 +39,7 @@ public interface AccountResource { * @return The account representation. */ @Get - public AccountRepresentation represent(); + AccountRepresentation represent(); /** * Stores the new value for the identified account. @@ -57,12 +48,12 @@ public interface AccountResource { * The identified account. */ @Put - public void store(AccountRepresentation account); + void store(AccountRepresentation account); /** * Deletes the identified account by setting its value to null. */ @Delete - public void remove(); + void remove(); } diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountsResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountsResource.java index 098e8151c2..61ee21164b 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountsResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/AccountsResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -47,7 +38,7 @@ public interface AccountsResource { * @return The list of accounts. */ @Get - public String represent(); + String represent(); /** * Add the given account to the list and returns its position as an @@ -58,6 +49,6 @@ public interface AccountsResource { * @return The account identifier. */ @Post - public String add(AccountRepresentation account); + String add(AccountRepresentation account); } diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactRepresentation.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactRepresentation.java index 3e90f64f06..c98bc2a8c4 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactResource.java index 85fa693599..73fe8ad84f 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactsRepresentation.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactsRepresentation.java index dba9b7e49a..9f8c554347 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactsRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactsRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactsResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactsResource.java index 999afcb4dc..1a796d6a94 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactsResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/ContactsResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -42,9 +33,9 @@ public interface ContactsResource { @Get - public ContactsRepresentation retrieve(); + ContactsRepresentation retrieve(); @Post - public void add(ContactRepresentation contact); + void add(ContactRepresentation contact); } diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/FeedRepresentation.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/FeedRepresentation.java index f032c23481..f27dc2779c 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/FeedRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/FeedRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailRepresentation.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailRepresentation.java index c19d5e94fb..39776041a1 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailResource.java index 989df9db6b..45fdb60885 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -42,9 +33,9 @@ public interface MailResource { @Get - public MailRepresentation retrieve(); + MailRepresentation retrieve(); @Put - public void store(MailRepresentation mail); + void store(MailRepresentation mail); } diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailsRepresentation.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailsRepresentation.java index 5618d93a2c..dffdf7a170 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailsRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailsRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailsResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailsResource.java index ee8568a7e3..a29c4a46b7 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailsResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/MailsResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -42,9 +33,9 @@ public interface MailsResource { @Get - public MailsRepresentation retrieve(); + MailsRepresentation retrieve(); @Post - public void add(MailRepresentation mail); + void add(MailRepresentation mail); } diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/RootResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/RootResource.java index e1aa82682b..f64a1a4096 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/RootResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/RootResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ @@ -46,6 +37,6 @@ public interface RootResource { * @return The root representation. */ @Get - public String represent(); + String represent(); } diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/TagRepresentation.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/TagRepresentation.java index c10fa1f4a1..68e05ad413 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/TagRepresentation.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/common/TagRepresentation.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/AccountServerResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/AccountServerResource.java index 53ac82450f..bbcc701699 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/AccountServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/AccountServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/AccountsServerResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/AccountsServerResource.java index 308ac8b8ce..fceeb55b1d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/AccountsServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/AccountsServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/ContactServerResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/ContactServerResource.java index 4d50b9125f..da3307f09d 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/ContactServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/ContactServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/ContactsServerResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/ContactsServerResource.java index c58cf42d9b..c030a02dd3 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/ContactsServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/ContactsServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailServerApplication.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailServerApplication.java index 16cacb5071..f02775a2ba 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailServerApplication.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailServerApplication.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailServerResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailServerResource.java index 2d63e13e7c..b3fc0f0904 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailsServerResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailsServerResource.java index 192fcabc75..d139fedfb6 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailsServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/MailsServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/RootServerResource.java b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/RootServerResource.java index 8296749a69..200089bceb 100644 --- a/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/RootServerResource.java +++ b/modules/org.restlet.example.book.restlet.ch09.gwt/src/org/restlet/example/book/restlet/ch09/server/RootServerResource.java @@ -1,23 +1,14 @@ /** - * Copyright 2005-2012 Restlet S.A.S. + * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -26,7 +17,7 @@ * * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly at - * http://www.restlet.com/products/restlet-framework + * http://restlet.com/products/restlet-framework * * Restlet is a registered trademark of Restlet S.A.S. */ diff --git a/modules/org.restlet.example/.classpath b/modules/org.restlet.example/.classpath index a17a9f3ca9..2480833454 100644 --- a/modules/org.restlet.example/.classpath +++ b/modules/org.restlet.example/.classpath @@ -2,7 +2,6 @@ - @@ -13,35 +12,27 @@ - - - - - - - + - - diff --git a/modules/org.restlet.example/config/SDC Agent.launch b/modules/org.restlet.example/config/SDC Agent.launch index aeb32cfe14..086d509059 100644 --- a/modules/org.restlet.example/config/SDC Agent.launch +++ b/modules/org.restlet.example/config/SDC Agent.launch @@ -1,12 +1,12 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/modules/org.restlet.example/module.xml b/modules/org.restlet.example/module.xml index 14d2d5fd16..ed8cf311ed 100644 --- a/modules/org.restlet.example/module.xml +++ b/modules/org.restlet.example/module.xml @@ -9,10 +9,8 @@ - - @@ -25,18 +23,15 @@ - - - diff --git a/modules/org.restlet.example/src/org/restlet/example/authentication/AuthenticationApplication.java b/modules/org.restlet.example/src/org/restlet/example/authentication/AuthenticationApplication.java new file mode 100644 index 0000000000..dcd40b7707 --- /dev/null +++ b/modules/org.restlet.example/src/org/restlet/example/authentication/AuthenticationApplication.java @@ -0,0 +1,68 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.example.authentication; + +import org.restlet.Application; +import org.restlet.Component; +import org.restlet.Restlet; +import org.restlet.data.ChallengeScheme; +import org.restlet.data.Protocol; +import org.restlet.resource.Directory; +import org.restlet.security.ChallengeAuthenticator; +import org.restlet.security.MapVerifier; + +public class AuthenticationApplication extends Application { + + public static void main(String[] args) throws Exception { + Component c = new Component(); + // server listening on pport 8182 + c.getServers().add(Protocol.HTTP, 8182); + // client connector required by the Directory. + c.getClients().add(Protocol.FILE); + c.getDefaultHost().attach(new AuthenticationApplication()); + + c.start(); + } + + @Override + public Restlet createInboundRoot() { + // Create a simple password verifier + MapVerifier verifier = new MapVerifier(); + verifier.getLocalSecrets().put("scott", "tiger".toCharArray()); + + // Create a guard + ChallengeAuthenticator guard = new ChallengeAuthenticator(getContext(), + ChallengeScheme.HTTP_BASIC, "Tutorial"); + guard.setVerifier(verifier); + + // Create a Directory able to return a deep hierarchy of files + Directory directory = new Directory(getContext(), "file:///tmp"); + directory.setListingAllowed(true); + guard.setNext(directory); + + return guard; + } + +} diff --git a/modules/org.restlet.example/src/org/restlet/example/authentication/AuthenticationClient.java b/modules/org.restlet.example/src/org/restlet/example/authentication/AuthenticationClient.java new file mode 100644 index 0000000000..a32f6ef8f6 --- /dev/null +++ b/modules/org.restlet.example/src/org/restlet/example/authentication/AuthenticationClient.java @@ -0,0 +1,61 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.example.authentication; + +import org.restlet.data.ChallengeResponse; +import org.restlet.data.ChallengeScheme; +import org.restlet.data.Status; +import org.restlet.resource.ClientResource; + +public class AuthenticationClient { + + public static void main(String[] args) { + // Prepare the request + ClientResource resource = new ClientResource("http://localhost:8182/"); + + // Add the client authentication to the call + ChallengeScheme scheme = ChallengeScheme.HTTP_BASIC; + ChallengeResponse authentication = new ChallengeResponse(scheme, + "scott", "tiger"); + resource.setChallengeResponse(authentication); + + try { + // Send the HTTP GET request + resource.get(); + // Output the response entity on the JVM console + resource.getResponseEntity().write(System.out); + } catch (Exception e) { + if (Status.CLIENT_ERROR_UNAUTHORIZED.equals(resource.getStatus())) { + // Unauthorized access + System.out + .println("Access unauthorized by the server, check your credentials"); + } else { + // Unexpected status + System.out.println("An unexpected status was returned: " + + resource.getStatus()); + } + } + } +} diff --git a/modules/org.restlet.example/src/org/restlet/example/authentication/HttpDigestAuthenticationApplication.java b/modules/org.restlet.example/src/org/restlet/example/authentication/HttpDigestAuthenticationApplication.java new file mode 100644 index 0000000000..e9529b0768 --- /dev/null +++ b/modules/org.restlet.example/src/org/restlet/example/authentication/HttpDigestAuthenticationApplication.java @@ -0,0 +1,68 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.example.authentication; + +import org.restlet.Application; +import org.restlet.Component; +import org.restlet.Restlet; +import org.restlet.data.Protocol; +import org.restlet.ext.crypto.DigestAuthenticator; +import org.restlet.resource.Directory; +import org.restlet.security.MapVerifier; + +public class HttpDigestAuthenticationApplication extends Application { + + public static void main(String[] args) throws Exception { + Component c = new Component(); + // server listening on pport 8182 + c.getServers().add(Protocol.HTTP, 8182); + // client connector required by the Directory. + c.getClients().add(Protocol.FILE); + c.getDefaultHost().attach(new HttpDigestAuthenticationApplication()); + + c.start(); + } + + @Override + public Restlet createInboundRoot() { + // Create a simple password verifier + MapVerifier verifier = new MapVerifier(); + verifier.getLocalSecrets().put("scott", "tiger".toCharArray()); + + DigestAuthenticator guard = new DigestAuthenticator(getContext(), + "TestRealm", "mySecretServerKey"); + MapVerifier mapVerifier = new MapVerifier(); + mapVerifier.getLocalSecrets().put("scott", "tiger".toCharArray()); + guard.setWrappedVerifier(mapVerifier); + + // Create a Directory able to return a deep hierarchy of files + Directory directory = new Directory(getContext(), "file:///tmp"); + directory.setListingAllowed(true); + guard.setNext(directory); + + return guard; + } + +} diff --git a/modules/org.restlet.example/src/org/restlet/example/authentication/HttpDigestAuthenticationClient.java b/modules/org.restlet.example/src/org/restlet/example/authentication/HttpDigestAuthenticationClient.java new file mode 100644 index 0000000000..3497dddcb1 --- /dev/null +++ b/modules/org.restlet.example/src/org/restlet/example/authentication/HttpDigestAuthenticationClient.java @@ -0,0 +1,73 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.example.authentication; + +import java.io.IOException; + +import org.restlet.data.ChallengeRequest; +import org.restlet.data.ChallengeResponse; +import org.restlet.data.ChallengeScheme; +import org.restlet.data.Status; +import org.restlet.resource.ClientResource; +import org.restlet.resource.ResourceException; + +public class HttpDigestAuthenticationClient { + + public static void main(String[] args) throws ResourceException, + IOException { + // Prepare the request + ClientResource cr = new ClientResource("http://localhost:8182/"); + + ChallengeRequest c1 = null; + // first try: unauthenticated request + try { + cr.get(); + } catch (ResourceException re) { + if (Status.CLIENT_ERROR_UNAUTHORIZED.equals(cr.getStatus())) { + c1 = getDigestChallengeRequest(cr); + } + } + + // second try: authenticated request + if (c1 != null) { + ChallengeResponse c2 = new ChallengeResponse(c1, cr.getResponse(), + "scott", "tiger".toCharArray()); + cr.setChallengeResponse(c2); + cr.get().write(System.out); + } + } + + private static ChallengeRequest getDigestChallengeRequest(ClientResource cr) { + ChallengeRequest c1 = null; + for (ChallengeRequest challengeRequest : cr.getChallengeRequests()) { + if (ChallengeScheme.HTTP_DIGEST + .equals(challengeRequest.getScheme())) { + c1 = challengeRequest; + break; + } + } + return c1; + } +} diff --git a/modules/org.restlet.example/src/org/restlet/example/authentication/httpDigestSample.zip b/modules/org.restlet.example/src/org/restlet/example/authentication/httpDigestSample.zip new file mode 100644 index 0000000000..ce03e5b017 Binary files /dev/null and b/modules/org.restlet.example/src/org/restlet/example/authentication/httpDigestSample.zip differ diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_1a.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_1a.java deleted file mode 100644 index 7989941dde..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_1a.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch2; - -import org.restlet.data.Reference; -import org.restlet.ext.xml.DomRepresentation; -import org.restlet.representation.Representation; -import org.restlet.resource.ClientResource; -import org.w3c.dom.Node; - -/** - * Searching the web with Yahoo!'s web service using XML. - * - * @author Jerome Louvel - */ -public class Example2_1a { - static final String BASE_URI = "http://api.search.yahoo.com/WebSearchService/V1/webSearch"; - - public static void main(String[] args) throws Exception { - if (args.length != 1) { - System.err.println("You need to pass a term to search"); - } else { - // Fetch a resource: an XML document full of search results - String term = Reference.encode(args[0]); - String uri = BASE_URI + "?appid=restbook&query=" + term; - Representation entity = new ClientResource(uri).get(); - DomRepresentation document = new DomRepresentation(entity); - - // Use XPath to find the interesting parts of the data structure - String expr = "/ResultSet/Result/Title"; - for (Node node : document.getNodes(expr)) { - System.out.println(node.getTextContent()); - } - } - } -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_1b.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_1b.java deleted file mode 100644 index 1f9b47c888..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_1b.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch2; - -import org.restlet.data.Reference; -import org.restlet.ext.xml.DomRepresentation; -import org.restlet.representation.Representation; -import org.restlet.resource.ClientResource; -import org.w3c.dom.Node; - -/** - * Searching the web with Yahoo!'s web service using XML. This version is - * namespace aware. - * - * @author Jerome Louvel - */ -public class Example2_1b { - static final String BASE_URI = "http://api.search.yahoo.com/WebSearchService/V1/webSearch"; - - public static void main(String[] args) throws Exception { - if (args.length != 1) { - System.err.println("You need to pass a term to search"); - } else { - // Fetch a resource: an XML document full of search results - String term = Reference.encode(args[0]); - String uri = BASE_URI + "?appid=restbook&query=" + term; - Representation entity = new ClientResource(uri).get(); - DomRepresentation document = new DomRepresentation(entity); - - // Associate the namespace with the prefix y - document.setNamespaceAware(true); - document.getNamespaces().put("y", "urn:yahoo:srch"); - - // Use XPath to find the interesting parts of the data structure - String expr = "/y:ResultSet/y:Result/y:Title/text()"; - for (Node node : document.getNodes(expr)) { - System.out.println(node.getTextContent()); - } - } - } -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_5.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_5.java deleted file mode 100644 index 1d10a48de0..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_5.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch2; - -import org.restlet.data.ChallengeResponse; -import org.restlet.data.ChallengeScheme; -import org.restlet.ext.xml.DomRepresentation; -import org.restlet.representation.Representation; -import org.restlet.resource.ClientResource; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; - -/** - * Getting your list of recent bookmarks on del.icio.us. - * - * @author Jerome Louvel - */ -public class Example2_5 { - public static void main(String[] args) throws Exception { - if (args.length != 2) { - System.err - .println("You need to pass your del.icio.us user name and password"); - } else { - // Create a authenticated request - ClientResource resource = new ClientResource( - "https://api.del.icio.us/v1/posts/recent"); - resource.setChallengeResponse(new ChallengeResponse( - ChallengeScheme.HTTP_BASIC, args[0], args[1])); - - // Fetch a resource: an XML document with your recent posts - Representation entity = resource.get(); - DomRepresentation document = new DomRepresentation(entity); - - // Use XPath to find the interesting parts of the data structure - for (Node node : document.getNodes("/posts/post")) { - NamedNodeMap attrs = node.getAttributes(); - String desc = attrs.getNamedItem("description").getNodeValue(); - String href = attrs.getNamedItem("href").getNodeValue(); - System.out.println(desc + ": " + href); - } - } - } -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_9.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_9.java deleted file mode 100644 index fc2c6f84f8..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch2/Example2_9.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch2; - -import org.json.JSONArray; -import org.json.JSONObject; -import org.restlet.data.Reference; -import org.restlet.ext.json.JsonRepresentation; -import org.restlet.representation.Representation; -import org.restlet.resource.ClientResource; - -/** - * Searching the web with Yahoo!'s web service using JSON. - * - * @author Jerome Louvel - */ -public class Example2_9 { - static final String BASE_URI = "http://api.search.yahoo.com/WebSearchService/V1/webSearch"; - - public static void main(String[] args) throws Exception { - if (args.length != 1) { - System.err.println("You need to pass a term to search"); - } else { - // Fetch a resource: a JSON document full of search results - String term = Reference.encode(args[0]); - String uri = BASE_URI + "?appid=restbook&output=json&query=" + term; - Representation entity = new ClientResource(uri).get(); - JSONObject json = new JsonRepresentation(entity).getJsonObject(); - - // Navigate within the JSON document to display the titles - JSONObject resultSet = json.getJSONObject("ResultSet"); - JSONArray results = resultSet.getJSONArray("Result"); - for (int i = 0; i < results.length(); i++) { - System.out.println(results.getJSONObject(i).getString("Title")); - } - } - } -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3App.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3App.java deleted file mode 100644 index 6d468eb6c7..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3App.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch3; - -import java.util.ArrayList; -import java.util.List; - -import org.restlet.Response; -import org.restlet.ext.xml.DomRepresentation; -import org.w3c.dom.Node; - -/** - * Amazon S3 client application. Returns a list of buckets. - * - * @author Jerome Louvel - */ -public class S3App extends S3Authorized { - - public static void main(String... args) { - for (S3Bucket bucket : new S3App().getBuckets()) { - System.out.println(bucket.getName() + " : " + bucket.getUri()); - } - } - - public List getBuckets() { - List result = new ArrayList(); - - // Fetch a resource: an XML document with our list of buckets - Response response = authorizedGet(HOST); - DomRepresentation document = new DomRepresentation(response.getEntity()); - - if (response.getStatus().isSuccess()) { - // Use XPath to find the bucket names - for (Node node : document.getNodes("//Bucket/Name")) { - result.add(new S3Bucket(node.getTextContent())); - } - } else { - System.out.println("Unable to access to your S3 buckets : " - + response.getStatus()); - } - - return result; - } -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3Authorized.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3Authorized.java deleted file mode 100644 index 9b156daee1..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3Authorized.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch3; - -import org.restlet.Client; -import org.restlet.Request; -import org.restlet.Response; -import org.restlet.data.ChallengeResponse; -import org.restlet.data.ChallengeScheme; -import org.restlet.data.Method; -import org.restlet.data.Protocol; -import org.restlet.representation.Representation; - -/** - * Amazon S3 client. Support class handling authorized requests. Remember to - * replace the access key id and secret below with your own values. For this you - * need to sign-up with Amazon Web Services *and* with the S3 service. - * - * @author Jerome Louvel - */ -public class S3Authorized { - public final static String ACCESS_KEY_ID = ""; - - public final static String SECRET_ACCESS_KEY = ""; - - public final static String HOST = "https://s3.amazonaws.com/"; - - public static Response authorizedDelete(String uri) { - return handleAuthorized(Method.DELETE, uri, null); - } - - public static Response authorizedGet(String uri) { - return handleAuthorized(Method.GET, uri, null); - } - - public static Response authorizedHead(String uri) { - return handleAuthorized(Method.HEAD, uri, null); - } - - public static Response authorizedPut(String uri, Representation entity) { - return handleAuthorized(Method.PUT, uri, entity); - } - - private static Response handleAuthorized(Method method, String uri, - Representation entity) { - // Send an authenticated request - final Request request = new Request(method, uri, entity); - request.setChallengeResponse(new ChallengeResponse( - ChallengeScheme.HTTP_AWS_S3, ACCESS_KEY_ID, SECRET_ACCESS_KEY)); - return new Client(Protocol.HTTPS).handle(request); - } -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3Bucket.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3Bucket.java deleted file mode 100644 index e9f4ed7eab..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3Bucket.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch3; - -import java.util.ArrayList; -import java.util.List; - -import org.restlet.Response; -import org.restlet.data.Status; -import org.restlet.ext.xml.DomRepresentation; -import org.w3c.dom.Node; - -/** - * Amazon S3 bucket. - * - * @author Jerome Louvel - */ -public class S3Bucket extends S3Authorized { - - private String name; - - private boolean truncated; - - public S3Bucket(String name) { - this.name = name; - } - - /** - * Deletes this bucket. - */ - public Status delete() { - return authorizedDelete(getUri()).getStatus(); - } - - public String getName() { - return this.name; - } - - /** - * Get the objects in this bucket: all of them, or some subset. - * - * If S3 decides not to return the whole bucket/subset, the second return - * value will be set to true. To get the rest of the objects, you'll need to - * manipulate the subset options. - * - * Subset options are :Prefix, :Marker, :Delimiter, :MaxKeys. For details, - * see the S3 docs on "Listing Keys". - * - * @return The objects in this nucket. - */ - public List getObjects(String prefix, String marker, - String delimiter, Integer maxKeys) { - final List result = new ArrayList(); - - // Construct the request URI by appending optional listing keys - final StringBuilder uri = new StringBuilder().append(getUri()); - String suffix = "?"; - if (prefix != null) { - uri.append(suffix).append("prefix=").append(prefix); - suffix = "&"; - } - if (marker != null) { - uri.append(suffix).append("marker=").append(marker); - suffix = "&"; - } - if (delimiter != null) { - uri.append(suffix).append("delimiter=").append(delimiter); - suffix = "&"; - } - if (maxKeys != null) { - uri.append(suffix).append("maxKeys=").append(maxKeys); - suffix = "&"; - } - - // Make the request and parse the document. - final Response response = authorizedGet(uri.toString()); - final DomRepresentation document = new DomRepresentation(response - .getEntity()); - - // Update the truncated flag - this.truncated = document.getNodes("//IsTruncated").get(0) - .getTextContent().equals("true"); - - // Browse the list of object keys - for (final Node node : document.getNodes("//Contents/Key")) { - result.add(new S3Object(this, node.getTextContent())); - } - - return result; - } - - public String getUri() { - return HOST + getName(); - } - - public boolean isTruncated() { - return this.truncated; - } - - /** - * Stores this bucket on S3. Analagous to ActiveRecord::Base#save, which - * stores an object in the database. - */ - public Status save() { - return authorizedPut(getUri(), null).getStatus(); - } - - public void setName(String name) { - this.name = name; - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3Object.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3Object.java deleted file mode 100644 index 2093f3551f..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3Object.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch3; - -import org.restlet.data.Reference; -import org.restlet.data.Status; -import org.restlet.representation.Representation; -import org.restlet.representation.Variant; - -/** - * Amazon S3 object. - * - * @author Jerome Louvel - */ -public class S3Object extends S3Authorized { - - private final S3Bucket bucket; - - private Variant metadata; - - private String name; - - public S3Object(S3Bucket bucket, String name) { - this.bucket = bucket; - this.name = name; - } - - /** - * Deletes this bucket. - */ - public Status delete() { - return authorizedDelete(getUri()).getStatus(); - } - - public S3Bucket getBucket() { - return this.bucket; - } - - /** - * Retrieves the metadata hash for this object, possibly fetchingit from S3. - * - * @return The metadata hash for this object, possibly fetchingit from S3. - */ - public Variant getMetadata() { - if (this.metadata == null) { - this.metadata = authorizedHead(getUri()).getEntity(); - } - return this.metadata; - } - - public String getName() { - return this.name; - } - - public String getUri() { - return getBucket().getUri() + "/" + Reference.encode(getName()); - } - - /** - * Retrieves the value of this object, always fetching it (along with the - * metadata) from S3. - * - * @return The value of this object. - */ - public Representation getValue() { - return authorizedGet(getUri()).getEntity(); - } - - /** - * Store this object on S3 with a given value. - * - * @param value - * The value of the object to store. - */ - public Status save(Representation value) { - this.metadata = value; - return authorizedPut(getUri(), value).getStatus(); - } - - public void setName(String name) { - this.name = name; - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch6/Example6_1.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch6/Example6_1.java deleted file mode 100644 index b206eadcb3..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch6/Example6_1.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch6; - -import org.restlet.data.Form; -import org.restlet.data.Reference; -import org.restlet.resource.ClientResource; - -/** - * Sample map client to create a user account - * - * @author Jerome Louvel - */ -public class Example6_1 { - public void makeUser(String user, String password) { - // Create the input form - Form input = new Form(); - input.add("password", password); - - // Create the target URI, encoding the user name - String uri = "https://maps.example.com/user/" + Reference.encode(user); - - // Invoke the web service - new ClientResource(uri).put(input.getWebRepresentation()); - } -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/Application.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/Application.java deleted file mode 100644 index 3c91e93596..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/Application.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch7; - -import java.io.File; - -import org.restlet.Component; -import org.restlet.Restlet; -import org.restlet.data.Protocol; -import org.restlet.routing.Router; -import org.restlet.routing.TemplateRoute; -import org.restlet.routing.Variable; - -import com.db4o.Db4oEmbedded; -import com.db4o.ObjectContainer; -import com.db4o.config.EmbeddedConfiguration; - -/** - * The main Web application. - * - * @author Jerome Louvel - */ -public class Application extends org.restlet.Application { - - public static void main(String... args) throws Exception { - // Create a component with an HTTP server connector - final Component comp = new Component(); - comp.getServers().add(Protocol.HTTP, 3000); - - // Attach the application to the default host and start it - comp.getDefaultHost().attach("/v1", new Application()); - comp.start(); - } - - private final ObjectContainer container; - - /** - * Constructor. - */ - public Application() { - /** Open and keep the db4o object container. */ - EmbeddedConfiguration config = Db4oEmbedded.newConfiguration(); - config.common().updateDepth(2); - this.container = Db4oEmbedded.openFile(config, System - .getProperty("user.home") - + File.separator + "restbook.dbo"); - } - - @Override - public Restlet createInboundRoot() { - final Router router = new Router(getContext()); - - // Add a route for user resources - router.attach("/users/{username}", UserResource.class); - - // Add a route for user's bookmarks resources - router.attach("/users/{username}/bookmarks", BookmarksResource.class); - - // Add a route for bookmark resources - final TemplateRoute uriRoute = router.attach( - "/users/{username}/bookmarks/{URI}", BookmarkResource.class); - uriRoute.getTemplate().getVariables().put("URI", - new Variable(Variable.TYPE_URI_ALL)); - - return router; - } - - /** - * Returns the database container. - * - * @return the database container. - */ - public ObjectContainer getContainer() { - return this.container; - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/ApplicationTest.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/ApplicationTest.java deleted file mode 100644 index 2aecd5a708..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/ApplicationTest.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch7; - -import org.restlet.data.ChallengeResponse; -import org.restlet.data.ChallengeScheme; -import org.restlet.data.Form; -import org.restlet.resource.ClientResource; - -/** - * Client code that can be used to test the application developed in the chapter - * 7 of the book and converted to Restlets in the chapter 13. - * - * @author Jerome Louvel - */ -public class ApplicationTest { - /** Base application URI. */ - public static final String APPLICATION_URI = "http://localhost:3000/v1"; - - public static void deleteBookmark(String userName, String password, - String uri) { - ClientResource resource = getAuthenticatedResource(getBookmarkUri( - userName, uri), userName, password); - resource.delete(); - System.out.println(resource.getStatus() + " : " - + resource.getLocationRef()); - } - - public static void deleteUser(String userName, String password) { - ClientResource resource = getAuthenticatedResource( - getUserUri(userName), userName, password); - resource.delete(); - System.out.println(resource.getStatus() + " : " - + resource.getLocationRef()); - } - - /** - * Creates an authenticated resour ce. - * - * @param uri - * The target resource URI. - * @param login - * The login name. - * @param password - * The password. - * @return The authenticated resource to use. - */ - public static ClientResource getAuthenticatedResource(String uri, - String login, String password) { - ClientResource result = new ClientResource(uri); - result.setChallengeResponse(new ChallengeResponse( - ChallengeScheme.HTTP_BASIC, login, password)); - return result; - } - - public static String getBookmarkUri(String userName, String uri) { - return APPLICATION_URI + "/users/" + userName + "/bookmarks/" + uri; - } - - public static String getUserUri(String name) { - return APPLICATION_URI + "/users/" + name; - } - - /** - * Main method to use for testing. - * - * @param args - * The arguments or nothing for a usage description. - */ - public static void main(String... args) throws Exception { - if (args.length == 0) { - System.out.println("Usage depends on the number of arguments:"); - System.out.println(" - Deletes a user : userName, password"); - System.out - .println(" - Deletes a bookmark : userName, password, URI"); - System.out - .println(" - Adds a new user : userName, password, \"full name\", email"); - System.out - .println(" - Adds a new bookmark: userName, password, URI, shortDescription, longDescription, restrict"); - } else if (args.length == 2) { - deleteUser(args[0], args[1]); - } else if (args.length == 3) { - deleteBookmark(args[0], args[1], args[2]); - } else if (args.length == 4) { - putUser(args[0], args[1], args[2], args[3]); - } else if (args.length == 6) { - putBookmark(args[0], args[1], args[2], args[3], args[4], Boolean - .valueOf(args[5])); - } - } - - public static void putBookmark(String userName, String password, - String uri, String shortDescription, String longDescription, - boolean restrict) { - Form form = new Form(); - form.add("bookmark[short_description]", shortDescription); - form.add("bookmark[long_description]", longDescription); - form.add("bookmark[restrict]", Boolean.toString(restrict)); - - // Create an authenticated resource as a bookmark is in - // the user's private area - ClientResource resource = getAuthenticatedResource(getBookmarkUri( - userName, uri), userName, password); - resource.put(form.getWebRepresentation()); - - System.out.println(resource.getStatus()); - } - - public static void putUser(String userName, String password, - String fullName, String email) { - Form form = new Form(); - form.add("user[password]", password); - form.add("user[full_name]", fullName); - form.add("user[email]", email); - - ClientResource resource = new ClientResource(getUserUri(userName)); - resource.put(form.getWebRepresentation()); - System.out.println(resource.getStatus()); - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/Bookmark.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/Bookmark.java deleted file mode 100644 index 758aa82d9d..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/Bookmark.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch7; - -import java.util.Date; - -/** - * URI saved and annotated by a user. - * - * @author Jerome Louvel - */ -public class Bookmark { - - private User user; - - private String uri; - - private String shortDescription; - - private String longDescription; - - private Date dateTime; - - private boolean restricting; - - public Bookmark(User user, String uri) { - this.user = user; - this.uri = uri; - this.restricting = true; - this.dateTime = null; - this.shortDescription = null; - this.longDescription = null; - } - - /** - * @return the dateTime - */ - public Date getDateTime() { - return this.dateTime; - } - - /** - * @return the longDescription - */ - public String getLongDescription() { - return this.longDescription; - } - - /** - * @return the shortDescription - */ - public String getShortDescription() { - return this.shortDescription; - } - - /** - * @return the uri - */ - public String getUri() { - return this.uri; - } - - /** - * @return the user - */ - public User getUser() { - return this.user; - } - - /** - * @return the restricting - */ - public boolean isRestricting() { - return this.restricting; - } - - /** - * @param dateTime - * the dateTime to set - */ - public void setDateTime(Date dateTime) { - this.dateTime = dateTime; - } - - /** - * @param longDescription - * the longDescription to set - */ - public void setLongDescription(String longDescription) { - this.longDescription = longDescription; - } - - /** - * @param restricting - * the restricting to set - */ - public void setRestricting(boolean restricting) { - this.restricting = restricting; - } - - /** - * @param shortDescription - * the shortDescription to set - */ - public void setShortDescription(String shortDescription) { - this.shortDescription = shortDescription; - } - - /** - * @param uri - * the uri to set - */ - public void setUri(String uri) { - this.uri = uri; - } - - /** - * @param user - * the user to set - */ - public void setUser(User user) { - this.user = user; - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/BookmarkResource.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/BookmarkResource.java deleted file mode 100644 index 1069524fb0..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/BookmarkResource.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch7; - -import java.util.Date; - -import org.restlet.data.Form; -import org.restlet.data.MediaType; -import org.restlet.data.Status; -import org.restlet.representation.Representation; -import org.restlet.representation.StringRepresentation; -import org.restlet.representation.Variant; -import org.restlet.resource.ResourceException; - -/** - * Resource for a user's bookmark. - * - * @author Jerome Louvel - */ -public class BookmarkResource extends UserResource { - - private Bookmark bookmark; - - private String uri; - - @Override - public Representation delete() throws ResourceException { - if (isModifiable()) { - if ((this.bookmark != null) && (checkAuthorization() == 1)) { - // Delete the bookmark - getUser().getBookmarks().remove(this.bookmark); - getContainer().delete(this.bookmark); - getContainer().store(getUser()); - getContainer().commit(); - setStatus(Status.SUCCESS_OK); - } else { - // Intentionally hide the bookmark existence - setStatus(Status.CLIENT_ERROR_NOT_FOUND); - } - } else { - return super.delete(); - } - - return null; - } - - @Override - public void doInit() { - super.doInit(); - - if (getUser() != null) { - this.uri = (String) getRequestAttributes().get("URI"); - this.bookmark = getUser().getBookmark(this.uri); - - if (this.bookmark != null) { - if ((checkAuthorization() != 1) && this.bookmark.isRestricting()) { - // Intentionally hide the bookmark existence - setStatus(Status.CLIENT_ERROR_NOT_FOUND); - } - } else { - // Bookmark not found, remove the variant added by the super - // class (UserResource). - getVariants().clear(); - } - } else { - // User not found - setStatus(Status.CLIENT_ERROR_NOT_FOUND); - } - } - - @Override - public Representation get(Variant variant) throws ResourceException { - Representation result = null; - - if (variant.getMediaType().equals(MediaType.TEXT_PLAIN)) { - // Creates a text representation - final StringBuilder sb = new StringBuilder(); - sb.append("----------------\n"); - sb.append("Bookmark details\n"); - sb.append("----------------\n\n"); - sb.append("User: ").append(this.bookmark.getUser().getName()) - .append('\n'); - sb.append("URI: ").append(this.bookmark.getUri()).append('\n'); - sb.append("Short: ").append(this.bookmark.getShortDescription()) - .append('\n'); - sb.append("Long: ").append(this.bookmark.getLongDescription()) - .append('\n'); - sb.append("Date: ").append(this.bookmark.getDateTime()).append( - '\n'); - sb.append("Restrict: ").append( - Boolean.toString(this.bookmark.isRestricting())).append('\n'); - result = new StringRepresentation(sb); - } - - return result; - } - - @Override - public Representation put(Representation entity) throws ResourceException { - if (checkAuthorization() == 1) { - if (entity.getMediaType().equals(MediaType.APPLICATION_WWW_FORM, - true)) { - // Parse the entity as a web form - final Form form = new Form(entity); - - // If the bookmark doesn't exist, create it - if (this.bookmark == null) { - this.bookmark = new Bookmark(getUser(), this.uri); - getUser().getBookmarks().add(this.bookmark); - setStatus(Status.SUCCESS_CREATED); - } else { - setStatus(Status.SUCCESS_NO_CONTENT); - } - - // Update the bookmark - this.bookmark.setShortDescription(form - .getFirstValue("bookmark[short_description]")); - this.bookmark.setLongDescription(form - .getFirstValue("bookmark[long_description]")); - this.bookmark.setDateTime(new Date()); - this.bookmark.setRestricting(new Boolean(form - .getFirstValue("bookmark[restrict]"))); - - // Commit the changes - getContainer().store(this.bookmark); - getContainer().store(getUser()); - getContainer().commit(); - } - } else { - // Intentionally hide the bookmark existence - setStatus(Status.CLIENT_ERROR_NOT_FOUND); - } - - return null; - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/BookmarksResource.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/BookmarksResource.java deleted file mode 100644 index 93a6ea53f1..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/BookmarksResource.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch7; - -import org.restlet.data.MediaType; -import org.restlet.data.Reference; -import org.restlet.data.ReferenceList; -import org.restlet.representation.Representation; -import org.restlet.representation.Variant; -import org.restlet.resource.ResourceException; - -/** - * Resource for a user's list of bookmarks. - * - * @author Jerome Louvel - */ -public class BookmarksResource extends UserResource { - - @Override - public void doInit() { - super.doInit(); - getVariants().clear(); - if (getUser() != null) { - getVariants().add(new Variant(MediaType.TEXT_HTML)); - } - } - - @Override - public Representation get(Variant variant) throws ResourceException { - Representation result = null; - - if (variant.getMediaType().equals(MediaType.TEXT_HTML)) { - int code = checkAuthorization(); - ReferenceList rl = new ReferenceList(); - - // Copy the bookmark URIs into a reference list. Make sure that we - // only expose public bookmarks if the client isn't the owner. - for (Bookmark bookmark : getUser().getBookmarks()) { - if (!bookmark.isRestricting() || (code == 1)) { - rl.add(bookmark.getUri()); - } - } - - result = rl.getWebRepresentation(); - } - - return result; - } - - @Override - public Representation handle() { - Representation result = null; - - // Make sure that the URI ends with a "/" without changing the query. - // This is helpful when exposing the list of relative references of the - // bookmarks. - Reference ref = getRequest().getResourceRef(); - if (!ref.getPath().endsWith("/")) { - ref.setPath(ref.getPath() + "/"); - redirectPermanent(ref); - } else { - result = super.handle(); - } - - return result; - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/User.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/User.java deleted file mode 100644 index 5aa73c90e5..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/User.java +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch7; - -import java.util.ArrayList; -import java.util.List; - -/** - * User account. - * - * @author Jerome Louvel - */ -public class User { - - private String name; - - private String fullName; - - private String email; - - private String password; - - private List bookmarks; - - public Bookmark getBookmark(String uri) { - for (final Bookmark bookmark : getBookmarks()) { - if (bookmark.getUri().equals(uri)) { - return bookmark; - } - } - - return null; - } - - /** - * @return the modifiable list of bookmarks - */ - public List getBookmarks() { - if (this.bookmarks == null) { - this.bookmarks = new ArrayList(); - } - return this.bookmarks; - } - - /** - * @return the email - */ - public String getEmail() { - return this.email; - } - - /** - * @return the fullName - */ - public String getFullName() { - return this.fullName; - } - - /** - * @return the name - */ - public String getName() { - return this.name; - } - - /** - * @return the password - */ - public String getPassword() { - return this.password; - } - - /** - * @param email - * the email to set - */ - public void setEmail(String email) { - this.email = email; - } - - /** - * @param fullName - * the fullName to set - */ - public void setFullName(String fullName) { - this.fullName = fullName; - } - - /** - * @param name - * the name to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * @param password - * the password to set - */ - public void setPassword(String password) { - this.password = password; - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/UserResource.java b/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/UserResource.java deleted file mode 100644 index 1c77a4bd6c..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/book/rest/ch7/UserResource.java +++ /dev/null @@ -1,305 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.book.rest.ch7; - -import java.util.ArrayList; -import java.util.List; - -import org.restlet.data.ChallengeRequest; -import org.restlet.data.ChallengeResponse; -import org.restlet.data.ChallengeScheme; -import org.restlet.data.Form; -import org.restlet.data.MediaType; -import org.restlet.data.Status; -import org.restlet.representation.Representation; -import org.restlet.representation.StringRepresentation; -import org.restlet.representation.Variant; -import org.restlet.resource.ResourceException; -import org.restlet.resource.ServerResource; - -import com.db4o.ObjectContainer; -import com.db4o.query.Predicate; - -/** - * Resource for a persistent user. - * - * @author Jerome Louvel - */ -public class UserResource extends ServerResource { - - private String login; - - private boolean modifiable; - - private String password; - - private User user; - - private String userName; - - private List variants; - - /** - * Updates the response to challenge the client for credentials. - */ - public void challenge() { - getResponse().setStatus(Status.CLIENT_ERROR_CONFLICT); - getResponse().getChallengeRequests().add( - new ChallengeRequest(ChallengeScheme.HTTP_BASIC, "Restlet")); - } - - /** - * Check the authorization credentials. - * - * @return 1 if authentication OK, 0 if it is missing, -1 if it is wrong - */ - public int checkAuthorization() { - int result = 0; - - if (this.user != null) { - if ((this.login != null) && (this.password != null)) { - // Credentials provided - if (this.userName.equals(this.login) - && this.password.equals(this.user.getPassword())) { - result = 1; - } else { - result = -1; - } - } - } - - return result; - } - - @Override - public Representation delete() throws ResourceException { - if (isModifiable()) { - switch (checkAuthorization()) { - case 1: - // Delete all associated bookmarks - for (final Bookmark bookmark : this.user.getBookmarks()) { - getContainer().delete(bookmark); - } - - // Delete the parent user - getContainer().delete(this.user); - - // Commit the changes - getContainer().commit(); - setStatus(Status.SUCCESS_OK); - break; - case 0: - // No authentication provided - challenge(); - break; - case -1: - // Wrong authentication provided - setStatus(Status.CLIENT_ERROR_UNAUTHORIZED); - break; - } - } else { - return super.delete(); - } - - return null; - } - - @Override - public void doInit() { - this.userName = (String) getRequestAttributes().get("username"); - final ChallengeResponse cr = getChallengeResponse(); - this.login = (cr != null) ? cr.getIdentifier() : null; - this.password = (cr != null) ? new String(cr.getSecret()) : null; - this.user = findUser(); - - if (this.user != null) { - this.variants = new ArrayList(); - this.variants.add(new Variant(MediaType.TEXT_PLAIN)); - } - - modifiable = true; - } - - /** - * Finds the associated user. - * - * @return The user found or null. - */ - public User findUser() { - User result = null; - - if (this.userName != null) { - // Create the query predicate - final Predicate predicate = new Predicate() { - private static final long serialVersionUID = 1L; - - @Override - public boolean match(User candidate) { - return UserResource.this.userName.equals(candidate - .getName()); - } - }; - - // Query the database and get the first result - final List users = getContainer().query(predicate); - if ((users != null) && (users.size() > 0)) { - result = users.get(0); - } - } - - return result; - } - - @Override - public Representation get(Variant variant) throws ResourceException { - Representation result = null; - - if ((variant != null) - && variant.getMediaType().equals(MediaType.TEXT_PLAIN)) { - // Creates a text representation - final StringBuilder sb = new StringBuilder(); - sb.append("------------\n"); - sb.append("User details\n"); - sb.append("------------\n\n"); - sb.append("Name: ").append(this.user.getFullName()).append('\n'); - sb.append("Email: ").append(this.user.getEmail()).append('\n'); - result = new StringRepresentation(sb); - } - - return result; - } - - /** - * Returns the parent application. - * - * @return the parent application. - */ - @Override - public Application getApplication() { - return (Application) super.getApplication(); - } - - /** - * Returns the database container. - * - * @return the database container. - */ - public ObjectContainer getContainer() { - return getApplication().getContainer(); - } - - /** - * Returns the associated user. - * - * @return The associated user. - */ - public User getUser() { - return this.user; - } - - @Override - public List getVariants() { - return variants; - } - - public boolean isModifiable() { - return modifiable; - } - - @Override - public Representation put(Representation entity) throws ResourceException { - if (isModifiable()) { - if (entity.getMediaType().equals(MediaType.APPLICATION_WWW_FORM, - true)) { - boolean canSet = true; - - if (getUser() == null) { - // The user doesn't exist, create it - setUser(new User()); - getUser().setName(this.userName); - setStatus(Status.SUCCESS_CREATED); - } else { - // The user already exists, check the authentication - switch (checkAuthorization()) { - case 1: - setStatus(Status.SUCCESS_NO_CONTENT); - break; - case 0: - // No authentication provided - challenge(); - canSet = false; - break; - case -1: - // Wrong authentication provided - setStatus(Status.CLIENT_ERROR_UNAUTHORIZED); - canSet = false; - break; - } - } - - if (canSet) { - // Parse the entity as a web form - Form form = new Form(entity); - getUser().setEmail(form.getFirstValue("user[email]")); - getUser() - .setFullName(form.getFirstValue("user[full_name]")); - getUser().setPassword(form.getFirstValue("user[password]")); - - // Commit the changes - getContainer().store(getUser()); - getContainer().commit(); - } - } - } else { - return super.put(entity); - } - - return null; - } - - public void setModifiable(boolean modifiable) { - this.modifiable = modifiable; - } - - /** - * Sets the associated user. - * - * @param user - * The user to set. - */ - public void setUser(User user) { - this.user = user; - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloClient.java index 1051b5371f..82cfae72ba 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloServer.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloServer.java index d7b58db062..3cd3de7d9c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloServer.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloServer.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloServerResource.java index df92a6edd9..ac772e67cc 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch01/HelloServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec3/sub1/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec3/sub1/MailServerApplication.java index 121cd525f0..32fe0b7527 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec3/sub1/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec3/sub1/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec3/sub2/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec3/sub2/MailServerApplication.java index a3cd8dd9a5..d8a82a4e3c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec3/sub2/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec3/sub2/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/Blocker.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/Blocker.java index f38baeeb2a..6420a35e57 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/Blocker.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/Blocker.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/MailServerApplication.java index f7c0bbffa8..2f0bc9803b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/Tracer.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/Tracer.java index 0bc4a00a97..632ab0cfc0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/Tracer.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub1/Tracer.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -51,12 +42,9 @@ public Tracer(Context context) { @Override public void handle(Request request, Response response) { String entity = "Method : " + request.getMethod() - + "\nResource URI : " - + request.getResourceRef() - + "\nIP address : " - + request.getClientInfo().getAddress() - + "\nAgent name : " - + request.getClientInfo().getAgentName() + + "\nResource URI : " + request.getResourceRef() + + "\nIP address : " + request.getClientInfo().getAddress() + + "\nAgent name : " + request.getClientInfo().getAgentName() + "\nAgent version: " + request.getClientInfo().getAgentVersion(); response.setEntity(entity, MediaType.TEXT_PLAIN); diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/Blocker.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/Blocker.java index 429f0540a1..e0b6f3aae6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/Blocker.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/Blocker.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/MailServerApplication.java index a95cc2c764..26e9bc1766 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/Tracer.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/Tracer.java index 88d293d4ec..d353ca8dad 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/Tracer.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec4/sub2/Tracer.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -51,12 +42,9 @@ public Tracer(Context context) { @Override public void handle(Request request, Response response) { String entity = "Method : " + request.getMethod() - + "\nResource URI : " - + request.getResourceRef() - + "\nIP address : " - + request.getClientInfo().getAddress() - + "\nAgent name : " - + request.getClientInfo().getAgentName() + + "\nResource URI : " + request.getResourceRef() + + "\nIP address : " + request.getClientInfo().getAddress() + + "\nAgent name : " + request.getClientInfo().getAgentName() + "\nAgent version: " + request.getClientInfo().getAgentVersion(); response.setEntity(entity, MediaType.TEXT_PLAIN); diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/AccountServerResource.java index 32dc626d5d..fa5f754a3c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/AccountsServerResource.java index cda37a77b1..59f50fc73b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/MailServerApplication.java index 4ad8ff9458..3a0e3ac78f 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -73,8 +64,7 @@ public MailServerApplication() { @Override public Restlet createInboundRoot() { Router router = new Router(getContext()); - router.attach("http://localhost:8111/", - RootServerResource.class); + router.attach("http://localhost:8111/", RootServerResource.class); router.attach("http://localhost:8111/accounts/", AccountsServerResource.class); router.attach("http://localhost:8111/accounts/{accountId}", diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/RootServerResource.java index 5d5bec79e7..58ead698a4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub2/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub3/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub3/MailClient.java index 2ee09d9de7..1c5e7a81ed 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub3/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub3/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/AccountServerResource.java index 30e3aa60f1..830d43bf1d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/AccountsServerResource.java index 42dcaffac1..d42227ddc2 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/MailClient.java index 0633e8aa4c..693ad90ac4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -41,8 +32,8 @@ public class MailClient { public static void main(String[] args) throws Exception { - RootResource mailRoot = ClientResource.create( - "http://localhost:8111/", RootResource.class); + RootResource mailRoot = ClientResource.create("http://localhost:8111/", + RootResource.class); String result = mailRoot.represent(); System.out.println(result); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/MailServerApplication.java index 39ab382070..799acbb909 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -73,8 +64,7 @@ public MailServerApplication() { @Override public Restlet createInboundRoot() { Router router = new Router(getContext()); - router.attach("http://localhost:8111/", - RootServerResource.class); + router.attach("http://localhost:8111/", RootServerResource.class); router.attach("http://localhost:8111/accounts/", AccountsServerResource.class); router.attach("http://localhost:8111/accounts/{accountId}", diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/RootResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/RootResource.java index 98d9ab49ed..ddad14e9d6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/RootResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/RootResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface RootResource { @Get("txt") - public String represent(); + String represent(); @Options("txt") - public String describe(); + String describe(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/RootServerResource.java index 333ff8e12c..3ccd6e2c6e 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub4/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -38,8 +29,7 @@ /** * Implementing the Java annotated resource interface. */ -public class RootServerResource - extends ServerResource implements RootResource { +public class RootServerResource extends ServerResource implements RootResource { public String represent() { return "This is the root resource"; diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/AccountResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/AccountResource.java index c4491ef5af..edbe626af5 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/AccountResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/AccountResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -48,7 +39,7 @@ public interface AccountResource { * @return The account representation. */ @Get("txt") - public String represent(); + String represent(); /** * Stores the new value for the identified account. @@ -57,12 +48,12 @@ public interface AccountResource { * The identified account. */ @Put("txt") - public void store(String account); + void store(String account); /** * Deletes the identified account by setting its value to null. */ @Delete - public void remove(); + void remove(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/AccountsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/AccountsResource.java index 0015eb0454..b9733f32e8 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/AccountsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/AccountsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -47,7 +38,7 @@ public interface AccountsResource { * @return The list of accounts. */ @Get("txt") - public String represent(); + String represent(); /** * Add the given account to the list and returns its position as an @@ -58,6 +49,6 @@ public interface AccountsResource { * @return The account identifier. */ @Post("txt") - public String add(String account); + String add(String account); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/RootResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/RootResource.java index 25bbe3a6c9..d1d359d053 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/RootResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/common/RootResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -46,6 +37,6 @@ public interface RootResource { * @return The root representation. */ @Get("txt") - public String represent(); + String represent(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/AccountServerResource.java index ce47ed2580..cdcea7da02 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/AccountsServerResource.java index 6bb21ca66c..e70102f279 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/MailServerApplication.java index 05acc80593..82279583b0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/RootServerResource.java index 72b72da8fb..58898eeb8a 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch02/sec5/sub5/server/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/MailComponentTestCase.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/MailComponentTestCase.java index 3099680ef2..ac1cfb1e65 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/MailComponentTestCase.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/MailComponentTestCase.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.book.restlet.ch03.sec3; import org.restlet.Request; diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/client/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/client/MailClient.java index f24a043f35..9eb82ca029 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/client/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/client/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/client/MailClientTestCase.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/client/MailClientTestCase.java index 6690861308..ed2da03f30 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/client/MailClientTestCase.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/client/MailClientTestCase.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/AccountResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/AccountResource.java index f1d1b6080c..0f8aa073dc 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/AccountResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/AccountResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -48,7 +39,7 @@ public interface AccountResource { * @return The account representation. */ @Get - public String represent(); + String represent(); /** * Stores the new value for the identified account. @@ -57,12 +48,12 @@ public interface AccountResource { * The identified account. */ @Put - public void store(String account); + void store(String account); /** * Deletes the identified account by setting its value to null. */ @Delete - public void remove(); + void remove(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/AccountsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/AccountsResource.java index 61b570803c..373a9c4ea1 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/AccountsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/AccountsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -47,7 +38,7 @@ public interface AccountsResource { * @return The list of accounts. */ @Get - public String represent(); + String represent(); /** * Add the given account to the list and returns its position as an @@ -58,6 +49,6 @@ public interface AccountsResource { * @return The account identifier. */ @Post - public String add(String account); + String add(String account); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/RootResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/RootResource.java index 392500baf2..55f684aa89 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/RootResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/common/RootResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -46,6 +37,6 @@ public interface RootResource { * @return The root representation. */ @Get - public String represent(); + String represent(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/AccountServerResource.java index eb56c2edd3..f758901f59 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/AccountsServerResource.java index 83af6b21f6..fea8e37321 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerApplication.java index 90b3defadd..b0e1fb5946 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerComponent.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerComponent.java index aba02c45a6..da37283358 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerComponent.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerComponent.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerSpring.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerSpring.java index 39c4593119..854e56235b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerSpring.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/MailServerSpring.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -34,9 +25,7 @@ package org.restlet.example.book.restlet.ch03.sec3.server; import org.restlet.Component; -import org.springframework.beans.factory.BeanFactory; -import org.springframework.beans.factory.xml.XmlBeanFactory; -import org.springframework.core.io.ClassPathResource; +import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Creates a Restlet component and application based on a Spring XML @@ -46,13 +35,13 @@ public class MailServerSpring { public static void main(String[] args) throws Exception { // Load the Spring container - ClassPathResource resource = new ClassPathResource( + ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( "org/restlet/example/book/restlet/ch03/sec3/server/component-spring.xml"); - BeanFactory factory = new XmlBeanFactory(resource); // Start the Restlet component - Component component = factory.getBean("component", Component.class); + Component component = ctx.getBean("component", Component.class); component.start(); + ctx.close(); } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/RootServerResource.java index f989550c57..fa6364380c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/component-spring.xml b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/component-spring.xml index 5edfc204a1..7e6fe8bad0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/component-spring.xml +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch03/sec3/server/component-spring.xml @@ -16,6 +16,10 @@ + + + + @@ -39,10 +43,6 @@ - - - - diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec1/AppendableTestCase.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec1/AppendableTestCase.java index 88b2b3244c..dd40655b55 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec1/AppendableTestCase.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec1/AppendableTestCase.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailClient.java index 8701682786..a5f3aac8cf 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailServerApplication.java index 189df4c6fd..68cd6b72a4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailServerResource.java index b7a26468bc..2d4f9380a9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub2/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailClient.java index d5d746bfdb..02b6c8da49 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailServerApplication.java index 34fc17dc26..710d9b0f30 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailServerResource.java index 90d0e1b667..b08cfae787 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub3/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailClient.java index eccd0b58b4..06c1ec1973 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailServerApplication.java index 9808f79daf..e53e1ff8be 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailServerResource.java index 6dfe8694b9..ba531d416c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub4/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailClient.java index 51e8a7dde5..964efcf0c1 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailServerApplication.java index fc8e6c1f7f..d73ed8a6bf 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -64,8 +55,7 @@ public static void main(String[] args) throws Exception { @Override public Restlet createInboundRoot() { Router router = new Router(getContext()); - router.attach( - "/accounts/{accountId}/mails/{mailId}", + router.attach("/accounts/{accountId}/mails/{mailId}", MailServerResource.class); return router; } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailServerResource.java index 48c6066187..b78b02f620 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub5/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailClient.java index 5ff4e2a82f..089d23241e 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailServerApplication.java index 4c80653253..c097c60bc3 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailServerResource.java index 2f859ef3f5..90c853acef 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub6/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailClient.java index d0b744451d..36ba6f2a3d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailServerApplication.java index 1a4679b4c1..dae574dd47 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailServerResource.java index c192dfa561..52d698ce2d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub7/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/Mail.java index 5589190642..64c9941345 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -39,11 +30,13 @@ import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; - /** - *

Java class for anonymous complex type. + *

+ * Java class for anonymous complex type. * - *

The following schema fragment specifies the expected content contained within this class. + *

+ * The following schema fragment specifies the expected content contained within + * this class. * *

  * <complexType>
@@ -63,31 +56,27 @@
  * 
  */
 @XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "", propOrder = {
-    "status",
-    "subject",
-    "content",
-    "accountRef"
-})
+@XmlType(name = "", propOrder = { "status", "subject", "content", "accountRef" })
 @XmlRootElement(name = "mail", namespace = "http://www.rmep.org/namespaces/1.0")
 public class Mail {
 
     @XmlElement(namespace = "http://www.rmep.org/namespaces/1.0", required = true)
     protected String status;
+
     @XmlElement(namespace = "http://www.rmep.org/namespaces/1.0", required = true)
     protected String subject;
+
     @XmlElement(namespace = "http://www.rmep.org/namespaces/1.0", required = true)
     protected String content;
+
     @XmlElement(namespace = "http://www.rmep.org/namespaces/1.0", required = true)
     protected String accountRef;
 
     /**
      * Gets the value of the status property.
      * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
+     * @return possible object is {@link String }
+     * 
      */
     public String getStatus() {
         return status;
@@ -97,9 +86,8 @@ public String getStatus() {
      * Sets the value of the status property.
      * 
      * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
+     *            allowed object is {@link String }
+     * 
      */
     public void setStatus(String value) {
         this.status = value;
@@ -108,10 +96,8 @@ public void setStatus(String value) {
     /**
      * Gets the value of the subject property.
      * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
+     * @return possible object is {@link String }
+     * 
      */
     public String getSubject() {
         return subject;
@@ -121,9 +107,8 @@ public String getSubject() {
      * Sets the value of the subject property.
      * 
      * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
+     *            allowed object is {@link String }
+     * 
      */
     public void setSubject(String value) {
         this.subject = value;
@@ -132,10 +117,8 @@ public void setSubject(String value) {
     /**
      * Gets the value of the content property.
      * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
+     * @return possible object is {@link String }
+     * 
      */
     public String getContent() {
         return content;
@@ -145,9 +128,8 @@ public String getContent() {
      * Sets the value of the content property.
      * 
      * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
+     *            allowed object is {@link String }
+     * 
      */
     public void setContent(String value) {
         this.content = value;
@@ -156,10 +138,8 @@ public void setContent(String value) {
     /**
      * Gets the value of the accountRef property.
      * 
-     * @return
-     *     possible object is
-     *     {@link String }
-     *     
+     * @return possible object is {@link String }
+     * 
      */
     public String getAccountRef() {
         return accountRef;
@@ -169,9 +149,8 @@ public String getAccountRef() {
      * Sets the value of the accountRef property.
      * 
      * @param value
-     *     allowed object is
-     *     {@link String }
-     *     
+     *            allowed object is {@link String }
+     * 
      */
     public void setAccountRef(String value) {
         this.accountRef = value;
diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailClient.java
index 547fc677ab..16bee5fbf6 100644
--- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailClient.java
+++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailClient.java
@@ -2,22 +2,13 @@
  * Copyright 2005-2014 Restlet
  * 
  * The contents of this file are subject to the terms of one of the following
- * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL
- * 1.0 (the "Licenses"). You can select the license that you prefer but you may
- * not use this file except in compliance with one of these Licenses.
+ * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can
+ * select the license that you prefer but you may not use this file except in
+ * compliance with one of these Licenses.
  * 
  * You can obtain a copy of the Apache 2.0 license at
  * http://www.opensource.org/licenses/apache-2.0
  * 
- * You can obtain a copy of the LGPL 3.0 license at
- * http://www.opensource.org/licenses/lgpl-3.0
- * 
- * You can obtain a copy of the LGPL 2.1 license at
- * http://www.opensource.org/licenses/lgpl-2.1
- * 
- * You can obtain a copy of the CDDL 1.0 license at
- * http://www.opensource.org/licenses/cddl1
- * 
  * You can obtain a copy of the EPL 1.0 license at
  * http://www.opensource.org/licenses/eclipse-1.0
  * 
diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailServerApplication.java
index fa8007522f..5033ac271f 100644
--- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailServerApplication.java
+++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailServerApplication.java
@@ -2,22 +2,13 @@
  * Copyright 2005-2014 Restlet
  * 
  * The contents of this file are subject to the terms of one of the following
- * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL
- * 1.0 (the "Licenses"). You can select the license that you prefer but you may
- * not use this file except in compliance with one of these Licenses.
+ * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can
+ * select the license that you prefer but you may not use this file except in
+ * compliance with one of these Licenses.
  * 
  * You can obtain a copy of the Apache 2.0 license at
  * http://www.opensource.org/licenses/apache-2.0
  * 
- * You can obtain a copy of the LGPL 3.0 license at
- * http://www.opensource.org/licenses/lgpl-3.0
- * 
- * You can obtain a copy of the LGPL 2.1 license at
- * http://www.opensource.org/licenses/lgpl-2.1
- * 
- * You can obtain a copy of the CDDL 1.0 license at
- * http://www.opensource.org/licenses/cddl1
- * 
  * You can obtain a copy of the EPL 1.0 license at
  * http://www.opensource.org/licenses/eclipse-1.0
  * 
@@ -64,8 +55,7 @@ public static void main(String[] args) throws Exception {
     @Override
     public Restlet createInboundRoot() {
         Router router = new Router(getContext());
-        router.attach(
-                "/accounts/{accountId}/mails/{mailId}",
+        router.attach("/accounts/{accountId}/mails/{mailId}",
                 MailServerResource.class);
         return router;
     }
diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailServerResource.java
index 0bd43f0fc0..9cdf795afc 100644
--- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailServerResource.java
+++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/MailServerResource.java
@@ -2,22 +2,13 @@
  * Copyright 2005-2014 Restlet
  * 
  * The contents of this file are subject to the terms of one of the following
- * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL
- * 1.0 (the "Licenses"). You can select the license that you prefer but you may
- * not use this file except in compliance with one of these Licenses.
+ * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can
+ * select the license that you prefer but you may not use this file except in
+ * compliance with one of these Licenses.
  * 
  * You can obtain a copy of the Apache 2.0 license at
  * http://www.opensource.org/licenses/apache-2.0
  * 
- * You can obtain a copy of the LGPL 3.0 license at
- * http://www.opensource.org/licenses/lgpl-3.0
- * 
- * You can obtain a copy of the LGPL 2.1 license at
- * http://www.opensource.org/licenses/lgpl-2.1
- * 
- * You can obtain a copy of the CDDL 1.0 license at
- * http://www.opensource.org/licenses/cddl1
- * 
  * You can obtain a copy of the EPL 1.0 license at
  * http://www.opensource.org/licenses/eclipse-1.0
  * 
diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/ObjectFactory.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/ObjectFactory.java
index 370756a004..9e9d5dc17f 100644
--- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/ObjectFactory.java
+++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec2/sub8/ObjectFactory.java
@@ -2,22 +2,13 @@
  * Copyright 2005-2014 Restlet
  * 
  * The contents of this file are subject to the terms of one of the following
- * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL
- * 1.0 (the "Licenses"). You can select the license that you prefer but you may
- * not use this file except in compliance with one of these Licenses.
+ * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can
+ * select the license that you prefer but you may not use this file except in
+ * compliance with one of these Licenses.
  * 
  * You can obtain a copy of the Apache 2.0 license at
  * http://www.opensource.org/licenses/apache-2.0
  * 
- * You can obtain a copy of the LGPL 3.0 license at
- * http://www.opensource.org/licenses/lgpl-3.0
- * 
- * You can obtain a copy of the LGPL 2.1 license at
- * http://www.opensource.org/licenses/lgpl-2.1
- * 
- * You can obtain a copy of the CDDL 1.0 license at
- * http://www.opensource.org/licenses/cddl1
- * 
  * You can obtain a copy of the EPL 1.0 license at
  * http://www.opensource.org/licenses/eclipse-1.0
  * 
@@ -35,27 +26,25 @@
 
 import javax.xml.bind.annotation.XmlRegistry;
 
-
 /**
- * This object contains factory methods for each 
- * Java content interface and Java element interface 
- * generated in the org.restlet.example.book.restlet.ch05.sec2.sub8 package. 
- * 

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. + * This object contains factory methods for each Java content interface and Java + * element interface generated in the + * org.restlet.example.book.restlet.ch05.sec2.sub8 package. + *

+ * An ObjectFactory allows you to programatically construct new instances of the + * Java representation for XML content. The Java representation of XML content + * can consist of schema derived interfaces and classes representing the binding + * of schema type definitions, element declarations and model groups. Factory + * methods for each of these are provided in this class. * */ @XmlRegistry public class ObjectFactory { - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.restlet.example.book.restlet.ch05.sec2.sub8 + * Create a new ObjectFactory that can be used to create new instances of + * schema derived classes for package: + * org.restlet.example.book.restlet.ch05.sec2.sub8 * */ public ObjectFactory() { diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailClient.java index d22a83bf91..9dd51eff94 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailServerApplication.java index 678be865ff..cb31f1361c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailServerResource.java index 565ecf89ca..1dd0f3eac0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub1/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/Mail.java index 2f10aadc21..3875420648 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailClient.java index aa2ef211e8..2da4a5c638 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailServerApplication.java index c2ad50dc1b..791c26d0d0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailServerResource.java index e5de67ced4..a0d2ed2b57 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec3/sub2/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/Mail.java index d099f0466e..9772df3d43 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailClient.java index 444a74b945..6936d6e845 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailServerApplication.java index a26c38ba43..eecd5e31af 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailServerResource.java index 3ad3851083..78c406851c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub1/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/Mail.java index 90632f85dc..de518abedf 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailClient.java index e6d1441bb7..a6c9d93618 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailServerApplication.java index 2075ad2c2e..51975c8b9f 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -65,8 +56,7 @@ public static void main(String[] args) throws Exception { @Override public Restlet createInboundRoot() { Router router = new Router(getContext()); - router.attach( - "/accounts/{accountId}/mails/{mailId}", + router.attach("/accounts/{accountId}/mails/{mailId}", MailServerResource.class); return router; } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailServerResource.java index c5b27c81ec..5fb56ce6bd 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec4/sub2/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/Mail.java index b83b3c3884..5ae3bfb862 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/MailServerApplication.java index 1e3b5cc711..c213b23598 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,6 +33,7 @@ /** * Routing to annotated server resources. */ +@Deprecated public class MailServerApplication extends Application { /** diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/MailServerResource.java index cfe48b2a1f..1da560cdd4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub2/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -38,7 +29,6 @@ import org.restlet.data.MediaType; import org.restlet.data.Reference; import org.restlet.ext.jackson.JacksonRepresentation; -import org.restlet.ext.xstream.XstreamRepresentation; import org.restlet.representation.Representation; import org.restlet.representation.Variant; import org.restlet.resource.ResourceException; @@ -48,6 +38,7 @@ * Resource corresponding to a mail received or sent with the parent mail * account. Leverages Jackson extension. */ +@Deprecated public class MailServerResource extends ServerResource { @Override @@ -69,14 +60,8 @@ protected Representation get(Variant variant) throws ResourceException { mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() .toString()); - if (MediaType.APPLICATION_XML.isCompatible(variant.getMediaType())) { - // Wraps the bean with an XStream representation - result = new XstreamRepresentation(mail); - } else if (MediaType.APPLICATION_JSON.isCompatible(variant - .getMediaType())) { - // Wraps the bean with a Jackson representation - result = new JacksonRepresentation(mail); - } + // Wraps the bean with a Jackson representation + result = new JacksonRepresentation(mail); return result; } @@ -87,19 +72,10 @@ protected Representation put(Representation representation, Variant variant) Mail mail = null; try { - if (MediaType.APPLICATION_XML.isCompatible(representation - .getMediaType())) { - // Parse the XML representation to get the mail bean - mail = new XstreamRepresentation(representation, - Mail.class).getObject(); - System.out.println("XML representation received"); - } else if (MediaType.APPLICATION_JSON.isCompatible(representation - .getMediaType())) { - // Parse the JSON representation to get the mail bean - mail = new JacksonRepresentation(representation, - Mail.class).getObject(); - System.out.println("JSON representation received"); - } + // Parse the JSON representation to get the mail bean + mail = new JacksonRepresentation(representation, Mail.class) + .getObject(); + System.out.println("JSON representation received"); if (mail != null) { // Output the mail bean diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub3/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub3/MailClient.java index d3de055301..e34325bc3e 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub3/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub3/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/Mail.java index 6e5906cd2f..1443a838ae 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailClient.java index cec2befdff..0cda937f09 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailResource.java index 830af98179..28fdebc5ad 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface MailResource { @Get - public Mail retrieve(); + Mail retrieve(); @Put - public void store(Mail mail); + void store(Mail mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailServerApplication.java index a5d7a6538b..c606db303a 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailServerResource.java index eb28b49001..6f36a06db3 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch04/sec5/sub4/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/Mail.java index e90055b6cd..6155d4d176 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailClient.java index 82320b5e11..16a2055e94 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailResource.java index 1e70cc8c81..986666f47c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface MailResource { @Get - public Mail retrieve(); + Mail retrieve(); @Put - public void store(Mail mail); + void store(Mail mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailServerApplication.java index e211656b96..ed849b8343 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailServerResource.java index 5a2c3c27df..f5df647704 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec1/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/Mail.java index b46f53ae8b..58a0a301ba 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailClient.java index 562cb011e5..b6485c357d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailResource.java index d929945988..00ed480b6a 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface MailResource { @Get - public Mail retrieve(); + Mail retrieve(); @Put - public void store(Mail mail); + void store(Mail mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailServerApplication.java index c1338f0a7a..28db9f60a6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailServerResource.java index d2503e0515..6139856be7 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/basic/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/Mail.java index 35b2dd2cd7..e194aa8281 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailClient.java index bffe7e411d..adc3940a98 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailResource.java index 3a58797450..62d57bcea4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface MailResource { @Get - public Mail retrieve(); + Mail retrieve(); @Put - public void store(Mail mail); + void store(Mail mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailServerApplication.java index 2569118719..a8e0c3cd3c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailServerResource.java index c97113222c..48c9b9f793 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/digest/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/Mail.java index b6088c171a..5d09b9dfd8 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailClient.java index 020437e494..987ba8450d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailResource.java index 2639d8917e..3a80824511 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface MailResource { @Get - public Mail retrieve(); + Mail retrieve(); @Put - public void store(Mail mail); + void store(Mail mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailServerApplication.java index a3c6053709..1378e2d426 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailServerResource.java index b33586269b..dcd4b5968b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/certificate/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/Mail.java index d3666f8b1c..59a6273937 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailClient.java index 2c157035ba..8a8f7718ac 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailResource.java index fb4d109c42..39a7bb2373 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface MailResource { @Get - public Mail retrieve(); + Mail retrieve(); @Put - public void store(Mail mail); + void store(Mail mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailServerApplication.java index 4da099be76..7a93b0d119 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailServerResource.java index e835d40fba..cca5c71386 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/jaas/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/Mail.java index f5df357d68..2be1a7ec7c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailClient.java index 9b3ac07b23..231f98ffae 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailResource.java index e5a3915ea7..ade580a137 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface MailResource { @Get - public Mail retrieve(); + Mail retrieve(); @Put - public void store(Mail mail); + void store(Mail mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailServerApplication.java index 829c6d6bf8..2175d0f500 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailServerResource.java index 8610ce6b83..11a06a7bdd 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/SimpleSecretVerifier.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/SimpleSecretVerifier.java index 37fbba218b..0637f58bad 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/SimpleSecretVerifier.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec2/verifier/secret/SimpleSecretVerifier.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/client/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/client/MailClient.java index 8f407252b6..aff539358e 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/client/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/client/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountRepresentation.java index e7827e7cde..fb88a729a5 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountResource.java index 57f22f1938..69e203d07a 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -48,7 +39,7 @@ public interface AccountResource { * @return The account representation. */ @Get - public String represent(); + String represent(); /** * Stores the new value for the identified account. @@ -57,12 +48,12 @@ public interface AccountResource { * The identified account. */ @Put - public void store(String account); + void store(String account); /** * Deletes the identified account by setting its value to null. */ @Delete - public void remove(); + void remove(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountsResource.java index 1e0cbf341b..8f6b9ba9b4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/AccountsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -47,7 +38,7 @@ public interface AccountsResource { * @return The list of accounts. */ @Get - public String represent(); + String represent(); /** * Add the given account to the list and returns its position as an @@ -58,6 +49,6 @@ public interface AccountsResource { * @return The account identifier. */ @Post - public String add(String account); + String add(String account); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/ContactRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/ContactRepresentation.java index 5a1ff52df6..d8aaeef6a0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/ContactRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/ContactRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/FeedRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/FeedRepresentation.java index 37237b38ca..65adcc7d98 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/FeedRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/FeedRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/MailRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/MailRepresentation.java index 87bc513fb3..6557a01f8e 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/MailRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/MailRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/RootResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/RootResource.java index e7c4ee0515..acc4d6b6f6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/RootResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/RootResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -46,6 +37,6 @@ public interface RootResource { * @return The root representation. */ @Get - public String represent(); + String represent(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/TagRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/TagRepresentation.java index 464d2e93ec..74c4313fa9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/TagRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/common/TagRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/AccountServerResource.java index 1979d5f07a..8580e3c366 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/AccountsServerResource.java index b1e817da8b..e97ec9a669 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/MailServerApplication.java index c486da4b62..451549338c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/MailServerComponent.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/MailServerComponent.java index 237e4f549a..ceac9771b2 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/MailServerComponent.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/MailServerComponent.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/RootServerResource.java index 671a5a0023..c86a08622a 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec3/server/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/client/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/client/MailClient.java index ec56f30f19..ccb37afcfa 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/client/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/client/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountRepresentation.java index 13e224df2b..352ff58ef4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountResource.java index be32426aab..5d31e776c6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -48,7 +39,7 @@ public interface AccountResource { * @return The account representation. */ @Get - public String represent(); + String represent(); /** * Stores the new value for the identified account. @@ -57,12 +48,12 @@ public interface AccountResource { * The identified account. */ @Put - public void store(String account); + void store(String account); /** * Deletes the identified account by setting its value to null. */ @Delete - public void remove(); + void remove(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountsResource.java index 1da05e73de..bdeec430e7 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/AccountsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -47,7 +38,7 @@ public interface AccountsResource { * @return The list of accounts. */ @Get - public String represent(); + String represent(); /** * Add the given account to the list and returns its position as an @@ -58,6 +49,6 @@ public interface AccountsResource { * @return The account identifier. */ @Post - public String add(String account); + String add(String account); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/ContactRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/ContactRepresentation.java index 5f33821e79..3476592d4c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/ContactRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/ContactRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/FeedRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/FeedRepresentation.java index c1cf9ddfd1..7036c5e41c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/FeedRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/FeedRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/MailRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/MailRepresentation.java index 3e8e3cef0a..890acb8510 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/MailRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/MailRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/RootResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/RootResource.java index dd4035cb7c..322d7e4fcb 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/RootResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/RootResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -46,6 +37,6 @@ public interface RootResource { * @return The root representation. */ @Get - public String represent(); + String represent(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/TagRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/TagRepresentation.java index 8ee1668d6e..fa26192704 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/TagRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/common/TagRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/AccountServerResource.java index d91d24d1de..afbdfb83c9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/AccountsServerResource.java index 8928161df6..1ea9af8ab4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/FilesServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/FilesServerResource.java index 336207ce23..7961754c73 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/FilesServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/FilesServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/MailServerApplication.java index dc01a8669c..7a06c6f55c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/MailServerComponent.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/MailServerComponent.java index fa9b77ff25..6edf5823e4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/MailServerComponent.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/MailServerComponent.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/RootServerResource.java index f489396cbd..564797e18e 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec4/server/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerificationClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerificationClient.java index 0141bc398f..3b06a5d0b8 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerificationClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerificationClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerificationServer.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerificationServer.java index 7810695f2c..57321cd32b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerificationServer.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerificationServer.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerifiedServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerifiedServerResource.java index 3ca610830a..2f90e13736 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerifiedServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch05/sec5/VerifiedServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/client/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/client/MailClient.java index 3663bdf287..3442c97c83 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/client/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/client/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountRepresentation.java index 63a9c362b3..e6c409009a 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountResource.java index 62088bca51..a867cd6b68 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -48,7 +39,7 @@ public interface AccountResource { * @return The account representation. */ @Get - public String represent(); + String represent(); /** * Stores the new value for the identified account. @@ -57,12 +48,12 @@ public interface AccountResource { * The identified account. */ @Put - public void store(String account); + void store(String account); /** * Deletes the identified account by setting its value to null. */ @Delete - public void remove(); + void remove(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountsResource.java index 03247d02f6..6768240a42 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/AccountsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -47,7 +38,7 @@ public interface AccountsResource { * @return The list of accounts. */ @Get - public String represent(); + String represent(); /** * Add the given account to the list and returns its position as an @@ -58,6 +49,6 @@ public interface AccountsResource { * @return The account identifier. */ @Post - public String add(String account); + String add(String account); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/ContactRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/ContactRepresentation.java index a061f84787..6465724f61 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/ContactRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/ContactRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/FeedRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/FeedRepresentation.java index 95aa130e3a..238722c74d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/FeedRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/FeedRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/MailRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/MailRepresentation.java index 242ba92802..4c58085857 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/MailRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/MailRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/RootResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/RootResource.java index 68f9a192bf..5e77237d92 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/RootResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/RootResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -46,6 +37,6 @@ public interface RootResource { * @return The root representation. */ @Get - public String represent(); + String represent(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/TagRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/TagRepresentation.java index f9eaee3e19..ab399b741e 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/TagRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/common/TagRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/AccountServerResource.java index 7775915825..a469c3ef76 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/AccountsServerResource.java index 2b781c22ec..2b34eaa1dc 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/MailServerApplication.java index 286822288f..fbb51aeec5 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/MailServerComponent.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/MailServerComponent.java index d49ab01740..10f476ff7d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/MailServerComponent.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/MailServerComponent.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/RootServerResource.java index 910c4ae57f..9aea6e879f 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch06/sec2/server/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/Mail.java index 46ce92d0cd..67caf50401 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailClient.java index 71e6120f30..6e51056b03 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailServerApplication.java index cf843ff520..69fb382339 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailServerResource.java index b828bf07b6..d89cc2969d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub1/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/Mail.java index 7155706905..9d479ff5b4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailClient.java index 0d14d53f27..d0abfac916 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailServerApplication.java index 66b0dcac95..414a7e375b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailServerResource.java index 24fb058803..26e2cfbb5d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/NaiveCookieAuthenticator.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/NaiveCookieAuthenticator.java index 4431ddebec..e5ec0c346d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/NaiveCookieAuthenticator.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub2/NaiveCookieAuthenticator.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -58,12 +49,13 @@ */ public class NaiveCookieAuthenticator extends ChallengeAuthenticator { - public NaiveCookieAuthenticator(Context context, boolean optional, String realm) { + public NaiveCookieAuthenticator(Context context, boolean optional, + String realm) { super(context, optional, ChallengeScheme.HTTP_COOKIE, realm); } - public NaiveCookieAuthenticator(Context context, boolean optional, String realm, - Verifier verifier) { + public NaiveCookieAuthenticator(Context context, boolean optional, + String realm, Verifier verifier) { super(context, optional, ChallengeScheme.HTTP_COOKIE, realm, verifier); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub3/HelloServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub3/HelloServerResource.java index dea1c3fa5b..3a80fed477 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub3/HelloServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub3/HelloServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub3/MergeSitesServicesApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub3/MergeSitesServicesApplication.java index f46ec99f76..549c7e82d1 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub3/MergeSitesServicesApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub3/MergeSitesServicesApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub4/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub4/MailServerApplication.java index 4d2746254d..58b5052ce4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub4/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub4/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub4/MailStatusService.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub4/MailStatusService.java index c745be2f0d..37ab73ebae 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub4/MailStatusService.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub4/MailStatusService.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/Mail.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/Mail.java index 518a9ce60d..51df6848a0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/Mail.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/Mail.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailClient.java index bdfa8a9632..2bb1c57e65 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailServerApplication.java index 6b71877190..16ed199ef4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailServerResource.java index b1613e3c00..e712f8d29c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec1/sub5/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/FeedServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/FeedServerResource.java index a0ca5f9073..4cb7730acb 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/FeedServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/FeedServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -33,9 +24,6 @@ package org.restlet.example.book.restlet.ch07.sec2; -import java.util.ArrayList; -import java.util.List; - import org.restlet.ext.atom.Entry; import org.restlet.ext.atom.Feed; import org.restlet.ext.atom.Text; @@ -43,13 +31,6 @@ import org.restlet.resource.ResourceException; import org.restlet.resource.ServerResource; -import com.sun.syndication.feed.synd.SyndContent; -import com.sun.syndication.feed.synd.SyndContentImpl; -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndEntryImpl; -import com.sun.syndication.feed.synd.SyndFeed; -import com.sun.syndication.feed.synd.SyndFeedImpl; - /** * Resource corresponding to an account feed associated to tags. */ @@ -71,26 +52,4 @@ public Feed toAtom() throws ResourceException { return result; } - @Get("rss") - public SyndFeed toRss() throws ResourceException { - SyndFeed result = new SyndFeedImpl(); - result.setTitle("Homer's feed"); - result.setDescription("Homer's feed"); - result.setLink(getReference().toString()); - List entries = new ArrayList(); - result.setEntries(entries); - SyndEntry entry; - SyndContent description; - - for (int i = 1; i < 11; i++) { - entry = new SyndEntryImpl(); - entry.setTitle("Mail #" + i); - description = new SyndContentImpl(); - description.setValue("Doh! This is the content of mail #" + i); - entry.setDescription(description); - entries.add(entry); - } - - return result; - } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/MailClient.java index d39abd8bb1..d6f87a8fe9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -33,15 +24,10 @@ package org.restlet.example.book.restlet.ch07.sec2; -import java.util.List; - import org.restlet.ext.atom.Entry; import org.restlet.ext.atom.Feed; import org.restlet.resource.ClientResource; -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndFeed; - /** * Mail client updating a mail by submitting a form. */ @@ -60,16 +46,5 @@ public static void main(String[] args) throws Exception { System.out.println("Summary: " + entry.getSummary()); } - // Display the retrieved RSS feed and entries - SyndFeed rssFeed = mailClient.get(SyndFeed.class); - System.out.println("\nRSS feed: " + rssFeed.getTitle() + "\n"); - - @SuppressWarnings("unchecked") - List entries = (List) rssFeed.getEntries(); - - for (SyndEntry entry : entries) { - System.out.println("Title : " + entry.getTitle()); - System.out.println("Summary: " + entry.getDescription().getValue()); - } } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/MailServerApplication.java index 4b84c0a473..33898887b6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec2/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/OldServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/OldServerResource.java index c05b98f19a..bdea0c3199 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/OldServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/OldServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -48,7 +39,7 @@ public String redirect() { System.out.println("Redirecting client to new location..."); - // Add explanation message entity + // Add explanation message entity return "Resource moved... \n"; } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/RedirectedClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/RedirectedClient.java index 1ce36c2fb8..7bfd12f67a 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/RedirectedClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/RedirectedClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/RedirectingServer.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/RedirectingServer.java index 168f03b699..158281deb7 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/RedirectingServer.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub1/RedirectingServer.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub2/SearchRedirector.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub2/SearchRedirector.java index 41969352b5..2a1eb90b84 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub2/SearchRedirector.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec3/sub2/SearchRedirector.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentClient.java index 01aa319934..66cffac369 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentServer.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentServer.java index 4975e2ca0c..098dac08f3 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentServer.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentServer.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentServerResource.java index f548495e9c..023d652917 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub1/DynamicContentServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub3/RangeClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub3/RangeClient.java index 74292c6160..22c642fcdb 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub3/RangeClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub3/RangeClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub3/RangeServer.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub3/RangeServer.java index 2260b0f302..538bac32dc 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub3/RangeServer.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub3/RangeServer.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingClient.java index c80f1befc7..92b4952f33 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingServer.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingServer.java index 7342d7ee99..867d0c89d9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingServer.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingServer.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingServerResource.java index 0a4c5ac3e5..721bd34104 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub4/CachingServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub5/ConditionalClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub5/ConditionalClient.java index 7b4818b548..2523aa47b6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub5/ConditionalClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec4/sub5/ConditionalClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/MailServerComponent.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/MailServerComponent.java index 84d67eb81d..07eb8e4fb0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/MailServerComponent.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/MailServerComponent.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/client/MailClient.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/client/MailClient.java index fb40e2f1b0..192d51f0b9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/client/MailClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/client/MailClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -33,17 +24,12 @@ package org.restlet.example.book.restlet.ch07.sec5.webapi.client; -import java.util.List; - import org.restlet.data.Cookie; import org.restlet.data.Form; import org.restlet.ext.atom.Entry; import org.restlet.ext.atom.Feed; import org.restlet.resource.ClientResource; -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndFeed; - /** * Mail client. */ @@ -90,17 +76,6 @@ public static void main(String[] args) throws Exception { System.out.println("Summary: " + entry.getSummary()); } - // Display the retrieved RSS feed and entries - SyndFeed rssFeed = mailClient.get(SyndFeed.class); - System.out.println("\nRSS feed: " + rssFeed.getTitle() + "\n"); - - @SuppressWarnings("unchecked") - List entries = (List) rssFeed.getEntries(); - - for (SyndEntry entry : entries) { - System.out.println("Title : " + entry.getTitle()); - System.out.println("Summary: " + entry.getDescription().getValue()); - } } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountRepresentation.java index 75aa205f37..67870f8586 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountResource.java index 3df5463074..818583cd5b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -48,7 +39,7 @@ public interface AccountResource { * @return The account representation. */ @Get - public AccountRepresentation represent(); + AccountRepresentation represent(); /** * Stores the new value for the identified account. @@ -57,12 +48,12 @@ public interface AccountResource { * The identified account. */ @Put - public void store(AccountRepresentation account); + void store(AccountRepresentation account); /** * Deletes the identified account by setting its value to null. */ @Delete - public void remove(); + void remove(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountsResource.java index 29277cbde1..ed18c195a9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/AccountsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -47,7 +38,7 @@ public interface AccountsResource { * @return The list of accounts. */ @Get - public String represent(); + String represent(); /** * Add the given account to the list and returns its position as an @@ -58,6 +49,6 @@ public interface AccountsResource { * @return The account identifier. */ @Post - public String add(AccountRepresentation account); + String add(AccountRepresentation account); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/ContactRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/ContactRepresentation.java index 065a5c1ccc..983cc80bec 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/ContactRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/ContactRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/FeedRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/FeedRepresentation.java index 22a5620bcb..b5da506887 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/FeedRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/FeedRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/MailRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/MailRepresentation.java index a3d7e5b3cc..b1dca6c2ed 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/MailRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/MailRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/MailResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/MailResource.java index e1563c2f20..1f4d013e1b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/MailResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/MailResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface MailResource { @Get - public MailRepresentation retrieve(); + MailRepresentation retrieve(); @Put - public void store(MailRepresentation mail); + void store(MailRepresentation mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/RootResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/RootResource.java index f8514d2561..3ec54db4d2 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/RootResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/RootResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -46,6 +37,6 @@ public interface RootResource { * @return The root representation. */ @Get - public String represent(); + String represent(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/TagRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/TagRepresentation.java index da9750b2a3..c1f68a3e4f 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/TagRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/common/TagRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/AccountServerResource.java index 9886f6a3fc..0a4be3fff4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/AccountsServerResource.java index 30c53ebe19..9ec085ca06 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/MailApiApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/MailApiApplication.java index 0bf05ee353..74ec93a544 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/MailApiApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/MailApiApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/MailServerResource.java index d4bcc334dc..dae82280d0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -41,7 +32,8 @@ /** * Mail server resource implementing the {@link MailResource} interface. */ -public class MailServerResource extends WadlServerResource implements MailResource { +public class MailServerResource extends WadlServerResource implements + MailResource { public MailRepresentation retrieve() { MailRepresentation mail = new MailRepresentation(); diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/RootServerResource.java index c0025d3758..0ad97d1417 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/webapi/server/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -56,8 +47,7 @@ protected RepresentationInfo describe(MethodInfo methodInfo, DocumentationInfo doc = new DocumentationInfo(); doc.setTitle("Mail application"); - doc - .setTextContent("Simple string welcoming the user to the mail application"); + doc.setTextContent("Simple string welcoming the user to the mail application"); result.getDocumentations().add(doc); return result; } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/AccountServerResource.java index 98f8958992..9ef44b61f9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/AccountsServerResource.java index 958b5d719a..6f00e604f8 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -38,6 +29,6 @@ /** * Implementation of the resource containing the list of mail accounts. */ -public class AccountsServerResource extends ServerResource{ +public class AccountsServerResource extends ServerResource { } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/CookieAuthenticator.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/CookieAuthenticator.java index 148f4e102d..3d362d8491 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/CookieAuthenticator.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/CookieAuthenticator.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/FeedServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/FeedServerResource.java index a7700edb58..4b14a2307d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/FeedServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/FeedServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -33,9 +24,6 @@ package org.restlet.example.book.restlet.ch07.sec5.website; -import java.util.ArrayList; -import java.util.List; - import org.restlet.ext.atom.Entry; import org.restlet.ext.atom.Feed; import org.restlet.ext.atom.Text; @@ -43,13 +31,6 @@ import org.restlet.resource.ResourceException; import org.restlet.resource.ServerResource; -import com.sun.syndication.feed.synd.SyndContent; -import com.sun.syndication.feed.synd.SyndContentImpl; -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndEntryImpl; -import com.sun.syndication.feed.synd.SyndFeed; -import com.sun.syndication.feed.synd.SyndFeedImpl; - /** * Resource corresponding to an account feed associated to tags. */ @@ -70,27 +51,4 @@ public Feed toAtom() throws ResourceException { return result; } - - @Get("rss") - public SyndFeed toRss() throws ResourceException { - SyndFeed result = new SyndFeedImpl(); - result.setTitle("Homer's feed"); - result.setDescription("Homer's feed"); - result.setLink(getReference().toString()); - List entries = new ArrayList(); - result.setEntries(entries); - SyndEntry entry; - SyndContent description; - - for (int i = 1; i < 11; i++) { - entry = new SyndEntryImpl(); - entry.setTitle("Mail n�" + i); - description = new SyndContentImpl(); - description.setValue("Doh! This is the content of mail n�" + i); - entry.setDescription(description); - entries.add(entry); - } - - return result; - } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailServerResource.java index a01f63e962..2581572589 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailSiteApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailSiteApplication.java index 17b0c12716..4d50d260a9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailSiteApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailSiteApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailStatusService.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailStatusService.java index 04eb887166..b7f24aa0a0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailStatusService.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/MailStatusService.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -56,8 +47,10 @@ public Representation getRepresentation(Status status, Request request, // Create the data model Map dataModel = new TreeMap(); dataModel.put("applicationName", Application.getCurrent().getName()); - dataModel.put("statusReasonPhrase", response.getStatus().getReasonPhrase()); - dataModel.put("statusDescription", response.getStatus().getDescription()); + dataModel.put("statusReasonPhrase", response.getStatus() + .getReasonPhrase()); + dataModel.put("statusDescription", response.getStatus() + .getDescription()); // Load the FreeMarker template Representation mailFtl = new ClientResource( diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/RootServerResource.java index c2f400635f..d65c444388 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch07/sec5/website/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountRepresentation.java index 15c463a1db..660bfb2a4c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountResource.java index b0ee280d36..5c03e5c464 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -48,7 +39,7 @@ public interface AccountResource { * @return The account representation. */ @Get - public AccountRepresentation represent(); + AccountRepresentation represent(); /** * Stores the new value for the identified account. @@ -57,12 +48,12 @@ public interface AccountResource { * The identified account. */ @Put - public void store(AccountRepresentation account); + void store(AccountRepresentation account); /** * Deletes the identified account by setting its value to null. */ @Delete - public void remove(); + void remove(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountsResource.java index 6cec0ea560..77d41593a0 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/AccountsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -47,7 +38,7 @@ public interface AccountsResource { * @return The list of accounts. */ @Get - public String represent(); + String represent(); /** * Add the given account to the list and returns its position as an @@ -58,6 +49,6 @@ public interface AccountsResource { * @return The account identifier. */ @Post - public String add(AccountRepresentation account); + String add(AccountRepresentation account); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/ContactRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/ContactRepresentation.java index 7eace5c5aa..47d9103a63 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/ContactRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/ContactRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/ContactResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/ContactResource.java index f2683b8502..bdbb0d061a 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/ContactResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/ContactResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -40,7 +31,7 @@ */ public interface ContactResource { - @Get - public ContactRepresentation retrieve(); + @Get + ContactRepresentation retrieve(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/FeedRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/FeedRepresentation.java index 4915409235..c98ad9a008 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/FeedRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/FeedRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailRepresentation.java index 8fdef30ed4..d9c1ab4c8d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailResource.java index fd33a18e09..4e95b9fc70 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface MailResource { @Get - public MailRepresentation retrieve(); + MailRepresentation retrieve(); @Put - public void store(MailRepresentation mail); + void store(MailRepresentation mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailsResource.java index 77ac6a3b02..48d0e3a1b5 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/MailsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -44,9 +35,9 @@ public interface MailsResource { @Get - public List retrieve(); + List retrieve(); @Post - public void add(MailRepresentation mail); + void add(MailRepresentation mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/RootResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/RootResource.java index 0c3f3b871e..92f80222f7 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/RootResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/RootResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -46,6 +37,6 @@ public interface RootResource { * @return The root representation. */ @Get - public String represent(); + String represent(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/TagRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/TagRepresentation.java index 7443e67f98..9419730318 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/TagRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/common/TagRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/AccountServerResource.java index aa5ab866a6..a54e575062 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/AccountsServerResource.java index 3acbf93d97..1109f36994 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/ContactServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/ContactServerResource.java index b170302461..a87d29c196 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/ContactServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/ContactServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -41,15 +32,15 @@ * Contact server resource implementing the {@link ContactResource} interface. */ public class ContactServerResource extends WadlServerResource implements - ContactResource { + ContactResource { - public ContactRepresentation retrieve() { - ContactRepresentation contact = new ContactRepresentation(); - contact.setFirstName("Homer"); - contact.setLastName("Simpson"); - contact.setLogin("chunkylover53"); - contact.setSenderName("Homer Simpson"); - return contact; - } + public ContactRepresentation retrieve() { + ContactRepresentation contact = new ContactRepresentation(); + contact.setFirstName("Homer"); + contact.setLastName("Simpson"); + contact.setLogin("chunkylover53"); + contact.setSenderName("Homer Simpson"); + return contact; + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerApplication.java index f322ff8186..4c24837def 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,32 +33,32 @@ */ public class MailServerApplication extends WadlApplication { - /** - * Constructor. - */ - public MailServerApplication() { - setName("RESTful Mail API application"); - setDescription("Example API for 'Restlet in Action' book"); - setOwner("Restlet S.A.S."); - setAuthor("The Restlet Team"); - } + /** + * Constructor. + */ + public MailServerApplication() { + setName("RESTful Mail API application"); + setDescription("Example API for 'Restlet in Action' book"); + setOwner("Restlet S.A.S."); + setAuthor("The Restlet Team"); + } - /** - * Creates a root Router to dispatch call to server resources. - */ - @Override - public Restlet createInboundRoot() { - Router router = new Router(getContext()); - router.attach("/", RootServerResource.class); - router.attach("/accounts/", AccountsServerResource.class); - router.attach("/accounts/{accountId}", AccountServerResource.class); - router.attach("/accounts/{accountId}/mails/", MailsServerResource.class); - router.attach("/accounts/{accountId}/mails/{mailId}", - MailServerResource.class); - router.attach("/accounts/{accountId}/contacts/{contactId}", - ContactServerResource.class); + /** + * Creates a root Router to dispatch call to server resources. + */ + @Override + public Restlet createInboundRoot() { + Router router = new Router(getContext()); + router.attach("/", RootServerResource.class); + router.attach("/accounts/", AccountsServerResource.class); + router.attach("/accounts/{accountId}", AccountServerResource.class); + router.attach("/accounts/{accountId}/mails/", MailsServerResource.class); + router.attach("/accounts/{accountId}/mails/{mailId}", + MailServerResource.class); + router.attach("/accounts/{accountId}/contacts/{contactId}", + ContactServerResource.class); - return router; - } + return router; + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerResource.java index ce95c62e00..a04e6b6bba 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -41,7 +32,8 @@ /** * Mail server resource implementing the {@link MailResource} interface. */ -public class MailServerResource extends WadlServerResource implements MailResource { +public class MailServerResource extends WadlServerResource implements + MailResource { public MailRepresentation retrieve() { MailRepresentation mail = new MailRepresentation(); diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailsServerResource.java index a7701b2085..d980940376 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/MailsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -45,26 +36,26 @@ * Mails server resource implementing the {@link MailsResource} interface. */ public class MailsServerResource extends WadlServerResource implements - MailsResource { + MailsResource { - public List retrieve() { - List mails = new ArrayList(); - MailRepresentation mail = new MailRepresentation(); - mail.setStatus("received"); - mail.setSubject("Message to self"); - mail.setContent("Doh!"); - mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() - .toString()); - mails.add(mail); - return mails; - } + public List retrieve() { + List mails = new ArrayList(); + MailRepresentation mail = new MailRepresentation(); + mail.setStatus("received"); + mail.setSubject("Message to self"); + mail.setContent("Doh!"); + mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() + .toString()); + mails.add(mail); + return mails; + } - public void add(MailRepresentation mail) { - System.out.println("Status: " + mail.getStatus()); - System.out.println("Subject: " + mail.getSubject()); - System.out.println("Content: " + mail.getContent()); - System.out.println("Account URI: " + mail.getAccountRef()); - System.out.println(); - } + public void add(MailRepresentation mail) { + System.out.println("Status: " + mail.getStatus()); + System.out.println("Subject: " + mail.getSubject()); + System.out.println("Content: " + mail.getContent()); + System.out.println("Account URI: " + mail.getAccountRef()); + System.out.println(); + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/RootServerResource.java index a90ada1ffd..8ad1e162e9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch08/gae/server/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -56,8 +47,7 @@ protected RepresentationInfo describe(MethodInfo methodInfo, DocumentationInfo doc = new DocumentationInfo(); doc.setTitle("Mail application"); - doc - .setTextContent("Simple string welcoming the user to the mail application"); + doc.setTextContent("Simple string welcoming the user to the mail application"); result.getDocumentations().add(doc); return result; } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountRepresentation.java index 10a5364298..bd40a8c3ff 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountResource.java index 95b8db9fb0..42a60899dd 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -48,7 +39,7 @@ public interface AccountResource { * @return The account representation. */ @Get - public AccountRepresentation represent(); + AccountRepresentation represent(); /** * Stores the new value for the identified account. @@ -57,12 +48,12 @@ public interface AccountResource { * The identified account. */ @Put - public void store(AccountRepresentation account); + void store(AccountRepresentation account); /** * Deletes the identified account by setting its value to null. */ @Delete - public void remove(); + void remove(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountsResource.java index 7d902c79e4..61ee21164b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/AccountsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -47,7 +38,7 @@ public interface AccountsResource { * @return The list of accounts. */ @Get - public String represent(); + String represent(); /** * Add the given account to the list and returns its position as an @@ -58,6 +49,6 @@ public interface AccountsResource { * @return The account identifier. */ @Post - public String add(AccountRepresentation account); + String add(AccountRepresentation account); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactRepresentation.java index d161b94fb4..d27b005791 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -37,85 +28,85 @@ public class ContactRepresentation implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private String firstName; + private String firstName; - private String lastName; + private String lastName; - private String email; + private String email; - private String login; + private String login; - private String nickName; + private String nickName; - private String senderName; + private String senderName; - public ContactRepresentation() { - } + public ContactRepresentation() { + } - public ContactRepresentation(String firstName, String lastName, - String email, String login) { - this(firstName, lastName, email, login, null, null); - } + public ContactRepresentation(String firstName, String lastName, + String email, String login) { + this(firstName, lastName, email, login, null, null); + } - public ContactRepresentation(String firstName, String lastName, - String email, String login, String nickName, String senderName) { - super(); - this.firstName = firstName; - this.lastName = lastName; - this.email = email; - this.login = login; - this.nickName = nickName; - this.senderName = senderName; - } + public ContactRepresentation(String firstName, String lastName, + String email, String login, String nickName, String senderName) { + super(); + this.firstName = firstName; + this.lastName = lastName; + this.email = email; + this.login = login; + this.nickName = nickName; + this.senderName = senderName; + } - public String getEmail() { - return email; - } + public String getEmail() { + return email; + } - public String getFirstName() { - return firstName; - } + public String getFirstName() { + return firstName; + } - public String getLastName() { - return lastName; - } + public String getLastName() { + return lastName; + } - public String getLogin() { - return login; - } + public String getLogin() { + return login; + } - public String getNickName() { - return nickName; - } + public String getNickName() { + return nickName; + } - public String getSenderName() { - return senderName; - } + public String getSenderName() { + return senderName; + } - public void setEmail(String email) { - this.email = email; - } + public void setEmail(String email) { + this.email = email; + } - public void setFirstName(String firstName) { - this.firstName = firstName; - } + public void setFirstName(String firstName) { + this.firstName = firstName; + } - public void setLastName(String lastName) { - this.lastName = lastName; - } + public void setLastName(String lastName) { + this.lastName = lastName; + } - public void setLogin(String login) { - this.login = login; - } + public void setLogin(String login) { + this.login = login; + } - public void setNickName(String nickName) { - this.nickName = nickName; - } + public void setNickName(String nickName) { + this.nickName = nickName; + } - public void setSenderName(String senderName) { - this.senderName = senderName; - } + public void setSenderName(String senderName) { + this.senderName = senderName; + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactResource.java index b164de5c08..add96102da 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -40,7 +31,7 @@ */ public interface ContactResource { - @Get - public ContactRepresentation retrieve(); + @Get + ContactRepresentation retrieve(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactsResource.java index e2c5866c2c..9d0e70f925 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/ContactsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -43,10 +34,10 @@ */ public interface ContactsResource { - @Get - public ArrayList retrieve(); + @Get + ArrayList retrieve(); - @Post - public void add(ContactRepresentation contact); + @Post + void add(ContactRepresentation contact); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/FeedRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/FeedRepresentation.java index c81a21f687..f27dc2779c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/FeedRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/FeedRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailRepresentation.java index 5c7de54657..97f1dbf7dd 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -40,46 +31,46 @@ */ public class MailRepresentation implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private String status; + private String status; - private String subject; + private String subject; - private String content; + private String content; - private String accountRef; + private String accountRef; - public String getAccountRef() { - return accountRef; - } + public String getAccountRef() { + return accountRef; + } - public String getContent() { - return content; - } + public String getContent() { + return content; + } - public String getStatus() { - return status; - } + public String getStatus() { + return status; + } - public String getSubject() { - return subject; - } + public String getSubject() { + return subject; + } - public void setAccountRef(String accountRef) { - this.accountRef = accountRef; - } + public void setAccountRef(String accountRef) { + this.accountRef = accountRef; + } - public void setContent(String content) { - this.content = content; - } + public void setContent(String content) { + this.content = content; + } - public void setStatus(String status) { - this.status = status; - } + public void setStatus(String status) { + this.status = status; + } - public void setSubject(String subject) { - this.subject = subject; - } + public void setSubject(String subject) { + this.subject = subject; + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailResource.java index 187d74da5e..45fdb60885 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,9 +33,9 @@ public interface MailResource { @Get - public MailRepresentation retrieve(); + MailRepresentation retrieve(); @Put - public void store(MailRepresentation mail); + void store(MailRepresentation mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailsResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailsResource.java index 8c6ecf89fd..551f622450 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/MailsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -44,9 +35,9 @@ public interface MailsResource { @Get - public List retrieve(); + List retrieve(); @Post - public void add(MailRepresentation mail); + void add(MailRepresentation mail); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/RootResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/RootResource.java index b7c8a768ae..f64a1a4096 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/RootResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/RootResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -46,6 +37,6 @@ public interface RootResource { * @return The root representation. */ @Get - public String represent(); + String represent(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/TagRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/TagRepresentation.java index 69dd4136f7..68e05ad413 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/TagRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/common/TagRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/AccountServerResource.java index 88011dde6b..892544c0c8 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -45,48 +36,48 @@ * Implementation of a mail account resource. */ public class AccountServerResource extends WadlServerResource implements - AccountResource { + AccountResource { - /** The account identifier. */ - private int accountId; + /** The account identifier. */ + private int accountId; - @Override - protected RepresentationInfo describe(MethodInfo methodInfo, - Class representationClass, Variant variant) { - RepresentationInfo result = new RepresentationInfo(variant); - result.setReference("account"); - return result; - } + @Override + protected RepresentationInfo describe(MethodInfo methodInfo, + Class representationClass, Variant variant) { + RepresentationInfo result = new RepresentationInfo(variant); + result.setReference("account"); + return result; + } - /** - * Retrieve the account identifier based on the URI path variable - * "accountId" declared in the URI template attached to the application - * router. - */ - @Override - protected void doInit() throws ResourceException { - String accountIdAttribute = getAttribute("accountId"); + /** + * Retrieve the account identifier based on the URI path variable + * "accountId" declared in the URI template attached to the application + * router. + */ + @Override + protected void doInit() throws ResourceException { + String accountIdAttribute = getAttribute("accountId"); - if (accountIdAttribute != null) { - this.accountId = Integer.parseInt(accountIdAttribute); - setName("Resource for mail account \"" + this.accountId + "\""); - setDescription("The resource describing the mail account number \"" - + this.accountId + "\""); - } else { - setName("Mail account resource"); - setDescription("The resource describing a mail account"); - } - } + if (accountIdAttribute != null) { + this.accountId = Integer.parseInt(accountIdAttribute); + setName("Resource for mail account \"" + this.accountId + "\""); + setDescription("The resource describing the mail account number \"" + + this.accountId + "\""); + } else { + setName("Mail account resource"); + setDescription("The resource describing a mail account"); + } + } - public void remove() { - AccountsServerResource.getAccounts().remove(this.accountId); - } + public void remove() { + AccountsServerResource.getAccounts().remove(this.accountId); + } - public AccountRepresentation represent() { - return AccountsServerResource.getAccounts().get(this.accountId); - } + public AccountRepresentation represent() { + return AccountsServerResource.getAccounts().get(this.accountId); + } - public void store(AccountRepresentation account) { - AccountsServerResource.getAccounts().set(this.accountId, account); - } + public void store(AccountRepresentation account) { + AccountsServerResource.getAccounts().set(this.accountId, account); + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/AccountsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/AccountsServerResource.java index 092bb6e588..fceeb55b1d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/AccountsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/AccountsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/ContactServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/ContactServerResource.java index 67db60107d..5054f3b75e 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/ContactServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/ContactServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -41,16 +32,16 @@ * Contact server resource implementing the {@link ContactResource} interface. */ public class ContactServerResource extends WadlServerResource implements - ContactResource { + ContactResource { - public ContactRepresentation retrieve() { - ContactRepresentation contact = new ContactRepresentation(); - contact.setFirstName("Homer"); - contact.setLastName("Simpson"); - contact.setEmail("homer@simpson.org"); - contact.setLogin("chunkylover53"); - contact.setSenderName("Homer Simpson"); - return contact; - } + public ContactRepresentation retrieve() { + ContactRepresentation contact = new ContactRepresentation(); + contact.setFirstName("Homer"); + contact.setLastName("Simpson"); + contact.setEmail("homer@simpson.org"); + contact.setLogin("chunkylover53"); + contact.setSenderName("Homer Simpson"); + return contact; + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/ContactsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/ContactsServerResource.java index 70b71f40a7..de15769322 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/ContactsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/ContactsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -43,27 +34,28 @@ * Contacts server resource implementing the {@link ContactsResource} interface. */ public class ContactsServerResource extends WadlServerResource implements - ContactsResource { + ContactsResource { - public ArrayList retrieve() { - ArrayList contacts = new ArrayList(); - ContactRepresentation contact = new ContactRepresentation("Homer", - "Simpson", "homer@simpson.org", "chunkylover53", null, "Homer Simpson"); - contacts.add(contact); - contact = new ContactRepresentation("Bartholomew", "Simpson", - "bart@simpson.org", "jojo10", null, "Bart Simpson"); - contacts.add(contact); - return contacts; - } + public ArrayList retrieve() { + ArrayList contacts = new ArrayList(); + ContactRepresentation contact = new ContactRepresentation("Homer", + "Simpson", "homer@simpson.org", "chunkylover53", null, + "Homer Simpson"); + contacts.add(contact); + contact = new ContactRepresentation("Bartholomew", "Simpson", + "bart@simpson.org", "jojo10", null, "Bart Simpson"); + contacts.add(contact); + return contacts; + } - public void add(ContactRepresentation contact) { - System.out.println("Email: " + contact.getEmail()); - System.out.println("First name: " + contact.getFirstName()); - System.out.println("Last name: " + contact.getLastName()); - System.out.println("Login: " + contact.getLogin()); - System.out.println("Nick name: " + contact.getNickName()); - System.out.println("Sender name: " + contact.getSenderName()); - System.out.println(); - } + public void add(ContactRepresentation contact) { + System.out.println("Email: " + contact.getEmail()); + System.out.println("First name: " + contact.getFirstName()); + System.out.println("Last name: " + contact.getLastName()); + System.out.println("Login: " + contact.getLogin()); + System.out.println("Nick name: " + contact.getNickName()); + System.out.println("Sender name: " + contact.getSenderName()); + System.out.println(); + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailServerApplication.java index ef22dcf21c..d9546e365d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -42,30 +33,33 @@ */ public class MailServerApplication extends WadlApplication { - /** - * Constructor. - */ - public MailServerApplication() { - setName("RESTful Mail API application"); - setDescription("Example API for 'Restlet in Action' book"); - setOwner("Restlet S.A.S."); - setAuthor("The Restlet Team"); - } + /** + * Constructor. + */ + public MailServerApplication() { + setName("RESTful Mail API application"); + setDescription("Example API for 'Restlet in Action' book"); + setOwner("Restlet S.A.S."); + setAuthor("The Restlet Team"); + } - /** - * Creates a root Router to dispatch call to server resources. - */ - @Override - public Restlet createInboundRoot() { - Router router = new Router(getContext()); - router.attach("/", RootServerResource.class); - router.attach("/accounts/", AccountsServerResource.class); - router.attach("/accounts/{accountId}", AccountServerResource.class); - router.attach("/accounts/{accountId}/mails/", MailsServerResource.class); - router.attach("/accounts/{accountId}/mails/{mailId}", MailServerResource.class); - router.attach("/accounts/{accountId}/contacts/", ContactsServerResource.class); - router.attach("/accounts/{accountId}/contacts/{contactId}", ContactServerResource.class); - return router; - } + /** + * Creates a root Router to dispatch call to server resources. + */ + @Override + public Restlet createInboundRoot() { + Router router = new Router(getContext()); + router.attach("/", RootServerResource.class); + router.attach("/accounts/", AccountsServerResource.class); + router.attach("/accounts/{accountId}", AccountServerResource.class); + router.attach("/accounts/{accountId}/mails/", MailsServerResource.class); + router.attach("/accounts/{accountId}/mails/{mailId}", + MailServerResource.class); + router.attach("/accounts/{accountId}/contacts/", + ContactsServerResource.class); + router.attach("/accounts/{accountId}/contacts/{contactId}", + ContactServerResource.class); + return router; + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailServerResource.java index c2fcece6bf..1da2692552 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -41,7 +32,8 @@ /** * Mail server resource implementing the {@link MailResource} interface. */ -public class MailServerResource extends WadlServerResource implements MailResource { +public class MailServerResource extends WadlServerResource implements + MailResource { public MailRepresentation retrieve() { MailRepresentation mail = new MailRepresentation(); diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailsServerResource.java index 2901f189cd..18ea4c42f1 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/MailsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -45,26 +36,26 @@ * Mails server resource implementing the {@link MailsResource} interface. */ public class MailsServerResource extends WadlServerResource implements - MailsResource { + MailsResource { - public List retrieve() { - List mails = new ArrayList(); - MailRepresentation mail = new MailRepresentation(); - mail.setStatus("received"); - mail.setSubject("Message to self"); - mail.setContent("Doh!"); - mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() - .toString()); - mails.add(mail); - return mails; - } + public List retrieve() { + List mails = new ArrayList(); + MailRepresentation mail = new MailRepresentation(); + mail.setStatus("received"); + mail.setSubject("Message to self"); + mail.setContent("Doh!"); + mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() + .toString()); + mails.add(mail); + return mails; + } - public void add(MailRepresentation mail) { - System.out.println("Status: " + mail.getStatus()); - System.out.println("Subject: " + mail.getSubject()); - System.out.println("Content: " + mail.getContent()); - System.out.println("Account URI: " + mail.getAccountRef()); - System.out.println(); - } + public void add(MailRepresentation mail) { + System.out.println("Status: " + mail.getStatus()); + System.out.println("Subject: " + mail.getSubject()); + System.out.println("Content: " + mail.getContent()); + System.out.println("Account URI: " + mail.getAccountRef()); + System.out.println(); + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/RootServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/RootServerResource.java index 678f220f0d..f395cadbec 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/RootServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch09/server/RootServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -46,30 +37,30 @@ * Root resource implementation. */ public class RootServerResource extends WadlServerResource implements - RootResource { + RootResource { - @Override - protected RepresentationInfo describe(MethodInfo methodInfo, - Class representationClass, Variant variant) { - RepresentationInfo result = new RepresentationInfo(MediaType.TEXT_PLAIN); - result.setIdentifier("root"); + @Override + protected RepresentationInfo describe(MethodInfo methodInfo, + Class representationClass, Variant variant) { + RepresentationInfo result = new RepresentationInfo(MediaType.TEXT_PLAIN); + result.setIdentifier("root"); - DocumentationInfo doc = new DocumentationInfo(); - doc.setTitle("Mail application"); - doc.setTextContent("Simple string welcoming the user to the mail application"); - result.getDocumentations().add(doc); - return result; - } + DocumentationInfo doc = new DocumentationInfo(); + doc.setTitle("Mail application"); + doc.setTextContent("Simple string welcoming the user to the mail application"); + result.getDocumentations().add(doc); + return result; + } - @Override - protected void doInit() throws ResourceException { - setAutoDescribing(false); - setName("Root resource"); - setDescription("The root resource of the mail server application"); - } + @Override + protected void doInit() throws ResourceException { + setAutoDescribing(false); + setName("Root resource"); + setDescription("The root resource of the mail server application"); + } - public String represent() { - return "Welcome to the " + getApplication().getName() + " !"; - } + public String represent() { + return "Welcome to the " + getApplication().getName() + " !"; + } } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec2/FoafExample.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec2/FoafExample.java index 5b8d96c41f..0bc66ef7bb 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec2/FoafExample.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec2/FoafExample.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -55,14 +46,14 @@ public static void main(String[] args) throws IOException { // Linked Simpson resources Reference homerRef = new Reference( - "http://www.rmep.org/accounts/chunkylover53/"); + "http://www.rmep.org/accounts/chunkylover53/"); Reference margeRef = new Reference( - "http://www.rmep.org/accounts/bretzels34/"); + "http://www.rmep.org/accounts/bretzels34/"); Reference bartRef = new Reference( - "http://www.rmep.org/accounts/jojo10/"); + "http://www.rmep.org/accounts/jojo10/"); Reference lisaRef = new Reference( - "http://www.rmep.org/accounts/lisa1984/"); - + "http://www.rmep.org/accounts/lisa1984/"); + // Example RDF graph Graph example = new Graph(); example.add(homerRef, firstName, new Literal("Homer")); diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/FoafConstants.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/FoafConstants.java index 1aac0d1161..7355a85a8d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/FoafConstants.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/FoafConstants.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/api/AccountRepresentation.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/api/AccountRepresentation.java index e6bdf820b3..80e2bd5dc6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/api/AccountRepresentation.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/api/AccountRepresentation.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/api/AccountResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/api/AccountResource.java index a1425097b5..8a847144a9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/api/AccountResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/api/AccountResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -47,7 +38,7 @@ public interface AccountResource { * @return The FOAF profile as a RDF graph. */ @Get("rdf") - public Graph getFoafProfile(); + Graph getFoafProfile(); /** * Represents the account as a simple string with the owner name for now. @@ -55,6 +46,6 @@ public interface AccountResource { * @return The account representation. */ @Get - public AccountRepresentation represent(); + AccountRepresentation represent(); } diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/client/FoafBrowser.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/client/FoafBrowser.java index 8956ae5ab9..082be7244f 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/client/FoafBrowser.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/client/FoafBrowser.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/model/Account.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/model/Account.java index 66d8701826..d95ca7de46 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/model/Account.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/model/Account.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/model/Contact.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/model/Contact.java index b5f1a081cc..7e83b75292 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/model/Contact.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/model/Contact.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/AccountServerResource.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/AccountServerResource.java index febdfcd568..feabd0270e 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/AccountServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/AccountServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/MailServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/MailServerApplication.java index 26d5535dce..6f94207d78 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/MailServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/MailServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/MailServerComponent.java b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/MailServerComponent.java index 3b4e5d79cb..e14074cb75 100644 --- a/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/MailServerComponent.java +++ b/modules/org.restlet.example/src/org/restlet/example/book/restlet/ch10/sec3/server/MailServerComponent.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/fileupload/FileUploadApplication.java b/modules/org.restlet.example/src/org/restlet/example/ext/fileupload/FileUploadApplication.java new file mode 100644 index 0000000000..46bd92058c --- /dev/null +++ b/modules/org.restlet.example/src/org/restlet/example/ext/fileupload/FileUploadApplication.java @@ -0,0 +1,51 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.example.ext.fileupload; + +import org.restlet.Application; +import org.restlet.Component; +import org.restlet.Restlet; +import org.restlet.data.Protocol; +import org.restlet.routing.Router; + +public class FileUploadApplication extends Application { + + public static void main(String[] args) throws Exception { + Component c = new Component(); + c.getServers().add(Protocol.HTTP, 8182); + c.getDefaultHost().attach(new FileUploadApplication()); + + c.start(); + } + + @Override + public Restlet createInboundRoot() { + Router router = new Router(getContext()); + + router.attach("/upload", FileUploadServerResource.class); + return router; + } + +} diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/fileupload/FileUploadServerResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/fileupload/FileUploadServerResource.java new file mode 100644 index 0000000000..757b0354af --- /dev/null +++ b/modules/org.restlet.example/src/org/restlet/example/ext/fileupload/FileUploadServerResource.java @@ -0,0 +1,96 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.example.ext.fileupload; + +import java.io.BufferedReader; +import java.io.InputStreamReader; + +import org.apache.commons.fileupload.FileItemIterator; +import org.apache.commons.fileupload.FileItemStream; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.restlet.data.MediaType; +import org.restlet.data.Status; +import org.restlet.ext.fileupload.RestletFileUpload; +import org.restlet.representation.Representation; +import org.restlet.representation.StringRepresentation; +import org.restlet.resource.Post; +import org.restlet.resource.ServerResource; + +public class FileUploadServerResource extends ServerResource { + + @Post + public Representation accept(Representation entity) throws Exception { + Representation result = null; + if (entity != null + && MediaType.MULTIPART_FORM_DATA.equals(entity.getMediaType(), + true)) { + // 1/ Create a factory for disk-based file items + DiskFileItemFactory factory = new DiskFileItemFactory(); + factory.setSizeThreshold(1000240); + + // 2/ Create a new file upload handler based on the Restlet + // FileUpload extension that will parse Restlet requests and + // generates FileItems. + RestletFileUpload upload = new RestletFileUpload(factory); + + // 3/ Request is parsed by the handler which generates a + // list of FileItems + FileItemIterator fileIterator = upload.getItemIterator(entity); + + // Process only the uploaded item called "fileToUpload" + // and return back + boolean found = false; + while (fileIterator.hasNext() && !found) { + FileItemStream fi = fileIterator.next(); + + if (fi.getFieldName().equals("fileToUpload")) { + // For the matter of sample code, it filters the multo + // part form according to the field name. + found = true; + // consume the stream immediately, otherwise the stream + // will be closed. + StringBuilder sb = new StringBuilder("media type: "); + sb.append(fi.getContentType()).append("\n"); + sb.append("file name : "); + sb.append(fi.getName()).append("\n"); + BufferedReader br = new BufferedReader(new InputStreamReader(fi.openStream())); + String line = null; + while ((line = br.readLine()) != null) { + sb.append(line); + } + sb.append("\n"); + result = new StringRepresentation(sb.toString(), + MediaType.TEXT_PLAIN); + } + } + } else { + // POST request with no entity. + setStatus(Status.CLIENT_ERROR_BAD_REQUEST); + } + + return result; + } + +} diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/guice/HelloWorld.java b/modules/org.restlet.example/src/org/restlet/example/ext/guice/HelloWorld.java index 549cab1f0a..58ed353bbd 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/guice/HelloWorld.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/guice/HelloWorld.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.ext.guice; import static java.lang.annotation.ElementType.FIELD; diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/guice/Main.java b/modules/org.restlet.example/src/org/restlet/example/ext/guice/Main.java index aaa106dc89..76e06ace3f 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/guice/Main.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/guice/Main.java @@ -1,3 +1,27 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + package org.restlet.example.ext.guice; import static com.google.inject.name.Names.named; @@ -36,7 +60,8 @@ public static class DefaultResource extends ServerResource { private final String path; @Inject - DefaultResource(@Named(PATH_QUALIFIER) String path) { + DefaultResource(@Named(PATH_QUALIFIER) + String path) { this.path = path; } @@ -54,7 +79,8 @@ public static class HelloServerResource extends ServerResource { private final String msg; @Inject - public HelloServerResource(@Named(MSG_QUALIFIER) String msg) { + public HelloServerResource(@Named(MSG_QUALIFIER) + String msg) { this.msg = msg; } diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/EasyRootResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/EasyRootResource.java index 19066876f6..43bdafd3b1 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/EasyRootResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/EasyRootResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/ExampleApplication.java b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/ExampleApplication.java index b47baec07e..b7c32c0ad9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/ExampleApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/ExampleApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/ExampleServer.java b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/ExampleServer.java index b537518dcf..df3cfdeef6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/ExampleServer.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/ExampleServer.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/AbstractEmployee.java b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/AbstractEmployee.java index 4e2a871f18..8f859a7a72 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/AbstractEmployee.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/AbstractEmployee.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/Employee.java b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/Employee.java index 02859abf15..8019815042 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/Employee.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/Employee.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeList.java b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeList.java index 5ada9e5bab..5139960a72 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeList.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeList.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeMgr.java b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeMgr.java index d14ea623b6..48c02205b5 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeMgr.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeMgr.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeResource.java index c4b2172225..4ec17e6275 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/EmployeeResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -82,8 +73,9 @@ private static URI createEmployeesUri(final UriInfo uriInfo) { } @DELETE - public Object delete(@Context HttpHeaders httpHeaders, - @Context UriInfo uriInfo) { + public Object delete(@Context + HttpHeaders httpHeaders, @Context + UriInfo uriInfo) { this.employeeMgr.remove(this.staffNo); if (httpHeaders.getAcceptableMediaTypes().contains( MediaType.TEXT_HTML_TYPE)) { @@ -93,8 +85,9 @@ public Object delete(@Context HttpHeaders httpHeaders, } @GET - @Consumes( { "application/xml", "text/xml", "application/json" }) - public Employee get(@Context UriInfo uriInfo) { + @Consumes({ "application/xml", "text/xml", "application/json" }) + public Employee get(@Context + UriInfo uriInfo) { // load employee with requested id final Employee employee = this.employeeMgr.getFull(this.staffNo); @@ -109,7 +102,8 @@ public Employee get(@Context UriInfo uriInfo) { @GET @Produces("text/html") - public StreamingOutput getHtml(@Context final UriInfo uriInfo) { + public StreamingOutput getHtml(@Context + final UriInfo uriInfo) { final Employee employee = get(uriInfo); final URI employeesUri = createEmployeesUri(uriInfo); return new StreamingOutput() { @@ -150,8 +144,7 @@ public void write(OutputStream output) throws IOException { ps.print("

"); - ps - .println(""); + ps.println(""); ps.println("
"); ps.print("
employeeData) { } @GET - @Produces( { "application/xml", "text/xml", "application/json" }) + @Produces({ "application/xml", "text/xml", "application/json" }) public EmployeeList getEmployees() { final EmployeeList employees = this.employeeMgr.getAll(); // set detail URIs @@ -143,23 +134,19 @@ public void write(OutputStream output) throws IOException { ps.println("\" method=\"POST\">"); ps.println(""); ps.println(""); - ps - .println(""); + ps.println(""); ps.println(""); ps.println(""); - ps - .println(""); + ps.println(""); ps.println(""); ps.println(""); ps.println(""); ps.println(""); ps.println(""); - ps - .println(""); + ps.println(""); ps.println(""); ps.println(""); - ps - .println(""); + ps.println(""); ps.println("
firstname:
lastname:
sex:
department:
"); ps.println(""); ps.println(""); @@ -169,7 +156,8 @@ public void write(OutputStream output) throws IOException { /** Create sub resource for one concrete employee. */ @Path("{staffNo}") - public EmployeeResource getSub(@PathParam("staffNo") int staffNo) { + public EmployeeResource getSub(@PathParam("staffNo") + int staffNo) { if (!this.employeeMgr.exists(staffNo)) { throw new WebApplicationException(Status.NOT_FOUND); } diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/SmallEmployee.java b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/SmallEmployee.java index 107059f0fb..6a20e73b41 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/SmallEmployee.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/jaxrs/employees/SmallEmployee.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/FacebookMeServerResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/FacebookMeServerResource.java index e4972a000f..a4271deb93 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/FacebookMeServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/FacebookMeServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/GoogleContactsServerResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/GoogleContactsServerResource.java index 70fca58ab5..e956f4824c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/GoogleContactsServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/GoogleContactsServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/OAuth2Sample.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/OAuth2Sample.java index 023fc26cce..5293ccde6d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/OAuth2Sample.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/OAuth2Sample.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/SampleApplication.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/SampleApplication.java index f20ff3e137..81164e4580 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/SampleApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/client/SampleApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoClient.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoClient.java index 3de54cb53f..13f5a1cb26 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoClientManager.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoClientManager.java index 1d5c896faa..f641448d74 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoClientManager.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoClientManager.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoToken.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoToken.java index 4fbb4cc9c2..60f9151259 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoToken.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoToken.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoTokenManager.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoTokenManager.java index b93ecd2082..aa8e59e82f 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoTokenManager.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/mongo/MongoTokenManager.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/LoginPageServerResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/LoginPageServerResource.java index b81e2fb2d7..c7c77cb10c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/LoginPageServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/LoginPageServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/OAuth2Sample.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/OAuth2Sample.java index feba268d80..821f5b2093 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/OAuth2Sample.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/OAuth2Sample.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/OAuth2ServerApplication.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/OAuth2ServerApplication.java index 073ffb8d0b..e21574129d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/OAuth2ServerApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/OAuth2ServerApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleApplication.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleApplication.java index b9d286a1b1..0b7266e90c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleUser.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleUser.java index acfa158dcb..d0976b4e12 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleUser.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleUser.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleUserManager.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleUserManager.java index 174ae3ab7d..e3a9fe25cc 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleUserManager.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/SampleUserManager.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/StatusServerResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/StatusServerResource.java index c97b27bc60..2ddd81d074 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/StatusServerResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/oauth/server/StatusServerResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/openid/OpenIdProvider.java b/modules/org.restlet.example/src/org/restlet/example/ext/openid/OpenIdProvider.java index 7af9a01e14..7f54dc6de1 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/openid/OpenIdProvider.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/openid/OpenIdProvider.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/osgi/ExampleResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/osgi/ExampleResource.java index bca57fef74..13dcf1885f 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/osgi/ExampleResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/osgi/ExampleResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/osgi/ExampleResourceProvider.java b/modules/org.restlet.example/src/org/restlet/example/ext/osgi/ExampleResourceProvider.java index 57c2b31326..7f76bd086c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/osgi/ExampleResourceProvider.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/osgi/ExampleResourceProvider.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/osgi/HelloResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/osgi/HelloResource.java index 9023c08931..f513ae4ebe 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/osgi/HelloResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/osgi/HelloResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/osgi/HelloResourceProvider.java b/modules/org.restlet.example/src/org/restlet/example/ext/osgi/HelloResourceProvider.java index 35553f6f1e..2e37f93035 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/osgi/HelloResourceProvider.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/osgi/HelloResourceProvider.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/Application.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/Application.java index 1f934f4f0e..286e921d88 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/Application.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/Application.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/data/DataFacade.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/data/DataFacade.java index ac1483d571..5d1ee77aa6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/data/DataFacade.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/data/DataFacade.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -52,7 +43,7 @@ public abstract class DataFacade { * new Contact object to be added. * @return the contact object completed with its identifiant. */ - public abstract Contact createContact(User user,Contact contact); + public abstract Contact createContact(User user, Contact contact); /** * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/data/ListFacade.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/data/ListFacade.java index 948afaac84..6768d644f3 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/data/ListFacade.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/data/ListFacade.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/BaseObject.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/BaseObject.java index c1e9fcb221..4cfd36b6f4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/BaseObject.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/BaseObject.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/Contact.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/Contact.java index 518d58349c..f143cb1d17 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/Contact.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/Contact.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -39,11 +30,10 @@ public class Contact extends User { /** FOAF URI of the contact. */ private String foafUri; - + /** Name of the contact. */ private String nickname; - public String getFoafUri() { return foafUri; } diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/ObjectsException.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/ObjectsException.java index 0943145369..5e158e4271 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/ObjectsException.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/ObjectsException.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/ObjectsFacade.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/ObjectsFacade.java index f53d8e7851..8d6c30c56c 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/ObjectsFacade.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/ObjectsFacade.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/User.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/User.java index bc6a288941..a4bd5379aa 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/User.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/objects/User.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -52,13 +43,13 @@ public class User extends BaseObject { /** Last name of the user. */ private String lastName; - + public User() { super(); } public List getContacts() { - if(contacts == null){ + if (contacts == null) { contacts = new ArrayList(); } return contacts; diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/BaseResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/BaseResource.java index a8bfb26c43..6500984000 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/BaseResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/BaseResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/ContactResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/ContactResource.java index dc674e1480..2b4ff00c31 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/ContactResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/ContactResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/ContactsResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/ContactsResource.java index 82df110226..cb6de8030b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/ContactsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/ContactsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/UserResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/UserResource.java index 9bd0401671..11f5602e4d 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/UserResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/UserResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/UsersResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/UsersResource.java index b7bacb9955..26d7d59e81 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/UsersResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/rdf/foaf/resources/UsersResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/sdc/Main.java b/modules/org.restlet.example/src/org/restlet/example/ext/sdc/Main.java index 5e212a6a3a..e8b4c514a5 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/sdc/Main.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/sdc/Main.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/sip/B2buaRedirector.java b/modules/org.restlet.example/src/org/restlet/example/ext/sip/B2buaRedirector.java deleted file mode 100644 index 99480c4f2e..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/ext/sip/B2buaRedirector.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.ext.sip; - -import org.restlet.Client; -import org.restlet.Component; -import org.restlet.Context; -import org.restlet.Request; -import org.restlet.Response; -import org.restlet.Restlet; -import org.restlet.Server; -import org.restlet.Uniform; -import org.restlet.data.Protocol; -import org.restlet.data.Reference; -import org.restlet.engine.header.HeaderConstants; -import org.restlet.ext.sip.SipRecipientInfo; -import org.restlet.ext.sip.SipRequest; -import org.restlet.ext.sip.SipResponse; -import org.restlet.routing.Redirector; -import org.restlet.routing.Template; - -/** - * Redirector that implements the B2BUA scenario. - */ -public class B2buaRedirector extends Redirector { - - public static void main(String[] args) throws Exception { - String[] arguments = new String[1]; - arguments[0] = "8111"; - - // Start the origin server on port 8111 - UacServerResource.main(arguments); - - Component c = new Component(); - Server server = new Server(Protocol.SIP); - c.getServers().add(server); - server.getContext().getParameters().add("tracing", "true"); - - Client client = new Client(Protocol.SIP); - c.getClients().add(client); - client.getContext().getParameters().add("proxyHost", "localhost"); - client.getContext().getParameters().add("proxyPort", arguments[0]); - client.getContext().getParameters().add("tracing", "false"); - client.getContext().getParameters().add("pipeliningConnections", - "false"); - - c.getDefaultHost().attachDefault( - new B2buaRedirector(null, "sip:localhost:8111")); - c.start(); - } - - /** - * Constructor for the client dispatcher mode. - * - * @param context - * The context. - * @param targetTemplate - * The template to build the target URI. - */ - public B2buaRedirector(Context context, String targetTemplate) { - super(context, targetTemplate); - } - - /** - * Constructor. - * - * @param context - * The context. - * @param targetPattern - * The pattern to build the target URI (using StringTemplate - * syntax and the CallModel for variables). - * @param mode - * The redirection mode. - */ - public B2buaRedirector(Context context, String targetTemplate, int mode) { - super(context, targetTemplate, mode); - } - - @Override - protected void outboundServerRedirect(Reference targetRef, Request request, - Response response) { - SipRequest r = (SipRequest) request; - SipRecipientInfo sri = new SipRecipientInfo(); - sri.setProtocol(Protocol.SIP); - sri.setTransport("TCP"); - sri.setName("127.0.0.1:5060"); - sri.getParameters().add("branch", "z9hG4bK-20369-1-0"); - r.getSipRecipientsInfo().add(0, sri); - super.outboundServerRedirect(targetRef, r, response); - }; - - @Override - protected void serverRedirect(Restlet next, Reference targetRef, - final Request request, final Response response) { - // Save the base URI if it exists as we might need it for - // redirections - final Reference resourceRef = request.getResourceRef(); - final Reference baseRef = resourceRef.getBaseRef(); - final String targetTemplate = getTargetTemplate(); - - // Reset the protocol and let the dispatcher handle the protocol - // request.setProtocol(null); - request.getAttributes().remove(HeaderConstants.ATTRIBUTE_HEADERS); - // Update the request to cleanly go to the target URI - request.setOnResponse(new Uniform() { - public void handle(Request req, Response resp) { - SipResponse r = (SipResponse) resp; - - if (!resp.getStatus().isInformational()) { - // Allow for response rewriting and clean the headers - response.setEntity(rewrite(response.getEntity())); - response.getAttributes().remove( - HeaderConstants.ATTRIBUTE_HEADERS); - request.setResourceRef(resourceRef); - - // In case of redirection, we may have to rewrite the - // redirect URI - if (response.getLocationRef() != null) { - Template rt = new Template(targetTemplate); - rt.setLogger(getLogger()); - int matched = rt.parse(response.getLocationRef() - .toString(), request); - - if (matched > 0) { - String remainingPart = (String) request - .getAttributes().get("rr"); - - if (remainingPart != null) { - response.setLocationRef(baseRef.toString() - + remainingPart); - } - } - } - - if (!r.getSipRecipientsInfo().isEmpty()) { - r.getSipRecipientsInfo().remove(0); - } - - resp.commit(); - } else { - SipResponse provisionalResponse = new SipResponse(request); - provisionalResponse.setStatus(resp.getStatus()); - provisionalResponse.commit(); - } - } - }); - request.setResourceRef(targetRef); - SipRequest r = new SipRequest((SipRequest) request); - // r.setResourceRef(targetRef); - - response.setAutoCommitting(false); - next.handle(r, response); - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacClientResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacClientResource.java deleted file mode 100644 index 61d5a8e91b..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacClientResource.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.ext.sip; - -import java.util.logging.Level; - -import org.restlet.Client; -import org.restlet.Context; -import org.restlet.data.Protocol; -import org.restlet.engine.Engine; -import org.restlet.ext.sip.Address; -import org.restlet.ext.sip.SipClientResource; - -/** - * Example SIP client resource for the UAC test scenario. - * - * @author Jerome Louvel - */ -public class UacClientResource implements UacResource { - - public static void main(String[] args) { - // [ifdef jse] instruction - Engine.setLogLevel(Level.FINE); - UacClientResource cr = new UacClientResource("sip:bob@locahost"); - cr.start(); - sleep(); - cr.acknowledge(); - sleep(); - cr.stop(); - } - - /** The internal client resource. */ - private SipClientResource clientResource; - - /** The internal client resource proxy. */ - private UacResource proxy; - - /** - * Constructor. - * - * @param uri - * Target resource URI. - */ - public UacClientResource(String uri) { - this.clientResource = new SipClientResource(uri); - this.clientResource.setCallId("a84b4c76e66710@pc33.atlanta.com"); - this.clientResource.setCommandSequence("314159"); - this.clientResource.setFrom(new Address("sip:alice@atlanta.com", - "Alice")); - this.clientResource.setTo(new Address("sip:bob@biloxi.com", "Bob")); - - Client client = new Client(new Context(), Protocol.SIP); - client.getContext().getParameters().add("minThreads", "1"); - client.getContext().getParameters().add("tracing", "true"); - client.getContext().getParameters().add("proxyHost", "localhost"); - client.getContext().getParameters().add("proxyPort", "5060"); - this.clientResource.setNext(client); - this.proxy = this.clientResource.wrap(UacResource.class); - } - - public void acknowledge() { - this.proxy.acknowledge(); - System.out.println("acknowledge\n"); - try { - if (this.clientResource.getResponseEntity() != null) { - this.clientResource.getResponseEntity().exhaust(); - } - } catch (Exception e) { - System.out.println("acknowledge " + e.getMessage()); - } - } - - /** - * Makes the current thread sleep. - */ - private static void sleep() { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - public void start() { - this.proxy.start(); - System.out.println("start\n"); - try { - if (this.clientResource.getResponseEntity() != null) { - this.clientResource.getResponseEntity().exhaust(); - } - } catch (Exception e) { - System.out.println("start " + e.getMessage()); - e.printStackTrace(); - } - } - - public void stop() { - this.proxy.stop(); - System.out.println("stop\n"); - try { - if (this.clientResource.getResponseEntity() != null) { - this.clientResource.getResponseEntity().exhaust(); - } - } catch (Exception e) { - System.out.println("stop " + e.getMessage()); - e.printStackTrace(); - } - } - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacResource.java deleted file mode 100644 index 9692cb9393..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacResource.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.ext.sip; - -import org.restlet.ext.sip.Ack; -import org.restlet.ext.sip.Bye; -import org.restlet.ext.sip.Invite; - -/** - * Example SIP resource for the UAC test scenario. - * - * @author Jerome Louvel - */ -public interface UacResource { - - @Ack - public abstract void acknowledge(); - - @Invite - public abstract void start(); - - @Bye - public abstract void stop(); - -} diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacServerResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacServerResource.java deleted file mode 100644 index 901be79a87..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacServerResource.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.example.ext.sip; - -import java.io.InputStream; -import java.util.Map; -import java.util.Properties; -import java.util.concurrent.atomic.AtomicLong; -import java.util.logging.Level; - -import org.restlet.Context; -import org.restlet.Server; -import org.restlet.data.Protocol; -import org.restlet.engine.Engine; -import org.restlet.ext.sip.SipResponse; -import org.restlet.ext.sip.SipServerResource; -import org.restlet.ext.sip.SipStatus; - -/** - * Example SIP server resource for the UAC test scenario. - * - * @author Jerome Louvel - */ -public class UacServerResource extends SipServerResource implements UacResource { - - private static long SLEEP_TIME; - - private static boolean TRACE; - - public static void main(String[] args) throws Exception { - // [ifdef jse] instruction - Engine.setLogLevel(Level.FINE); - Server server = null; - - if (args.length == 1) { - server = new Server(new Context(), Protocol.SIP, - Integer.parseInt(args[0]), UacServerResource.class); - } else { - server = new Server(new Context(), Protocol.SIP, - UacServerResource.class); - } - - ClassLoader cl = UacServerResource.class.getClassLoader(); - InputStream is = cl.getResourceAsStream("UacServerResource.properties"); - - if (is == null) { - is = cl.getResourceAsStream("org/restlet/example/ext/sip/UacServerResource.properties"); - } - - if (is != null) { - Properties p = new Properties(); - p.load(is); - - for (Map.Entry entry : p.entrySet()) { - server.getContext() - .getParameters() - .add((String) entry.getKey(), (String) entry.getValue()); - } - - // Sets the sleep time of this resource - String str = p.getProperty("sleepTime", "100"); - - try { - SLEEP_TIME = Integer.parseInt(str); - } catch (Throwable e) { - } - - str = p.getProperty("trace", "false"); - - try { - TRACE = Boolean.parseBoolean(str); - } catch (Throwable e) { - } - } - - server.start(); - } - - private static AtomicLong TAG = new AtomicLong(1000); - - public void acknowledge() { - trace(); - } - - /** - * Makes the current thread sleep. - */ - private void sleep() { - try { - Thread.sleep(SLEEP_TIME); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - public void start() { - trace(); - - // Indicate successful reception - SipResponse provisionalResponse = new SipResponse(getRequest()); - provisionalResponse.setStatus(SipStatus.INFO_TRYING); - provisionalResponse.commit(); - - sleep(); - - // Indicate that the user phone is ringing - provisionalResponse = new SipResponse(getRequest()); - provisionalResponse.setStatus(SipStatus.INFO_RINGING); - provisionalResponse.commit(); - - sleep(); - - // Indicate that the session is progressing - provisionalResponse = new SipResponse(getRequest()); - provisionalResponse.setStatus(SipStatus.INFO_SESSION_PROGRESS); - provisionalResponse.commit(); - - sleep(); - if (getTo() != null) { - getTo().getParameters().add("tag", - "restlet" + TAG.incrementAndGet()); - } - - // Send a first final response - provisionalResponse = new SipResponse(getRequest()); - provisionalResponse.setStatus(SipStatus.SUCCESS_OK); - provisionalResponse.commit(); - - sleep(); - - // Set the final response - setStatus(SipStatus.SUCCESS_OK); - } - - public void stop() { - trace(); - setStatus(SipStatus.SUCCESS_OK); - } - - /** - * Displays info about the current request. - */ - private void trace() { - if (TRACE) { - System.out.println("--------------start trace--------------------"); - System.out.println("Method: " + getMethod()); - System.out.println("Call ID: " + getCallId()); - System.out.println("Call Sequence: " + getCommandSequence()); - System.out.println("To: " + getTo()); - System.out.println("From: " + getFrom()); - System.out.println("Max Forwards: " + getMaxForwards()); - System.out.println("---------------------------------------------"); - } - } -} diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacServerResource.properties b/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacServerResource.properties deleted file mode 100644 index 045509061c..0000000000 --- a/modules/org.restlet.example/src/org/restlet/example/ext/sip/UacServerResource.properties +++ /dev/null @@ -1,4 +0,0 @@ -sleepTime: 100 -trace: true -minThreads: 1 -tracing: false diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/BaseResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/BaseResource.java index 01c49fc60f..7924d6d46b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/BaseResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/BaseResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceApplication.java b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceApplication.java index 3658e9d401..4b219300ce 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -60,7 +51,7 @@ public synchronized Restlet createInboundRoot() { // Defines a route for the resource "list of items" router.attach("/items", ItemsResource.class); // Defines a route for the resource "item" - //router.attach("/items/{itemName}", ItemResource.class); + // router.attach("/items/{itemName}", ItemResource.class); return router; } diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceClientMain.java b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceClientMain.java index 093e948e7f..8b1fd9f82e 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceClientMain.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceClientMain.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceServerMain.java b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceServerMain.java index 42e66f5e76..d2efe9bc6b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceServerMain.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/FirstResourceServerMain.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/Item.java b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/Item.java index b5331f3570..5c5cf3b335 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/Item.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/Item.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/ItemResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/ItemResource.java index bc99435815..84393aae07 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/ItemResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/ItemResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/ItemsResource.java b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/ItemsResource.java index 47e09c1001..79b0cc9df6 100644 --- a/modules/org.restlet.example/src/org/restlet/example/ext/wadl/ItemsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/ext/wadl/ItemsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/firstResource/BaseResource.java b/modules/org.restlet.example/src/org/restlet/example/firstResource/BaseResource.java index 90da4693f3..c8e0c48dff 100644 --- a/modules/org.restlet.example/src/org/restlet/example/firstResource/BaseResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/firstResource/BaseResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceApplication.java b/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceApplication.java index be99618e4d..fd191c3e4f 100644 --- a/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceClientMain.java b/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceClientMain.java index bfc12a8f41..d0a26f4178 100644 --- a/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceClientMain.java +++ b/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceClientMain.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceServerMain.java b/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceServerMain.java index c4ec52ed83..572965cd66 100644 --- a/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceServerMain.java +++ b/modules/org.restlet.example/src/org/restlet/example/firstResource/FirstResourceServerMain.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/firstResource/Item.java b/modules/org.restlet.example/src/org/restlet/example/firstResource/Item.java index c3096dd1e9..e697056316 100644 --- a/modules/org.restlet.example/src/org/restlet/example/firstResource/Item.java +++ b/modules/org.restlet.example/src/org/restlet/example/firstResource/Item.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/firstResource/ItemResource.java b/modules/org.restlet.example/src/org/restlet/example/firstResource/ItemResource.java index 3911bb0597..f3ebf95d47 100644 --- a/modules/org.restlet.example/src/org/restlet/example/firstResource/ItemResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/firstResource/ItemResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/firstResource/ItemsResource.java b/modules/org.restlet.example/src/org/restlet/example/firstResource/ItemsResource.java index 5ea51f5343..a4d5f745ec 100644 --- a/modules/org.restlet.example/src/org/restlet/example/firstResource/ItemsResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/firstResource/ItemsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -73,8 +64,8 @@ && getItems().putIfAbsent(itemName, Representation rep = new StringRepresentation("Item created", MediaType.TEXT_PLAIN); // Indicates where is located the new resource. - rep.setLocationRef(getRequest().getResourceRef().getIdentifier() + "/" - + itemName); + rep.setLocationRef(getRequest().getResourceRef().getIdentifier() + + "/" + itemName); result = rep; } else { // Item is already registered. setStatus(Status.CLIENT_ERROR_NOT_FOUND); diff --git a/modules/org.restlet.example/src/org/restlet/example/firstSteps/FirstStepsApplication.java b/modules/org.restlet.example/src/org/restlet/example/firstSteps/FirstStepsApplication.java index c3f21fdc35..abb0173dd3 100644 --- a/modules/org.restlet.example/src/org/restlet/example/firstSteps/FirstStepsApplication.java +++ b/modules/org.restlet.example/src/org/restlet/example/firstSteps/FirstStepsApplication.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/firstSteps/FirstStepsMain.java b/modules/org.restlet.example/src/org/restlet/example/firstSteps/FirstStepsMain.java index df2270121f..faeb51df6a 100644 --- a/modules/org.restlet.example/src/org/restlet/example/firstSteps/FirstStepsMain.java +++ b/modules/org.restlet.example/src/org/restlet/example/firstSteps/FirstStepsMain.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/firstSteps/HelloWorldResource.java b/modules/org.restlet.example/src/org/restlet/example/firstSteps/HelloWorldResource.java index 73189bd31b..f8aaf9abb1 100644 --- a/modules/org.restlet.example/src/org/restlet/example/firstSteps/HelloWorldResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/firstSteps/HelloWorldResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/misc/AwsTest.java b/modules/org.restlet.example/src/org/restlet/example/misc/AwsTest.java index 60f0a126f6..c5d33a5b18 100644 --- a/modules/org.restlet.example/src/org/restlet/example/misc/AwsTest.java +++ b/modules/org.restlet.example/src/org/restlet/example/misc/AwsTest.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/misc/ClapTest.java b/modules/org.restlet.example/src/org/restlet/example/misc/ClapTest.java index 3f3a0c7784..5bbe7fbf5b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/misc/ClapTest.java +++ b/modules/org.restlet.example/src/org/restlet/example/misc/ClapTest.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/misc/HeadersTest.java b/modules/org.restlet.example/src/org/restlet/example/misc/HeadersTest.java index 61addb4c3c..418de48259 100644 --- a/modules/org.restlet.example/src/org/restlet/example/misc/HeadersTest.java +++ b/modules/org.restlet.example/src/org/restlet/example/misc/HeadersTest.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/router/QueryRouter.java b/modules/org.restlet.example/src/org/restlet/example/router/QueryRouter.java new file mode 100644 index 0000000000..1c6f12c6f1 --- /dev/null +++ b/modules/org.restlet.example/src/org/restlet/example/router/QueryRouter.java @@ -0,0 +1,90 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.example.router; + +import java.util.Map.Entry; + +import org.restlet.Context; +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.data.Form; +import org.restlet.routing.Route; +import org.restlet.routing.Router; +import org.restlet.routing.TemplateRoute; +import org.restlet.routing.Variable; + +public class QueryRouter extends Router { + public QueryRouter(Context context) { + super(context); + // Allows you to customize the routing logic. + setRoutingMode(Router.MODE_CUSTOM); + // Allows to calculate the score of all routes without taking into + // account the query part + setDefaultMatchingQuery(false); + } + + /** + * Mix the logic based on URI (except the query part) and the logic based on + * query parameters. + */ + @Override + protected Route getCustom(Request request, Response response) { + Form form = request.getResourceRef().getQueryAsForm(); + + Route result = null; + + float bestScore = 0F; + float score; + + for (Route route : getRoutes()) { + TemplateRoute current = (TemplateRoute) route; + // Logic based on the beginning of the route (i.e. all before the + // query string) + score = current.score(request, response); + if ((score > bestScore)) { + + // Add the logic based on the variables values. + // Check that all the variables values are correct + boolean fit = true; + for (Entry entry : current.getTemplate() + .getVariables().entrySet()) { + String formValue = form.getFirstValue(entry.getKey()); + if (formValue == null + || !formValue.equals(entry.getValue() + .getDefaultValue())) { + fit = false; + break; + } + } + if (fit) { + bestScore = score; + result = current; + } + } + } + + return result; + } +} diff --git a/modules/org.restlet.example/src/org/restlet/example/router/QueryRouterApplication.java b/modules/org.restlet.example/src/org/restlet/example/router/QueryRouterApplication.java new file mode 100644 index 0000000000..60a28ab502 --- /dev/null +++ b/modules/org.restlet.example/src/org/restlet/example/router/QueryRouterApplication.java @@ -0,0 +1,85 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.example.router; + +import java.util.Map; + +import org.restlet.Application; +import org.restlet.Component; +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.Restlet; +import org.restlet.data.MediaType; +import org.restlet.data.Protocol; +import org.restlet.routing.Router; +import org.restlet.routing.TemplateRoute; +import org.restlet.routing.Variable; + +public class QueryRouterApplication extends Application { + public static void main(String[] args) throws Exception { + Component c = new Component(); + c.getServers().add(Protocol.HTTP, 8182); + c.getDefaultHost().attach(new QueryRouterApplication()); + + c.start(); + } + + @Override + public Restlet createInboundRoot() { + Router router = new QueryRouter(getContext()); + // restlet attached to /path?q=hello + Restlet restletHello = new Restlet() { + @Override + public void handle(Request request, Response response) { + response.setEntity("Hello.", MediaType.TEXT_PLAIN); + } + }; + + // restlet attached to /path?q=bye + Restlet restletBye = new Restlet() { + @Override + public void handle(Request request, Response response) { + response.setEntity("Bye", MediaType.TEXT_PLAIN); + } + }; + + // Defines two routes on the same path, but distinct query parameters. + TemplateRoute logonRoute = router.attach("/path", restletHello); + Map logonVariables = logonRoute.getTemplate() + .getVariables(); + // Take care of using the same query parameter names + logonVariables.put("q", new Variable(Variable.TYPE_URI_QUERY, "hello", + true, true)); + + TemplateRoute logoutRoute = router.attach("/path", restletBye); + Map logoutVariables = logoutRoute.getTemplate() + .getVariables(); + // Take care of using the same query parameter names + logoutVariables.put("q", new Variable(Variable.TYPE_URI_QUERY, "bye", + true, true)); + + return router; + } +} diff --git a/modules/org.restlet.example/src/org/restlet/example/router/QueryRouterClient.java b/modules/org.restlet.example/src/org/restlet/example/router/QueryRouterClient.java new file mode 100644 index 0000000000..ed4c0b5d74 --- /dev/null +++ b/modules/org.restlet.example/src/org/restlet/example/router/QueryRouterClient.java @@ -0,0 +1,53 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.example.router; + +import org.restlet.Application; +import org.restlet.data.Status; +import org.restlet.resource.ClientResource; + +public class QueryRouterClient extends Application { + public static void main(String[] args) throws Exception { + ClientResource cr = new ClientResource("http://localhost:8182/path"); + cr.addQueryParameter("q", "hello"); + cr.get().write(System.out); + + cr = new ClientResource("http://localhost:8182/path"); + cr.addQueryParameter("q", "bye"); + cr.get().write(System.out); + + cr = new ClientResource("http://localhost:8182/path"); + cr.addQueryParameter("q", "test"); + try { + cr.get(); + } catch (Exception e) { + if (Status.CLIENT_ERROR_NOT_FOUND.equals(cr.getStatus())) { + System.out.println("fine."); + } else { + System.out.println("Should be 404 not found response."); + } + } + } +} diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Constants.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Constants.java index 9933be24ec..04a1c9cb9f 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Constants.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Constants.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/OrderResource.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/OrderResource.java index 146e8229fb..a85cc545ba 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/OrderResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/OrderResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/OrdersResource.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/OrdersResource.java index eb82972366..bad77ed04b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/OrdersResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/OrdersResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part02a_RetrieveContent.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part02a_RetrieveContent.java index 84bd978362..dedbe85999 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part02a_RetrieveContent.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part02a_RetrieveContent.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part02b_RetrieveContent.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part02b_RetrieveContent.java index a4475c995c..df68b562a4 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part02b_RetrieveContent.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part02b_RetrieveContent.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part03_ListenToBrowsers.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part03_ListenToBrowsers.java index 2b82d5fcfc..8391d54248 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part03_ListenToBrowsers.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part03_ListenToBrowsers.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part05_RestletComponents.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part05_RestletComponents.java index 6f7c728747..2572239c8b 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part05_RestletComponents.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part05_RestletComponents.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -51,7 +42,8 @@ public static void main(String[] args) throws Exception { component.getServers().add(Protocol.HTTP, 8111); // Then attach it to the local host - component.getDefaultHost().attach("/trace", Part05_RestletComponents.class); + component.getDefaultHost().attach("/trace", + Part05_RestletComponents.class); // Now, let's start the component! // Note that the HTTP server connector is also automatically started. diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part06_ServeStaticFiles.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part06_ServeStaticFiles.java index 87069484b8..d6423c31a3 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part06_ServeStaticFiles.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part06_ServeStaticFiles.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part09a_GuardAccess.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part09a_GuardAccess.java index ccbb2bb045..060904a443 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part09a_GuardAccess.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part09a_GuardAccess.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part09b_AuthenticateClient.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part09b_AuthenticateClient.java index 2a1bcb620d..db897ae2c3 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part09b_AuthenticateClient.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part09b_AuthenticateClient.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part10.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part10.java index 78926b810a..dd08b38720 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part10.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part10.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part11_Routing.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part11_Routing.java index 4d6ffe10b0..c98e989295 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part11_Routing.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part11_Routing.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part12_ServerResources.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part12_ServerResources.java index 4843f670d4..c06a064299 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/Part12_ServerResources.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/Part12_ServerResources.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.example/src/org/restlet/example/tutorial/UserResource.java b/modules/org.restlet.example/src/org/restlet/example/tutorial/UserResource.java index 48a19a1558..e65c10f4f9 100644 --- a/modules/org.restlet.example/src/org/restlet/example/tutorial/UserResource.java +++ b/modules/org.restlet.example/src/org/restlet/example/tutorial/UserResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * diff --git a/modules/org.restlet.ext.apispark/.classpath b/modules/org.restlet.ext.apispark/.classpath index 088c134245..e0ed501bc2 100644 --- a/modules/org.restlet.ext.apispark/.classpath +++ b/modules/org.restlet.ext.apispark/.classpath @@ -6,5 +6,10 @@ + + + + + diff --git a/modules/org.restlet.ext.apispark/module.xml b/modules/org.restlet.ext.apispark/module.xml index 7528a58781..5b34c3f517 100644 --- a/modules/org.restlet.ext.apispark/module.xml +++ b/modules/org.restlet.ext.apispark/module.xml @@ -1,4 +1,4 @@ - + Restlet Extension - APISpark Integration with APISpark cloud platform, by Restlet. @@ -6,10 +6,15 @@ - + + + + + + - \ No newline at end of file + diff --git a/modules/org.restlet.ext.apispark/src/META-INF/services/org.restlet.ext.apispark.internal.introspection.IntrospectionHelper b/modules/org.restlet.ext.apispark/src/META-INF/services/org.restlet.ext.apispark.internal.introspection.IntrospectionHelper new file mode 100644 index 0000000000..9225ea7760 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/META-INF/services/org.restlet.ext.apispark.internal.introspection.IntrospectionHelper @@ -0,0 +1 @@ +org.restlet.ext.apispark.internal.introspection.helper.SwaggerAnnotationIntrospectionHelper diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/ApiSparkService.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/ApiSparkService.java new file mode 100644 index 0000000000..7d71737e29 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/ApiSparkService.java @@ -0,0 +1,603 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark; + +import org.restlet.Context; +import org.restlet.engine.application.Encoder; +import org.restlet.engine.util.StringUtils; +import org.restlet.ext.apispark.internal.ApiSparkConfig; +import org.restlet.ext.apispark.internal.ApiSparkFilter; +import org.restlet.ext.apispark.internal.agent.AgentConfigurationTimerTask; +import org.restlet.ext.apispark.internal.firewall.rule.FirewallRule; +import org.restlet.routing.Filter; +import org.restlet.service.EncoderService; +import org.restlet.service.Service; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; +import java.util.Timer; +import java.util.TimerTask; +import java.util.concurrent.TimeUnit; +import java.util.logging.Logger; + +/** + * Configures a proxy for your own application and provides some services hosted + * by the APISpark platform such as analytics, security. + * + * The service could be configured by a property file with the + * {@link #loadConfiguration()} method. + * + * @author Cyprien Quilici + * @author Manuel Boillod + */ +public class ApiSparkService extends Service { + + /** Internal logger. */ + protected static Logger LOGGER = Logger.getLogger(ApiSparkService.class + .getName()); + + /** The URL of the remote service used by default. */ + public static final String DEFAULT_AGENT_SERVICE_URL = "https://apispark.restlet.com"; + + /** The system property key for agent configuration file. */ + public static final String CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY = "apiSparkServiceConfig"; + + /** The filter performing the services */ + private ApiSparkFilter apiSparkFilter; + + /** Indicates if the APISpark agent is enabled.*/ + private boolean agentEnabled; + + /** The password used to connect to the APISpark platform. */ + private char[] agentPassword; + + /** The url of the APISpark service. */ + private String agentServiceUrl = DEFAULT_AGENT_SERVICE_URL; + + /** + * The maximum size of the stored analytics. When this threshold is + * exceeded, an asynchronous task is triggered to send them to the APISpark + * service. + */ + private int agentAnalyticsBufferSize = 100; + + /** + * The period in seconds of the timer triggering the asynchronous post + * of analytics to the APISpark service. + */ + private long agentAnalyticsPostPeriodInSecond = 60; + + /** The timer that triggers agent re-configuration */ + private Timer agentRefreshTimer; + + /** Agent refresh period in seconds */ + private long agentRefreshPeriodInSecond = TimeUnit.MINUTES.toSeconds(15); + + /** The login used to connect to the APISpark platform. */ + private String agentLogin; + + /** + * The identifier of the cell configured on the APISpark platform for your + * application. + */ + private Integer agentCellId; + + /** + * The identifier of the cell version configured on the APISpark platform + * for your application. + */ + private Integer agentCellVersion; + + /** + * The list of associated + * {@link org.restlet.ext.apispark.internal.firewall.rule.FirewallRule}. + */ + private List firewallRules = new ArrayList<>(); + + /** + * Indicates if the firewall is enabled. Add firewall rules with + * {@link #firewallConfig}. + */ + private boolean firewallEnabled; + + /** + * Firewall configuration + */ + private FirewallConfig firewallConfig = new FirewallConfig(firewallRules); + + /** + * Indicates if the request redirection is enabled. If true, the + * {@link #reverseProxyTargetUrl} should be set. + */ + private boolean reverseProxyEnabled; + + /** + * The redirection URL. Used if {@link #reverseProxyEnabled} is true. + */ + private String reverseProxyTargetUrl; + + /** + * Default constructor. + */ + public ApiSparkService() { + super(true); + } + + /** + * Constructor using the default APISpark service url. + * + * @param agentLogin + * The login used to connect to the APISpark platform. + * @param agentPassword + * The password used to connect to the APISpark platform. + * @param agentCellId + * The identifier of the cell configured on the APISpark platform + * for your application. + * @param agentCellVersion + * The identifier of the cell version configured on the APISpark + * platform for your application. + * @param reverseProxyEnabled + * Indicates if the request redirection is enabled. + * @param reverseProxyTargetUrl + * The redirection URL. + */ + public ApiSparkService(String agentLogin, char[] agentPassword, + Integer agentCellId, Integer agentCellVersion, + boolean reverseProxyEnabled, String reverseProxyTargetUrl) { + this(DEFAULT_AGENT_SERVICE_URL, agentLogin, agentPassword, agentCellId, + agentCellVersion, reverseProxyEnabled, reverseProxyTargetUrl); + } + + /** + * Constructor. + * + * @param agentServiceUrl + * The url of the APISpark service. + * @param agentLogin + * The login used to connect to the APISpark platform. + * @param agentPassword + * The password used to connect to the APISpark platform. + * @param agentCellId + * The identifier of the cell configured on the APISpark platform + * for your application. + * @param agentCellVersion + * The identifier of the cell version configured on the APISpark + * platform for your application. + * @param reverseProxyEnabled + * Indicates if the request redirection is enabled. + * @param reverseProxyTargetUrl + * The redirection URL. + */ + public ApiSparkService(String agentServiceUrl, String agentLogin, + char[] agentPassword, Integer agentCellId, + Integer agentCellVersion, boolean reverseProxyEnabled, + String reverseProxyTargetUrl) { + super(true); + this.agentPassword = agentPassword; + this.agentServiceUrl = agentServiceUrl; + this.agentLogin = agentLogin; + this.agentCellId = agentCellId; + this.agentCellVersion = agentCellVersion; + this.reverseProxyEnabled = reverseProxyEnabled; + this.reverseProxyTargetUrl = reverseProxyTargetUrl; + } + + @Override + public Filter createInboundFilter(Context context) { + ApiSparkConfig apiSparkConfig = new ApiSparkConfig(); + apiSparkConfig.setAgentCellId(agentCellId); + apiSparkConfig.setAgentCellVersion(agentCellVersion); + apiSparkConfig.setAgentServiceUrl(agentServiceUrl); + apiSparkConfig.setAgentLogin(agentLogin); + apiSparkConfig.setAgentPassword(agentPassword); + apiSparkConfig.setReverseProxyEnabled(reverseProxyEnabled); + apiSparkConfig.setReverseProxyTargetUrl(reverseProxyTargetUrl); + apiSparkConfig.setAgentAnalyticsBufferSize(agentAnalyticsBufferSize); + apiSparkConfig.setAgentAnalyticsPostPeriodInSecond(agentAnalyticsPostPeriodInSecond); + + apiSparkFilter = new ApiSparkFilter(context, apiSparkConfig, + agentEnabled, firewallEnabled, firewallRules); + + if (agentEnabled && agentRefreshPeriodInSecond > 0) { + TimerTask task = new AgentConfigurationTimerTask(apiSparkFilter); + agentRefreshTimer = new Timer(true); + long agentRefreshPeriodInMs = TimeUnit.SECONDS.toMillis(agentRefreshPeriodInSecond); + agentRefreshTimer.scheduleAtFixedRate(task, agentRefreshPeriodInMs, + agentRefreshPeriodInMs); + LOGGER.info("Setting agent refresh timer every " + + TimeUnit.SECONDS.toMinutes(agentRefreshPeriodInSecond) + + " minutes"); + } + + return apiSparkFilter; + } + + @Override + public Filter createOutboundFilter(Context context) { + Encoder encoder = new Encoder(context, true, false, + new EncoderService()); + return encoder; + } + + /** + * Returns the agent Analytics module buffer size. + * + * @return The agent Analytics module buffer size. + */ + public int getAgentAnalyticsBufferSize() { + return agentAnalyticsBufferSize; + } + + /** + * Returns the agent Analytics module post period. + * + * @return The agent Analytics module post period. + */ + public long getAgentAnalyticsPostPeriodInSecond() { + return agentAnalyticsPostPeriodInSecond; + } + + /** + * Returns the password used to connect to the APISpark platform. + * + * @return The password used to connect to the APISpark platform. + */ + public String getAgentPassword() { + return new String(agentPassword); + } + + /** + * Returns the url of the APISpark service. + * + * @return The url of the APISpark service. + */ + public String getAgentServiceUrl() { + return agentServiceUrl; + } + + /** + * Returns the agent refresh period in seconds + * + * @return The agent refresh period in seconds + */ + public long getAgentRefreshPeriodInSecond() { + return agentRefreshPeriodInSecond; + } + + /** + * Returns the login used to connect to the APISpark platform. + * + * @return The login used to connect to the APISpark platform. + */ + public String getAgentLogin() { + return agentLogin; + } + + /** + * Returns the identifier of the cell configured on the APISpark platform + * for your application. + * + * @return The identifier of the cell configured on the APISpark platform + * for your application. + */ + public Integer getAgentCellId() { + return agentCellId; + } + + /** + * Returns the identifier of the cell version configured on the APISpark + * platform for your application. + * + * @return The identifier of the cell version configured on the APISpark + * platform for your application. + */ + public Integer getAgentCellVersion() { + return agentCellVersion; + } + + public FirewallConfig getFirewallConfig() { + return firewallConfig; + } + + /** + * Returns the redirection URL. Used if {@link #isReverseProxyEnabled()} + * returns true. + * + * @return The redirection URL. + */ + public String getReverseProxyTargetUrl() { + return reverseProxyTargetUrl; + } + + /** + * Indicates if the APISpark agent is enabled. + * + * @return True if the APISpark agent is enabled. + */ + public boolean isAgentEnabled() { + return agentEnabled; + } + + /** + * Indicates if the firewall is enabled. Add firewall rules with + * {@link #firewallConfig}. + * + * @return True if the firewall is enabled. + */ + public boolean isFirewallEnabled() { + return firewallEnabled; + } + + /** + * Indicates if the request redirection is enabled. If true, the redirection + * URL should be set with {@link #setReverseProxyTargetUrl(String)}. + * + * @return True if the request redirection is enabled. + */ + public boolean isReverseProxyEnabled() { + return reverseProxyEnabled; + } + + /** + * Load the agent configuration from the file set by the system property + * 'apiSparkServiceConfig'. + * + * @see #CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY + */ + public void loadConfiguration() { + String configurationFile = System + .getProperty(CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY); + if (configurationFile == null) { + throw new IllegalArgumentException( + "Agent configuration file is not set. " + + "Use system property '" + + CONFIGURATION_FILE_SYSTEM_PROPERTY_KEY + + "' to define it."); + } + + loadConfiguration(new File(configurationFile)); + } + + /** + * Load the agent configuration from the file. + * + * @param configurationFile + * The configuration file. + */ + public void loadConfiguration(File configurationFile) { + if (configurationFile == null) { + throw new IllegalArgumentException( + "APISpark configuration file is null."); + } + if (!configurationFile.exists()) { + throw new IllegalArgumentException( + "APISpark configuration file does not exist: " + + configurationFile.getAbsolutePath()); + } + try { + loadConfiguration(new FileInputStream(configurationFile)); + } catch (FileNotFoundException e) { + throw new IllegalArgumentException( + "APISpark configuration file error. See exception for details.", + e); + } + } + + /** + * Load the agent configuration from the input stream. + * + * @param inputStream + * The input stream of the configuration file. + */ + public void loadConfiguration(InputStream inputStream) { + Properties properties = new Properties(); + try { + properties.load(inputStream); + } catch (IOException e) { + throw new IllegalArgumentException( + "APISpark configuration file error. See exception for details.", + e); + } + this.agentServiceUrl = properties.getProperty("agent.serviceUrl", + DEFAULT_AGENT_SERVICE_URL); + this.agentLogin = properties.getProperty("agent.login"); + this.agentPassword = getRequiredProperty(properties, "agent.password") + .toCharArray(); + this.agentCellId = getRequiredIntegerProperty(properties, + "agent.cellId"); + this.agentCellVersion = getRequiredIntegerProperty(properties, + "agent.cellVersion"); + this.reverseProxyEnabled = Boolean.valueOf(getRequiredProperty( + properties, "reverseProxy.enabled")); + if (this.reverseProxyEnabled) { + this.reverseProxyTargetUrl = getRequiredProperty(properties, + "reverseProxy.targetUrl"); + } + } + + private String getRequiredProperty(Properties properties, String key) { + String value = properties.getProperty(key); + if (StringUtils.isNullOrEmpty(value)) { + throw new IllegalArgumentException( + "APISpark configuration file error. The property '" + key + + "' is required"); + } + return value; + } + + private Integer getRequiredIntegerProperty(Properties properties, String key) { + String value = getRequiredProperty(properties, key); + try { + return Integer.valueOf(value); + } catch (NumberFormatException e) { + throw new IllegalArgumentException( + "APISpark configuration file error. The property '" + key + + "' should be a number", e); + } + } + + /** + * Sets the agent Analytics module buffer size. + * + * @param agentAnalyticsBufferSize + * The agent Analytics module buffer size. + */ + public void setAgentAnalyticsBufferSize(int agentAnalyticsBufferSize) { + this.agentAnalyticsBufferSize = agentAnalyticsBufferSize; + } + + /** + * Sets the agent Analytics module post period. + * + * @param agentAnalyticsPostPeriodInSecond + * The agent Analytics module post period. + */ + public void setAgentAnalyticsPostPeriodInSecond(long agentAnalyticsPostPeriodInSecond) { + this.agentAnalyticsPostPeriodInSecond = agentAnalyticsPostPeriodInSecond; + } + + /** + * Sets the password used to connect to the APISpark platform. + * + * @param agentPassword + * The password used to connect to the APISpark platform. + */ + public void setAgentPassword(String agentPassword) { + this.agentPassword = agentPassword != null ? agentPassword + .toCharArray() : null; + } + + /** + * Sets the url of the APISpark agent service. + * + * @param agentServiceUrl + * The url of the APISpark agent service. + */ + public void setAgentServiceUrl(String agentServiceUrl) { + this.agentServiceUrl = agentServiceUrl; + } + + /** + * Sets the agent refresh period + * + * @param agentRefreshPeriodInSecond + * The agent refresh period in seconds + * + */ + public void setAgentRefreshPeriodInSecond(long agentRefreshPeriodInSecond) { + this.agentRefreshPeriodInSecond = agentRefreshPeriodInSecond; + } + + /** + * Sets the login used to connect to the APISpark platform. + * + * @param agentLogin + * The login used to connect to the APISpark platform. + */ + public void setAgentLogin(String agentLogin) { + this.agentLogin = agentLogin; + } + + /** + * Sets the identifier of the cell configured on the APISpark platform for + * your application. + * + * @param agentCellId + * The identifier of the cell configured on the APISpark platform + * for your application. + */ + public void setAgentCellId(Integer agentCellId) { + this.agentCellId = agentCellId; + } + + /** + * Sets the identifier of the cell version configured on the APISpark + * platform for your application. + * + * @param agentCellVersion + * The version of the cell configured on the APISpark platform + * for your application. + */ + public void setAgentCellVersion(Integer agentCellVersion) { + this.agentCellVersion = agentCellVersion; + } + + /** + * Indicates if the APISpark agent is enabled. + * + * @param agentEnabled + * True if the APISpark agent is enabled. + */ + public void setAgentEnabled(boolean agentEnabled) { + this.agentEnabled = agentEnabled; + } + + /** + * Indicates if the firewall is enabled. + * + * @param firewallEnabled + * True if the firewall is enabled. + */ + public void setFirewallEnabled(boolean firewallEnabled) { + this.firewallEnabled = firewallEnabled; + } + + /** + * Indicates if the reverse proxy is enabled. If true, the target URL should + * be set with {@link #setReverseProxyTargetUrl(String)}. + * + * @param reverseProxyEnabled + * True if the reverse proxy is enabled. + */ + public void setReverseProxyEnabled(boolean reverseProxyEnabled) { + this.reverseProxyEnabled = reverseProxyEnabled; + } + + /** + * Set the target URL of the reverse proxy. Used if + * {@link #isReverseProxyEnabled()} is true. + * + * @param reverseProxyTargetUrl + * The target URL. + */ + public void setReverseProxyTargetUrl(String reverseProxyTargetUrl) { + this.reverseProxyTargetUrl = reverseProxyTargetUrl; + } + + /** Stops the service and its timer */ + @Override + public synchronized void stop() throws Exception { + super.stop(); + if (agentRefreshTimer != null) { + agentRefreshTimer.cancel(); + } + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/FirewallConfig.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/FirewallConfig.java new file mode 100644 index 0000000000..f515089e34 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/FirewallConfig.java @@ -0,0 +1,235 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark; + +import org.restlet.ext.apispark.internal.firewall.handler.BlockingHandler; +import org.restlet.ext.apispark.internal.firewall.handler.policy.RoleLimitPolicy; +import org.restlet.ext.apispark.internal.firewall.handler.policy.UniqueLimitPolicy; +import org.restlet.ext.apispark.internal.firewall.rule.ConcurrentFirewallCounterRule; +import org.restlet.ext.apispark.internal.firewall.rule.FirewallCounterRule; +import org.restlet.ext.apispark.internal.firewall.rule.FirewallIpFilteringRule; +import org.restlet.ext.apispark.internal.firewall.rule.FirewallRule; +import org.restlet.ext.apispark.internal.firewall.rule.PeriodicFirewallCounterRule; +import org.restlet.ext.apispark.internal.firewall.rule.policy.HostDomainCountingPolicy; +import org.restlet.ext.apispark.internal.firewall.rule.policy.IpAddressCountingPolicy; +import org.restlet.ext.apispark.internal.firewall.rule.policy.UserCountingPolicy; +import org.restlet.security.Role; +import org.restlet.security.User; + +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * Configuration methods for the Firewall. + * + * @author Guillaume Blondeau + */ +public class FirewallConfig { + + /** The list of associated {@link FirewallRule}. */ + private List rules; + + /** + * Private Constructor. + */ + @SuppressWarnings("unchecked") + public FirewallConfig(List rules) { + // does not expose in Javadoc FirewallRule + this.rules = (List) rules; + } + + + /** + * Adds a rule to the firewall. + * + * @param rule + * The rule to add. + */ + private void add(FirewallRule rule) { + rules.add(rule); + } + + /** + * Adds a rule that limits the number of concurrent requests by request's + * host domain. + * + * @param limit + * The maximum number of requests allowed by host domain at the + * same time. + */ + public void addHostDomainConcurrencyCounter(int limit) { + FirewallCounterRule rule = new ConcurrentFirewallCounterRule( + new HostDomainCountingPolicy()); + rule.addHandler(new BlockingHandler(new UniqueLimitPolicy(limit))); + add(rule); + } + + /** + * Adds a rule that limits the number of requests for a given period of time + * by request's host domain. + * + * @param period + * The period of time. + * @param periodUnit + * Period time unit associated to the rule. + * @param limit + * The maximum number of requests allowed by host domain for the + * given period of time. + */ + public void addHostDomainPeriodicCounter(int period, TimeUnit periodUnit, + int limit) { + FirewallCounterRule rule = new PeriodicFirewallCounterRule(period, + periodUnit, new HostDomainCountingPolicy()); + rule.addHandler(new BlockingHandler(new UniqueLimitPolicy(limit))); + } + + /** + * Adds a rule that forbids access to the given set of IP addresses. + * + * @param blackList + * The list of rejected IP addresses. + */ + public void addIpAddressesBlackList(List blackList) { + add(new FirewallIpFilteringRule(blackList, false)); + } + + /** + * Adds a rule that restricts access according to the IP address of the + * request's client. A unique limit is applied for all IP addresses. + * + * @param limit + * The maximum number of accepted concurrent requests. + */ + public void addIpAddressesConcurrencyCounter(int limit) { + FirewallCounterRule rule = new ConcurrentFirewallCounterRule( + new IpAddressCountingPolicy()); + rule.addHandler(new BlockingHandler(new UniqueLimitPolicy(limit))); + add(rule); + } + + /** + * Adds a rule that restricts access by period of time according to the IP + * address of the request's client. A unique limit is applied for all IP + * addresses. + * + * @param period + * The period of time. + * @param periodUnit + * Period time unit associated to the rule. + * @param limit + * The maximum number of accepted requests for a period of time. + */ + public void addIpAddressesPeriodicCounter(int period, TimeUnit periodUnit, + int limit) { + FirewallCounterRule rule = new PeriodicFirewallCounterRule(period, + periodUnit, new IpAddressCountingPolicy()); + rule.addHandler(new BlockingHandler(new UniqueLimitPolicy(limit))); + add(rule); + } + + /** + * Adds a rule that restricts access to the given set of IP addresses. + * + * @param whiteList + * The list of accepted IP addresses. + */ + public void addIpAddressesWhiteList(List whiteList) { + add(new FirewallIpFilteringRule(whiteList, true)); + } + + /** + * Adds a rule that restricts access according to the {@link Role} of the + * current authenticated {@link User}. Each role is defined a limit in terms + * of concurrent requests, in any other case the access is forbidden. + * + * @param limitsPerRole + * The limit assigned per role's name. + */ + public void addRolesConcurrencyCounter(Map limitsPerRole) { + addRolesConcurrencyCounter(limitsPerRole, 0); + } + + /** + * Adds a rule that restricts access according to the {@link Role} of the + * current authenticated {@link User}. Each role is defined a limit in terms + * of concurrent requests, in any other case a default limit is applied. + * + * @param limitsPerRole + * The limit assigned per role's name. + * @param defaultLimit + * The limit assigned for any other roles, or for user without + * assigned role. + */ + public void addRolesConcurrencyCounter(Map limitsPerRole, + int defaultLimit) { + FirewallCounterRule rule = new ConcurrentFirewallCounterRule( + new UserCountingPolicy()); + rule.addHandler(new BlockingHandler(new RoleLimitPolicy(limitsPerRole, + defaultLimit))); + add(rule); + } + + /** + * Adds a rule that restricts access according to the {@link Role} of the + * current authenticated {@link User}. Each role is defined a limit in terms + * of requests by period of time, in any other case the access is forbidden. + * + * @param period + * The period of time. + * @param periodUnit + * Period time unit associated to the rule. + * @param limitsPerRole + * The limit assigned per role's name. + */ + public void addRolesPeriodicCounter(int period, TimeUnit periodUnit, + Map limitsPerRole) { + addRolesPeriodicCounter(period, periodUnit, limitsPerRole, 0); + } + + /** + * Adds a rule that restricts access according to the {@link Role} of the + * current authenticated {@link User}. Each role is defined a limit in terms + * of concurrent requests, in any other case a default limit is applied. + * + * @param period + * The period of time. + * @param periodUnit + * Period time unit associated to the rule. + * @param limitsPerRole + * The limit assigned per role's name. + * @param defaultLimit + * The limit assigned for any other roles, or for user without + * assigned role. + */ + public void addRolesPeriodicCounter(int period, TimeUnit periodUnit, + Map limitsPerRole, int defaultLimit) { + FirewallCounterRule rule = new PeriodicFirewallCounterRule(period, + periodUnit, new UserCountingPolicy()); + rule.addHandler(new BlockingHandler(new RoleLimitPolicy(limitsPerRole, + defaultLimit))); + add(rule); + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/Introspector.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/Introspector.java index 9e7d09b7f1..09722fbfec 100644 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/Introspector.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/Introspector.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -33,9 +24,8 @@ package org.restlet.ext.apispark; -import java.io.PrintStream; -import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.logging.Level; import java.util.logging.LogRecord; @@ -43,221 +33,57 @@ import org.restlet.Application; import org.restlet.Component; -import org.restlet.Request; -import org.restlet.Restlet; -import org.restlet.data.Protocol; import org.restlet.data.Reference; import org.restlet.engine.Engine; -import org.restlet.ext.apispark.internal.conversion.IntrospectionConverter; -import org.restlet.ext.apispark.internal.conversion.SwaggerConversionException; -import org.restlet.ext.apispark.internal.conversion.SwaggerUtils; -import org.restlet.ext.apispark.internal.info.ApplicationInfo; -import org.restlet.ext.apispark.internal.info.DocumentationInfo; -import org.restlet.ext.apispark.internal.info.ResourceInfo; +import org.restlet.engine.util.StringUtils; +import org.restlet.ext.apispark.internal.conversion.TranslationException; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.SwaggerUtils; +import org.restlet.ext.apispark.internal.introspection.application.ApplicationIntrospector; +import org.restlet.ext.apispark.internal.introspection.application.ComponentIntrospector; +import org.restlet.ext.apispark.internal.introspection.jaxrs.JaxRsIntrospector; import org.restlet.ext.apispark.internal.model.Definition; +import org.restlet.ext.apispark.internal.utils.CliUtils; import org.restlet.ext.apispark.internal.utils.IntrospectionUtils; -import org.restlet.resource.Directory; -import org.restlet.resource.Finder; -import org.restlet.resource.ServerResource; -import org.restlet.routing.Filter; -import org.restlet.routing.Route; -import org.restlet.routing.Router; -import org.restlet.routing.TemplateRoute; -import org.restlet.routing.VirtualHost; /** - * Publish the documentation of a Restlet-based Application to the APISpark - * console. + * Generates the Web API documentation of a Restlet based {@link Application} + * and imports it into the APISpark console. * * @author Thierry Boileau */ -public class Introspector extends IntrospectionUtils { +public class Introspector { /** Internal logger. */ - protected static Logger LOGGER = Logger.getLogger(Introspector.class - .getName()); - - /** - * Returns an instance of what must be a subclass of {@link Application}. - * Returns null in case of errors. - * - * @param className - * The name of the application class. - * @return An instance of what must be a subclass of {@link Application}. - */ - private static Application getApplication(String className) { - Application result = null; - - if (className == null) { - return result; - } + private static Logger LOGGER = Engine.getLogger(Introspector.class); - Class clazz = null; - try { - clazz = Class.forName(className); - if (Application.class.isAssignableFrom(clazz)) { - result = (Application) clazz.getConstructor().newInstance(); - } else { - LOGGER.log(Level.SEVERE, className - + " does not seem to be a valid subclass of " - + Application.class.getName() + " class."); - } - } catch (ClassNotFoundException e) { - LOGGER.log(Level.SEVERE, "Cannot locate the definition source.", e); - } catch (InstantiationException e) { - LOGGER.log(Level.SEVERE, - "Cannot instantiate the application class.", e); - } catch (IllegalAccessException e) { - LOGGER.log(Level.SEVERE, - "Cannot instantiate the application class.", e); - } catch (IllegalArgumentException e) { - LOGGER.log( - Level.SEVERE, - "Check that the application class has an empty constructor.", - e); - } catch (InvocationTargetException e) { - LOGGER.log(Level.SEVERE, - "Cannot instantiate the application class.", e); - } catch (NoSuchMethodException e) { - LOGGER.log( - Level.SEVERE, - "Check that the application class has an empty constructor.", - e); - } catch (SecurityException e) { - LOGGER.log(Level.SEVERE, - "Cannot instantiate the application class.", e); - } - - return result; - } - - /** - * Returns a APISpark description of the current application. By default, - * this method discovers all the resources attached to this application. It - * can be overridden to add documentation, list of representations, etc. - * - * @param request - * The current request. - * @param response - * The current response. - * @return An application description. - */ - protected static ApplicationInfo getApplicationInfo( - Application application, Reference baseRef) { - ApplicationInfo applicationInfo = new ApplicationInfo(); - if ((application.getName() != null) && !application.getName().isEmpty()) { - DocumentationInfo doc = null; - if (applicationInfo.getDocumentations().isEmpty()) { - doc = new DocumentationInfo(); - applicationInfo.getDocumentations().add(doc); - } else { - doc = applicationInfo.getDocumentations().get(0); - } - applicationInfo.setName(application.getName()); - doc.setTitle(application.getName()); - } - applicationInfo.getResources().setBaseRef(baseRef); - applicationInfo.getResources().setResources( - getResourceInfos(applicationInfo, - getNextRouter(application.getInboundRoot()), "/")); + private static final List SUPPORTED_LANGUAGES = Arrays + .asList("swagger"); - return applicationInfo; + private static void failWithErrorMessage(String message) { + LOGGER.severe(message + "Use parameter --help for help."); + System.exit(1); } - /** - * Returns an instance of what must be a subclass of {@link Component}. - * Returns null in case of errors. - * - * @param className - * The name of the component class. - * @return An instance of what must be a subclass of {@link Component}. - */ - private static Component getComponent(String className) { - Component result = null; - - if (className == null) { - return result; - } - - Class clazz = null; + private static Definition getDefinitionFromJaxrsSources(String defSource, + boolean useSectionNamingPackageStrategy, String applicationName, + String endpoint, List jaxRsResources) { + javax.ws.rs.core.Application jaxrsApplication = JaxRsIntrospector + .getApplication(defSource); + @SuppressWarnings("rawtypes") + List resources = new ArrayList<>(); try { - clazz = Class.forName(className); - if (Component.class.isAssignableFrom(clazz)) { - result = (Component) clazz.getConstructor().newInstance(); - } else { - LOGGER.log(Level.SEVERE, className - + " does not seem to a valid subclass of " - + Component.class.getName() + " class."); + for (String c : jaxRsResources) { + resources.add(Class.forName(c)); } } catch (ClassNotFoundException e) { - LOGGER.log(Level.SEVERE, "Cannot locate the component class.", e); - } catch (InstantiationException e) { - LOGGER.log(Level.SEVERE, "Cannot instantiate the component class.", - e); - } catch (IllegalAccessException e) { - LOGGER.log(Level.SEVERE, "Cannot instantiate the component class.", - e); - } catch (IllegalArgumentException e) { - LOGGER.log(Level.SEVERE, - "Check that the component class has an empty constructor.", - e); - } catch (InvocationTargetException e) { - LOGGER.log(Level.SEVERE, "Cannot instantiate the component class.", + LOGGER.log(Level.SEVERE, "Cannot locate the JAXRS resource class.", e); - } catch (NoSuchMethodException e) { - LOGGER.log(Level.SEVERE, - "Check that the component class has an empty constructor.", - e); - } catch (SecurityException e) { - LOGGER.log(Level.SEVERE, "Cannot instantiate the component class.", - e); - } - - return result; - } - - /** - * Returns the next application available. - * - * @param current - * The current Restlet to inspect. - * @return The first application available. - */ - private static Application getNextApplication(Restlet current) { - Application result = null; - if (current instanceof Application) { - result = (Application) current; - } else if (current instanceof Filter) { - result = getNextApplication(((Filter) current).getNext()); - } else if (current instanceof Router) { - Router router = (Router) current; - for (Route route : router.getRoutes()) { - result = getNextApplication(route.getNext()); - if (result != null) { - break; - } - } - } - - return result; - } - - /** - * Returns the next router available. - * - * @param current - * The current Restlet to inspect. - * @return The first router available. - */ - private static Router getNextRouter(Restlet current) { - Router result = null; - if (current instanceof Router) { - result = (Router) current; - } else if (current instanceof Filter) { - result = getNextRouter(((Filter) current).getNext()); + System.exit(1); } - - return result; + Reference baseRef = endpoint != null ? new Reference(endpoint) : null; + return JaxRsIntrospector.getDefinition(jaxrsApplication, + applicationName, resources, baseRef, + useSectionNamingPackageStrategy); } /** @@ -284,400 +110,320 @@ private static String getParameter(String[] args, int index) { } /** - * Completes the data available about a given Filter instance. - * - * @param applicationInfo - * The parent application. - * @param filter - * The Filter instance to document. - * @param path - * The base path. - * @param request - * The current request. - * @param response - * The current response. - * @return The resource description. - */ - private static ResourceInfo getResourceInfo( - ApplicationInfo applicationInfo, Filter filter, String path) { - return getResourceInfo(applicationInfo, filter.getNext(), path); - } - - /** - * Completes the data available about a given Finder instance. - * - * @param applicationInfo - * The parent application. - * @param resourceInfo - * The ResourceInfo object to complete. - * @param finder - * The Finder instance to document. - */ - private static ResourceInfo getResourceInfo( - ApplicationInfo applicationInfo, Finder finder, String path) { - ResourceInfo result = null; - Object resource = null; - - if (finder instanceof Directory) { - resource = finder; - } else { - ServerResource sr = finder.find(null, null); - - if (sr != null) { - // The handler instance targeted by this finder. - Request request = new Request(); - org.restlet.Response response = new org.restlet.Response( - request); - sr.setRequest(request); - sr.setResponse(response); - sr.updateAllowedMethods(); - resource = sr; - } - } - - if (resource != null) { - result = new ResourceInfo(); - ResourceInfo.describe(applicationInfo, result, resource, path); - } - - return result; - } - - /** - * Completes the data available about a given Restlet instance. - * - * @param applicationInfo - * The parent application. - * @param resourceInfo - * The ResourceInfo object to complete. - * @param restlet - * The Restlet instance to document. - */ - private static ResourceInfo getResourceInfo( - ApplicationInfo applicationInfo, Restlet restlet, String path) { - ResourceInfo result = null; - - if (restlet instanceof Finder) { - result = getResourceInfo(applicationInfo, (Finder) restlet, path); - } else if (restlet instanceof Router) { - result = new ResourceInfo(); - result.setPath(path); - result.setChildResources(getResourceInfos(applicationInfo, - (Router) restlet, path)); - } else if (restlet instanceof Filter) { - result = getResourceInfo(applicationInfo, (Filter) restlet, path); - } - - return result; - } - - /** - * Returns the APISpark data about the given Route instance. - * - * @param applicationInfo - * The parent application. - * @param route - * The Route instance to document. - * @param basePath - * The base path. - * @return The APISpark data about the given Route instance. - */ - private static ResourceInfo getResourceInfo( - ApplicationInfo applicationInfo, Route route, String basePath) { - ResourceInfo result = null; - - if (route instanceof TemplateRoute) { - TemplateRoute templateRoute = (TemplateRoute) route; - String path = templateRoute.getTemplate().getPattern(); - - // APISpark requires resource paths to be relative to parent path - if (path.startsWith("/") && basePath.endsWith("/")) { - path = basePath + path.substring(1); - } else { - path = basePath + path; - } - - result = getResourceInfo(applicationInfo, route.getNext(), path); - } - - return result; - } - - /** - * Completes the list of ResourceInfo instances for the given Router - * instance. + * Main class, invokes this class without argument to get help instructions. * - * @param applicationInfo - * The parent application. - * @param router - * The router to document. - * @param path - * The base path. - * @return The list of ResourceInfo instances to complete. + * @param args + * Main arguments. + * @throws TranslationException */ - private static List getResourceInfos( - ApplicationInfo applicationInfo, Router router, String path) { - List result = new ArrayList(); - - if (router != null) { - for (Route route : router.getRoutes()) { - ResourceInfo resourceInfo = getResourceInfo(applicationInfo, - route, path); - - if (resourceInfo != null) { - result.add(resourceInfo); - } - } - - if (router.getDefaultRoute() != null) { - ResourceInfo resourceInfo = getResourceInfo(applicationInfo, - router.getDefaultRoute(), path); - if (resourceInfo != null) { - result.add(resourceInfo); - } - } + public static void main(String[] args) throws TranslationException { + try { + process(args); + } catch (Exception e) { + LOGGER.log(Level.SEVERE, "Introspection error", e); + System.exit(1); } - - return result; + System.exit(0); } - /** - * Main class, invoke this class without argument to get help instructions. - * - * @param args - * @throws SwaggerConversionException - */ - public static void main(String[] args) throws SwaggerConversionException { + public static void process(String[] args) throws TranslationException { Engine.register(); String ulogin = null; String upwd = null; String serviceUrl = null; String defSource = null; String compName = null; - String definitionId = null; String language = null; + String cellId = null; + String cellVersion = null; + String cellType = null; + + boolean createNewCell = false; + boolean createNewVersion = false; + boolean updateCell = false; + String updateStrategy = "update"; + + boolean useSectionNamingPackageStrategy = false; + + String applicationName = null; + String endpoint = null; + List jaxRsResources = new ArrayList<>(); + + // (default ?) LOGGER.fine("Get parameters"); for (int i = 0; i < (args.length); i++) { - if ("-h".equals(args[i])) { + String arg = args[i]; + if ("-h".equals(arg) || "--help".equals(arg)) { printHelp(); System.exit(0); - } else if ("-u".equals(args[i])) { + } else if ("-u".equals(arg) || "--username".equals(arg)) { ulogin = getParameter(args, ++i); - } else if ("-p".equals(args[i])) { + } else if ("-p".equals(arg) || "--password".equals(arg)) { upwd = getParameter(args, ++i); - } else if ("-s".equals(args[i])) { + } else if ("-S".equals(arg) || "--service".equals(arg)) { serviceUrl = getParameter(args, ++i); - } else if ("-c".equals(args[i])) { + } else if ("-c".equals(arg) || "--create-connector".equals(arg)) { + createNewCell = true; + cellType = "webapiconnector"; + } else if ("-d".equals(arg) || "--create-descriptor".equals(arg)) { + createNewCell = true; + cellType = "webapidescriptor"; + } else if ("--component".equals(arg)) { compName = getParameter(args, ++i); - } else if ("-d".equals(args[i])) { - definitionId = getParameter(args, ++i); - } else if ("-l".equals(args[i])) { + } else if ("-i".equals(arg) || "--id".equals(arg)) { + cellId = getParameter(args, ++i); + } else if ("-v".equals(arg) || "--version".equals(arg)) { + cellVersion = getParameter(args, ++i); + } else if ("-U".equals(arg) || "--update".equals(arg)) { + updateCell = true; + } else if ("-s".equals(arg) || "--update-strategy".equals(arg)) { + updateStrategy = getParameter(args, ++i).toLowerCase(); + } else if ("-n".equals(arg) || "--new-version".equals(arg)) { + createNewVersion = true; + } else if ("-l".equals(arg) || "--language".equals(arg)) { language = getParameter(args, ++i).toLowerCase(); - } else if ("-v".equals(args[i])) { + } else if ("--sections".equals(arg)) { + useSectionNamingPackageStrategy = true; + } else if ("-V".equals(arg) || "--verbose".equals(arg)) { + // [ifndef gae,jee] instruction Engine.setLogLevel(Level.FINE); + } else if ("--application-name".equals(arg)) { + applicationName = getParameter(args, ++i); + } else if ("--endpoint".equals(arg)) { + endpoint = getParameter(args, ++i); + } else if ("--jaxrs-resources".equals(arg)) { + jaxRsResources = Arrays.asList(getParameter(args, ++i).split( + ",")); } else { - defSource = args[i]; + defSource = arg; } } - Engine.getLogger("").getHandlers()[0] - .setFilter(new java.util.logging.Filter() { - public boolean isLoggable(LogRecord record) { - return record.getLoggerName().startsWith( - "org.restlet.ext.apispark"); - } - }); - LOGGER.fine("Check parameters"); - if (isEmpty(serviceUrl)) { - serviceUrl = "https://apispark.com/"; - } - if (!serviceUrl.endsWith("/")) { - serviceUrl += "/"; + if (!createNewCell && !createNewVersion && !updateCell) { + failWithErrorMessage("You should specify the wanted action among -d (--create-descriptor), -c (--create-connector), " + + "-U (--update) or -n (--new-version). "); } - if (isEmpty(ulogin) || isEmpty(upwd) || isEmpty(defSource)) { - printHelp(); - System.exit(1); + if (createNewCell) { + if (createNewVersion || updateCell) { + failWithErrorMessage("In create new cell mode, you can't use -U (--update) or -n (--new-version). "); + } + if (cellId != null || cellVersion != null) { + failWithErrorMessage("In create new cell mode, you can't use -i (--id) or -v (--version). "); + } + } + if (createNewVersion) { + if (createNewCell || updateCell) { + failWithErrorMessage("In create new version mode, you can't use -d (--create-descriptor), -c (--create-connector) or -n (--new-version). "); + } + if (cellId == null) { + failWithErrorMessage("In create new version mode, you should specify the cell id with -i (--id). "); + } + if (cellVersion != null) { + failWithErrorMessage("In create new version mode, you can't use -v (--version). "); + } + } + if (updateCell) { + if (createNewCell || createNewVersion) { + failWithErrorMessage("In update mode, you can't use -d (--create-descriptor), -c (--create-connector) or -N (--new-version). "); + } + if (cellId == null || cellVersion == null) { + failWithErrorMessage("In update mode, you should specify the cell id with -i (--id) and the cell version with -v (--version). "); + } + if (!IntrospectionUtils.STRATEGIES.contains(updateStrategy)) { + failWithErrorMessage("The strategy: " + updateStrategy + + " is not available. "); + } } - // TODO validate the definition URL: - // * accept absolute urls - // * accept relative urls such as /definitions/{id} and concatenate with - // the serviceUrl - // * accept relative urls such as {id} and concatenate with the - // serviceUrl + if (StringUtils.isNullOrEmpty(ulogin) + || StringUtils.isNullOrEmpty(upwd)) { + failWithErrorMessage("You should specify your API spark login and password with -U (--username) and -p (--password). "); + } - // Validate the application class name - Application application = null; - Component component = null; - Definition definition = null; - if (language == null) { - application = getApplication(defSource); - component = getComponent(compName); + if (StringUtils.isNullOrEmpty(defSource) && jaxRsResources.isEmpty()) { + failWithErrorMessage("You should specify the definition source to use (value no prefixed by any option). "); } - if (application != null) { - LOGGER.info("Instantiate introspector"); - Introspector i = new Introspector(component, application); + if (!StringUtils.isNullOrEmpty(language) + && !SUPPORTED_LANGUAGES.contains(language)) { + failWithErrorMessage("The language " + language + + " is not currently supported. "); + } - LOGGER.info("Generate documentation"); - definition = i.getDefinition(); - } else if ("swagger".equals(language)) { - definition = SwaggerUtils.getDefinition(defSource, ulogin, upwd); + if (StringUtils.isNullOrEmpty(serviceUrl)) { + serviceUrl = "https://apispark.restlet.com/"; } - if (definition != null) { - sendDefinition(definition, definitionId, ulogin, upwd, serviceUrl, - LOGGER); - } else { - LOGGER.severe("Please provide a valid application class name or definition URL."); + if (!serviceUrl.endsWith("/")) { + serviceUrl += "/"; } - } - /** - * Prints the instructions necessary to launch this tool. - */ - private static void printHelp() { - PrintStream o = System.out; - - o.println("SYNOPSIS"); - printSynopsis(o, Introspector.class, "[options] APPLICATION"); - printSynopsis(o, Introspector.class, - "-l swagger [options] SWAGGER DEFINITION URL/PATH"); - o.println("DESCRIPTION"); - printSentence( - o, - "Publish to the APISpark platform the description of your Web API, represented by APPLICATION,", - "the full name of your Restlet application class or by the swagger definition available on the ", - "URL/PATH"); - printSentence( - o, - "If the whole process is successfull, it displays the url of the corresponding documentation."); - o.println("OPTIONS"); - printOption(o, "-h", "Prints this help."); - printOption(o, "-u", "The mandatory APISpark user name."); - printOption(o, "-p", "The mandatory APISpark user secret key."); - printOption(o, "-s", - "The optional APISpark platform URL (by default https://apispark.com)."); - printOption(o, "-c", - "The optional full name of your Restlet Component class.", - "This allows to collect some other data, such as the endpoint."); - printOption( - o, - "-d", - "The optional identifier of an existing definition hosted by APISpark you want to update with this new documentation."); - printOption( - o, - "-l", - "The optional name of the description language of the definition you want to upload. Possible value: swagger"); - printOption(o, "-v", - "The optional parameter switching the process to a verbose mode"); - } + Engine.getLogger("").getHandlers()[0] + .setFilter(new java.util.logging.Filter() { + public boolean isLoggable(LogRecord record) { + return record.getLoggerName().startsWith( + "org.restlet.ext.apispark"); + } + }); - /** The current Web API definition. */ - private Definition definition; + // Validate the application class name + Definition definition = null; - /** - * Constructor. - * - * @param application - * An application to introspect. - */ - public Introspector(Application application, boolean verbose) { - this(null, application); - } + // get definition + if (language != null) { + if ("swagger".equals(language)) { + definition = SwaggerUtils + .getDefinition(defSource, ulogin, upwd); + } else { + failWithErrorMessage("The language " + language + + " is not currently supported. "); + } + } else { + if (defSource != null) { + Class clazz = null; + try { + clazz = Class.forName(defSource); + } catch (ClassNotFoundException e) { + LOGGER.log(Level.SEVERE, + "Cannot locate the application class.", e); + System.exit(1); + } - /** - * Constructor. - * - * @param component - * An component to introspect in order to get extra details such - * as the endpoint. - * @param application - * An application to introspect. - */ - public Introspector(Component component, Application application) { - definition = IntrospectionConverter.toDefinition( - getApplicationInfo(application, null), LOGGER); - - if (component != null && definition != null) { - LOGGER.fine("Look for the endpoint."); - String endpoint = null; - // TODO What if the application is attached to several endpoints? - // Look for the endpoint to which this application is attached. - endpoint = getEndpoint(component.getDefaultHost(), application); - for (int i = 0; endpoint == null && i < component.getHosts().size(); i++) { - VirtualHost virtualHost = component.getHosts().get(i); - endpoint = getEndpoint(virtualHost, application); + // Is Restlet application ? + // TODO implement introspection of Restlet based JaxRs + // (org.restlet.ext.jaxrs.JaxRsApplication) + if (Application.class.isAssignableFrom(clazz)) { + Application application = ApplicationIntrospector + .getApplication(defSource); + Component component = ComponentIntrospector + .getComponent(compName); + Reference baseRef = endpoint != null ? new Reference( + endpoint) : null; + if (applicationName != null) { + application.setName(applicationName); + } + definition = ApplicationIntrospector.getDefinition( + application, baseRef, component, + useSectionNamingPackageStrategy); + } else if (javax.ws.rs.core.Application.class + .isAssignableFrom(clazz)) { + definition = getDefinitionFromJaxrsSources(defSource, + useSectionNamingPackageStrategy, applicationName, + endpoint, jaxRsResources); + } else { + LOGGER.log(Level.SEVERE, "Class " + defSource + + " is not supported"); + System.exit(1); + } + } else if (!jaxRsResources.isEmpty()) { + definition = getDefinitionFromJaxrsSources(defSource, + useSectionNamingPackageStrategy, applicationName, + endpoint, jaxRsResources); } - definition.setEndpoint(endpoint); } - } - /** - * Returns the current definition. - * - * @return The current definition. - */ - private Definition getDefinition() { - return definition; + if (definition == null) { + failWithErrorMessage("Please provide a valid application class name or definition URL."); + } + + IntrospectionUtils.sendDefinition(definition, ulogin, upwd, serviceUrl, + cellType, cellId, cellVersion, createNewCell, createNewVersion, + updateCell, updateStrategy, LOGGER); + + LOGGER.info("Instrospection complete"); } /** - * Returns the endpoint to which the application is attached. - * - * @param virtualHost - * The virtual host to which this application may be attached. - * @param application - * The application. - * @return The endpoint. + * Prints the instructions necessary to launch this tool. */ - private String getEndpoint(VirtualHost virtualHost, Application application) { - String result = null; - - for (Route route : virtualHost.getRoutes()) { - if (route.getNext() != null) { - Application app = getNextApplication(route.getNext()); - if (app != null - && application.getClass().equals(app.getClass())) { - String hostDomain = null; - if (virtualHost.getHostDomain() != null - && !".*".equals(virtualHost.getHostDomain())) { - if (virtualHost.getHostDomain().contains("|")) { - hostDomain = virtualHost.getHostDomain().split("|")[0]; - } else { - hostDomain = virtualHost.getHostDomain(); - } - } - if (hostDomain != null) { - Protocol scheme = null; - if (!".*".equals(virtualHost.getHostScheme())) { - scheme = Protocol.valueOf(virtualHost - .getHostScheme()); - } - if (scheme == null) { - scheme = Protocol.HTTP; - } - Reference ref = new Reference(); - ref.setProtocol(scheme); - ref.setHostDomain(hostDomain); - if (route instanceof TemplateRoute) { - ref.addSegment(((TemplateRoute) route) - .getTemplate().getPattern()); - } - try { - ref.setHostPort(Integer.parseInt(virtualHost - .getHostPort())); - } catch (Exception e) { - // Nothing - } - // Concatenate in order to get the endpoint - result = ref.toString(); - } - } - } - } - return result; + private static void printHelp() { + CliUtils cli = new CliUtils(System.out, 100); + cli.print(); + cli.print0("SYNOPSIS"); + cli.print1("org.restlet.ext.apispark.Introspector [credentials] [actions] [options] [--language swagger SWAGGER_DEFINITION_URL_OR_PATH | APPLICATION]"); + + cli.print(); + cli.print0("DESCRIPTION"); + cli.print1( + "Publish to the APISpark platform the description of your Web API, represented by APPLICATION, the full name of your Restlet or JAX-RS application class or by the Swagger definition available at URL/PATH", + "If the whole process is successful, it displays the url of the corresponding descriptor or connector cell."); + + cli.print(); + cli.print0("EXAMPLES"); + cli.print1( + "org.restlet.ext.apispark.Introspector -u 1234 -p Xy12 --create-descriptor com.acme.Application", + "org.restlet.ext.apispark.Introspector -u 1234 -p Xy12 --new-version --id 60 com.acme.Application", + "org.restlet.ext.apispark.Introspector -u 1234 -p Xy12 --update --update-strategy replace --id 60 --version 1 --language swagger http://acme.com/api/swagger"); + + cli.print(); + cli.print0("OPTIONS"); + cli.print12("-h, --help" + "Prints this help."); + cli.print(); + cli.print1("[credentials]"); + cli.print12("-u, --username username", + "The mandatory APISpark user name."); + cli.print12("-p, --password password", + "The mandatory APISpark user secret key."); + cli.print(); + cli.print1("[actions]"); + cli.print12("-d, --create-descriptor", + "Creates a new descriptor from introspection."); + cli.print12("-c, --create-connector", + "Creates a new connector from introspection."); + cli.print12( + "-n, --new-version", + "Creates a new version of the descriptor/connector identified by the -i (--id) option"); + cli.print12( + "-U, --update", + "Updates the cell descriptor/connector specified by the -i (--id) and -v (--version) options.", + "Use the default update strategy (update) except if -S (--update-strategy) option is specified."); + cli.print(); + cli.print1("[options]"); + cli.print12( + "-i, --id cellId", + "The identifier of an existing cell hosted by APISpark you want to update with this new documentation.", + "Required if -n (--new-version) or -U (--update) options are specified."); + cli.print12("-v, --version cellVersion", + "The version of the cell to be updated.", + "Required if -U (--update) option is specified."); + cli.print12( + "-s, --update-strategy strategy", + "Specifies the update strategy.", + "Available strategies:", + "- update: (default) new objects will be added to the APISpark's descriptor/connector, primitive fields of existing objects will be updated. Nothing will be deleted.", + "- replace: deletes all the information in the descriptor/connector on APISpark's and fills it again with introspected definition."); + cli.print12( + "--component componentClass", + "The optional full name of your Restlet Component class. This allows to collect some", + "other data, such as the endpoint."); + cli.print12( + "-l, --language languageName", + "The optional name of the description language of the definition you want to upload.", + "Possible value:", "- swagger: Swagger 1.2 specification."); + cli.print12("--sections", + "Set section of introspected resources from java package name."); + cli.print12("-v, --verbose", + "The optional parameter switching the process to a verbose mode."); + cli.print12("--application-name name", + "The optional parameter overriding the name of the API."); + cli.print12("--endpoint endpoint", + "The optional parameter overriding the endpoint of the API."); + cli.print12( + "--jaxrs-resources resourcesClasses", + "The optional parameter providing the list of fully qualified classes separated by a " + + "comma that should be introspected. Example: com.example.MyResource,com.example.MyResource2.", + "Replaces javax.ws.rs.core.Application#getClasses."); + + cli.print(); + cli.print0("ENHANCE INTROSPECTION"); + cli.print1( + "You can extend the basic introspection and enrich the generated documentation by providing", + "dedicated helpers to the introspector.", + "By default, swagger annotation are supported.", + "Introspection use the Java Service Loader system.", + "To add a new helper, create a", + "'META-INF/services/org.restlet.ext.apispark.internal.introspection.IntrospectionHelper' file", + "with the name of your implementation class."); } - } diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/JaxrsIntrospector.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/JaxrsIntrospector.java deleted file mode 100644 index 1125376646..0000000000 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/JaxrsIntrospector.java +++ /dev/null @@ -1,781 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.ext.apispark; - -import java.io.PrintStream; -import java.lang.annotation.Annotation; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Level; -import java.util.logging.Logger; - -import javax.ws.rs.ApplicationPath; -import javax.ws.rs.Consumes; -import javax.ws.rs.CookieParam; -import javax.ws.rs.DELETE; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.Encoded; -import javax.ws.rs.FormParam; -import javax.ws.rs.GET; -import javax.ws.rs.HEAD; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.HttpMethod; -import javax.ws.rs.MatrixParam; -import javax.ws.rs.OPTIONS; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; - -import org.restlet.Application; -import org.restlet.Context; -import org.restlet.data.MediaType; -import org.restlet.data.Reference; -import org.restlet.data.Status; -import org.restlet.ext.apispark.internal.conversion.IntrospectionConverter; -import org.restlet.ext.apispark.internal.info.ApplicationInfo; -import org.restlet.ext.apispark.internal.info.MethodInfo; -import org.restlet.ext.apispark.internal.info.ParameterInfo; -import org.restlet.ext.apispark.internal.info.ParameterStyle; -import org.restlet.ext.apispark.internal.info.RepresentationInfo; -import org.restlet.ext.apispark.internal.info.RequestInfo; -import org.restlet.ext.apispark.internal.info.ResourceInfo; -import org.restlet.ext.apispark.internal.model.Definition; -import org.restlet.ext.apispark.internal.reflect.ReflectUtils; -import org.restlet.ext.apispark.internal.utils.IntrospectionUtils; -import org.restlet.representation.Variant; -import org.restlet.routing.Template; - -/** - * Publish the documentation of a Jaxrs-based Application to the APISpark - * console. - * - * @author Thierry Boileau - */ -public class JaxrsIntrospector extends IntrospectionUtils { - - /** Internal logger. */ - protected static Logger LOGGER = Context.getCurrentLogger(); - - /** - * Completes or creates the "Web form" representation handled by a method, - * according to the value of the provided {@link FormParam} annotation. Such - * annotation describes the name of one field of the provided entity. - * - * @param method - * The current method. - * @param formParam - * The {@link FormParam} annotation. - */ - private static void addRepresentation(MethodInfo method, FormParam formParam) { - if (formParam != null) { - // gives an indication of the expected entity - RepresentationInfo ri = null; - // gives an indication on the kind of representation handled - for (RepresentationInfo r : method.getRequest() - .getRepresentations()) { - if (r.getMediaType().equals(MediaType.APPLICATION_WWW_FORM)) { - ri = r; - break; - } - } - if (ri == null) { - ri = new RepresentationInfo(); - ri.setIdentifier(method.getMethod().getName() + "Form"); - ri.setName(method.getMethod().getName()); - ri.setMediaType(MediaType.APPLICATION_WWW_FORM); - method.getRequest().getRepresentations().add(ri); - } - ParameterInfo pi = new ParameterInfo(formParam.value(), - ParameterStyle.PLAIN, "body parameter: " - + formParam.value()); - method.getParameters().add(pi); - } - } - - /** - * Returns an instance of what must be a subclass of {@link Application}. - * Returns null in case of errors. - * - * @param className - * The name of the application class. - * @return An instance of what must be a subclass of {@link Application}. - */ - private static javax.ws.rs.core.Application getApplication(String className) { - javax.ws.rs.core.Application result = null; - - if (className == null) { - return result; - } - - Class clazz = null; - try { - clazz = Class.forName(className); - if (javax.ws.rs.core.Application.class.isAssignableFrom(clazz)) { - result = (javax.ws.rs.core.Application) clazz.getConstructor() - .newInstance(); - } else { - LOGGER.log(Level.SEVERE, className - + " does not seem to be a valid subclass of " - + Application.class.getName() + " class."); - } - } catch (ClassNotFoundException e) { - LOGGER.log(Level.SEVERE, "Cannot locate the application class.", e); - } catch (InstantiationException e) { - LOGGER.log(Level.SEVERE, - "Cannot instantiate the application class.", e); - } catch (IllegalAccessException e) { - LOGGER.log(Level.SEVERE, - "Cannot instantiate the application class.", e); - } catch (IllegalArgumentException e) { - LOGGER.log( - Level.SEVERE, - "Check that the application class has an empty constructor.", - e); - } catch (InvocationTargetException e) { - LOGGER.log(Level.SEVERE, - "Cannot instantiate the application class.", e); - } catch (NoSuchMethodException e) { - LOGGER.log( - Level.SEVERE, - "Check that the application class has an empty constructor.", - e); - } catch (SecurityException e) { - LOGGER.log(Level.SEVERE, - "Cannot instantiate the application class.", e); - } - - return result; - } - - /** - * Returns a APISpark description of the current application. By default, - * this method discovers all the resources attached to this application. It - * can be overridden to add documentation, list of representations, etc. - * - * @param request - * The current request. - * @param response - * The current response. - * @return An application description. - */ - protected static ApplicationInfo getApplicationInfo( - javax.ws.rs.core.Application application, Reference baseRef) { - ApplicationInfo applicationInfo = new ApplicationInfo(); - - for (Class clazz : application.getClasses()) { - scan(clazz, applicationInfo, baseRef); - } - for (Object singleton : application.getSingletons()) { - if (singleton != null) { - scan(singleton.getClass(), applicationInfo, baseRef); - } - } - applicationInfo.getResources().setBaseRef(baseRef); - - return applicationInfo; - } - - /** - * Returns the value according to its index. - * - * @param args - * The argument table. - * @param index - * The index of the argument. - * @return The value of the given argument. - */ - private static String getParameter(String[] args, int index) { - if (index >= args.length) { - return null; - } else { - String value = args[index]; - if ("-s".equals(value) || "-u".equals(value) || "-p".equals(value) - || "-d".equals(value) || "-c".equals(value)) { - // In case the given value is actually an option, reset it. - value = null; - } - return value; - } - } - - private static String getPath(Path rootPath, Path relativePath) { - return getPath(((rootPath != null) ? rootPath.value() : null), - ((relativePath != null) ? relativePath.value() : null)); - } - - private static String getPath(String rootPath, String relativePath) { - String result = null; - - if (rootPath == null) { - rootPath = "/"; - } else if (!rootPath.startsWith("/")) { - rootPath += "/" + rootPath; - } - if (relativePath == null) { - result = rootPath; - } else if (rootPath.endsWith("/")) { - if (relativePath.startsWith("/")) { - result = rootPath + relativePath.substring(1); - } else { - result = rootPath + relativePath; - } - } else { - if (relativePath.startsWith("/")) { - result = rootPath + relativePath; - } else { - result = rootPath + "/" + relativePath; - } - } - - return result; - } - - /** - * Main class, invoke this class without argument to get help instructions. - * - * @param args - */ - public static void main(String[] args) { - String ulogin = null; - String upwd = null; - String serviceUrl = null; - String appName = null; - String definitionId = null; - - LOGGER.fine("Get parameters"); - for (int i = 0; i < (args.length); i++) { - if ("-h".equals(args[i])) { - printHelp(); - System.exit(0); - } else if ("-u".equals(args[i])) { - ulogin = getParameter(args, ++i); - } else if ("-p".equals(args[i])) { - upwd = getParameter(args, ++i); - } else if ("-s".equals(args[i])) { - serviceUrl = getParameter(args, ++i); - } else if ("-d".equals(args[i])) { - definitionId = getParameter(args, ++i); - } else { - appName = args[i]; - } - } - - LOGGER.fine("Check parameters"); - if (isEmpty(serviceUrl)) { - serviceUrl = "https://apispark.com/"; - } - if (!serviceUrl.endsWith("/")) { - serviceUrl += "/"; - } - - if (isEmpty(ulogin) || isEmpty(upwd) || isEmpty(appName)) { - printHelp(); - System.exit(1); - } - - // Validate the application class name - javax.ws.rs.core.Application application = getApplication(appName); - - Definition definition = null; - if (application != null) { - LOGGER.fine("Instantiate introspector"); - JaxrsIntrospector i = new JaxrsIntrospector(application); - - LOGGER.info("Generate documentation"); - definition = i.getDefinition(); - } - - if (definition != null) { - sendDefinition(definition, definitionId, ulogin, upwd, serviceUrl, - LOGGER); - } else { - LOGGER.severe("Please provide a valid application class name."); - } - } - - /** - * Prints the instructions necessary to launch this tool. - */ - private static void printHelp() { - PrintStream o = System.out; - - o.println("SYNOPSIS"); - printSynopsis(o, JaxrsIntrospector.class, "[options] APPLICATION"); - o.println("DESCRIPTION"); - printSentence( - o, - "Publish to the APISpark platform the description of your Web API, represented by APPLICATION,", - "the full name of your Restlet application class."); - printSentence( - o, - "If the whole process is successfull, it displays the url of the corresponding documentation."); - o.println("OPTIONS"); - printOption(o, "-h", "Prints this help."); - printOption(o, "-u", "The mandatory APISpark user name."); - printOption(o, "-p", "The mandatory APISpark user secret key."); - printOption(o, "-s", - "The optional APISpark platform URL (by default https://apispark.com)."); - printOption(o, "-c", - "The optional full name of your Restlet Component class.", - "This allows to collect some other data, such as the endpoint."); - printOption( - o, - "-d", - "The optional identifier of an existing definition hosted by APISpark you want to update with this new documentation."); - o.println("LOGGING"); - printSentence( - o, - "You can get a detailled log of the process using the JDK's API.", - "See the official documentation: http://docs.oracle.com/javase/7/docs/technotes/guides/logging/overview.html", - "Here is the name of the used Logger: " - + JaxrsIntrospector.class.getName()); - } - - private static void scan(Annotation[] annotations, Class parameterClass, - Type parameterType, ApplicationInfo info, ResourceInfo resource, - MethodInfo method, Consumes consumes) { - // Indicates that this parameter is instantiated from annotation - boolean valueComputed = false; - // TODO sounds like there are several level of parameters, be carefull - - for (Annotation annotation : annotations) { - // Introduced by Jax-rs 2.0 - // BeanParam - if (annotation instanceof CookieParam) { - valueComputed = true; - String value = ((CookieParam) annotation).value(); - ParameterInfo pi = new ParameterInfo(value, - ParameterStyle.COOKIE, "Cookie parameter: " + value); - method.getRequest().getParameters().add(pi); - } else if (annotation instanceof DefaultValue) { - // TODO Do we support DefaultValue annotation? - // DefaultValue defaultvalue = (DefaultValue) annotation; - } else if (annotation instanceof Encoded) { - // TODO Do we support encoded annotation? - // Encoded encoded = (Encoded) annotation; - } else if (annotation instanceof FormParam) { - valueComputed = true; - addRepresentation(method, (FormParam) annotation); - } else if (annotation instanceof HeaderParam) { - valueComputed = true; - String value = ((HeaderParam) annotation).value(); - ParameterInfo pi = new ParameterInfo(value, - ParameterStyle.HEADER, "header parameter: " + value); - method.getParameters().add(pi); - } else if (annotation instanceof MatrixParam) { - valueComputed = true; - String value = ((MatrixParam) annotation).value(); - ParameterInfo pi = new ParameterInfo(value, - ParameterStyle.MATRIX, "matrix parameter: " + value); - method.getParameters().add(pi); - } else if (annotation instanceof PathParam) { - valueComputed = true; - String value = ((PathParam) annotation).value(); - boolean found = false; - for (ParameterInfo p : resource.getParameters()) { - if (p.getName().equals(value)) { - found = true; - break; - } - } - if (!found) { - ParameterInfo pi = new ParameterInfo(value, - ParameterStyle.TEMPLATE, "Path parameter: " + value); - resource.getParameters().add(pi); - } - - } else if (annotation instanceof QueryParam) { - valueComputed = true; - String value = ((QueryParam) annotation).value(); - ParameterInfo pi = new ParameterInfo(value, - ParameterStyle.QUERY, "Query parameter: " + value); - method.getParameters().add(pi); - } else if (annotation instanceof javax.ws.rs.core.Context) { - valueComputed = true; - javax.ws.rs.core.Context context = (javax.ws.rs.core.Context) annotation; - // TODO scan context annotation. - } - } - - if (!valueComputed) { - // We make the assumption this represents the body... - if (parameterClass != null && !Void.class.equals(parameterClass)) { - String[] mediaTypes = null; - if (consumes == null || consumes.value() == null - || consumes.value().length == 0) { - // We assume this can't really happen... - // Perhaps, we should rely on Produces annotations? - mediaTypes = new String[1]; - mediaTypes[0] = MediaType.APPLICATION_ALL.getName(); - } else { - mediaTypes = consumes.value(); - } - for (String consume : mediaTypes) { - Variant variant = new Variant(MediaType.valueOf(consume)); - RepresentationInfo representationInfo = null; - - representationInfo = RepresentationInfo.describe(method, - parameterClass, parameterType, variant); - if (method.getRequest() == null) { - method.setRequest(new RequestInfo()); - } - method.getRequest().getRepresentations() - .add(representationInfo); - } - } - } - } - - private static void scan(Class clazz, ApplicationInfo info, - Reference baseRef) { - info.getResources().setBaseRef(baseRef); - - // List of common annotations, defined at the level of the class, or at - // the level of the fields. - List cookieParams = new ArrayList(); - List formParams = new ArrayList(); - List headerParams = new ArrayList(); - List matrixParams = new ArrayList(); - List pathParams = new ArrayList(); - List queryParams = new ArrayList(); - List contextList = new ArrayList(); - - // Introduced by Jax-rs 2.0 - // ConstrainedTo ct = clazz.getAnnotation(ConstrainedTo.class); - // value = RuntimeType.SERVER - - Consumes c = clazz.getAnnotation(Consumes.class); - // TODO Do we support encoded annotation? - // Encoded e = clazz.getAnnotation(Encoded.class); - - Path path = clazz.getAnnotation(Path.class); - Produces p = clazz.getAnnotation(Produces.class); - - Field[] fields = ReflectUtils.getAllDeclaredFields(clazz); - if (fields != null) { - for (Field field : fields) { - // Apply the values gathered at fields level at the method - // level. - scan(field, cookieParams, formParams, headerParams, - matrixParams, pathParams, queryParams, contextList); - } - } - - Method[] methods = clazz.getDeclaredMethods(); - for (Method method : methods) { - scan(method, info, path, c, p, cookieParams, formParams, - headerParams, matrixParams, pathParams, queryParams, - contextList); - } - } - - private static void scan(Field field, List cookieParams, - List formParams, List headerParams, - List matrixParams, List pathParams, - List queryParams, - List contextList) { - // Introduced by Jax-rs 2.0 - // BeanParam beanparam = field.getAnnotation(BeanParam.class); - CookieParam cookieParam = field.getAnnotation(CookieParam.class); - if (cookieParam != null) { - cookieParams.add(cookieParam); - } - - // TODO handle default value annotation? - // DefaultValue defaultvalue = field.getAnnotation(DefaultValue.class); - - // TODO Do we support encoded annotation? - // Encoded encoded = field.getAnnotation(Encoded.class); - - FormParam formParam = field.getAnnotation(FormParam.class); - if (formParam != null) { - formParams.add(formParam); - } - - HeaderParam headerParam = field.getAnnotation(HeaderParam.class); - if (headerParam != null) { - headerParams.add(headerParam); - } - - MatrixParam matrixParam = field.getAnnotation(MatrixParam.class); - if (matrixParam != null) { - matrixParams.add(matrixParam); - } - PathParam pathParam = field.getAnnotation(PathParam.class); - if (pathParam != null) { - pathParams.add(pathParam); - } - QueryParam queryParam = field.getAnnotation(QueryParam.class); - if (queryParam != null) { - queryParams.add(queryParam); - } - - javax.ws.rs.core.Context context = field - .getAnnotation(javax.ws.rs.core.Context.class); - // TODO hanlde context annotation - } - - private static void scan(Method method, ApplicationInfo info, Path cPath, - Consumes cConsumes, Produces cProduces, - List cookieParams, List formParams, - List headerParams, List matrixParams, - List pathParams, List queryParams, - List contextList) { - MethodInfo mi = new MethodInfo(); - // TODO set documentation? - - for (FormParam formParam : formParams) { - addRepresentation(mi, formParam); - } - - // "Path" decides on which resource to put this method - Path path = method.getAnnotation(Path.class); - String fullPath = getPath(cPath, path); - - ResourceInfo resource = null; - for (ResourceInfo ri : info.getResources().getResources()) { - if (fullPath.equals(ri.getPath())) { - resource = ri; - break; - } - } - if (resource == null) { - resource = new ResourceInfo(); - // TODO how to set the identifier? - resource.setIdentifier(fullPath); - resource.setPath(fullPath); - info.getResources().getResources().add(resource); - } - resource.getMethods().add(mi); - - PathParam pathParam = method.getAnnotation(PathParam.class); - if (pathParam != null) { - pathParams.add(pathParam); - ParameterInfo pi = new ParameterInfo(pathParam.value(), - ParameterStyle.TEMPLATE, "Path parameter: " - + pathParam.value()); - pi.setRequired(true); - resource.getParameters().add(pi); - } else { - // let's check that parameters are rightly specified - Template template = new Template(fullPath); - for (String var : template.getVariableNames()) { - boolean found = false; - for (ParameterInfo pi : resource.getParameters()) { - if (pi.getStyle().equals(ParameterStyle.TEMPLATE) - && var.equals(pi.getName())) { - found = true; - break; - } - } - if (!found) { - ParameterInfo pi = new ParameterInfo(var, - ParameterStyle.TEMPLATE, "Path parameter: " + var); - pi.setRequired(true); - resource.getParameters().add(pi); - } - } - } - - // Introduced by Jax-rs 2.0 - // BeanParam beanparam = method.getAnnotation(BeanParam.class); - - CookieParam cookieParam = method.getAnnotation(CookieParam.class); - if (cookieParam != null) { - ParameterInfo pi = new ParameterInfo(cookieParam.value(), - ParameterStyle.COOKIE, "Cookie parameter: " - + cookieParam.value()); - mi.getParameters().add(pi); - } - // TODO Do we support encoded annotation? - // Encoded encoded = method.getAnnotation(Encoded.class); - - FormParam formParam = method.getAnnotation(FormParam.class); - addRepresentation(mi, formParam); - - HeaderParam headerParam = method.getAnnotation(HeaderParam.class); - if (headerParam != null) { - ParameterInfo pi = new ParameterInfo(headerParam.value(), - ParameterStyle.HEADER, "Header parameter: " - + cookieParam.value()); - mi.getParameters().add(pi); - } - MatrixParam matrixParam = method.getAnnotation(MatrixParam.class); - if (matrixParam != null) { - ParameterInfo pi = new ParameterInfo(matrixParam.value(), - ParameterStyle.MATRIX, "Matrix parameter: " - + cookieParam.value()); - mi.getParameters().add(pi); - } - QueryParam queryParam = method.getAnnotation(QueryParam.class); - if (queryParam != null) { - ParameterInfo pi = new ParameterInfo(queryParam.value(), - ParameterStyle.QUERY, "Query parameter: " - + cookieParam.value()); - mi.getParameters().add(pi); - } - - // TODO do we support default value annotation? - // DefaultValue defaultvalue = method.getAnnotation(DefaultValue.class); - - DELETE delete = method.getAnnotation(DELETE.class); - GET get = method.getAnnotation(GET.class); - HEAD head = method.getAnnotation(HEAD.class); - OPTIONS options = method.getAnnotation(OPTIONS.class); - POST post = method.getAnnotation(POST.class); - PUT put = method.getAnnotation(PUT.class); - HttpMethod httpMethod = method.getAnnotation(HttpMethod.class); - if (delete != null) { - mi.setMethod(org.restlet.data.Method.DELETE); - } else if (get != null) { - mi.setMethod(org.restlet.data.Method.GET); - } else if (head != null) { - mi.setMethod(org.restlet.data.Method.HEAD); - } else if (httpMethod != null) { - mi.setMethod(org.restlet.data.Method.valueOf(httpMethod.value())); - } else if (options != null) { - mi.setMethod(org.restlet.data.Method.OPTIONS); - } else if (post != null) { - mi.setMethod(org.restlet.data.Method.POST); - } else if (put != null) { - mi.setMethod(org.restlet.data.Method.PUT); - } - - Produces produces = method.getAnnotation(Produces.class); - if (produces == null) { - produces = cProduces; - } - - Class outputClass = method.getReturnType(); - if (produces != null && outputClass != null - && !Void.class.equals(outputClass)) { - for (String produce : produces.value()) { - Variant variant = new Variant(MediaType.valueOf(produce)); - RepresentationInfo representationInfo = null; - - if (javax.ws.rs.core.Response.class - .isAssignableFrom(outputClass)) { - // We can't interpret such responses, do we try to check the - // "Web form" representation? - representationInfo = new RepresentationInfo(variant); - representationInfo - .setType(org.restlet.representation.Representation.class); - representationInfo.setIdentifier(representationInfo - .getType().getCanonicalName()); - representationInfo.setName(representationInfo.getType() - .getSimpleName()); - representationInfo.setRaw(true); - } else { - representationInfo = RepresentationInfo - .describe(mi, outputClass, - method.getGenericReturnType(), variant); - } - mi.getResponse().getRepresentations().add(representationInfo); - } - } - - // Cope with the incoming representation - Consumes consumes = method.getAnnotation(Consumes.class); - if (consumes == null) { - consumes = cConsumes; - } - Annotation[][] parameterAnnotations = method.getParameterAnnotations(); - Class[] parameterTypes = method.getParameterTypes(); - int i = 0; - for (Annotation[] annotations : parameterAnnotations) { - Class parameterType = parameterTypes[i]; - scan(annotations, parameterType, - method.getGenericParameterTypes()[i], info, resource, mi, - consumes); - i++; - } - if (mi.getResponse().getStatuses().isEmpty()) { - mi.getResponse().getStatuses().add(Status.SUCCESS_OK); - mi.getResponse().setDocumentation("Success"); - } - - // Introduced by Jax-rs 2.0, - // Context context = method.getAnnotation(Context.class); - } - - private static void scanAnnotation() { - // HttpMethod x - // NameBinding x - } - - private static void scanConstructor() { - // Encoded x - } - - /** The current Web API definition. */ - private Definition definition; - - /** - * Constructor. - * - * @param application - * An application to introspect. - */ - public JaxrsIntrospector(javax.ws.rs.core.Application application) { - definition = IntrospectionConverter.toDefinition( - getApplicationInfo(application, null), LOGGER); - - if (definition != null) { - LOGGER.fine("Look for the endpoint."); - String endpoint = null; - ApplicationPath ap = application.getClass().getAnnotation( - ApplicationPath.class); - if (ap != null) { - endpoint = ap.value(); - } - definition.setEndpoint(endpoint); - } - } - - /** - * Returns the current definition. - * - * @return The current definition. - */ - private Definition getDefinition() { - return definition; - } -} \ No newline at end of file diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/ApiSparkConfig.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/ApiSparkConfig.java new file mode 100644 index 0000000000..c03d3949b8 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/ApiSparkConfig.java @@ -0,0 +1,130 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal; + +/** + * TODO I'm not convinced by the presence of such configuration bean. The + * service really hosts the configuration. + * + * @author Manuel Boillod + */ +public class ApiSparkConfig { + + private char[] agentPassword; + + private String agentServiceUrl; + + private String agentLogin; + + private Integer agentCellId; + + private Integer agentCellVersion; + + private boolean reverseProxyEnabled; + + private String reverseProxyTargetUrl; + + private int agentAnalyticsBufferSize; + + private long agentAnalyticsPostPeriodInSecond; + + public String getAgentPassword() { + return agentPassword != null ? new String(agentPassword) : null; + } + + public String getAgentServiceUrl() { + return agentServiceUrl; + } + + public String getAgentLogin() { + return agentLogin; + } + + public Integer getAgentCellId() { + return agentCellId; + } + + public Integer getAgentCellVersion() { + return agentCellVersion; + } + + public String getReverseProxyTargetUrl() { + return reverseProxyTargetUrl; + } + + public boolean isReverseProxyEnabled() { + return reverseProxyEnabled; + } + + public void setAgentPassword(char[] agentPassword) { + this.agentPassword = agentPassword; + } + + public void setAgentSecret(String agentSecret) { + this.agentPassword = agentSecret != null ? agentSecret.toCharArray() + : null; + } + + public void setAgentServiceUrl(String agentServiceUrl) { + this.agentServiceUrl = agentServiceUrl; + } + + public void setAgentLogin(String agentLogin) { + this.agentLogin = agentLogin; + } + + public void setAgentCellId(Integer cell) { + this.agentCellId = cell; + } + + public void setAgentCellVersion(Integer cellVersion) { + this.agentCellVersion = cellVersion; + } + + public void setReverseProxyEnabled(boolean reverseProxyEnabled) { + this.reverseProxyEnabled = reverseProxyEnabled; + } + + public void setReverseProxyTargetUrl(String reverseProxyTargetUrl) { + this.reverseProxyTargetUrl = reverseProxyTargetUrl; + } + + public int getAgentAnalyticsBufferSize() { + return agentAnalyticsBufferSize; + } + + public void setAgentAnalyticsBufferSize(int agentAnalyticsBufferSize) { + this.agentAnalyticsBufferSize = agentAnalyticsBufferSize; + } + + public long getAgentAnalyticsPostPeriodInSecond() { + return agentAnalyticsPostPeriodInSecond; + } + + public void setAgentAnalyticsPostPeriodInSecond(long agentAnalyticsPostPeriodInSecond) { + this.agentAnalyticsPostPeriodInSecond = agentAnalyticsPostPeriodInSecond; + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/ApiSparkFilter.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/ApiSparkFilter.java new file mode 100644 index 0000000000..319acbdf74 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/ApiSparkFilter.java @@ -0,0 +1,256 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal; + +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.restlet.Context; +import org.restlet.Restlet; +import org.restlet.engine.util.StringUtils; +import org.restlet.ext.apispark.FirewallConfig; +import org.restlet.ext.apispark.internal.agent.AgentConfigurationException; +import org.restlet.ext.apispark.internal.agent.bean.ModulesSettings; +import org.restlet.ext.apispark.internal.agent.module.AnalyticsModule; +import org.restlet.ext.apispark.internal.agent.module.AuthenticationModule; +import org.restlet.ext.apispark.internal.agent.module.AuthorizationModule; +import org.restlet.ext.apispark.internal.agent.module.FirewallModule; +import org.restlet.ext.apispark.internal.agent.module.ModulesSettingsModule; +import org.restlet.ext.apispark.internal.agent.module.ReverseProxyModule; +import org.restlet.ext.apispark.internal.firewall.FirewallFilter; +import org.restlet.ext.apispark.internal.firewall.rule.FirewallRule; +import org.restlet.ext.apispark.internal.utils.RestletChain; +import org.restlet.routing.Filter; +import org.restlet.routing.Redirector; + +public class ApiSparkFilter extends Filter { + + /** Internal logger. */ + protected static Logger LOGGER = Logger.getLogger(ApiSparkFilter.class + .getName()); + + /** Default next restlet of filter. */ + private Restlet agentFirstRestlet; + + /** First restlet of the agent filter. */ + private Restlet filterNext; + + /** Last restlet of the agent filter. */ + private Restlet agentLastRestlet; + + /** Modules settings of the agent */ + private ModulesSettings modulesSettings; + + /** List of firewall rules set by user at creation */ + private List firewallRules; + + /** Is user set firewall enabled */ + private boolean firewallEnabled; + + /** APISpark connection configuration */ + private ApiSparkConfig apiSparkConfig; + + /** APISpark connection enabled */ + private boolean agentEnabled; + + /** Restlet context */ + private Context context; + + /** + * Create a new ApiSparkFilter with the specified configuration. + * + * @param context + * The current context. + * @param apiSparkConfig + * The ApiSparkService configuration. + */ + public ApiSparkFilter(Context context, ApiSparkConfig apiSparkConfig, + boolean agentEnabled, boolean firewallEnabled, + List firewallRules) { + super(context); + this.firewallRules = firewallRules; + this.firewallEnabled = firewallEnabled; + this.apiSparkConfig = apiSparkConfig; + this.agentEnabled = agentEnabled; + this.context = context; + + validateRedirection(apiSparkConfig); + + if (agentEnabled) { + validateAgentConfiguration(apiSparkConfig); + modulesSettings = ModulesSettingsModule.getModulesSettings( + apiSparkConfig, null); + } + + refreshApiSparkFilter(); + + } + + /** + * Retrieves the modules settings from the service and updates the filter. + */ + public void refreshApiSparkFilterIfRevisionChanged() { + + try { + ModulesSettings newModulesSettings = ModulesSettingsModule + .getModulesSettings(apiSparkConfig, modulesSettings); + + if (newModulesSettings != null) { + modulesSettings = newModulesSettings; + + LOGGER.info("Updating modules settings"); + refreshApiSparkFilter(); + } + } catch (Exception e) { + LOGGER.log(Level.WARNING, + "Unable to retrieve agent settings from apispark", e); + } + } + + /** + * Updates the filter with its modules settings. + */ + public void refreshApiSparkFilter() { + + boolean authenticationEnabled = false; + RestletChain restletChain = new RestletChain(); + + if (agentEnabled) { + + if (modulesSettings.isAuthenticationModuleEnabled()) { + LOGGER.info("Add authentication module"); + authenticationEnabled = true; + restletChain.add(new AuthenticationModule(apiSparkConfig, + modulesSettings, context)); + } + if (modulesSettings.isAuthorizationModuleEnabled()) { + if (!modulesSettings.isAuthenticationModuleEnabled()) { + throw new AgentConfigurationException( + "The authorization module requires the authentication module which is not enabled"); + } + LOGGER.info("Add authorization module"); + restletChain.add(new AuthorizationModule(apiSparkConfig, + modulesSettings, context)); + } + + if (modulesSettings.isFirewallModuleEnabled()) { + firewallEnabled = true; + FirewallModule firewallModule = new FirewallModule( + apiSparkConfig, modulesSettings); + FirewallConfig firewallConfig = new FirewallConfig( + firewallRules); + firewallModule.updateFirewallConfig(firewallConfig); + } + + if (modulesSettings.isAnalyticsModuleEnabled()) { + LOGGER.info("Add analytics module"); + restletChain.add(new AnalyticsModule(apiSparkConfig, + modulesSettings, context)); + } + } + + if (firewallEnabled) { + LOGGER.info("Add firewall module"); + restletChain.add(new FirewallFilter(context, firewallRules)); + } + + if (apiSparkConfig.isReverseProxyEnabled()) { + LOGGER.info("Add redirection module"); + String redirectorUrl = apiSparkConfig.getReverseProxyTargetUrl() + + "{rr}"; + Redirector redirector = new ReverseProxyModule(context, + redirectorUrl, authenticationEnabled); + restletChain.add(redirector); + } + + if (restletChain.getFirst() == null) { + LOGGER.warning("No modules are enabled."); + } + + agentFirstRestlet = restletChain.getFirst(); + agentLastRestlet = restletChain.getLast(); + } + + @Override + public Restlet getNext() { + return agentFirstRestlet != null ? agentFirstRestlet : filterNext; + } + + @Override + public void setNext(Restlet next) { + filterNext = next; + // If the agent has any restlet components, set the next on the last + // one. + if (agentLastRestlet != null) { + if (agentLastRestlet instanceof Filter) { + Filter filter = (Filter) agentLastRestlet; + filter.setNext(next); + } + } + } + + /** + * Terminates the agent if the service's configuration is not correctly set. + * + * @param config + * The service's configuration + */ + public void validateAgentConfiguration(ApiSparkConfig config) { + if (config.getAgentCellId() == null) { + throw new IllegalArgumentException( + "The cell identifier is mandatory"); + } + if (config.getAgentCellId() == null) { + throw new IllegalArgumentException( + "The cell version identifier is mandatory"); + } + if (StringUtils.isNullOrEmpty(config.getAgentServiceUrl())) { + throw new IllegalArgumentException( + "The agent service url is mandatory"); + } + if (StringUtils.isNullOrEmpty(config.getAgentLogin())) { + throw new IllegalArgumentException("The agent login is mandatory"); + } + if (StringUtils.isNullOrEmpty(config.getAgentPassword())) { + throw new IllegalArgumentException( + "The agent password key is mandatory"); + } + } + + /** + * Validates the redirection URL + * + * @param config + * The service's configuration + */ + public void validateRedirection(ApiSparkConfig config) { + if (config.isReverseProxyEnabled() + && StringUtils.isNullOrEmpty(config.getReverseProxyTargetUrl())) { + throw new IllegalArgumentException( + "The redirection url is mandatory when redirection is enabled"); + } + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentConfigurationException.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentConfigurationException.java new file mode 100644 index 0000000000..b30cd7e941 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentConfigurationException.java @@ -0,0 +1,47 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent; + +/** + * @author Manuel Boillod + */ +@SuppressWarnings("serial") +public class AgentConfigurationException extends AgentException { + + public AgentConfigurationException() { + } + + public AgentConfigurationException(String message) { + super(message); + } + + public AgentConfigurationException(String message, Throwable cause) { + super(message, cause); + } + + public AgentConfigurationException(Throwable cause) { + super(cause); + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentConfigurationTimerTask.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentConfigurationTimerTask.java new file mode 100644 index 0000000000..89480a2409 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentConfigurationTimerTask.java @@ -0,0 +1,25 @@ +package org.restlet.ext.apispark.internal.agent; + +import java.util.TimerTask; +import java.util.logging.Logger; + +import org.restlet.ext.apispark.internal.ApiSparkFilter; + +public class AgentConfigurationTimerTask extends TimerTask { + + /** Internal logger. */ + protected static Logger LOGGER = Logger + .getLogger(AgentConfigurationTimerTask.class.getName()); + + /** ApiSpark filter to reconfigure at each tick. */ + private ApiSparkFilter agentFilter; + + public AgentConfigurationTimerTask(ApiSparkFilter agentFilter) { + this.agentFilter = agentFilter; + } + + @Override + public void run() { + agentFilter.refreshApiSparkFilterIfRevisionChanged(); + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentConstants.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentConstants.java new file mode 100644 index 0000000000..f89fc61d1f --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentConstants.java @@ -0,0 +1,42 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent; + +/** + * @author Manuel Boillod + */ +public class AgentConstants { + + public static final String AGENT_VERSION = "1.0.0"; + + public static final String REQUEST_HEADER_CONNECTOR_AGENT_EXPECTED_VERSION = "x-restlet-connector-agent-expected-version"; + + public static final String REQUEST_HEADER_CONNECTOR_AGENT_VERSION = "x-restlet-connector-agent-version"; + + public static final String REQUEST_HEADER_CONNECTOR_CELL_EXPECTED_REVISION = "x-restlet-connector-cell-expected-revision"; + + public static final String REQUEST_HEADER_CONNECTOR_CELL_REVISION = "x-restlet-connector-cell-revision"; + +} diff --git a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Header.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentException.java similarity index 52% rename from modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Header.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentException.java index efd511c019..4abd1a9243 100644 --- a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Header.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentException.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -31,12 +22,26 @@ * Restlet is a registered trademark of Restlet S.A.S. */ -package org.restlet.ext.swagger.internal.model; +package org.restlet.ext.apispark.internal.agent; /** - * - * @author + * @author Manuel Boillod */ -public class Header extends Parameter { +@SuppressWarnings("serial") +public class AgentException extends RuntimeException { + + public AgentException() { + } + + public AgentException(String message) { + super(message); + } + + public AgentException(String message, Throwable cause) { + super(message, cause); + } + public AgentException(Throwable cause) { + super(cause); + } } diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentUtils.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentUtils.java new file mode 100644 index 0000000000..0d4866255e --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/AgentUtils.java @@ -0,0 +1,125 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent; + +import org.restlet.data.ChallengeScheme; +import org.restlet.data.Header; +import org.restlet.data.MediaType; +import org.restlet.ext.apispark.internal.ApiSparkConfig; +import org.restlet.ext.apispark.internal.agent.bean.ModulesSettings; +import org.restlet.resource.ClientResource; +import org.restlet.util.Series; + +/** + * Tool class for the agent service. + * + * @author Manuel Boillod + */ +public abstract class AgentUtils { + + /** + * Returns a client resource configured to communicate with the APISpark + * connector cell. + * + * @param apiSparkConfig + * The agent configuration. + * @param modulesSettings + * The optional modules settings. + * @param resourceClass + * The resource class. + * @param resourcePath + * The resource path. + * + * @return A client resource configured to communicate with the apispark + * connector cell. + */ + public static T getClientResource(ApiSparkConfig apiSparkConfig, + ModulesSettings modulesSettings, Class resourceClass, + String resourcePath) { + + ClientResource clientResource = new ClientResource(buildResourcePath( + apiSparkConfig, resourcePath)); + clientResource.accept(MediaType.APPLICATION_JSON); + + // add authentication scheme + clientResource.setChallengeResponse(ChallengeScheme.HTTP_BASIC, + apiSparkConfig.getAgentLogin(), + apiSparkConfig.getAgentPassword()); + + // send agent version to apispark in headers + Series
headers = clientResource.getRequest().getHeaders(); + headers.add(AgentConstants.REQUEST_HEADER_CONNECTOR_AGENT_VERSION, + AgentConstants.AGENT_VERSION); + + // send connector cell revision to apispark in headers + if (modulesSettings != null) { + headers.add(AgentConstants.REQUEST_HEADER_CONNECTOR_CELL_REVISION, + modulesSettings.getCellRevision()); + } + + return clientResource.wrap(resourceClass, AgentUtils.class.getClassLoader()); + } + + /** + * Builds the path of the client resource to communicate with the APISpark + * connector cell. + * + * @param apiSparkConfig + * The agent configuration. + * @param resourcePath + * The resource path. + * @return The path of the client resource to communicate with the APISpark + * connector cell. + */ + private static String buildResourcePath(ApiSparkConfig apiSparkConfig, + String resourcePath) { + StringBuilder sb = new StringBuilder( + apiSparkConfig.getAgentServiceUrl()); + if (!apiSparkConfig.getAgentServiceUrl().endsWith("/")) { + sb.append("/"); + } + sb.append("agent"); + sb.append("/cells/"); + sb.append(apiSparkConfig.getAgentCellId()); + sb.append("/versions/"); + sb.append(apiSparkConfig.getAgentCellVersion()); + if (resourcePath != null) { + if (!resourcePath.startsWith("/")) { + sb.append("/"); + } + sb.append(resourcePath); + } + + return sb.toString(); + } + + /** + * Private constructor to ensure that the class acts as a true utility class + * i.e. it isn't instantiable and extensible. + */ + private AgentUtils() { + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/AuthenticationSettings.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/AuthenticationSettings.java new file mode 100644 index 0000000000..059f6b4170 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/AuthenticationSettings.java @@ -0,0 +1,66 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.bean; + +import java.util.concurrent.TimeUnit; + +/** + * @author Manuel Boillod + */ +public class AuthenticationSettings { + + private int cacheSize = 1000; + + private long cacheTimeToLiveSeconds = TimeUnit.MINUTES.toSeconds(5); + + /** + * Indicates if the authentication is optional. + */ + private boolean optional = false; + + public int getCacheSize() { + return cacheSize; + } + + public long getCacheTimeToLiveSeconds() { + return cacheTimeToLiveSeconds; + } + + public boolean isOptional() { + return optional; + } + + public void setCacheSize(int cacheSize) { + this.cacheSize = cacheSize; + } + + public void setCacheTimeToLiveSeconds(long cacheTimeToLiveSeconds) { + this.cacheTimeToLiveSeconds = cacheTimeToLiveSeconds; + } + + public void setOptional(boolean optional) { + this.optional = optional; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/CallLog.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/CallLog.java new file mode 100644 index 0000000000..4082be33e6 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/CallLog.java @@ -0,0 +1,120 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.bean; + +import java.io.Serializable; +import java.util.Date; + +/** + * Contains information about one call made to a Web API, used for communication + * with APISpark to store analytics about the Web API. + * + * @author Cyprien Quilici + * + */ +public class CallLog implements Serializable { + + private static final long serialVersionUID = 1L; + + private Date date; + + private int duration; + + private String method; + + private String path; + + private String remoteIp; + + private int statusCode; + + private String userAgent; + + private String userToken; + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + public int getDuration() { + return duration; + } + + public void setDuration(int duration) { + this.duration = duration; + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getRemoteIp() { + return remoteIp; + } + + public void setRemoteIp(String remoteIp) { + this.remoteIp = remoteIp; + } + + public int getStatusCode() { + return statusCode; + } + + public void setStatusCode(int statusCode) { + this.statusCode = statusCode; + } + + public String getUserAgent() { + return userAgent; + } + + public void setUserAgent(String userAgent) { + this.userAgent = userAgent; + } + + public String getUserToken() { + return userToken; + } + + public void setUserToken(String userToken) { + this.userToken = userToken; + } +} diff --git a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Account.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/CallLogs.java similarity index 52% rename from modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Account.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/CallLogs.java index 5466e2a193..211360a155 100644 --- a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Account.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/CallLogs.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -31,16 +22,26 @@ * Restlet is a registered trademark of Restlet S.A.S. */ -package org.restlet.ext.swagger.internal.model; +package org.restlet.ext.apispark.internal.agent.bean; + +import java.io.Serializable; +import java.util.ArrayList; /** + * List of CallLog element, used for communication with APISpark to store + * analytics about the Web API. + * + * @author Cyprien Quilici * - * @author */ -public class Account { +public class CallLogs extends ArrayList implements Serializable { - public void createApi(Contract api) { + private static final long serialVersionUID = 1L; + public CallLogs() { } + public CallLogs(int size) { + super(size); + } } diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/Credentials.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/Credentials.java new file mode 100644 index 0000000000..e17190f6b7 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/Credentials.java @@ -0,0 +1,57 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.bean; + +public class Credentials { + + private char[] password; + + private String username; + + public Credentials() { + } + + public Credentials(String username, char[] password) { + this.username = username; + this.password = password; + } + + public char[] getPassword() { + return password; + } + + public String getUsername() { + return username; + } + + public void setPassword(char[] password) { + this.password = password; + } + + public void setUsername(String username) { + this.username = username; + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/FirewallIpFilter.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/FirewallIpFilter.java new file mode 100644 index 0000000000..868e161471 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/FirewallIpFilter.java @@ -0,0 +1,56 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.bean; + +import java.util.List; + +/** + * @author Manuel Boillod + */ +public class FirewallIpFilter { + + List ips; + + /** + * Indicates if IpFilter is of type white list or black list + */ + boolean whiteList; + + public List getIps() { + return ips; + } + + public boolean isWhiteList() { + return whiteList; + } + + public void setIps(List ips) { + this.ips = ips; + } + + public void setWhiteList(boolean whiteList) { + this.whiteList = whiteList; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/FirewallRateLimit.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/FirewallRateLimit.java new file mode 100644 index 0000000000..0c0b6483ca --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/FirewallRateLimit.java @@ -0,0 +1,88 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.bean; + +public class FirewallRateLimit { + + private boolean defaultRateLimit; + + private String group; + + private String id; + + private String name; + + private int period; + + private int rateLimit; + + public String getGroup() { + return group; + } + + public String getId() { + return id; + } + + public String getName() { + return name; + } + + public int getPeriod() { + return period; + } + + public int getRateLimit() { + return rateLimit; + } + + public boolean isDefaultRateLimit() { + return defaultRateLimit; + } + + public void setDefaultRateLimit(boolean defaultRateLimit) { + this.defaultRateLimit = defaultRateLimit; + } + + public void setGroup(String group) { + this.group = group; + } + + public void setId(String id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setPeriod(int period) { + this.period = period; + } + + public void setRateLimit(int rateLimit) { + this.rateLimit = rateLimit; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/FirewallSettings.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/FirewallSettings.java new file mode 100644 index 0000000000..04f99d2be1 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/FirewallSettings.java @@ -0,0 +1,50 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.bean; + +import java.util.List; + +public class FirewallSettings { + + private List ipFilters; + + private List rateLimits; + + public List getIpFilters() { + return ipFilters; + } + + public List getRateLimits() { + return rateLimits; + } + + public void setIpFilters(List ipFilters) { + this.ipFilters = ipFilters; + } + + public void setRateLimits(List rateLimits) { + this.rateLimits = rateLimits; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/ModulesSettings.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/ModulesSettings.java new file mode 100644 index 0000000000..2b8ca31b40 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/ModulesSettings.java @@ -0,0 +1,82 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.bean; + +/** + * @author Manuel Boillod + */ +public class ModulesSettings { + + boolean analyticsModuleEnabled; + + boolean authenticationModuleEnabled; + + boolean authorizationModuleEnabled; + + String cellRevision; + + boolean firewallModuleEnabled; + + public String getCellRevision() { + return cellRevision; + } + + public boolean isAnalyticsModuleEnabled() { + return analyticsModuleEnabled; + } + + public boolean isAuthenticationModuleEnabled() { + return authenticationModuleEnabled; + } + + public boolean isAuthorizationModuleEnabled() { + return authorizationModuleEnabled; + } + + public boolean isFirewallModuleEnabled() { + return firewallModuleEnabled; + } + + public void setAnalyticsModuleEnabled(boolean analyticsModuleEnabled) { + this.analyticsModuleEnabled = analyticsModuleEnabled; + } + + public void setAuthenticationModuleEnabled( + boolean authenticationModuleEnabled) { + this.authenticationModuleEnabled = authenticationModuleEnabled; + } + + public void setAuthorizationModuleEnabled(boolean authorizationModuleEnabled) { + this.authorizationModuleEnabled = authorizationModuleEnabled; + } + + public void setCellRevision(String cellRevision) { + this.cellRevision = cellRevision; + } + + public void setFirewallModuleEnabled(boolean firewallModuleEnabled) { + this.firewallModuleEnabled = firewallModuleEnabled; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/OperationAuthorization.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/OperationAuthorization.java new file mode 100644 index 0000000000..0239e7473a --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/OperationAuthorization.java @@ -0,0 +1,77 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.bean; + +import java.util.List; + +/** + * @author Manuel Boillod + */ +public class OperationAuthorization { + + List groupsAllowed; + + String method; + + /** + * The URI path template that must match the relative part of the resource + * URI. + */ + String pathTemplate; + + public OperationAuthorization() { + } + + public OperationAuthorization(String method, String pathTemplate, + List groupsAllowed) { + this.method = method; + this.pathTemplate = pathTemplate; + this.groupsAllowed = groupsAllowed; + } + + public List getGroupsAllowed() { + return groupsAllowed; + } + + public String getMethod() { + return method; + } + + public String getPathTemplate() { + return pathTemplate; + } + + public void setGroupsAllowed(List groupsAllowed) { + this.groupsAllowed = groupsAllowed; + } + + public void setMethod(String method) { + this.method = method; + } + + public void setPathTemplate(String pathTemplate) { + this.pathTemplate = pathTemplate; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/OperationsAuthorization.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/OperationsAuthorization.java new file mode 100644 index 0000000000..db040ced86 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/OperationsAuthorization.java @@ -0,0 +1,44 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.bean; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * @author Manuel Boillod + */ +public class OperationsAuthorization extends ArrayList { + + private static final long serialVersionUID = 1L; + + public OperationsAuthorization() { + } + + public OperationsAuthorization( + Collection c) { + super(c); + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/User.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/User.java new file mode 100644 index 0000000000..acc4ec8374 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/bean/User.java @@ -0,0 +1,80 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.bean; + +import java.util.List; + +public class User { + + private String email; + + private String firstName; + + private List groups; + + private String lastName; + + private String username; + + public String getEmail() { + return email; + } + + public String getFirstName() { + return firstName; + } + + public List getGroups() { + return groups; + } + + public String getLastName() { + return lastName; + } + + public String getUsername() { + return username; + } + + public void setEmail(String email) { + this.email = email; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public void setGroups(List groups) { + this.groups = groups; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public void setUsername(String username) { + this.username = username; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AnalyticsHandler.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AnalyticsHandler.java new file mode 100644 index 0000000000..dbc5813d21 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AnalyticsHandler.java @@ -0,0 +1,295 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.module; + +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Timer; +import java.util.TimerTask; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.RejectedExecutionException; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.logging.Logger; + +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.ext.apispark.internal.ApiSparkConfig; +import org.restlet.ext.apispark.internal.agent.AgentUtils; +import org.restlet.ext.apispark.internal.agent.bean.CallLog; +import org.restlet.ext.apispark.internal.agent.bean.CallLogs; +import org.restlet.ext.apispark.internal.agent.bean.ModulesSettings; +import org.restlet.ext.apispark.internal.agent.resource.AnalyticsResource; + +import com.google.common.collect.Lists; +import com.google.common.util.concurrent.ThreadFactoryBuilder; + +public class AnalyticsHandler { + + /** Internal logger. */ + protected static Logger LOGGER = Logger.getLogger(AnalyticsHandler.class + .getName()); + + /** Maximum number of concurrent call logs post threads */ + private static final int THREAD_MAX_NUMBER = 3; + + /** + * Number of buffered calls. Asynchronous post of analytics is triggered + * either every POST_PERIOD or when the buffer exceeds this number. + */ + private int bufferSize = 100; + + + /** Maximum time between two asynchronous call logs post. */ + private long postPeriodInSecond = 60; + + /** + * Initial time to wait between to attempts to reach the APISpark analytics + * service in milliseconds. + * + * This number is multiplied at each attempt. See + * {@link AsyncCallLogsPostTask#getRetryTime(int)} for more details. + */ + private static final long RETRY_AFTER = 500; + + /** + * Maximum number of attempts to reach the APISpark analytics service if + * there are errors before the call logs are lost. + */ + private static final int MAX_ATTEMPTS = 5; + + /** + * Maximum time between two attempts to reach the APISpark analytics + * service. + */ + private static final long MAX_TIME = TimeUnit.SECONDS.toMillis(10); + + /** Timer trigerring call logs post to APISpark */ + private Timer asyncPostTimer; + + /** Client resourceused to post call logs to APISpark */ + private AnalyticsResource analyticsClientResource; + + /** Executor service used for async tasks */ + private ExecutorService executorService; + + /** List of call logs */ + private final List callLogs; + + /** + * Create a new analytics handler with the specified settings. + * + * @param apiSparkConfig + * The agent configuration. + * @param modulesSettings + * The modules settings. + */ + public AnalyticsHandler(ApiSparkConfig apiSparkConfig, + ModulesSettings modulesSettings) { + analyticsClientResource = AgentUtils.getClientResource(apiSparkConfig, + modulesSettings, AnalyticsResource.class, + AnalyticsModule.ANALYTICS_PATH); + callLogs = Collections.synchronizedList(Lists + . newArrayListWithExpectedSize(bufferSize)); + + bufferSize = apiSparkConfig.getAgentAnalyticsBufferSize(); + executorService = new ThreadPoolExecutor(1, THREAD_MAX_NUMBER, 0L, + TimeUnit.SECONDS, + new LinkedBlockingQueue(bufferSize), + new ThreadFactoryBuilder().setNameFormat("analytics-poster-%d") + .build()); + + postPeriodInSecond = apiSparkConfig.getAgentAnalyticsPostPeriodInSecond(); + long postPeriodInMs = TimeUnit.SECONDS.toMillis(postPeriodInSecond); + + asyncPostTimer = new Timer(); + asyncPostTimer.schedule(new TimerTask() { + + @Override + public void run() { + flushLogs(); + + } + }, postPeriodInMs, postPeriodInMs); + } + + /** + * Generates a CallLog for the request and adds it to the buffer. + * + * @param request + * The Request object associated with the request. + * @param response + * The Response object associated with the request. + * @param duration + * The duration of the request in milliseconds. + * @param startTime + * The time at which the request arrived to the agent as an + * epoch. + */ + public void addCallLogToBuffer(Request request, Response response, + int duration, long startTime) { + + CallLog callLog = new CallLog(); + callLog.setDate(new Date(startTime)); + callLog.setDuration(duration); + callLog.setMethod(request.getMethod().getName()); + callLog.setPath(request.getResourceRef().getPath()); + callLog.setRemoteIp(request.getClientInfo().getUpstreamAddress()); + callLog.setStatusCode(response.getStatus().getCode()); + callLog.setUserAgent(request.getClientInfo().getAgent()); + + callLog.setUserToken((request.getClientInfo().getUser() == null) ? "" + : request.getClientInfo().getUser().getIdentifier()); + + callLogs.add(callLog); + + if (callLogs.size() >= bufferSize) { + flushLogs(); + } + } + + /** + * Creates a new Thread that asynchronously posts call logs to APISpark + */ + public void flushLogs() { + if (callLogs.isEmpty()) { + return; + } + + CallLogs logsToPost; + synchronized (callLogs) { + if (callLogs.isEmpty()) { + return; + } + logsToPost = new CallLogs(callLogs.size()); + logsToPost.addAll(callLogs); + callLogs.clear(); + } + + postLogs(logsToPost); + } + + /** + * Adds a task to the executor service to post call logs to the APISpark + * analytics service. + * + * If the executor service cannot satisfy the request, the call logs are + * lost and an error message is logged with the reason of the failure. + * + * @param logsToPost + * The call logs to post to the APISpark analytics service. + */ + private void postLogs(CallLogs logsToPost) { + try { + executorService.execute(new AsyncCallLogsPostTask(logsToPost)); + } catch (RejectedExecutionException e) { + LOGGER.severe("Posting " + logsToPost.size() + + " call logs failed permanently due to \"" + + e.getCause().getMessage() + "\"."); + errorSendLog(logsToPost); + } + } + + /** + * Called on permanent errors. Override to add your own behavior. + * + * @param logsToPost + * The list of logs that were not posted. + */ + protected void errorSendLog(CallLogs logsToPost) { + // do nothing + } + + /** + * Asynchronous task posting the call logs to APISpark and implementing + * fall-back methods if attempts are not successful. + * + * @author Cyprien Quilici + * + */ + private class AsyncCallLogsPostTask implements Runnable { + + private CallLogs logsToPost; + + public AsyncCallLogsPostTask(CallLogs logsToPost) { + this.logsToPost = logsToPost; + } + + @Override + public void run() { + for (int attemptNumber = 1; attemptNumber <= MAX_ATTEMPTS + 1; attemptNumber++) { + try { + analyticsClientResource.postLogs(logsToPost); + LOGGER.fine(logsToPost.size() + + " call logs sent to the analytics service."); + break; + } catch (Exception e) { + if (attemptNumber == MAX_ATTEMPTS) { + LOGGER.severe("Posting " + logsToPost.size() + + " call logs failed permanently after " + + MAX_ATTEMPTS + " attempts."); + errorSendLog(logsToPost); + } else { + LOGGER.warning("Error sending " + + logsToPost.size() + + " call logs to the analytics service during attempt n°" + + attemptNumber + " because \"" + + e.getMessage() + "\"."); + try { + Thread.sleep(getRetryTime(attemptNumber)); + } catch (InterruptedException e1) { + // ignore + } + } + } + } + } + + /** + * Returns the time to wait between two attempts to reach the APISpark + * analytics service. + * + * It is multiplied by 2 each attempt with a maximum limit of + * {@link AnalyticsHandler#MAX_TIME}. + * + * @param attemptNumber + * The number of the attempt. + * @return The time to wait between two attempts to reach the APISpark + * analytics service. + */ + private long getRetryTime(int attemptNumber) { + long newTime = RETRY_AFTER + * ((int) Math.pow(2.0, attemptNumber - 1)); + return Math.min(newTime, MAX_TIME); + } + } + + public synchronized void stop() throws Exception { + asyncPostTimer.cancel(); + executorService.shutdown(); + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AnalyticsModule.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AnalyticsModule.java new file mode 100644 index 0000000000..836a359d06 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AnalyticsModule.java @@ -0,0 +1,121 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.module; + +import java.util.concurrent.TimeUnit; +import java.util.logging.Logger; + +import org.restlet.Context; +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.ext.apispark.internal.ApiSparkConfig; +import org.restlet.ext.apispark.internal.agent.bean.ModulesSettings; +import org.restlet.routing.Filter; + +/** + * Analytics module for the agent. This class extends {@link Filter} and sends + * call logs to the APISpark platform. To view them, open the Analytics tab of + * your Connector. + * + * Posting is asynchronous to preserve performance. + * + * @author Cyprien Quilici + */ +public class AnalyticsModule extends Filter { + + /** Internal logger. */ + protected static Logger LOGGER = Logger.getLogger(AnalyticsModule.class + .getName()); + + /** Analytics handler */ + private AnalyticsHandler analyticsHandler; + + /** + * Last segment of the path to the APISpark analytics service for this + * connector. + */ + public static final String ANALYTICS_PATH = "/analytics"; + + /** + * Create a new Analytics module with the specified settings. + * + * @param apiSparkConfig + * The agent configuration. + * @param modulesSettings + * The modules settings. + */ + public AnalyticsModule(ApiSparkConfig apiSparkConfig, + ModulesSettings modulesSettings) { + this(apiSparkConfig, modulesSettings, null); + } + + /** + * Create a new Authentication module with the specified settings. + * + * @param apiSparkConfig + * The agent configuration. + * @param modulesSettings + * The modules settings. + * @param context + * The context. + */ + public AnalyticsModule(ApiSparkConfig apiSparkConfig, + ModulesSettings modulesSettings, Context context) { + super(context); + + analyticsHandler = new AnalyticsHandler(apiSparkConfig, modulesSettings); + } + + @Override + protected int beforeHandle(Request request, Response response) { + request.getAttributes().put("org.restlet.startTime", getTimeMillis()); + return CONTINUE; + } + + @Override + protected void afterHandle(Request request, Response response) { + long startTime = (Long) request.getAttributes().get( + "org.restlet.startTime"); + int duration = (int) (getTimeMillis() - startTime); + analyticsHandler.addCallLogToBuffer(request, response, duration, + startTime); + } + + /** + * Returns the current time in milliseconds. Uses {@link System#nanoTime()} + * for enhanced precision. + * + * @return The current time in milliseconds. + */ + private long getTimeMillis() { + return TimeUnit.NANOSECONDS.toMillis(System.nanoTime()); + } + + @Override + public synchronized void stop() throws Exception { + analyticsHandler.stop(); + super.stop(); + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AuthenticationModule.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AuthenticationModule.java new file mode 100644 index 0000000000..37924c890a --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AuthenticationModule.java @@ -0,0 +1,296 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.module; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.concurrent.TimeUnit; +import java.util.logging.Logger; + +import org.restlet.Application; +import org.restlet.Context; +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.data.ChallengeScheme; +import org.restlet.data.Status; +import org.restlet.ext.apispark.internal.ApiSparkConfig; +import org.restlet.ext.apispark.internal.agent.AgentException; +import org.restlet.ext.apispark.internal.agent.AgentUtils; +import org.restlet.ext.apispark.internal.agent.bean.AuthenticationSettings; +import org.restlet.ext.apispark.internal.agent.bean.Credentials; +import org.restlet.ext.apispark.internal.agent.bean.ModulesSettings; +import org.restlet.ext.apispark.internal.agent.bean.User; +import org.restlet.ext.apispark.internal.agent.resource.AuthenticationAuthenticateResource; +import org.restlet.resource.ResourceException; +import org.restlet.security.ChallengeAuthenticator; +import org.restlet.security.Role; +import org.restlet.security.Verifier; + +import com.google.common.cache.CacheBuilder; +import com.google.common.cache.CacheLoader; +import com.google.common.cache.LoadingCache; +import com.google.common.util.concurrent.UncheckedExecutionException; + +/** + * Authentication module for the agent. This class extends {@link ChallengeAuthenticator} and is responsible to fill + * {@link org.restlet.data.ClientInfo} on the request. + * + * @author Manuel Boillod + */ +public class AuthenticationModule extends ChallengeAuthenticator { + + private class AgentVerifier implements Verifier { + + @Override + public int verify(Request request, Response response) { + int result; + + if (request.getChallengeResponse() == null) { + result = RESULT_MISSING; + } else { + String identifier = request.getChallengeResponse() + .getIdentifier(); + char[] secret = request.getChallengeResponse().getSecret(); + UserIdentifier userIdentifier = new UserIdentifier(identifier, + secret); + + try { + // we have to add secret in cache key because cache loader + // needs the secret. + UserInfo userInfo = userLoadingCache + .getUnchecked(userIdentifier); + if (userInfo == null) { + throw new AgentException("User could not be null"); + } + // verify password (only after getting user from cache). + // See UserIdenfifier javadoc for more details. + if (!Arrays.equals(secret, userInfo.getSecret())) { + result = RESULT_INVALID; + } else { + // set user on request client info + User user = userInfo.getUser(); + org.restlet.security.User securityUser = new org.restlet.security.User( + identifier, (char[]) null, user.getFirstName(), + user.getLastName(), user.getEmail()); + request.getClientInfo().setUser(securityUser); + + // set roles on request client info + List securityRoles = new ArrayList<>(); + Application application = Application.getCurrent(); + if (user.getGroups() != null) { + for (String role : user.getGroups()) { + securityRoles.add(new Role(application, role)); + } + } + request.getClientInfo().setRoles(securityRoles); + + result = RESULT_VALID; + } + } catch (UncheckedExecutionException e) { + if (e.getCause() instanceof ResourceException) { + // client resource exception (status 401 is normal) + ResourceException rex = (ResourceException) e + .getCause(); + if (Status.CLIENT_ERROR_UNAUTHORIZED.equals(rex + .getStatus())) { + response.setStatus(Status.CLIENT_ERROR_UNAUTHORIZED); + result = RESULT_INVALID; + } else { + throw new ResourceException( + Status.SERVER_ERROR_INTERNAL, + "Agent service error during user authentication of user: " + + identifier, rex); + } + } else { + throw new AgentException( + "Unexpected error during user authentication error of user: " + + identifier, e); + } + } + } + + return result; + } + } + + /** + * This class is used as Cache Key. The {@link #secret} is not used in the + * key, but the {@link CacheLoader} need it. + * + * Warning: The {@link #hashCode()} and {@link #equals(Object)} methods only + * use the {@link #identifier} attribute. The secret should be compared + * separately. + */ + public static class UserIdentifier { + + private String identifier; + + private char[] secret; + + public UserIdentifier(String identifier, char[] secret) { + this.identifier = identifier; + this.secret = secret; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj instanceof UserIdentifier) { + UserIdentifier userIdentifier = (UserIdentifier) obj; + return Objects.equals(identifier, userIdentifier.identifier); + } + return false; + } + + public String getIdentifier() { + return identifier; + } + + public char[] getSecret() { + return secret; + } + + @Override + public int hashCode() { + return Objects.hash(identifier); + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + public void setSecret(char[] secret) { + this.secret = secret; + } + } + + private static class UserInfo { + private char[] secret; + + private User user; + + private UserInfo(User user, char[] secret) { + this.user = user; + this.secret = secret; + } + + public char[] getSecret() { + return secret; + } + + public User getUser() { + return user; + } + } + + public static final String AUTHENTICATE_PATH = "/authentication/authenticate"; + + /** Internal logger. */ + protected static Logger LOGGER = Logger + .getLogger(AuthenticationModule.class.getName()); + + private AuthenticationAuthenticateResource authenticateClientResource; + + private AuthenticationSettings authenticationSettings; + + private LoadingCache userLoadingCache; + + /** + * Create a new Authentication module with the specified settings. + * + * @param apiSparkConfig + * The agent configuration. + * @param modulesSettings + * The modules settings. + */ + public AuthenticationModule(ApiSparkConfig apiSparkConfig, + ModulesSettings modulesSettings) { + this(apiSparkConfig, modulesSettings, null); + } + + /** + * Create a new Authentication module with the specified settings. + * + * @param apiSparkConfig + * The agent configuration. + * @param modulesSettings + * The modules settings. + * @param context + * The context + */ + public AuthenticationModule(ApiSparkConfig apiSparkConfig, + ModulesSettings modulesSettings, Context context) { + super(context, ChallengeScheme.HTTP_BASIC, "realm"); + + authenticationSettings = new AuthenticationSettings(); + authenticationSettings.setOptional(modulesSettings.isAuthorizationModuleEnabled()); + + authenticateClientResource = AgentUtils.getClientResource( + apiSparkConfig, modulesSettings, + AuthenticationAuthenticateResource.class, AUTHENTICATE_PATH); + + // config ChallengeAuthenticator + setOptional(authenticationSettings.isOptional()); + setVerifier(new AgentVerifier()); + + // Initialize the cache + initializeCache(); + } + + /** + * Initializes the user cache and the cache loader instance. + */ + private void initializeCache() { + // Cache loader get user from apispark. Never returns null + CacheLoader userLoader = new CacheLoader() { + public UserInfo load(UserIdentifier userIdentifier) { + Credentials credentials = new Credentials( + userIdentifier.getIdentifier(), + userIdentifier.getSecret()); + User user = authenticateClientResource + .authenticate(credentials); + if (user == null) { + // Authentication should throw an error instead of + // returning + // null + throw new AgentException( + "Authentication should not return null"); + } + return new UserInfo(user, userIdentifier.getSecret()); + } + }; + + userLoadingCache = CacheBuilder + .newBuilder() + .maximumSize(authenticationSettings.getCacheSize()) + .expireAfterWrite( + authenticationSettings.getCacheTimeToLiveSeconds(), + TimeUnit.SECONDS).build(userLoader); + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AuthorizationModule.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AuthorizationModule.java new file mode 100644 index 0000000000..4ec9c5b27d --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/AuthorizationModule.java @@ -0,0 +1,216 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.module; + +import java.util.List; +import java.util.logging.Logger; + +import org.restlet.Context; +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.Restlet; +import org.restlet.data.Status; +import org.restlet.ext.apispark.internal.ApiSparkConfig; +import org.restlet.ext.apispark.internal.agent.AgentConfigurationException; +import org.restlet.ext.apispark.internal.agent.AgentUtils; +import org.restlet.ext.apispark.internal.agent.bean.ModulesSettings; +import org.restlet.ext.apispark.internal.agent.bean.OperationAuthorization; +import org.restlet.ext.apispark.internal.agent.resource.AuthorizationOperationsResource; +import org.restlet.routing.Filter; +import org.restlet.routing.Router; +import org.restlet.routing.TemplateRoute; +import org.restlet.security.Role; + +/** + * Authorization module for the agent. + * + * @author Manuel Boillod + */ +public class AuthorizationModule extends Filter { + + /** + * Wrap an {@link OperationAuthorization} in a {@link Restlet} class for + * reuse of {@link Router#getNext(org.restlet.Request, org.restlet.Response)} logic. + */ + private static class RestletOperationAuthorization extends Restlet { + + private OperationAuthorization operationAuthorization; + + private RestletOperationAuthorization( + OperationAuthorization operationAuthorization) { + this.operationAuthorization = operationAuthorization; + } + + public OperationAuthorization getOperationAuthorization() { + return operationAuthorization; + } + + @SuppressWarnings("unused") + public void setOperationAuthorization( + OperationAuthorization operationAuthorization) { + this.operationAuthorization = operationAuthorization; + } + } + + /** Internal logger. */ + protected static Logger LOGGER = Logger.getLogger(AuthorizationModule.class + .getName()); + + public static final String MODULE_PATH = "/authorization"; + + public static final String OPERATIONS_AUTHORIZATIONS_PATH = MODULE_PATH + + "/operations"; + + /** + * Router is used for finding the Operation corresponding to a incoming + * request. + */ + private Router router; + + /** + * Create a new Authorization module with the specified settings. + * + * @param apiSparkConfig + * The agent configuration. + * @param modulesSettings + * The modules settings. + */ + public AuthorizationModule(ApiSparkConfig apiSparkConfig, + ModulesSettings modulesSettings) { + this(apiSparkConfig, modulesSettings, null); + } + + /** + * Create a new Authorization module with the specified settings. + * + * @param apiSparkConfig + * The agent configuration. + * @param modulesSettings + * The modules settings. + * @param context + * The context + */ + public AuthorizationModule(ApiSparkConfig apiSparkConfig, + ModulesSettings modulesSettings, Context context) { + super(context); + + AuthorizationOperationsResource authorizationOperationsClientResource = AgentUtils + .getClientResource(apiSparkConfig, modulesSettings, + AuthorizationOperationsResource.class, + OPERATIONS_AUTHORIZATIONS_PATH); + + List operationAuthorizations; + try { + operationAuthorizations = authorizationOperationsClientResource + .getAuthorizations(); + } catch (Exception e) { + throw new AgentConfigurationException( + "Could not get authorization module configuration from APISpark connector service", + e); + } + + // Initialize the router + router = new Router(); + for (OperationAuthorization operationAuthorization : operationAuthorizations) { + router.attach(operationAuthorization.getPathTemplate(), + new RestletOperationAuthorization(operationAuthorization)); + } + } + + /** + * Find the best {@link OperationAuthorization} for the incoming request and + * check user authorization. + * + * @param request + * The request to handle. + * @param response + * The response to update. + * @return {@link org.restlet.routing.Filter#CONTINUE} if the user is + * authorized. + */ + @Override + protected int beforeHandle(Request request, Response response) { + + // find the corresponding Operation + TemplateRoute templateRoute = (TemplateRoute) router.getNext(request, + response); + + // check route exists + if (templateRoute == null) { + response.setStatus(Status.CLIENT_ERROR_NOT_FOUND); + return STOP; + } + RestletOperationAuthorization restletOperationAuthorization = (RestletOperationAuthorization) templateRoute + .getNext(); + + List userRoles = request.getClientInfo().getRoles(); + + // check that user has at least one authorized role (named group in + // apispark) + boolean authorized = false; + OperationAuthorization operationAuthorization = restletOperationAuthorization + .getOperationAuthorization(); + List groupsAllowed = operationAuthorization.getGroupsAllowed(); + if (groupsAllowed == null) { + LOGGER.warning("No group is allowed for method " + + operationAuthorization.getMethod() + + " on this resource: " + + operationAuthorization.getPathTemplate()); + } else { + for (String groupAllowed : groupsAllowed) { + if (hasRole(userRoles, groupAllowed) + || "anyone".equals(groupAllowed)) { + authorized = true; + break; + } + } + } + + if (authorized) { + return CONTINUE; + } else { + response.setStatus(Status.CLIENT_ERROR_FORBIDDEN); + return STOP; + } + } + + /** + * Indicates if the given role is in the list of roles. + * + * @param roles + * The list of roles. + * @param roleName + * The name of the role to look for. + * @return True if the list of roles contains the given role. + */ + protected boolean hasRole(List roles, String roleName) { + for (Role role : roles) { + if (role.getName().equals(roleName)) { + return true; + } + } + return false; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/FirewallModule.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/FirewallModule.java new file mode 100644 index 0000000000..97f78eee35 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/FirewallModule.java @@ -0,0 +1,129 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.module; + +import com.google.common.base.Function; +import com.google.common.collect.ListMultimap; +import com.google.common.collect.Multimaps; +import org.restlet.ext.apispark.FirewallConfig; +import org.restlet.ext.apispark.internal.ApiSparkConfig; +import org.restlet.ext.apispark.internal.agent.AgentConfigurationException; +import org.restlet.ext.apispark.internal.agent.AgentUtils; +import org.restlet.ext.apispark.internal.agent.bean.FirewallIpFilter; +import org.restlet.ext.apispark.internal.agent.bean.FirewallRateLimit; +import org.restlet.ext.apispark.internal.agent.bean.FirewallSettings; +import org.restlet.ext.apispark.internal.agent.bean.ModulesSettings; +import org.restlet.ext.apispark.internal.agent.resource.FirewallSettingsResource; + +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * @author Manuel Boillod + */ +public class FirewallModule { + + public static final String MODULE_PATH = "/firewall"; + + public static final String SETTINGS_PATH = MODULE_PATH + "/settings"; + + FirewallSettings firewallSettings; + + public FirewallModule(ApiSparkConfig apiSparkConfig, + ModulesSettings modulesSettings) { + FirewallSettingsResource firewallSettingsClientResource = AgentUtils + .getClientResource(apiSparkConfig, modulesSettings, + FirewallSettingsResource.class, SETTINGS_PATH); + + try { + firewallSettings = firewallSettingsClientResource.getSettings(); + } catch (Exception e) { + throw new AgentConfigurationException( + "Could not get firewall module configuration from APISpark connector service", + e); + } + } + + public void updateFirewallConfig(FirewallConfig firewallConfig) { + addIpFilterRules(firewallSettings, firewallConfig); + addRateLimitationRules(firewallSettings, firewallConfig); + } + + private void addIpFilterRules(FirewallSettings firewallSettings, + FirewallConfig firewallConfig) { + if (firewallSettings.getIpFilters() != null) { + for (FirewallIpFilter ipFilter : firewallSettings.getIpFilters()) { + if (ipFilter.isWhiteList()) { + firewallConfig.addIpAddressesWhiteList(ipFilter.getIps()); + } else { + firewallConfig.addIpAddressesBlackList(ipFilter.getIps()); + } + } + } + } + + private void addRateLimitationRules(FirewallSettings firewallSettings, + FirewallConfig firewallConfig) { + if (firewallSettings.getRateLimits() != null) { + List rateLimits = firewallSettings + .getRateLimits(); + Map> rateLimitsByPeriod = sortRateLimitsByPeriod(rateLimits); + for (Integer period : rateLimitsByPeriod.keySet()) { + Map limitsPerRole = new HashMap<>(); + int defaultRateLimit = Integer.MAX_VALUE; + + for (FirewallRateLimit firewallRateLimit : rateLimitsByPeriod + .get(period)) { + if (firewallRateLimit.isDefaultRateLimit()) { + defaultRateLimit = firewallRateLimit.getRateLimit(); + } else { + limitsPerRole.put(firewallRateLimit.getGroup(), + firewallRateLimit.getRateLimit()); + } + } + + firewallConfig.addRolesPeriodicCounter(period, + TimeUnit.SECONDS, limitsPerRole, defaultRateLimit); + } + } + } + + private Map> sortRateLimitsByPeriod( + List rateLimits) { + + ListMultimap rateLimitsByPeriod = Multimaps + .index(rateLimits, new Function() { + @Override + public Integer apply(FirewallRateLimit firewallRateLimit) { + return firewallRateLimit.getPeriod(); + } + }); + return rateLimitsByPeriod.asMap(); + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/ModulesSettingsModule.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/ModulesSettingsModule.java new file mode 100644 index 0000000000..01d01d7127 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/ModulesSettingsModule.java @@ -0,0 +1,67 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.module; + +import org.restlet.ext.apispark.internal.ApiSparkConfig; +import org.restlet.ext.apispark.internal.agent.AgentConfigurationException; +import org.restlet.ext.apispark.internal.agent.AgentUtils; +import org.restlet.ext.apispark.internal.agent.bean.ModulesSettings; +import org.restlet.ext.apispark.internal.agent.resource.ModulesSettingsResource; + +/** + * Get modules settings from connector service + * + * @author Manuel Boillod + */ +public class ModulesSettingsModule { + + public static final String MODULE_PATH = "/settings"; + + /** + * Retrieves the modules settings from the service if it has changed, null + * otherwise. + * + * @param apiSparkConfig + * The service's configuration + * @param modulesSettings + * The current modules settings + * @return The updated modules settings if it has changed, null otherwise. + */ + public static ModulesSettings getModulesSettings( + ApiSparkConfig apiSparkConfig, ModulesSettings modulesSettings) { + + // When modulesSettings not null, cell revision header is set + ModulesSettingsResource modulesSettingsResource = AgentUtils + .getClientResource(apiSparkConfig, modulesSettings, + ModulesSettingsResource.class, MODULE_PATH); + try { + return modulesSettingsResource.getSettings(); + } catch (Exception e) { + throw new AgentConfigurationException( + "Unable to retrieve agent settings from apispark", e); + } + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/ReverseProxyModule.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/ReverseProxyModule.java new file mode 100644 index 0000000000..19f80eca86 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/module/ReverseProxyModule.java @@ -0,0 +1,57 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.module; + +import org.restlet.Context; +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.routing.Redirector; + +/** + * @author Manuel Boillod + */ +public class ReverseProxyModule extends Redirector { + + private final boolean authenticationEnabled; + + public ReverseProxyModule(Context context, String targetTemplate, + boolean authenticationEnabled) { + super(context, targetTemplate, Redirector.MODE_SERVER_OUTBOUND); + this.authenticationEnabled = authenticationEnabled; + setHeadersCleaning(false); + } + + @Override + public void handle(Request request, Response response) { + if (authenticationEnabled) { + // Do not add Authentication info from redirection request since + // authentication has already been done. + request.getHeaders().removeAll("Authorization"); + request.setChallengeResponse(null); + } + super.handle(request, response); + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/AnalyticsResource.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/AnalyticsResource.java new file mode 100644 index 0000000000..b6e02d8078 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/AnalyticsResource.java @@ -0,0 +1,10 @@ +package org.restlet.ext.apispark.internal.agent.resource; + +import org.restlet.ext.apispark.internal.agent.bean.CallLogs; +import org.restlet.resource.Post; + +public interface AnalyticsResource { + + @Post + void postLogs(CallLogs callLogs); +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/AuthenticationAuthenticateResource.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/AuthenticationAuthenticateResource.java new file mode 100644 index 0000000000..0ece9db6e1 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/AuthenticationAuthenticateResource.java @@ -0,0 +1,48 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.resource; + +import org.restlet.ext.apispark.internal.agent.bean.Credentials; +import org.restlet.ext.apispark.internal.agent.bean.User; +import org.restlet.resource.Post; + +public interface AuthenticationAuthenticateResource { + + /** + * Authenticate a user from its credentials + * + * @param credentials + * The user credentials + * + * @return The user is the authentication succeeded
+ * Status details: + *
    + *
  • 200 if the user is authenticated
  • + *
  • 401 if the user is not authenticated or does not exist
  • + *
+ */ + @Post + public User authenticate(Credentials credentials); +} diff --git a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Sample.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/AuthorizationOperationsResource.java similarity index 52% rename from modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Sample.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/AuthorizationOperationsResource.java index 66af49f8fb..99cfc636a2 100644 --- a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Sample.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/AuthorizationOperationsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -31,12 +22,13 @@ * Restlet is a registered trademark of Restlet S.A.S. */ -package org.restlet.ext.swagger.internal.model; +package org.restlet.ext.apispark.internal.agent.resource; -/** - * - * @author - */ -public class Sample { +import org.restlet.ext.apispark.internal.agent.bean.OperationsAuthorization; +import org.restlet.resource.Get; + +public interface AuthorizationOperationsResource { + @Get + public OperationsAuthorization getAuthorizations(); } diff --git a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Version.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/FirewallSettingsResource.java similarity index 52% rename from modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Version.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/FirewallSettingsResource.java index 009fd77255..ac97c8db52 100644 --- a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/Version.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/FirewallSettingsResource.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -31,12 +22,16 @@ * Restlet is a registered trademark of Restlet S.A.S. */ -package org.restlet.ext.swagger.internal.model; +package org.restlet.ext.apispark.internal.agent.resource; -/** - * - * @author - */ -public class Version { +import org.restlet.ext.apispark.internal.agent.bean.FirewallSettings; +import org.restlet.resource.Get; + +public interface FirewallSettingsResource { + /** + * Retrieve the firewall settings from apispark connector cell. + */ + @Get + public FirewallSettings getSettings(); } diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/ModulesSettingsResource.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/ModulesSettingsResource.java new file mode 100644 index 0000000000..cef9b2fe34 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/agent/resource/ModulesSettingsResource.java @@ -0,0 +1,44 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.agent.resource; + +import org.restlet.ext.apispark.internal.agent.bean.ModulesSettings; +import org.restlet.resource.Get; + +/** + * Resource used for communicate with apispark connector cell. + * + * @author Manuel Boillod + */ +public interface ModulesSettingsResource { + + /** + * Returns the modules settings from apispark connector cell. + * + * @return The modules settings of the current cell. + */ + @Get + ModulesSettings getSettings(); +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/IntrospectionConverter.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/IntrospectionConverter.java deleted file mode 100644 index fb2dbcbf29..0000000000 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/IntrospectionConverter.java +++ /dev/null @@ -1,544 +0,0 @@ -package org.restlet.ext.apispark.internal.conversion; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.restlet.Server; -import org.restlet.data.Protocol; -import org.restlet.data.Status; -import org.restlet.engine.Engine; -import org.restlet.engine.connector.ConnectorHelper; -import org.restlet.ext.apispark.internal.info.ApplicationInfo; -import org.restlet.ext.apispark.internal.info.DocumentationInfo; -import org.restlet.ext.apispark.internal.info.MethodInfo; -import org.restlet.ext.apispark.internal.info.ParameterInfo; -import org.restlet.ext.apispark.internal.info.ParameterStyle; -import org.restlet.ext.apispark.internal.info.PropertyInfo; -import org.restlet.ext.apispark.internal.info.RepresentationInfo; -import org.restlet.ext.apispark.internal.info.ResourceInfo; -import org.restlet.ext.apispark.internal.info.ResponseInfo; -import org.restlet.ext.apispark.internal.model.Body; -import org.restlet.ext.apispark.internal.model.Contract; -import org.restlet.ext.apispark.internal.model.Definition; -import org.restlet.ext.apispark.internal.model.Header; -import org.restlet.ext.apispark.internal.model.Operation; -import org.restlet.ext.apispark.internal.model.PathVariable; -import org.restlet.ext.apispark.internal.model.Property; -import org.restlet.ext.apispark.internal.model.QueryParameter; -import org.restlet.ext.apispark.internal.model.Representation; -import org.restlet.ext.apispark.internal.model.Resource; -import org.restlet.ext.apispark.internal.model.Response; -import org.restlet.ext.apispark.internal.reflect.ReflectUtils; - -/** - * Tools library for converting the model used for introspection to Restlet Web - * API Definition. - * - * @author Cyprien Quilici - */ -public class IntrospectionConverter { - - /** - * Completes a map of representations with a list of representations. - * - * @param mapReps - * The map to complete. - * @param representations - * The source list. - */ - private static void addRepresentations( - Map mapReps, - List representations) { - if (representations != null) { - for (RepresentationInfo r : representations) { - if (!mapReps.containsKey(r.getIdentifier())) { - mapReps.put(r.getIdentifier(), r); - } - } - } - } - - /** - * Completes the given {@link Contract} with the list of resources. - * - * @param application - * The source application. - * @param contract - * The contract to complete. - * @param resources - * The list of resources. - * @param basePath - * The resources base path. - * @param mapReps - * The lndex of representations. - */ - private static void addResources(ApplicationInfo application, - Contract contract, List resources, String basePath, - Map mapReps, Logger logger) { - for (ResourceInfo ri : resources) { - Resource resource = new Resource(); - resource.setDescription(toString(ri.getDocumentations())); - resource.setName(ri.getIdentifier()); - if (ri.getPath() == null) { - resource.setResourcePath("/"); - resource.setSection("root"); - } else { - resource.setSection(ReflectUtils.getFirstSegment(ri.getPath())); - if (!ri.getPath().startsWith("/")) { - resource.setResourcePath("/" + ri.getPath()); - } else { - resource.setResourcePath(ri.getPath()); - } - } - - resource.setPathVariables(new ArrayList()); - for (ParameterInfo pi : ri.getParameters()) { - if (ParameterStyle.TEMPLATE.equals(pi.getStyle())) { - PathVariable pathVariable = new PathVariable(); - - pathVariable - .setDescription(toString(pi.getDocumentations())); - pathVariable.setName(pi.getName()); - - resource.getPathVariables().add(pathVariable); - } - } - - if (!ri.getChildResources().isEmpty()) { - addResources(application, contract, ri.getChildResources(), - resource.getResourcePath(), mapReps, logger); - } - logger.fine("Resource " + ri.getPath() + " added."); - - if (ri.getMethods().isEmpty()) { - logger.warning("Resource " + ri.getIdentifier() - + " has no methods."); - continue; - } - - resource.setOperations(new ArrayList()); - for (MethodInfo mi : ri.getMethods()) { - String methodName = mi.getMethod().getName(); - if ("OPTIONS".equals(methodName) || "PATCH".equals(methodName)) { - logger.fine("Method " + methodName + " ignored."); - continue; - } - logger.fine("Method " + methodName + " added."); - Operation operation = new Operation(); - operation.setDescription(toString(mi.getDocumentations())); - operation.setName(methodName); - // TODO complete Method class with mi.getName() - operation.setMethod(mi.getMethod().getName()); - - // Fill fields produces/consumes - String mediaType; - if (mi.getRequest() != null - && mi.getRequest().getRepresentations() != null) { - List consumed = mi.getRequest() - .getRepresentations(); - for (RepresentationInfo reprInfo : consumed) { - mediaType = reprInfo.getMediaType().getName(); - operation.getConsumes().add(mediaType); - } - } - - if (mi.getResponse() != null - && mi.getResponse().getRepresentations() != null) { - List produced = mi.getResponse() - .getRepresentations(); - for (RepresentationInfo reprInfo : produced) { - mediaType = reprInfo.getMediaType().getName(); - operation.getProduces().add(mediaType); - } - } - - // Complete parameters - operation.setHeaders(new ArrayList
()); - operation.setQueryParameters(new ArrayList()); - if (mi.getRequest() != null) { - for (ParameterInfo pi : mi.getRequest().getParameters()) { - if (ParameterStyle.HEADER.equals(pi.getStyle())) { - Header header = new Header(); - header.setAllowMultiple(pi.isRepeating()); - header.setDefaultValue(pi.getDefaultValue()); - header.setDescription(toString( - pi.getDocumentations(), - pi.getDefaultValue())); - header.setName(pi.getName()); - header.setPossibleValues(new ArrayList()); - header.setRequired(pi.isRequired()); - - operation.getHeaders().add(header); - } else if (ParameterStyle.QUERY.equals(pi.getStyle())) { - QueryParameter queryParameter = new QueryParameter(); - queryParameter.setAllowMultiple(pi.isRepeating()); - queryParameter - .setDefaultValue(pi.getDefaultValue()); - queryParameter.setDescription(toString( - pi.getDocumentations(), - pi.getDefaultValue())); - queryParameter.setName(pi.getName()); - queryParameter - .setPossibleValues(new ArrayList()); - queryParameter.setRequired(pi.isRequired()); - - operation.getQueryParameters().add(queryParameter); - } - } - } - for (ParameterInfo pi : mi.getParameters()) { - if (ParameterStyle.HEADER.equals(pi.getStyle())) { - Header header = new Header(); - header.setAllowMultiple(pi.isRepeating()); - header.setDefaultValue(pi.getDefaultValue()); - header.setDescription(toString(pi.getDocumentations(), - pi.getDefaultValue())); - header.setName(pi.getName()); - header.setPossibleValues(new ArrayList()); - header.setRequired(pi.isRequired()); - - operation.getHeaders().add(header); - } else if (ParameterStyle.QUERY.equals(pi.getStyle())) { - QueryParameter queryParameter = new QueryParameter(); - queryParameter.setAllowMultiple(pi.isRepeating()); - queryParameter.setDefaultValue(pi.getDefaultValue()); - queryParameter.setDescription(toString( - pi.getDocumentations(), pi.getDefaultValue())); - queryParameter.setName(pi.getName()); - queryParameter - .setPossibleValues(new ArrayList()); - queryParameter.setRequired(pi.isRequired()); - - operation.getQueryParameters().add(queryParameter); - } - } - - if (mi.getRequest() != null - && mi.getRequest().getRepresentations() != null - && !mi.getRequest().getRepresentations().isEmpty()) { - addRepresentations(mapReps, mi.getRequest() - .getRepresentations()); - - Body body = new Body(); - // TODO analyze - // The models differ : one representation / one variant - // for Restlet one representation / several variants for - // APIspark - body.setRepresentation(mi.getRequest().getRepresentations() - .get(0).getType().getSimpleName()); - body.setArray(mi.getRequest().getRepresentations().get(0) - .isCollection()); - - operation.setInRepresentation(body); - } - - if (mi.getResponses() != null && !mi.getResponses().isEmpty()) { - operation.setResponses(new ArrayList()); - - Body body = new Body(); - // TODO analyze - // The models differ : one representation / one variant - // for Restlet one representation / several variants for - // APIspark - if (!mi.getResponse().getRepresentations().isEmpty()) { - body.setRepresentation(mi.getResponse() - .getRepresentations().get(0).getType() - .getSimpleName()); - body.setArray(mi.getResponse().getRepresentations() - .get(0).isCollection()); - } - operation.setOutRepresentation(body); - - for (ResponseInfo rio : mi.getResponses()) { - addRepresentations(mapReps, rio.getRepresentations()); - - if (!rio.getStatuses().isEmpty()) { - Status status = rio.getStatuses().get(0); - // TODO analyze - // The models differ : one representation / one - // variant - // for Restlet one representation / several - // variants for - // APIspark - - Response response = new Response(); - response.setBody(body); - response.setCode(status.getCode()); - response.setName(toString(rio.getDocumentations())); - response.setDescription(toString(rio - .getDocumentations())); - response.setMessage(status.getDescription()); - // response.setName(); - - operation.getResponses().add(response); - } - } - } - - resource.getOperations().add(operation); - } - - contract.getResources().add(resource); - } - } - - /** - * Converts a ApplicationInfo to a {@link Definition} object. - * - * @param application - * The {@link ApplicationInfo} instance. - * @return The definintion instance. - */ - public static Definition toDefinition(ApplicationInfo application, - Logger logger) { - Definition result = null; - if (application != null) { - result = new Definition(); - result.setVersion(application.getVersion()); - if (application.getResources().getBaseRef() != null) { - result.setEndpoint(application.getResources().getBaseRef() - .toString()); - } - - Contract contract = new Contract(); - result.setContract(contract); - contract.setDescription(toString(application.getDocumentations())); - contract.setName(application.getName()); - if (contract.getName() == null || contract.getName().isEmpty()) { - contract.setName(application.getClass().getName()); - logger.log(Level.WARNING, - "Please provide a name to your application, used " - + contract.getName() + " by default."); - } - logger.fine("Contract " + contract.getName() + " added."); - - // List of resources. - contract.setResources(new ArrayList()); - Map mapReps = new HashMap(); - addResources(application, contract, application.getResources() - .getResources(), result.getEndpoint(), mapReps, logger); - - java.util.List protocols = new ArrayList(); - for (ConnectorHelper helper : Engine.getInstance() - .getRegisteredServers()) { - for (Protocol protocol : helper.getProtocols()) { - if (!protocols.contains(protocol.getName())) { - logger.fine("Protocol " + protocol.getName() - + " added."); - protocols.add(protocol.getName()); - } - } - } - - // List of representations. - contract.setRepresentations(new ArrayList()); - for (RepresentationInfo ri : application.getRepresentations()) { - if (!mapReps.containsKey(ri.getIdentifier())) { - mapReps.put(ri.getIdentifier(), ri); - } - } - // This first phase discovers representations related to annotations - // Let's cope with the inheritance chain, and complex properties - List toBeAdded = new ArrayList(); - // Initialize the list of classes to be anaylized - for (RepresentationInfo ri : mapReps.values()) { - if (ri.isRaw()) { - continue; - } - if (ri.isCollection() - && !mapReps.containsKey(ri.getType().getName())) { - // Check if the type has been described. - RepresentationInfo r = new RepresentationInfo( - ri.getMediaType()); - r.setType(ri.getType()); - toBeAdded.add(r); - } - // Parent class - Class parentType = ri.getType().getSuperclass(); - if (parentType != null && ReflectUtils.isJdkClass(parentType)) { - // TODO This type must introspected too, as it will reveal - // other representation - parentType = null; - } - if (parentType != null - && !mapReps.containsKey(parentType.getName())) { - RepresentationInfo r = new RepresentationInfo( - ri.getMediaType()); - r.setType(parentType); - toBeAdded.add(r); - } - for (PropertyInfo pi : ri.getProperties()) { - if (pi.getType() != null - && !mapReps.containsKey(pi.getType().getName()) - && !toBeAdded.contains(pi.getType())) { - RepresentationInfo r = new RepresentationInfo( - ri.getMediaType()); - r.setType(pi.getType()); - toBeAdded.add(r); - } - } - } - // Second phase, discover classes and loop while classes are unknown - while (!toBeAdded.isEmpty()) { - RepresentationInfo[] tab = new RepresentationInfo[toBeAdded - .size()]; - toBeAdded.toArray(tab); - toBeAdded.clear(); - for (int i = 0; i < tab.length; i++) { - RepresentationInfo current = tab[i]; - if (!current.isRaw() - && !ReflectUtils.isJdkClass(current.getType())) { - if (!mapReps.containsKey(current.getName())) { - // TODO clearly something is wrong here. We should - // list all representations when discovering the - // method. - RepresentationInfo ri = RepresentationInfo - .introspect(current.getType(), null, - current.getMediaType()); - mapReps.put(ri.getIdentifier(), ri); - // have a look at the parent type - - Class parentType = ri.getType().getSuperclass(); - if (parentType != null - && ReflectUtils.isJdkClass(parentType)) { - // TODO This type must introspected too, as it - // will reveal - // other representation - parentType = null; - } - if (parentType != null - && !mapReps.containsKey(parentType - .getName())) { - RepresentationInfo r = new RepresentationInfo( - ri.getMediaType()); - r.setType(parentType); - toBeAdded.add(r); - } - for (PropertyInfo prop : ri.getProperties()) { - if (prop.getType() != null - && !mapReps.containsKey(prop.getType() - .getName()) - && !toBeAdded.contains(prop.getType())) { - RepresentationInfo r = new RepresentationInfo( - ri.getMediaType()); - r.setType(prop.getType()); - toBeAdded.add(r); - } - } - } - } - } - } - - for (RepresentationInfo ri : mapReps.values()) { - if (ri.isCollection()) { - continue; - } - logger.fine("Representation " + ri.getName() + " added."); - Representation rep = new Representation(); - - // TODO analyze - // The models differ : one representation / one variant for - // Restlet - // one representation / several variants for APIspark - rep.setDescription(toString(ri.getDocumentations())); - rep.setName(ri.getName()); - - rep.setProperties(new ArrayList()); - for (PropertyInfo pi : ri.getProperties()) { - logger.fine("Property " + pi.getName() + " added."); - Property p = new Property(); - p.setDefaultValue(pi.getDefaultValue()); - p.setDescription(pi.getDescription()); - p.setMax(pi.getMax()); - p.setMaxOccurs(pi.getMaxOccurs()); - p.setMin(pi.getMin()); - p.setMinOccurs(pi.getMinOccurs()); - p.setName(pi.getName()); - p.setPossibleValues(pi.getPossibleValues()); - if (pi.getType() != null) { - // TODO: handle primitive type, etc - p.setType(pi.getType().getSimpleName()); - } - - p.setUniqueItems(pi.isUniqueItems()); - - rep.getProperties().add(p); - } - - rep.setRaw(ri.isRaw() || ReflectUtils.isJdkClass(ri.getType())); - contract.getRepresentations().add(rep); - } - } - - Collections.sort(result.getContract().getRepresentations(), - new Comparator() { - - @Override - public int compare(Representation o1, Representation o2) { - return o1.getName().compareTo(o2.getName()); - } - - }); - Collections.sort(result.getContract().getResources(), - new Comparator() { - - @Override - public int compare(Resource o1, Resource o2) { - return o1.getResourcePath().compareTo( - o2.getResourcePath()); - } - - }); - return result; - } - - /** - * Concats a list of {@link DocumentationInfo} instances as a single String. - * - * @param dis - * The list of {@link DocumentationInfo} instances. - * @return A String value. - */ - private static String toString(List dis) { - return toString(dis, ""); - } - - /** - * Concats a list of {@link DocumentationInfo} instances as a single String. - * - * @param dis - * The list of {@link DocumentationInfo} instances. - * @return A String value. - */ - private static String toString(List dis, - String defaultValue) { - if (dis != null && !dis.isEmpty()) { - StringBuilder d = new StringBuilder(); - for (DocumentationInfo doc : dis) { - if (doc.getTextContent() != null) { - d.append(doc.getTextContent()); - } - } - if (d.length() > 0) { - return d.toString(); - } - } - - return defaultValue; - } - - /** - * Private constructor to ensure that the class acts as a true utility class - * i.e. it isn't instantiable and extensible. - */ - private IntrospectionConverter() { - } - -} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/SwaggerConversionException.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/SwaggerConversionException.java deleted file mode 100644 index 1919b8e63b..0000000000 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/SwaggerConversionException.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.restlet.ext.apispark.internal.conversion; - -@SuppressWarnings("serial") -public class SwaggerConversionException extends Exception { - - private String type; - - private String message; - - public SwaggerConversionException(String type, String message) { - super(); - this.type = type; - this.message = message; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - -} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/SwaggerConverter.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/SwaggerConverter.java deleted file mode 100644 index ca1891f74a..0000000000 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/SwaggerConverter.java +++ /dev/null @@ -1,758 +0,0 @@ -/** - * Copyright 2005-2014 Restlet - * - * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. - * - * You can obtain a copy of the Apache 2.0 license at - * http://www.opensource.org/licenses/apache-2.0 - * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * - * You can obtain a copy of the EPL 1.0 license at - * http://www.opensource.org/licenses/eclipse-1.0 - * - * See the Licenses for the specific language governing permissions and - * limitations under the Licenses. - * - * Alternatively, you can obtain a royalty free commercial license with less - * limitations, transferable or non-transferable, directly at - * http://restlet.com/products/restlet-framework - * - * Restlet is a registered trademark of Restlet S.A.S. - */ - -package org.restlet.ext.apispark.internal.conversion; - -import java.io.FileNotFoundException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.TreeMap; -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.restlet.data.MediaType; -import org.restlet.data.Status; -import org.restlet.ext.apispark.internal.model.Body; -import org.restlet.ext.apispark.internal.model.Contract; -import org.restlet.ext.apispark.internal.model.Definition; -import org.restlet.ext.apispark.internal.model.Operation; -import org.restlet.ext.apispark.internal.model.PathVariable; -import org.restlet.ext.apispark.internal.model.Property; -import org.restlet.ext.apispark.internal.model.QueryParameter; -import org.restlet.ext.apispark.internal.model.Representation; -import org.restlet.ext.apispark.internal.model.Resource; -import org.restlet.ext.apispark.internal.model.Response; -import org.restlet.ext.apispark.internal.model.swagger.ApiDeclaration; -import org.restlet.ext.apispark.internal.model.swagger.ApiInfo; -import org.restlet.ext.apispark.internal.model.swagger.ItemsDeclaration; -import org.restlet.ext.apispark.internal.model.swagger.ModelDeclaration; -import org.restlet.ext.apispark.internal.model.swagger.ResourceDeclaration; -import org.restlet.ext.apispark.internal.model.swagger.ResourceListing; -import org.restlet.ext.apispark.internal.model.swagger.ResourceOperationDeclaration; -import org.restlet.ext.apispark.internal.model.swagger.ResourceOperationParameterDeclaration; -import org.restlet.ext.apispark.internal.model.swagger.ResponseMessageDeclaration; -import org.restlet.ext.apispark.internal.model.swagger.TypePropertyDeclaration; -import org.restlet.ext.apispark.internal.reflect.ReflectUtils; - -/** - * Tools library for converting Restlet Web API Definition to and from Swagger - * documentation. - * - * @author Cyprien Quilici - */ -public abstract class SwaggerConverter { - - /** Internal logger. */ - protected static Logger LOGGER = Logger.getLogger(SwaggerConverter.class - .getName()); - - /** Supported version of Swagger. */ - private static final String SWAGGER_VERSION = "1.2"; - - /** - * Converts a Swagger documentation to a Restlet definition. - * - * @param resourceListing - * The Swagger resource listing. - * @param apiDeclarations - * The list of Swagger API declarations. - * @return The Restlet definition. - * @throws SwaggerConversionException - */ - public static Definition convert(ResourceListing resourceListing, - Map apiDeclarations) - throws SwaggerConversionException { - - validate(resourceListing, apiDeclarations); - - boolean containsRawTypes = false; - List declaredTypes = new ArrayList(); - List declaredPathVariables; - Map> subtypes = new HashMap>(); - - try { - Definition definition = new Definition(); - definition.setVersion(resourceListing.getApiVersion()); - definition.setContact(resourceListing.getInfo().getContact()); - definition.setLicense(resourceListing.getInfo().getLicenseUrl()); - Contract contract = new Contract(); - contract.setName(resourceListing.getInfo().getTitle()); - LOGGER.log(Level.FINE, "Contract " + contract.getName() + " added."); - contract.setDescription(resourceListing.getInfo().getDescription()); - definition.setContract(contract); - - // Resource listing - Resource resource; - for (Entry entry : apiDeclarations - .entrySet()) { - ApiDeclaration swagApiDeclaration = entry.getValue(); - List apiProduces = swagApiDeclaration.getProduces(); - List apiConsumes = swagApiDeclaration.getConsumes(); - - for (ResourceDeclaration api : swagApiDeclaration.getApis()) { - declaredPathVariables = new ArrayList(); - resource = new Resource(); - resource.setResourcePath(api.getPath()); - resource.setSection(entry.getKey()); - - // Operations listing - Operation operation; - for (ResourceOperationDeclaration swagOperation : api - .getOperations()) { - String methodName = swagOperation.getMethod(); - operation = new Operation(); - operation.setMethod(swagOperation.getMethod()); - operation.setName(swagOperation.getNickname()); - operation.setDescription(swagOperation.getSummary()); - - // Set variants - Representation representation; - for (String produced : apiProduces.isEmpty() ? swagOperation - .getProduces() : apiProduces) { - if (!containsRawTypes - && MediaType.MULTIPART_FORM_DATA.getName() - .equals(produced)) { - representation = new Representation(); - representation.setName("File"); - representation.setRaw(true); - containsRawTypes = true; - contract.getRepresentations().add( - representation); - } - operation.getProduces().add(produced); - } - for (String consumed : apiConsumes.isEmpty() ? swagOperation - .getConsumes() : apiConsumes) { - if (!containsRawTypes - && MediaType.MULTIPART_FORM_DATA.getName() - .equals(consumed)) { - representation = new Representation(); - representation.setName("File"); - representation.setRaw(true); - containsRawTypes = true; - contract.getRepresentations().add( - representation); - } - operation.getConsumes().add(consumed); - } - - // Set response's entity - Body rwadOutRepr = new Body(); - if ("array".equals(swagOperation.getType())) { - LOGGER.log(Level.FINER, "Operation: " - + swagOperation.getNickname() - + " returns an array"); - rwadOutRepr.setArray(true); - if (swagOperation.getItems().getType() != null) { - rwadOutRepr.setRepresentation(swagOperation - .getItems().getType()); - } else { - rwadOutRepr.setRepresentation(swagOperation - .getItems().getRef()); - } - } else { - LOGGER.log(Level.FINER, "Operation: " - + swagOperation.getNickname() - + " returns a single Representation"); - rwadOutRepr.setArray(false); - if (swagOperation.getType() != null) { - rwadOutRepr.setRepresentation(swagOperation - .getType()); - } else { - rwadOutRepr.setRepresentation(swagOperation - .getRef()); - } - } - operation.setOutRepresentation(rwadOutRepr); - - // Extract success response message - Response success = new Response(); - success.setCode(Status.SUCCESS_OK.getCode()); - success.setBody(rwadOutRepr); - success.setDescription("Success"); - success.setMessage(Status.SUCCESS_OK.getDescription()); - success.setName("Success"); - operation.getResponses().add(success); - - // Loop over Swagger parameters. - for (ResourceOperationParameterDeclaration param : swagOperation - .getParameters()) { - if ("path".equals(param.getParamType())) { - if (!declaredPathVariables.contains(param - .getName())) { - declaredPathVariables.add(param.getName()); - PathVariable pathVariable = toPathVariable(param); - resource.getPathVariables().add( - pathVariable); - } - } else if ("body".equals(param.getParamType())) { - if (operation.getInRepresentation() == null) { - Body rwadInRepr = toBody(param); - operation.setInRepresentation(rwadInRepr); - } - } else if ("query".equals(param.getParamType())) { - QueryParameter rwadQueryParam = toQueryParameter(param); - operation.getQueryParameters().add( - rwadQueryParam); - } - } - - // Set error response messages - if (swagOperation.getResponseMessages() != null) { - for (ResponseMessageDeclaration swagResponse : swagOperation - .getResponseMessages()) { - Response response = new Response(); - Body body = new Body(); - body.setRepresentation(swagResponse - .getResponseModel()); - response.setBody(body); - response.setName("Error " - + swagResponse.getCode()); - response.setCode(swagResponse.getCode()); - response.setMessage(swagResponse.getMessage()); - operation.getResponses().add(response); - } - } - - resource.getOperations().add(operation); - LOGGER.log(Level.FINE, "Method " + methodName - + " added."); - - // Add representations - for (Entry modelEntry : swagApiDeclaration - .getModels().entrySet()) { - ModelDeclaration model = modelEntry.getValue(); - if (model.getSubTypes() != null - && !model.getSubTypes().isEmpty()) { - subtypes.put(model.getId(), model.getSubTypes()); - } - if (!declaredTypes.contains(modelEntry.getKey())) { - declaredTypes.add(modelEntry.getKey()); - Representation rwadRepr = toRepresentation( - model, modelEntry.getKey()); - contract.getRepresentations().add(rwadRepr); - LOGGER.log(Level.FINE, "Representation " - + modelEntry.getKey() + " added."); - } - } - - // Deal with subtyping - for (Entry> subtypesPair : subtypes - .entrySet()) { - List subtypesOf = subtypesPair.getValue(); - for (String subtypeOf : subtypesOf) { - Representation repr = getRepresentationByName( - contract, subtypeOf); - repr.setParentType(subtypesPair.getKey()); - } - } - } - - definition.getContract().getResources().add(resource); - LOGGER.log(Level.FINE, "Resource " + api.getPath() - + " added."); - } - - if (definition.getEndpoint() == null) { - definition.setEndpoint(swagApiDeclaration.getBasePath()); - } - } - LOGGER.log(Level.FINE, - "Definition successfully retrieved from Swagger definition"); - return definition; - } catch (Exception e) { - if (e instanceof FileNotFoundException) { - throw new SwaggerConversionException("file", - ((FileNotFoundException) e).getMessage()); - } else { - throw new SwaggerConversionException("compliance", - "Impossible to read your API definition, check your Swagger specs compliance"); - } - } - } - - /** - * Retrieves the Swagger API declaration corresponding to a category of the - * given Restlet Web API Definition - * - * @param category - * The category of the API declaration - * @param definition - * The Restlet Web API Definition - * @return The Swagger API definition of the given category - */ - public static ApiDeclaration getApiDeclaration(String category, - Definition definition) { - ApiDeclaration result = new ApiDeclaration(); - result.setApiVersion(definition.getVersion()); - result.setBasePath(definition.getEndpoint()); - result.setInfo(new ApiInfo()); - result.setSwaggerVersion(SWAGGER_VERSION); - result.setResourcePath("/" + category); - Set usedModels = new HashSet(); - - // Get resources - for (Resource resource : definition.getContract().getResources()) { - // Discriminate the resources of one category - if (!resource.getResourcePath().startsWith("/" + category)) { - continue; - } - ResourceDeclaration rd = new ResourceDeclaration(); - rd.setPath(resource.getResourcePath()); - rd.setDescription(resource.getDescription()); - - // Get operations - for (Operation operation : resource.getOperations()) { - ResourceOperationDeclaration rod = new ResourceOperationDeclaration(); - rod.setMethod(operation.getMethod()); - rod.setSummary(operation.getDescription()); - rod.setNickname(operation.getName()); - rod.setProduces(operation.getProduces()); - rod.setConsumes(operation.getConsumes()); - - // Get path variables - ResourceOperationParameterDeclaration ropd; - for (PathVariable pv : resource.getPathVariables()) { - ropd = new ResourceOperationParameterDeclaration(); - ropd.setParamType("path"); - ropd.setType("string"); - ropd.setRequired(true); - ropd.setName(pv.getName()); - ropd.setAllowMultiple(false); - ropd.setDescription(pv.getDescription()); - rod.getParameters().add(ropd); - } - - // Get in representation - Body inRepr = operation.getInRepresentation(); - if (inRepr != null) { - ropd = new ResourceOperationParameterDeclaration(); - ropd.setParamType("body"); - ropd.setRequired(true); - if ("Representation".equals(inRepr.getRepresentation())) { - ropd.setType("File"); - } else { - ropd.setType(toSwaggerType(inRepr.getRepresentation())); - } - if (inRepr.getRepresentation() != null) { - usedModels.add(inRepr.getRepresentation()); - } - rod.getParameters().add(ropd); - } - - // Get out representation - Body outRepr = operation.getOutRepresentation(); - if (outRepr != null && outRepr.getRepresentation() != null) { - if (outRepr.isArray()) { - rod.setType("array"); - if (isPrimitiveType(outRepr.getRepresentation())) { - rod.getItems().setType( - toSwaggerType(outRepr.getRepresentation())); - } else { - rod.getItems().setRef(outRepr.getRepresentation()); - } - } else { - rod.setType(toSwaggerType(outRepr.getRepresentation())); - } - usedModels.add(outRepr.getRepresentation()); - } else { - rod.setType("void"); - } - - // Get query parameters - for (QueryParameter qp : operation.getQueryParameters()) { - ropd = new ResourceOperationParameterDeclaration(); - ropd.setParamType("query"); - ropd.setType("string"); - ropd.setName(qp.getName()); - ropd.setAllowMultiple(true); - ropd.setDescription(qp.getDescription()); - ropd.setEnum_(qp.getPossibleValues()); - ropd.setDefaultValue(qp.getDefaultValue()); - rod.getParameters().add(ropd); - } - - // Get response messages - for (Response response : operation.getResponses()) { - if (Status.isSuccess(response.getCode())) { - continue; - } - ResponseMessageDeclaration rmd = new ResponseMessageDeclaration(); - rmd.setCode(response.getCode()); - rmd.setMessage(response.getMessage()); - if (response.getBody() != null) { - rmd.setResponseModel(response.getBody() - .getRepresentation()); - } - rod.getResponseMessages().add(rmd); - } - - rd.getOperations().add(rod); - } - result.getApis().add(rd); - } - - result.setModels(new TreeMap()); - Iterator iterator = usedModels.iterator(); - while (iterator.hasNext()) { - String model = iterator.next(); - Representation repr = getRepresentationByName( - definition.getContract(), model); - if (repr == null || isPrimitiveType(model)) { - continue; - } - ModelDeclaration md = new ModelDeclaration(); - md.setId(model); - md.setDescription(repr.getDescription()); - for (Property prop : repr.getProperties()) { - if (prop.isRequired()) { - md.getRequired().add(prop.getName()); - } - if (!isPrimitiveType(prop.getType()) - && !usedModels.contains(prop.getType())) { - usedModels.add(prop.getType()); - iterator = usedModels.iterator(); - } - TypePropertyDeclaration tpd = new TypePropertyDeclaration(); - tpd.setDescription(prop.getDescription()); - tpd.setEnum_(prop.getPossibleValues()); - - if (prop.getMaxOccurs() > 1 || prop.getMaxOccurs() == -1) { - tpd.setType("array"); - tpd.setItems(new ItemsDeclaration()); - if (isPrimitiveType(prop.getType())) { - tpd.getItems().setType(toSwaggerType(prop.getType())); - } else { - tpd.getItems().setRef(prop.getType()); - } - } else { - if (isPrimitiveType(prop.getType())) { - tpd.setType(toSwaggerType(prop.getType())); - } else { - tpd.setRef(prop.getType()); - } - } - tpd.setMaximum(prop.getMax()); - tpd.setMinimum(prop.getMin()); - tpd.setUniqueItems(prop.isUniqueItems()); - - md.getProperties().put(prop.getName(), tpd); - } - result.getModels().put(md.getId(), md); - } - - // Sort the API declarations according to their path. - Collections.sort(result.getApis(), - new Comparator() { - @Override - public int compare(ResourceDeclaration o1, - ResourceDeclaration o2) { - return o1.getPath().compareTo(o2.getPath()); - } - }); - return result; - } - - /** - * Returns the representation given its name from the list of - * representations of the given contract. - * - * @param contract - * The contract. - * @param name - * The name of the representation. - * @return A representation. - */ - private static Representation getRepresentationByName(Contract contract, - String name) { - if (name != null) { - for (Representation repr : contract.getRepresentations()) { - if (name.equals(repr.getName())) { - return repr; - } - } - } - return null; - } - - /** - * Converts a Restlet Web API Definition to a Swagger resource listing. - * - * @param definition - * The Restlet Web API Definition. - * @return The corresponding resource listing - */ - public static ResourceListing getResourcelisting(Definition definition) { - ResourceListing result = new ResourceListing(); - - // common properties - result.setApiVersion(definition.getVersion()); - // result.setBasePath(definition.getEndpoint()); - result.setInfo(new ApiInfo()); - result.setSwaggerVersion(SWAGGER_VERSION); - if (definition.getContact() != null) { - result.getInfo().setContact(definition.getContact()); - } - if (definition.getLicense() != null) { - result.getInfo().setLicenseUrl(definition.getLicense()); - } - if (definition.getContract() != null) { - result.getInfo().setTitle(definition.getContract().getName()); - result.getInfo().setDescription( - definition.getContract().getDescription()); - } - // Resources - List addedApis = new ArrayList(); - if (definition.getContract() != null - && definition.getContract().getResources() != null) { - result.setApis(new ArrayList()); - - for (Resource resource : definition.getContract().getResources()) { - ResourceDeclaration rd = new ResourceDeclaration(); - rd.setDescription(resource.getDescription()); - rd.setPath(ReflectUtils.getFirstSegment(resource.getResourcePath())); - if (!addedApis.contains(rd.getPath())) { - addedApis.add(rd.getPath()); - result.getApis().add(rd); - } - } - } - Collections.sort(result.getApis(), - new Comparator() { - @Override - public int compare(ResourceDeclaration o1, - ResourceDeclaration o2) { - return o1.getPath().compareTo(o2.getPath()); - } - - }); - return result; - } - - /** - * Indicates if the given type is a primitive type. - * - * @param type - * The type to be analysed - * @return A boolean of value true if the given type is primitive, false - * otherwise. - */ - private static boolean isPrimitiveType(String type) { - if ("string".equals(type.toLowerCase()) - || "int".equals(type.toLowerCase()) - || "integer".equals(type.toLowerCase()) - || "long".equals(type.toLowerCase()) - || "float".equals(type.toLowerCase()) - || "double".equals(type.toLowerCase()) - || "date".equals(type.toLowerCase()) - || "boolean".equals(type.toLowerCase()) - || "bool".equals(type.toLowerCase())) { - return true; - } - return false; - } - - /** - * Converts a Swagger parameter to an instance of {@link Body}. - * - * @param parameter - * The Swagger parameter. - * @return An instance of {@link Body}. - */ - private static Body toBody(ResourceOperationParameterDeclaration parameter) { - Body result = new Body(); - if ("array".equals(parameter.getType())) { - result.setArray(true); - if (parameter.getItems() != null - && parameter.getItems().getType() != null) { - result.setRepresentation(parameter.getItems().getType()); - } else if (parameter.getItems() != null) { - result.setRepresentation(parameter.getItems().getRef()); - } - } else { - result.setArray(false); - result.setRepresentation(parameter.getType()); - } - return result; - } - - /** - * Converts a Swagger parameter to an instance of {@link PathVariable}. - * - * @param parameter - * The Swagger parameter. - * @return An instance of {@link PathVariable}. - */ - private static PathVariable toPathVariable( - ResourceOperationParameterDeclaration parameter) { - PathVariable result = new PathVariable(); - result.setName(parameter.getName()); - result.setDescription(parameter.getDescription()); - result.setArray(parameter.isAllowMultiple()); - return result; - } - - /** - * Converts a Swagger parameter to an instance of {@link QueryParameter}. - * - * @param parameter - * The Swagger parameter. - * @return An instance of {@link QueryParameter}. - */ - private static QueryParameter toQueryParameter( - ResourceOperationParameterDeclaration parameter) { - QueryParameter result = new QueryParameter(); - result.setName(parameter.getName()); - result.setDescription(parameter.getDescription()); - result.setRequired(parameter.isRequired()); - result.setAllowMultiple(parameter.isAllowMultiple()); - result.setDefaultValue(parameter.getDefaultValue()); - if (parameter.getEnum_() != null && !parameter.getEnum_().isEmpty()) { - result.setPossibleValues(new ArrayList()); - for (String value : parameter.getEnum_()) { - result.getPossibleValues().add(value); - } - } - return result; - } - - /** - * Converts a Swagger model to an instance of {@link Representation}. - * - * @param model - * The Swagger model. - * @param name - * The name of the representation. - * @return An instance of {@link Representation}. - */ - private static Representation toRepresentation(ModelDeclaration model, - String name) { - Representation result = new Representation(); - result.setName(name); - result.setDescription(model.getDescription()); - - // Set properties - for (Entry swagProperties : model - .getProperties().entrySet()) { - TypePropertyDeclaration swagProperty = swagProperties.getValue(); - Property property = new Property(); - property.setName(swagProperties.getKey()); - - // Set property's type - boolean isArray = "array".equals(swagProperty.getType()); - if (isArray) { - property.setType(swagProperty.getItems().getType() != null ? swagProperty - .getItems().getType() : swagProperty.getItems() - .getRef()); - } else if (swagProperty.getType() != null) { - property.setType(swagProperty.getType()); - } else if (swagProperty.getRef() != null) { - property.setType(swagProperty.getRef()); - } - - if (model.getRequired() != null) { - property.setMinOccurs(model.getRequired().contains( - swagProperties.getKey()) ? 1 : 0); - } else { - property.setMinOccurs(0); - } - property.setMaxOccurs(isArray ? -1 : 1); - property.setDescription(swagProperty.getDescription()); - property.setMin(swagProperty.getMinimum()); - property.setMax(swagProperty.getMaximum()); - property.setUniqueItems(swagProperty.isUniqueItems()); - - result.getProperties().add(property); - LOGGER.log(Level.FINE, "Property " + property.getName() + " added."); - } - return result; - } - - /** - * Returns the primitive types as Swagger expects them - * - * @param type - * The type name to Swaggerize - * @return The Swaggerized type - */ - private static String toSwaggerType(String type) { - if ("Integer".equals(type)) { - return "int"; - } else if ("String".equals(type)) { - return "string"; - } else if ("Boolean".equals(type)) { - return "boolean"; - } else { - return type; - } - } - - /** - * Indicates if the given resource listing and list of API declarations - * match. - * - * @param resourceListing - * The Swagger resource listing. - * @param apiDeclarations - * The list of Swagger API declarations. - * @throws SwaggerConversionException - */ - private static void validate(ResourceListing resourceListing, - Map apiDeclarations) - throws SwaggerConversionException { - int rlSize = resourceListing.getApis().size(); - int adSize = apiDeclarations.size(); - if (rlSize < adSize) { - throw new SwaggerConversionException("file", - "One of your API declarations is not mapped in your resource listing"); - } else if (rlSize > adSize) { - throw new SwaggerConversionException("file", - "Some API declarations are missing"); - } - } - - /** - * Private constructor to ensure that the class acts as a true utility class - * i.e. it isn't instantiable and extensible. - */ - private SwaggerConverter() { - } -} \ No newline at end of file diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/TranslationException.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/TranslationException.java new file mode 100644 index 0000000000..cf702bc6f5 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/TranslationException.java @@ -0,0 +1,50 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion; + +@SuppressWarnings("serial") +public class TranslationException extends Exception { + + private String type; + + public TranslationException(String type, String message) { + super(message); + this.type = type; + } + + public TranslationException(String type, String message, Throwable throwable) { + super(message, throwable); + this.type = type; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/raml/RamlTranslator.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/raml/RamlTranslator.java new file mode 100644 index 0000000000..e22f0e2d45 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/raml/RamlTranslator.java @@ -0,0 +1,571 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.raml; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.raml.model.Action; +import org.raml.model.ActionType; +import org.raml.model.MimeType; +import org.raml.model.Raml; +import org.raml.model.SecurityScheme; +import org.raml.model.parameter.UriParameter; +import org.restlet.data.ChallengeScheme; +import org.restlet.data.Status; +import org.restlet.ext.apispark.internal.conversion.TranslationException; +import org.restlet.ext.apispark.internal.introspection.util.Types; +import org.restlet.ext.apispark.internal.model.Contract; +import org.restlet.ext.apispark.internal.model.Definition; +import org.restlet.ext.apispark.internal.model.Endpoint; +import org.restlet.ext.apispark.internal.model.Operation; +import org.restlet.ext.apispark.internal.model.PathVariable; +import org.restlet.ext.apispark.internal.model.PayLoad; +import org.restlet.ext.apispark.internal.model.Property; +import org.restlet.ext.apispark.internal.model.QueryParameter; +import org.restlet.ext.apispark.internal.model.Representation; +import org.restlet.ext.apispark.internal.model.Resource; +import org.restlet.ext.apispark.internal.model.Response; +import org.restlet.ext.apispark.internal.utils.SampleUtils; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema; + +/** + * Tools library for converting Restlet Web API Definition to and from RAML + * documentation. + * + * @author Cyprien Quilici + */ +public abstract class RamlTranslator { + + /** Internal logger. */ + protected static Logger LOGGER = Logger.getLogger(RamlTranslator.class + .getName()); + + /** + * Returns the {@link org.restlet.ext.apispark.internal.model.PathVariable} + * as described by the given {@link org.raml.model.parameter.UriParameter}. + * + * @param paramName + * The name of the path variable. + * @param uriParameter + * The uri parameter. + * @return The {@link org.restlet.ext.apispark.internal.model.PathVariable} + * as described by the given + * {@link org.raml.model.parameter.UriParameter}. + */ + private static PathVariable getPathVariable(String paramName, + UriParameter uriParameter) { + PathVariable pathVariable = new PathVariable(); + pathVariable.setName(paramName); + pathVariable.setDescription(uriParameter.getDescription()); + // pathVariable.setType(uriParameter.getType().toString().toLowerCase()); + return pathVariable; + } + + /** + * Returns the list of + * {@link org.restlet.ext.apispark.internal.model.PathVariable} as defined + * by the given {@link org.raml.model.Resource}. + * + * @param resource + * The given resource. + * @return The list of + * {@link org.restlet.ext.apispark.internal.model.PathVariable} as + * defined by the given {@link org.raml.model.Resource}. + */ + private static List getPathVariables( + org.raml.model.Resource resource) { + List pathVariables = new ArrayList(); + for (Entry entry : resource.getUriParameters() + .entrySet()) { + pathVariables + .add(getPathVariable(entry.getKey(), entry.getValue())); + } + if (resource.getParentResource() != null) { + pathVariables + .addAll(getPathVariables(resource.getParentResource())); + } + return pathVariables; + } + + /** + * Builds a sample map for each Representation of the Contract + * + * @param contract + * The Restlet Web API Contract + * @return A map of representations' names and sample maps + */ + private static Map> getSamples(Contract contract) { + Map> samples = new HashMap<>(); + for (Representation representation : contract.getRepresentations()) { + samples.put(representation.getName(), + SampleUtils.getRepresentationSample(representation)); + } + return samples; + } + + /** + * Retrieves the RAML API declaration corresponding to a category of the + * given Restlet Web API Definition. + * + * @param definition + * The Restlet Web API Definition. + * @return The RAML API definition of the given category. + */ + public static Raml getRaml(Definition definition) { + Raml raml = new Raml(); + ObjectMapper m = new ObjectMapper(); + + // TODO see how to translate it (1.0.0 to v1 ???) + if (definition.getVersion() != null) { + raml.setVersion(definition.getVersion()); + } + Contract contract = definition.getContract(); + + Map> representationSamples = getSamples(contract); + + // No way to specify multiple endpoints in RAML so we take the first one + Endpoint endpoint = null; + if (!definition.getEndpoints().isEmpty()) { + endpoint = definition.getEndpoints().get(0); + raml.setBaseUri(endpoint.computeUrl()); + } else { + raml.setBaseUri("http://example.com/v1"); + } + + // Authentication + raml.setSecuritySchemes(new ArrayList>()); + fillSecuritySchemes(raml.getSecuritySchemes(), endpoint); + + // raml.setBaseUriParameters(new HashMap()); + // raml.getBaseUriParameters().put("version", new + // UriParameter("version")); + raml.setTitle(contract.getName()); + + raml.setResources(new HashMap()); + fillResources(raml.getResources(), m, contract, representationSamples); + + // Representations + raml.setSchemas(new ArrayList>()); + Map schemas = new HashMap(); + raml.getSchemas().add(schemas); + for (Representation representation : contract.getRepresentations()) { + if (RamlUtils.isPrimitiveType(representation.getName())) { + continue; + } + try { + RamlUtils.fillSchemas(representation, schemas, m); + } catch (JsonProcessingException e) { + LOGGER.log(Level.WARNING, + "Error when putting mime type schema for representation: " + + representation.getName(), e); + } + } + return raml; + } + + private static void fillResources( + Map resources, ObjectMapper m, + Contract contract, + Map> representationSamples) { + + org.raml.model.Resource ramlResource; + List paths = new ArrayList(); + + // Resources + for (Resource resource : contract.getResources()) { + ramlResource = new org.raml.model.Resource(); + if (resource.getName() != null) { + ramlResource.setDisplayName(resource.getName()); + } else { + ramlResource.setDisplayName(RamlUtils + .processResourceName(resource.getResourcePath())); + } + ramlResource.setDescription(resource.getDescription()); + + ramlResource.setParentUri(""); + ramlResource.setRelativeUri(resource.getResourcePath()); + + // Path variables + UriParameter uiParam = new UriParameter(); + ramlResource.setUriParameters(new HashMap()); + for (PathVariable pathVariable : resource.getPathVariables()) { + uiParam.setDisplayName(pathVariable.getName()); + uiParam.setDescription(pathVariable.getDescription()); + uiParam.setType(RamlUtils.getParamType(pathVariable.getType())); + uiParam.setExample(pathVariable.getExample()); + ramlResource.getUriParameters().put(pathVariable.getName(), + uiParam); + } + + // Operations + Action action; + ramlResource.setActions(new HashMap()); + for (Operation operation : resource.getOperations()) { + action = new Action(); + action.setDescription(operation.getDescription()); + action.setResource(ramlResource); + + // In representation + + if (operation.getInputPayLoad() != null) { + MimeType ramlInRepresentation = new MimeType(); + fillInputRepresentation(m, representationSamples, action, + operation, ramlInRepresentation); + } + + // Query parameters + + action.setQueryParameters(new HashMap()); + for (QueryParameter queryParameter : operation + .getQueryParameters()) { + org.raml.model.parameter.QueryParameter ramlQueryParameter = new org.raml.model.parameter.QueryParameter(); + ramlQueryParameter.setDisplayName(queryParameter.getName()); + // ramlQueryParameter.setType(RamlUtils + // .getParamType(queryParameter.getType())); + ramlQueryParameter.setDescription(queryParameter + .getDescription()); + ramlQueryParameter.setRequired(queryParameter.isRequired()); + ramlQueryParameter.setExample(queryParameter.getExample()); + // TODO when enumerations have been added in RWADef + // ramlQueryParameter.setEnumeration(queryParameter.getEnumeration()); + ramlQueryParameter.setDefaultValue(queryParameter + .getDefaultValue()); + ramlQueryParameter.setRepeat(queryParameter + .isAllowMultiple()); + action.getQueryParameters().put(queryParameter.getName(), + ramlQueryParameter); + } + + // Responses + out representation + MimeType ramlOutRepresentation; + org.raml.model.Response ramlResponse = new org.raml.model.Response(); + action.setResponses(new HashMap()); + for (Response response : operation.getResponses()) { + ramlResponse = new org.raml.model.Response(); + ramlResponse.setDescription(response.getDescription()); + ramlResponse.setBody(new HashMap()); + ramlOutRepresentation = new MimeType(); + if (Status.isSuccess(response.getCode()) + && response.getOutputPayLoad() != null + && response.getOutputPayLoad().getType() != null) { + if (RamlUtils.isPrimitiveType(response + .getOutputPayLoad().getType())) { + Property outRepresentationPrimitive = new Property(); + outRepresentationPrimitive.setName(""); + outRepresentationPrimitive.setType(response + .getOutputPayLoad().getType()); + SimpleTypeSchema outRepresentationSchema = RamlUtils + .generatePrimitiveSchema(outRepresentationPrimitive); + try { + ramlOutRepresentation + .setSchema(m + .writeValueAsString(outRepresentationSchema)); + } catch (JsonProcessingException e) { + LOGGER.log(Level.WARNING, + "Error when setting mime type schema.", + e); + } + } else { + ramlOutRepresentation.setSchema(response + .getOutputPayLoad().getType()); + } + } + if (response.getOutputPayLoad() != null) { + MimeType ramlOutRepresentationWithMediaType; + for (String mediaType : operation.getProduces()) { + ramlOutRepresentationWithMediaType = new MimeType(); + ramlOutRepresentationWithMediaType + .setSchema(ramlOutRepresentation + .getSchema()); + try { + ramlOutRepresentationWithMediaType + .setExample(getExampleFromPayLoad( + response.getOutputPayLoad(), + representationSamples, + mediaType)); + } catch (Exception e) { + LOGGER.log(Level.WARNING, + "Error when writting sample.", e); + } + ramlResponse.getBody().put(mediaType, + ramlOutRepresentationWithMediaType); + } + } + action.getResponses().put( + Integer.toString(response.getCode()), ramlResponse); + } + + ramlResource.getActions().put( + RamlUtils.getActionType(operation.getMethod()), action); + } + paths.add(resource.getResourcePath()); + + resources.put(ramlResource.getRelativeUri(), ramlResource); + } + } + + private static void fillInputRepresentation(ObjectMapper m, + Map> representationSamples, + Action action, Operation operation, MimeType ramlInRepresentation) { + ramlInRepresentation.setType(operation.getInputPayLoad().getType()); + if (RamlUtils.isPrimitiveType(operation.getInputPayLoad().getType())) { + Property inRepresentationPrimitive = new Property(); + inRepresentationPrimitive.setName(""); + inRepresentationPrimitive.setType(operation.getInputPayLoad() + .getType()); + SimpleTypeSchema inRepresentationSchema = RamlUtils + .generatePrimitiveSchema(inRepresentationPrimitive); + try { + ramlInRepresentation.setSchema(m + .writeValueAsString(inRepresentationSchema)); + } catch (JsonProcessingException e) { + LOGGER.log(Level.WARNING, + "Error when setting mime type schema.", e); + } + } else { + ramlInRepresentation.setSchema(operation.getInputPayLoad() + .getType()); + } + action.setBody(new HashMap()); + MimeType ramlInRepresentationWithMediaType; + for (String mediaType : operation.getConsumes()) { + ramlInRepresentationWithMediaType = new MimeType(); + ramlInRepresentationWithMediaType.setSchema(ramlInRepresentation + .getSchema()); + try { + ramlInRepresentationWithMediaType + .setExample(getExampleFromPayLoad( + operation.getInputPayLoad(), + representationSamples, mediaType)); + } catch (Exception e) { + LOGGER.log(Level.WARNING, "Error when writting sample.", e); + } + action.getBody().put(mediaType, ramlInRepresentationWithMediaType); + } + } + + private static void fillSecuritySchemes( + List> securitySchemesList, + Endpoint endpoint) { + Map securitySchemes = new HashMap(); + SecurityScheme securityScheme = new SecurityScheme(); + if (endpoint != null) { + if (ChallengeScheme.HTTP_BASIC.equals(endpoint + .getAuthenticationProtocol())) { + securityScheme.setType(ChallengeScheme.HTTP_BASIC.getName()); + securitySchemes.put(ChallengeScheme.HTTP_BASIC.getName(), + securityScheme); + } else if (ChallengeScheme.HTTP_OAUTH.equals(endpoint + .getAuthenticationProtocol()) + || ChallengeScheme.HTTP_OAUTH_BEARER.equals(endpoint + .getAuthenticationProtocol()) + || ChallengeScheme.HTTP_OAUTH_MAC.equals(endpoint + .getAuthenticationProtocol())) { + securityScheme.setType("Oauth 2.0"); + securitySchemes.put("oauth_2_0", securityScheme); + } else if (ChallengeScheme.HTTP_DIGEST.equals(endpoint + .getAuthenticationProtocol())) { + securityScheme.setType(ChallengeScheme.HTTP_DIGEST.getName()); + securitySchemes.put(ChallengeScheme.HTTP_DIGEST.getName(), + securityScheme); + } else if (ChallengeScheme.CUSTOM.equals(endpoint + .getAuthenticationProtocol())) { + securityScheme.setType(ChallengeScheme.CUSTOM.getName()); + securitySchemes.put(ChallengeScheme.CUSTOM.getName(), + securityScheme); + } + securitySchemesList.add(securitySchemes); + } + } + + /** + * Returns the representation given its name from the given list of + * representations. + * + * @param representations + * The list of representations. + * @param name + * The name of the representation. + * @return A representation. + */ + public static Representation getRepresentationByName( + List representations, String name) { + if (name != null) { + for (Representation repr : representations) { + if (name.equals(repr.getName())) { + return repr; + } + } + } + return null; + } + + /** + * Returns the list of Resources nested under a given Resource. + * + * @param resourceName + * The name of the generated resource, extracted from its path. + * @param resource + * The RAML Resource from which the list is extracted. + * @param rootPathVariables + * The path variables contained in the base URI. + * @return The list of Resources nested under resource. + */ + private static List getResource(String resourceName, + org.raml.model.Resource resource, + List rootPathVariables) { + List rwadResources = new ArrayList(); + + // Create one resource + Resource rwadResource = new Resource(); + rwadResource.setDescription(resource.getDescription()); + rwadResource.setName(resourceName); + rwadResource.setResourcePath(resource.getUri()); + + // Path Variables + rwadResource.setPathVariables(getPathVariables(resource)); + rwadResource.getPathVariables().addAll(rootPathVariables); + + // Operations + for (Entry entry : resource.getActions().entrySet()) { + Action action = entry.getValue(); + Operation operation = new Operation(); + operation.setDescription(action.getDescription()); + operation.setMethod(entry.getKey().name().toString()); + } + + rwadResources.add(rwadResource); + + // Nested resources + for (Entry entry : resource + .getResources().entrySet()) { + rwadResources.addAll(getResource( + RamlUtils.processResourceName(entry.getValue().getUri()), + entry.getValue(), rootPathVariables)); + } + + return rwadResources; + } + + /** + * Translates a RAML documentation to a Restlet definition. + * + * @param raml + * The RAML resource listing. + * @return The Restlet definition. + * @throws TranslationException + */ + public static Definition translate(Raml raml) throws TranslationException { + Definition definition = new Definition(); + if (raml.getVersion() != null) { + definition.setVersion(raml.getVersion().substring(1)); + // def.setEndpoint(raml.getBaseUri().replace("{version}", + // raml.getVersion())); + } else { + // def.setEndpoint(raml.getBaseUri()); + } + Contract contract = new Contract(); + definition.setContract(contract); + contract.setName(raml.getTitle()); + + // TODO add section sorting strategies + + // TODO String defaultMediaType = raml.getMediaType(); + List rootPathVariables = new ArrayList(); + for (Entry entry : raml.getBaseUriParameters() + .entrySet()) { + rootPathVariables.add(getPathVariable(entry.getKey(), + entry.getValue())); + } + + for (Map schema : raml.getSchemas()) { + for (Entry entry : schema.entrySet()) { + Representation representation = new Representation(); + representation.setName(entry.getKey()); + representation.setDescription(entry.getValue()); + // TODO get the schema !!! + + // TODO set representations's sections + // representation.getSections().add(section.getName()); + contract.getRepresentations().add(representation); + } + } + + // Resources + for (Entry entry : raml.getResources() + .entrySet()) { + org.raml.model.Resource resource = entry.getValue(); + contract.getResources().addAll( + getResource( + RamlUtils.processResourceName(resource.getUri()), + resource, rootPathVariables)); + } + + return definition; + } + + /** + * Returns an example in provided media Type of the entity in the given + * PayLoad. + * + * @param payLoad + * The PayLoad. + * @param representationSamples + * The map of samples by representations. + * @param mediaType + * The media type as String. + * @return An example in provided media Type of the entity in the given + * PayLoad. + */ + private static String getExampleFromPayLoad(PayLoad payLoad, + Map> representationSamples, + String mediaType) { + Object sample = (Types.isPrimitiveType(payLoad.getType())) ? + SampleUtils.getPropertyDefaultExampleValue(payLoad.getType(), "value") : + representationSamples.get(payLoad.getType()); + + if (payLoad.isArray()) { + sample = Arrays.asList(sample); + } + return SampleUtils.convertSampleAccordingToMediaType(sample, mediaType, payLoad.getType()); + } + + /** + * Private constructor to ensure that the class acts as a true utility class + * i.e. it isn't instantiable and extensible. + */ + private RamlTranslator() { + } +} \ No newline at end of file diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/raml/RamlUtils.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/raml/RamlUtils.java new file mode 100644 index 0000000000..2a8a0b9192 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/raml/RamlUtils.java @@ -0,0 +1,399 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.raml; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.raml.model.ActionType; +import org.raml.model.ParamType; +import org.raml.model.Raml; +import org.raml.model.Resource; +import org.raml.parser.rule.ValidationResult; +import org.raml.parser.visitor.RamlValidationService; +import org.restlet.engine.util.StringUtils; +import org.restlet.ext.apispark.internal.conversion.TranslationException; +import org.restlet.ext.apispark.internal.introspection.util.Types; +import org.restlet.ext.apispark.internal.model.Property; +import org.restlet.ext.apispark.internal.model.Representation; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.module.jsonSchema.JsonSchema; +import com.fasterxml.jackson.module.jsonSchema.types.ArraySchema; +import com.fasterxml.jackson.module.jsonSchema.types.BooleanSchema; +import com.fasterxml.jackson.module.jsonSchema.types.IntegerSchema; +import com.fasterxml.jackson.module.jsonSchema.types.NumberSchema; +import com.fasterxml.jackson.module.jsonSchema.types.ObjectSchema; +import com.fasterxml.jackson.module.jsonSchema.types.SimpleTypeSchema; +import com.fasterxml.jackson.module.jsonSchema.types.StringSchema; + +/** + * Utility class for RAML java beans. + * + * @author Cyprien Quilici + */ +public class RamlUtils { + /** + * The list of java types that correspond to RAML's integer type. + */ + private static final List integerTypesList = Arrays.asList( + "integer", "int"); + + /** + * The list of java types that correspond to RAML's number type. + */ + private static final List numericTypesList = Arrays.asList( + "integer", "int", "double", "long", "float"); + + /** + * Returns the String passed as a parameter with a capital first letter. + * Used to generate resource names in camel case + * + * @param str + * The string to process + * @return The String with a capital first letter + */ + public static String capFirst(String str) { + if (str == null || str.isEmpty()) { + return str; + } + return ("" + str.charAt(0)).toUpperCase() + str.substring(1); + } + + /** + * Generates the JsonSchema of a Representation's Property of primitive + * type. + * + * @param property + * The Property from which the JsonSchema is generated. + * @return The JsonSchema of the given Property. + */ + protected static SimpleTypeSchema generatePrimitiveSchema(Property property) { + SimpleTypeSchema result = null; + + String name = property.getName(); + String type = (property.getType() != null) ? property.getType() + .toLowerCase() : null; + if (RamlUtils.integerTypesList.contains(type)) { + IntegerSchema integerSchema = new IntegerSchema(); + integerSchema.setTitle(name); + if (property.getMin() != null) { + integerSchema.setMinimum(Double.parseDouble(property.getMin())); + } + if (property.getMax() != null) { + integerSchema.setMaximum(Double.parseDouble(property.getMax())); + } + result = integerSchema; + } else if (RamlUtils.numericTypesList.contains(type)) { + NumberSchema numberSchema = new NumberSchema(); + numberSchema.setTitle(name); + if (property.getMin() != null) { + numberSchema.setMinimum(Double.parseDouble(property.getMin())); + } + if (property.getMax() != null) { + numberSchema.setMaximum(Double.parseDouble(property.getMax())); + } + result = numberSchema; + } else if ("boolean".equals(type)) { + BooleanSchema booleanSchema = new BooleanSchema(); + booleanSchema.setTitle(name); + result = booleanSchema; + } else if ("string".equals(type) || "date".equals(type)) { + StringSchema stringSchema = new StringSchema(); + stringSchema.setTitle(name); + result = stringSchema; + } + + return result; + } + + /** + * Generates the JsonSchema of a Representation. + * + * @param representation + * The representation. + * @param schemas + * @param m + * @throws JsonProcessingException + */ + public static void fillSchemas(Representation representation, + Map schemas, ObjectMapper m) + throws JsonProcessingException { + fillSchemas(representation.getName(), representation.getDescription(), + representation.isRaw(), representation.getExtendedType(), + representation.getProperties(), schemas, m); + } + + public static void fillSchemas(String name, String description, + boolean isRaw, String extendedType, List properties, + Map schemas, ObjectMapper m) + throws JsonProcessingException { + ObjectSchema objectSchema = new ObjectSchema(); + objectSchema.setTitle(name); + objectSchema.setDescription(description); + if (!isRaw) { + if (extendedType != null) { + JsonSchema[] extended = new JsonSchema[1]; + SimpleTypeSchema typeExtended = new ObjectSchema(); + typeExtended.set$ref(extendedType); + extended[0] = typeExtended; + objectSchema.setExtends(extended); + } + objectSchema.setProperties(new HashMap()); + for (Property property : properties) { + String type = property.getType(); + + if (property.getMaxOccurs() != 1) { + ArraySchema array = new ArraySchema(); + array.setTitle(property.getName()); + array.setRequired(property.getMinOccurs() > 0); + array.setUniqueItems(property.isUniqueItems()); + if (isPrimitiveType(type)) { + Property prop = new Property(); + prop.setName(property.getName()); + prop.setType(type); + array.setItemsSchema(generatePrimitiveSchema(prop)); + } else { + if (Types.isCompositeType(type)) { + type = name + StringUtils.firstUpper(property.getName()); + // add the new schema + fillSchemas(type, null, false, null, + property.getProperties(), schemas, m); + } + + SimpleTypeSchema reference = new ObjectSchema(); + reference.set$ref("#/schemas/" + type); + array.setItemsSchema(reference); + // array.setItemsSchema(generateSchema(RamlTranslator + // .getRepresentationByName(representations, + // property.getType()), representations)); + } + objectSchema.getProperties().put(array.getTitle(), array); + } else if (isPrimitiveType(type)) { + SimpleTypeSchema primitive = generatePrimitiveSchema(property); + primitive.setRequired(property.getMinOccurs() > 0); + if (property.getDefaultValue() != null) { + primitive.setDefault(property.getDefaultValue()); + } + objectSchema.getProperties().put(property.getName(), + primitive); + } else { + if (Types.isCompositeType(type)) { + type = name + StringUtils.firstUpper(property.getName()); + // add the new schema + fillSchemas(type, null, false, null, + property.getProperties(), schemas, m); + } + + SimpleTypeSchema propertySchema = new ObjectSchema(); + propertySchema.setTitle(property.getName()); + propertySchema.set$ref("#/schemas/" + type); + propertySchema.setRequired(property.getMinOccurs() > 0); + objectSchema.getProperties().put(propertySchema.getTitle(), + propertySchema); + } + } + + } + + schemas.put(name, m.writeValueAsString(objectSchema)); + } + + /** + * Returns the RAML {@link org.raml.model.ActionType} given an HTTP method + * name. + * + * @param method + * The HTTP method name as String. + * @return The corresponding {@link org.raml.model.ActionType}. + */ + public static ActionType getActionType(String method) { + String m = (method != null) ? method.toLowerCase() : null; + if ("post".equals(m)) { + return ActionType.POST; + } else if ("get".equals(m)) { + return ActionType.GET; + } else if ("put".equals(m)) { + return ActionType.PUT; + } else if ("patch".equals(m)) { + return ActionType.PATCH; + } else if ("delete".equals(m)) { + return ActionType.DELETE; + } else if ("head".equals(m)) { + return ActionType.HEAD; + } else if ("options".equals(m)) { + return ActionType.OPTIONS; + } else if ("trace".equals(m)) { + return ActionType.TRACE; + } + return null; + } + + /** + * Returns the RAML parameter type given a java primitive type. + * + * @param type + * The Java type. + * @return The RAML parameter type. + */ + public static ParamType getParamType(String type) { + String t = (type != null) ? type.toLowerCase() : null; + + if (integerTypesList.contains(t)) { + return ParamType.INTEGER; + } else if (numericTypesList.contains(t)) { + return ParamType.NUMBER; + } else if ("boolean".equals(t)) { + return ParamType.BOOLEAN; + } else if ("date".equals(t)) { + return ParamType.DATE; + } + + // TODO add files + // else if () { + // return ParamType.FILE; + // } + return ParamType.STRING; + } + + /** + * Gets the parent resource of a Resource given its path and the list of + * paths available on the API. + * + * @param paths + * The list of paths available on the API. + * @param resourcePath + * The path of the resource the parent resource is searched for. + * @param raml + * The RAML representing the API. + * @return The parent resource. + */ + public static Resource getParentResource(List paths, + String resourcePath, Raml raml) { + List parentPaths = new ArrayList(); + parentPaths.addAll(paths); + parentPaths.add(resourcePath); + Collections.sort(parentPaths); + int index = parentPaths.indexOf(resourcePath); + if (index != 0) { + String parentPath = parentPaths.get(index - 1); + if (resourcePath.startsWith(parentPath)) { + return getResourceByCompletePath(raml, parentPath); + } + } + return null; + } + + /** + * Returns a RAML Resource given its complete path. + * + * @param raml + * The RAML in which the Resource is searched for. + * @param path + * The complete path of the resource. + * @return The Resource. + */ + private static Resource getResourceByCompletePath(Raml raml, String path) { + for (Entry entry : raml.getResources().entrySet()) { + if (path.equals(entry.getValue().getParentUri() + + entry.getValue().getRelativeUri())) { + return entry.getValue(); + } + } + return null; + } + + /** + * Indicates if the given type is a primitive type. + * + * @param type + * The type to check. + * @return True if the given type is primitive, false otherwise. + */ + public static boolean isPrimitiveType(String type) { + String t = (type != null) ? type.toLowerCase() : null; + return ("string".equals(t) || "int".equals(t) || "integer".equals(t) + || "long".equals(t) || "float".equals(t) || "double".equals(t) + || "date".equals(t) || "boolean".equals(t) || "bool".equals(t)); + } + + /** + * Generates a name for a resource computed from its path. The name is + * composed of all alphanumeric characters in camel case.
+ * Ex: /contacts/{contactId} => ContactsContactId + * + * @param uri + * The URI of the Resource + * @return The Resource's name computed from the path. + */ + public static String processResourceName(String uri) { + String processedUri = ""; + String[] split = uri.replaceAll("\\{", "").replaceAll("\\}", "") + .split("/"); + for (String str : split) { + processedUri += RamlUtils.capFirst(str); + } + return processedUri; + } + + /** + * Returns the primitive type as RAML expects them. + * + * @param type + * The Java primitive type. + * @return The primitive type expected by RAML. + */ + public static String toRamlType(String type) { + if ("Integer".equals(type)) { + return "int"; + } else if ("String".equals(type)) { + return "string"; + } else if ("Boolean".equals(type)) { + return "boolean"; + } + + return type; + } + + /** + * Indicates if the given RAML definition is valid according to RAML + * specifications. + * + * @param location + * The RAML definition. + * @throws TranslationException + */ + public static List validate(String location) + throws TranslationException { + // TODO see if needed as it requires lots of dependencies. + return RamlValidationService.createDefault().validate(location); + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerTranslator.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerTranslator.java new file mode 100644 index 0000000000..c1eb667670 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerTranslator.java @@ -0,0 +1,1237 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.TreeMap; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.restlet.data.ChallengeScheme; +import org.restlet.data.Status; +import org.restlet.engine.util.StringUtils; +import org.restlet.ext.apispark.internal.conversion.TranslationException; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ApiDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ApiInfo; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.AuthorizationsDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.BasicAuthorizationDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ItemsDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ModelDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.OAuth2AuthorizationDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ResourceDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ResourceListing; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ResourceListingApi; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ResourceOperationDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ResourceOperationParameterDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ResponseMessageDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.TypePropertyDeclaration; +import org.restlet.ext.apispark.internal.introspection.util.Types; +import org.restlet.ext.apispark.internal.model.Contact; +import org.restlet.ext.apispark.internal.model.Contract; +import org.restlet.ext.apispark.internal.model.Definition; +import org.restlet.ext.apispark.internal.model.Endpoint; +import org.restlet.ext.apispark.internal.model.License; +import org.restlet.ext.apispark.internal.model.Operation; +import org.restlet.ext.apispark.internal.model.PathVariable; +import org.restlet.ext.apispark.internal.model.PayLoad; +import org.restlet.ext.apispark.internal.model.Property; +import org.restlet.ext.apispark.internal.model.QueryParameter; +import org.restlet.ext.apispark.internal.model.Representation; +import org.restlet.ext.apispark.internal.model.Resource; +import org.restlet.ext.apispark.internal.model.Response; +import org.restlet.ext.apispark.internal.model.Section; +import org.restlet.ext.apispark.internal.reflect.ReflectUtils; + +/** + * Tool library for converting Restlet Web API Definition to and from Swagger + * documentation. + * + * @author Cyprien Quilici + */ +public abstract class SwaggerTranslator { + + /** Internal logger. */ + protected static Logger LOGGER = Logger.getLogger(SwaggerTranslator.class + .getName()); + + /** Supported version of Swagger. */ + public static final String SWAGGER_VERSION = "1.2"; + + /** + * Fills Swagger ResourceOperationDeclaration's type from Restlet Web API + * definition's Operation + * + * @param operation + * The Restlet Web API definition's Operation + * @param rod + * The Swagger Swagger ResourceOperationDeclaration + * @param contract + * The Restlet Web API definition's Contract + * @param usedModels + * The models specified by this API declaration + */ + private static void fillApiDeclarationInRepresentation(Operation operation, + ResourceOperationDeclaration rod, Contract contract, + Collection usedModels) { + // Get in representation + ResourceOperationParameterDeclaration ropd; + PayLoad inRepr = operation.getInputPayLoad(); + if (inRepr != null) { + Representation representation = contract.getRepresentation(inRepr + .getType()); + + ropd = new ResourceOperationParameterDeclaration(); + ropd.setParamType("body"); + ropd.setName("body"); + ropd.setRequired(true); + + ropd.setType(inRepr.getType()); + if (representation != null) { + usedModels.add(inRepr.getType()); + } + rod.getParameters().add(ropd); + } + } + + /** + * Fills Swagger API declaration main attributes from Restlet Web API + * definition + * + * @param definition + * The Restlet Web API definition + * @param apiDeclaration + * The Swagger 1.2 API declaration + * @param sectionName + * The name of the current section + */ + private static void fillApiDeclarationMainAttributes(Definition definition, + ApiDeclaration apiDeclaration, String sectionName) { + apiDeclaration.setApiVersion(definition.getVersion()); + + // No way to specify multiple endpoints in Swagger so we take the first + // one + Endpoint endpoint; + if (!definition.getEndpoints().isEmpty()) { + endpoint = definition.getEndpoints().get(0); + apiDeclaration.setBasePath(endpoint.computeUrl()); + } else { + endpoint = new Endpoint("http://example.com"); + } + + // Authentication + // TODO deal with API key authentication + AuthorizationsDeclaration authorizations = new AuthorizationsDeclaration(); + if (ChallengeScheme.HTTP_BASIC.getName().equals( + (endpoint.getAuthenticationProtocol()))) { + authorizations.setBasicAuth(new BasicAuthorizationDeclaration()); + apiDeclaration.setAuthorizations(authorizations); + } else if (ChallengeScheme.HTTP_OAUTH.getName().equals( + (endpoint.getAuthenticationProtocol())) + || ChallengeScheme.HTTP_OAUTH_BEARER.getName().equals( + (endpoint.getAuthenticationProtocol())) + || ChallengeScheme.HTTP_OAUTH_MAC.getName().equals( + (endpoint.getAuthenticationProtocol()))) { + authorizations.setOauth2(new OAuth2AuthorizationDeclaration()); + } + + apiDeclaration.setInfo(new ApiInfo()); + apiDeclaration.setSwaggerVersion(SWAGGER_VERSION); + apiDeclaration.setResourcePath("/" + sectionName); + } + + /** + * Fills Swagger ResourceDeclaration's ResourceOperationDeclaration from + * Restlet Web API definition's Resource + * + * @param resource + * The Restlet Web API definition's Resource + * @param contract + * The Restlet Web API definition's Contract + * @param usedModels + * The models specified by this API declaration + * @param rd + * The Swagger Swagger ResourceDeclaration + */ + private static void fillApiDeclarationOperations(Resource resource, + Contract contract, Collection usedModels, + ResourceDeclaration rd) { + // Get operations + for (Operation operation : resource.getOperations()) { + ResourceOperationDeclaration rod = new ResourceOperationDeclaration(); + rod.setMethod(operation.getMethod()); + rod.setSummary(operation.getDescription()); + rod.setNickname(operation.getName()); + rod.setProduces(operation.getProduces()); + rod.setConsumes(operation.getConsumes()); + + // fill the resource operation parameters + fillApiDeclarationPathVariables(resource, rod); + fillApiDeclarationQueryParameters(operation, rod); + + // fill the resource operation in representation + fillApiDeclarationInRepresentation(operation, rod, contract, + usedModels); + + // fill the resource operation out representation + fillApiDeclarationOutRepresentation(operation, rod, usedModels); + + // fill the resource operation erorr response models + fillApiDeclarationResponses(operation, usedModels, rod); + + rd.getOperations().add(rod); + } + } + + /** + * Fills Swagger ResourceOperationDeclaration's returned type from Restlet + * Web API definition's Operation + * + * @param operation + * The Restlet Web API definition's Operation + * @param rod + * The Swagger Swagger ResourceOperationDeclaration + * @param usedModels + * The models specified by this API declaration + */ + private static void fillApiDeclarationOutRepresentation( + Operation operation, ResourceOperationDeclaration rod, + Collection usedModels) { + // Get out representation + PayLoad outRepr = null; + for (Response response : operation.getResponses()) { + if (Status.isSuccess(response.getCode())) { + outRepr = response.getOutputPayLoad(); + } + } + if (outRepr != null && outRepr.getType() != null) { + if (outRepr.isArray()) { + rod.setType("array"); + if (Types.isPrimitiveType(outRepr.getType())) { + SwaggerTypeFormat swaggerTypeFormat = SwaggerTypes + .toSwaggerType(outRepr.getType()); + rod.getItems().setType(swaggerTypeFormat.getType()); + rod.getItems().setFormat(swaggerTypeFormat.getFormat()); + } else { + rod.getItems().setRef(outRepr.getType()); + } + } else { + rod.setType(outRepr.getType()); + } + usedModels.add(outRepr.getType()); + } else { + rod.setType("void"); + } + } + + /** + * Fills Swagger ResourceOperationDeclaration's + * ResourceOperationParameterDeclaration from Restlet Web API definition's + * Resource + * + * @param resource + * The Restlet Web API definition's Resource + * @param rod + * The Swagger Swagger ResourceOperationDeclaration + */ + private static void fillApiDeclarationPathVariables(Resource resource, + ResourceOperationDeclaration rod) { + // Get path variables + ResourceOperationParameterDeclaration ropd; + for (PathVariable pv : resource.getPathVariables()) { + ropd = new ResourceOperationParameterDeclaration(); + ropd.setParamType("path"); + SwaggerTypeFormat swaggerTypeFormat = SwaggerTypes.toSwaggerType(pv + .getType()); + ropd.setType(swaggerTypeFormat.getType()); + ropd.setFormat(swaggerTypeFormat.getFormat()); + ropd.setRequired(true); + ropd.setName(pv.getName()); + ropd.setAllowMultiple(false); + ropd.setDescription(pv.getDescription()); + rod.getParameters().add(ropd); + } + } + + /** + * Fills Swagger ResourceOperationDeclaration's + * ResourceOperationParameterDeclaration from Restlet Web API definition's + * Operation + * + * @param operation + * The Restlet Web API definition's Operation + * @param rod + * The Swagger Swagger ResourceOperationDeclaration + */ + private static void fillApiDeclarationQueryParameters(Operation operation, + ResourceOperationDeclaration rod) { + // Get query parameters + ResourceOperationParameterDeclaration ropd; + for (QueryParameter qp : operation.getQueryParameters()) { + ropd = new ResourceOperationParameterDeclaration(); + ropd.setParamType("query"); + SwaggerTypeFormat swaggerTypeFormat = SwaggerTypes.toSwaggerType(qp + .getType()); + ropd.setType(swaggerTypeFormat.getType()); + ropd.setFormat(swaggerTypeFormat.getFormat()); + ropd.setName(qp.getName()); + ropd.setAllowMultiple(true); + ropd.setDescription(qp.getDescription()); + ropd.setEnum_(qp.getEnumeration()); + ropd.setDefaultValue(qp.getDefaultValue()); + rod.getParameters().add(ropd); + } + } + + /** + * Fills Swagger ApiDeclaration's ModelDeclarations from Restlet Web API + * definition + * + * @param definition + * The Restlet Web API definition + * @param apiDeclaration + * The Swagger API declaration + * @param usedModels + * The models specified by this API declaration + */ + private static void fillApiDeclarationRepresentations( + Definition definition, ApiDeclaration apiDeclaration, + Collection usedModels) { + Contract contract = definition.getContract(); + apiDeclaration.setModels(new TreeMap()); + + List usedModelsList = new ArrayList<>(usedModels); + for (int i = 0; i < usedModelsList.size(); i++) { + String model = usedModelsList.get(i); + Representation repr = contract.getRepresentation(model); + if (repr == null || Types.isPrimitiveType(model)) { + continue; + } + ModelDeclaration md = new ModelDeclaration(); + fillModel(apiDeclaration, usedModelsList, model, + repr.getDescription(), repr.getProperties(), md); + } + } + + private static void fillModel(ApiDeclaration apiDeclaration, + List usedModelsList, String model, String description, + List properties, ModelDeclaration md) { + md.setId(model); + md.setDescription(description); + for (Property prop : properties) { + String type = prop.getType(); + + boolean composite = Types.isCompositeType(type); + if (composite) { + type = model + StringUtils.firstUpper(prop.getName()); + } + + if (prop.getMinOccurs() > 0) { + md.getRequired().add(prop.getName()); + } + if (!Types.isPrimitiveType(type) && !usedModelsList.contains(type)) { + usedModelsList.add(type); + } + TypePropertyDeclaration tpd = new TypePropertyDeclaration(); + tpd.setDescription(prop.getDescription()); + tpd.setEnum_(prop.getEnumeration()); + + if (prop.getMaxOccurs() > 1 || prop.getMaxOccurs() == -1) { + tpd.setType("array"); + tpd.setItems(new ItemsDeclaration()); + if (Types.isPrimitiveType(type)) { + SwaggerTypeFormat swaggerTypeFormat = SwaggerTypes + .toSwaggerType(type); + tpd.getItems().setType(swaggerTypeFormat.getType()); + tpd.getItems().setFormat(swaggerTypeFormat.getFormat()); + } else { + tpd.getItems().setRef(type); + if (composite) { + ModelDeclaration m = new ModelDeclaration(); + fillModel(apiDeclaration, usedModelsList, type, null, prop.getProperties(), m); + } + } + } else { + if (Types.isPrimitiveType(type)) { + SwaggerTypeFormat swaggerTypeFormat = SwaggerTypes + .toSwaggerType(type); + tpd.setType(swaggerTypeFormat.getType()); + tpd.setFormat(swaggerTypeFormat.getFormat()); + } else { + tpd.setRef(type); + if (composite) { + ModelDeclaration m = new ModelDeclaration(); + fillModel(apiDeclaration, usedModelsList, type, null, prop.getProperties(), m); + } + } + } + tpd.setMaximum(prop.getMax()); + tpd.setMinimum(prop.getMin()); + tpd.setUniqueItems(prop.isUniqueItems()); + + md.getProperties().put(prop.getName(), tpd); + } + apiDeclaration.getModels().put(md.getId(), md); + } + + /** + * Fills Swagger ApiDeclaration's ResourceDeclarations from Restlet Web API + * definition + * + * @param definition + * The Restlet Web API definition + * @param apiDeclaration + * The Swagger API declaration + * @param sectionName + * The name of the current section + * @return The models specified by this API declaration + */ + private static Collection fillApiDeclarationResources( + Definition definition, ApiDeclaration apiDeclaration, + String sectionName) { + Set usedModels = new HashSet<>(); + Contract contract = definition.getContract(); + + // Get the resources corresponding to the sectionName + List resources = new ArrayList<>(); + boolean allResources = contract.getSections().isEmpty(); + for (Resource resource : contract.getResources()) { + if (allResources) { + resources.add(resource); + } else { + if (resource.getSections().contains(sectionName)) { + resources.add(resource); + } + } + } + + // Get resources + for (Resource resource : resources) { + // Discriminate the resources of one category + if (allResources + && !resource.getResourcePath() + .startsWith("/" + sectionName)) { + continue; + } + ResourceDeclaration rd = new ResourceDeclaration(); + rd.setPath(resource.getResourcePath()); + rd.setDescription(resource.getDescription()); + + // fill resource declaration + fillApiDeclarationOperations(resource, contract, usedModels, rd); + + apiDeclaration.getApis().add(rd); + } + // Sort the API declarations according to their path. + Collections.sort(apiDeclaration.getApis(), + new Comparator() { + @Override + public int compare(ResourceDeclaration o1, + ResourceDeclaration o2) { + return o1.getPath().compareTo(o2.getPath()); + } + }); + return usedModels; + } + + /** + * Fills Swagger ResourceOperationDeclaration's error responses from Restlet + * Web API definition's Operation + * + * @param operation + * The Restlet Web API definition's Operation + * @param usedModels + * The models specified by this API declaration + * @param rod + * The Swagger Swagger ResourceOperationDeclaration + */ + private static void fillApiDeclarationResponses(Operation operation, + Collection usedModels, ResourceOperationDeclaration rod) { + // Get response messages + for (Response response : operation.getResponses()) { + if (Status.isSuccess(response.getCode())) { + continue; + } + ResponseMessageDeclaration rmd = new ResponseMessageDeclaration(); + rmd.setCode(response.getCode()); + rmd.setMessage(response.getMessage()); + if (response.getOutputPayLoad() != null) { + rmd.setResponseModel(response.getOutputPayLoad().getType()); + usedModels.add(response.getOutputPayLoad().getType()); + } + rod.getResponseMessages().add(rmd); + } + } + + /** + * Fills Restlet Web API definition's Contract from Swagger 1.2 definition + * + * @param contract + * The Restlet Web API definition's Contract + * @param listing + * The Swagger ResourceListing + * @param apiDeclarations + * The Swagger ApiDeclaration + */ + private static void fillContract(Contract contract, + ResourceListing listing, Map apiDeclarations) { + + // Resource listing + Resource resource; + List declaredTypes = new ArrayList<>(); + for (Entry entry : apiDeclarations.entrySet()) { + ApiDeclaration apiDeclaration = entry.getValue(); + Section section = new Section(); + if (entry.getKey().startsWith("/")) { + section.setName(entry.getKey().substring(1)); + } else { + section.setName(entry.getKey()); + } + section.setDescription(listing.getApi(entry.getKey()) + .getDescription()); + contract.getSections().add(section); + + for (ResourceDeclaration api : apiDeclaration.getApis()) { + resource = new Resource(); + resource.setResourcePath(api.getPath()); + + List declaredPathVariables = new ArrayList<>(); + fillOperations(resource, apiDeclaration, api, contract, + section, declaredPathVariables, declaredTypes); + + resource.getSections().add(section.getName()); + contract.getResources().add(resource); + LOGGER.log(Level.FINE, "Resource " + api.getPath() + " added."); + } + } + } + + /** + * Fills Restlet Web API definition's Contract from Swagger 1.2 API + * declaration + * + * @param contract + * The Restlet Web API definition's Contract + * @param apiDeclaration + * The Swagger ApiDeclaration + */ + private static void fillContract(Contract contract, + ApiDeclaration apiDeclaration) { + // Resource listing + Resource resource; + List declaredTypes = new ArrayList<>(); + Section section = new Section(); + if (apiDeclaration.getResourcePath().startsWith("/")) { + section.setName(apiDeclaration.getResourcePath().substring(1)); + } else { + section.setName(apiDeclaration.getResourcePath()); + } + contract.getSections().add(section); + + for (ResourceDeclaration api : apiDeclaration.getApis()) { + resource = new Resource(); + resource.setResourcePath(api.getPath()); + + List declaredPathVariables = new ArrayList<>(); + fillOperations(resource, apiDeclaration, api, contract, section, + declaredPathVariables, declaredTypes); + + resource.getSections().add(section.getName()); + contract.getResources().add(resource); + LOGGER.log(Level.FINE, "Resource " + api.getPath() + " added."); + } + } + + /** + * Fills Restlet Web API definition's main attributes from Swagger 1.2 + * definition + * + * @param definition + * The Restlet Web API definition + * @param listing + * The Swagger 1.2 resource listing + * @param basePath + * The basePath of the described Web API + */ + private static void fillMainAttributes(Definition definition, + ResourceListing listing, String basePath) { + definition.setVersion(listing.getApiVersion()); + Contact contact = new Contact(); + contact.setEmail(listing.getInfo().getContact()); + definition.setContact(contact); + License license = new License(); + license.setUrl(listing.getInfo().getLicenseUrl()); + definition.setLicense(license); + + Contract contract = new Contract(); + contract.setName(listing.getInfo().getTitle()); + LOGGER.log(Level.FINE, "Contract " + contract.getName() + " added."); + contract.setDescription(listing.getInfo().getDescription()); + definition.setContract(contract); + + if (definition.getEndpoints().isEmpty()) { + // TODO verify how to deal with API key auth + oauth + Endpoint endpoint = new Endpoint(basePath); + definition.getEndpoints().add(endpoint); + if (listing.getAuthorizations().getBasicAuth() != null) { + endpoint.setAuthenticationProtocol(ChallengeScheme.HTTP_BASIC + .getName()); + } else if (listing.getAuthorizations().getOauth2() != null) { + endpoint.setAuthenticationProtocol(ChallengeScheme.HTTP_OAUTH + .getName()); + } else if (listing.getAuthorizations().getApiKey() != null) { + endpoint.setAuthenticationProtocol(ChallengeScheme.CUSTOM + .getName()); + } + } + } + + /** + * Fills Restlet Web API definition's Operations from Swagger ApiDeclaration + * + * @param resource + * The Restlet Web API definition's Resource + * @param apiDeclaration + * The Swagger ApiDeclaration + * @param api + * The Swagger ResourceDeclaration + * @param contract + * The Restlet Web API definition's Contract + * @param section + * The Restlet Web API definition's current Section + * @param declaredPathVariables + * The list of all declared path variables for the Resource + * @param declaredTypes + * The list of all declared types for the Contract + */ + private static void fillOperations(Resource resource, + ApiDeclaration apiDeclaration, ResourceDeclaration api, + Contract contract, Section section, + List declaredPathVariables, List declaredTypes) { + + List apiProduces = apiDeclaration.getProduces(); + List apiConsumes = apiDeclaration.getConsumes(); + Map> subtypes = new HashMap<>(); + Representation representation; + + // Operations listing + Operation operation; + for (ResourceOperationDeclaration swaggerOperation : api + .getOperations()) { + String methodName = swaggerOperation.getMethod(); + operation = new Operation(); + operation.setMethod(swaggerOperation.getMethod()); + operation.setName(swaggerOperation.getNickname()); + operation.setDescription(swaggerOperation.getSummary()); + + // fill produced and consumed variants + fillVariants(operation, swaggerOperation, + apiProduces, apiConsumes); + + // Extract success response message + Response success = new Response(); + success.setCode(Status.SUCCESS_OK.getCode()); + success.setDescription("Success"); + success.setMessage(Status.SUCCESS_OK.getDescription()); + success.setName("Success"); + + // fill output payload + fillOutPayLoad(success, swaggerOperation); + operation.getResponses().add(success); + + // fill parameters + fillParameters(resource, operation, swaggerOperation, + declaredPathVariables); + + // fill responses + fillResponseMessages(operation, swaggerOperation); + + resource.getOperations().add(operation); + LOGGER.log(Level.FINE, "Method " + methodName + " added."); + + // fill representations + fillRepresentations(contract, section, apiDeclaration, subtypes, + declaredTypes); + + // Deal with subtyping + for (Entry> subtypesPair : subtypes.entrySet()) { + List subtypesOf = subtypesPair.getValue(); + for (String subtypeOf : subtypesOf) { + representation = contract.getRepresentation(subtypeOf); + representation.setExtendedType(subtypesPair.getKey()); + } + } + } + } + + /** + * Fills Restlet Web API definition's operation output payload from Swagger + * ResourceOperationDeclaration + * + * @param success + * The Restlet Web API definition's operation success Response + * @param swaggerOperation + * The Swagger ResourceOperationDeclaration + */ + private static void fillOutPayLoad(Response success, + ResourceOperationDeclaration swaggerOperation) { + // Set response's entity + PayLoad rwadOutRepr = new PayLoad(); + if ("array".equals(swaggerOperation.getType())) { + LOGGER.log(Level.FINER, + "Operation: " + swaggerOperation.getNickname() + + " returns an array"); + rwadOutRepr.setArray(true); + if (swaggerOperation.getItems().getType() != null) { + rwadOutRepr.setType(swaggerOperation.getItems().getType()); + } else { + rwadOutRepr.setType(swaggerOperation.getItems().getRef()); + } + } else { + LOGGER.log(Level.FINER, + "Operation: " + swaggerOperation.getNickname() + + " returns a single Representation"); + rwadOutRepr.setArray(false); + if (swaggerOperation.getType() != null) { + rwadOutRepr.setType(swaggerOperation.getType()); + } else { + rwadOutRepr.setType(swaggerOperation.getRef()); + } + } + success.setOutputPayLoad(rwadOutRepr); + } + + /** + * Fills Restlet Web API definition's operation parameter from Swagger + * ResourceOperationDeclaration + * + * @param resource + * The Restlet Web API definition's Resource to which the + * operation is attached + * @param operation + * The Restlet Web API definition's Operation + * @param swaggerOperation + * The Swagger ResourceOperationDeclaration + * @param declaredPathVariables + * The list of declared pathVariable on the resource + */ + private static void fillParameters(Resource resource, Operation operation, + ResourceOperationDeclaration swaggerOperation, + List declaredPathVariables) { + // Loop over Swagger parameters. + for (ResourceOperationParameterDeclaration param : swaggerOperation + .getParameters()) { + if ("path".equals(param.getParamType())) { + if (!declaredPathVariables.contains(param.getName())) { + declaredPathVariables.add(param.getName()); + PathVariable pathVariable = toPathVariable(param); + resource.getPathVariables().add(pathVariable); + } + } else if ("body".equals(param.getParamType())) { + if (operation.getInputPayLoad() == null) { + PayLoad rwadInRepr = toEntity(param); + operation.setInputPayLoad(rwadInRepr); + } + } else if ("query".equals(param.getParamType())) { + QueryParameter rwadQueryParam = toQueryParameter(param); + operation.getQueryParameters().add(rwadQueryParam); + } + } + } + + /** + * Fills Restlet Web API definition's Representations from Swagger + * ApiDeclaration + * + * @param contract + * The Restlet Web API definition's Contract + * @param section + * The Restlet Web API definition's current Section + * @param apiDeclaration + * The Swagger ApiDeclaration + * @param subtypes + * The list of this Representation's subtypes + * @param declaredTypes + * The list of all declared types for the Contract + */ + private static void fillRepresentations(Contract contract, Section section, + ApiDeclaration apiDeclaration, Map> subtypes, + List declaredTypes) { + // Add representations + Representation representation; + for (Entry modelEntry : apiDeclaration + .getModels().entrySet()) { + ModelDeclaration model = modelEntry.getValue(); + if (model.getSubTypes() != null && !model.getSubTypes().isEmpty()) { + subtypes.put(model.getId(), model.getSubTypes()); + } + if (!declaredTypes.contains(modelEntry.getKey())) { + declaredTypes.add(modelEntry.getKey()); + representation = toRepresentation(model, modelEntry.getKey()); + representation.getSections().add(section.getName()); + contract.getRepresentations().add(representation); + LOGGER.log(Level.FINE, "Representation " + modelEntry.getKey() + + " added."); + } + } + } + + /** + * Fills Swagger resource listing main attributes from Restlet Web API + * definition + * + * @param definition + * The Restlet Web API definition + * @param listing + * The Swagger 1.2 resource listing + */ + private static void fillResourceListingApis(Definition definition, + ResourceListing listing) { + Contract contract = definition.getContract(); + boolean allResources = contract.getSections().isEmpty(); + + // Resources + List addedApis = new ArrayList<>(); + if (definition.getContract() != null && contract.getResources() != null) { + listing.setApis(new ArrayList()); + + for (Resource resource : contract.getResources()) { + + if (allResources) { + ResourceListingApi rd = new ResourceListingApi(); + rd.setDescription(resource.getDescription()); + rd.setPath(ReflectUtils.getFirstSegment(resource + .getResourcePath())); + if (!addedApis.contains(rd.getPath())) { + addedApis.add(rd.getPath()); + listing.getApis().add(rd); + } + } else { + for (String sectionName : resource.getSections()) { + Section section = contract.getSection(sectionName); + ResourceListingApi rd = new ResourceListingApi(); + rd.setDescription(section.getDescription()); + rd.setPath("/" + sectionName); + if (!addedApis.contains(rd.getPath())) { + addedApis.add(rd.getPath()); + listing.getApis().add(rd); + } + } + } + } + } + Collections.sort(listing.getApis(), + new Comparator() { + @Override + public int compare(ResourceListingApi o1, + ResourceListingApi o2) { + return o1.getPath().compareTo(o2.getPath()); + } + + }); + } + + /** + * Fills Swagger resource listing main attributes from Restlet Web API + * definition + * + * @param definition + * The Restlet Web API definition + * @param listing + * The Swagger 1.2 resource listing + */ + private static void fillResourceListingMainAttributes( + Definition definition, ResourceListing listing) { + // common properties + listing.setApiVersion(definition.getVersion()); + // result.setBasePath(definition.getEndpoint()); + listing.setInfo(new ApiInfo()); + listing.setSwaggerVersion(SWAGGER_VERSION); + if (definition.getContact() != null) { + listing.getInfo().setContact(definition.getContact().getEmail()); + } + if (definition.getLicense() != null) { + listing.getInfo().setLicenseUrl(definition.getLicense().getUrl()); + } + if (definition.getContract() != null) { + listing.getInfo().setTitle(definition.getContract().getName()); + listing.getInfo().setDescription( + definition.getContract().getDescription()); + } + + if (!definition.getEndpoints().isEmpty()) { + String authenticationProtocol = definition.getEndpoints().get(0) + .getAuthenticationProtocol(); + if (authenticationProtocol != null) { + AuthorizationsDeclaration authorizations = new AuthorizationsDeclaration(); + // TODO add other authentication protocols + if (ChallengeScheme.HTTP_BASIC.getName().equals( + authenticationProtocol)) { + authorizations + .setBasicAuth(new BasicAuthorizationDeclaration()); + listing.setAuthorizations(authorizations); + } else if (ChallengeScheme.HTTP_OAUTH.getName().equals( + authenticationProtocol) + || ChallengeScheme.HTTP_OAUTH_BEARER.getName().equals( + authenticationProtocol) + || ChallengeScheme.HTTP_OAUTH_MAC.getName().equals( + authenticationProtocol)) { + authorizations + .setOauth2(new OAuth2AuthorizationDeclaration()); + } + } + } + } + + /** + * Fills Restlet Web API definition's operation Responses from Swagger + * ResourceOperationDeclaration + * + * @param operation + * The Restlet Web API definition's Operation + * @param swaggerOperation + * The Swagger ResourceOperationDeclaration + */ + private static void fillResponseMessages(Operation operation, + ResourceOperationDeclaration swaggerOperation) { + // Set error response messages + if (swaggerOperation.getResponseMessages() != null) { + for (ResponseMessageDeclaration swagResponse : swaggerOperation + .getResponseMessages()) { + Response response = new Response(); + PayLoad outputPayLoad = new PayLoad(); + outputPayLoad.setType(swagResponse.getResponseModel()); + response.setOutputPayLoad(outputPayLoad); + response.setName("Error " + swagResponse.getCode()); + response.setCode(swagResponse.getCode()); + response.setMessage(swagResponse.getMessage()); + operation.getResponses().add(response); + } + } + } + + /** + * Fills Restlet Web API definition's variants from Swagger 1.2 definition + * + * @param operation + * The Restlet Web API definition's Operation + * @param swaggerOperation + * The Swagger ResourceOperationDeclaration + * @param apiProduces + * The list of media types produced by the operation + * @param apiConsumes + * The list of media types consumed by the operation + */ + private static void fillVariants(Operation operation, ResourceOperationDeclaration swaggerOperation, + List apiProduces, List apiConsumes) { + // Set variants + for (String produced : apiProduces.isEmpty() ? swaggerOperation + .getProduces() : apiProduces) { + operation.getProduces().add(produced); + } + + for (String consumed : apiConsumes.isEmpty() ? swaggerOperation + .getConsumes() : apiConsumes) { + operation.getConsumes().add(consumed); + } + } + + /** + * Retrieves the Swagger API declaration corresponding to a category of the + * given Restlet Web API Definition + * + * @param sectionName + * The category of the API declaration + * @param definition + * The Restlet Web API Definition + * @return The Swagger API definition of the given category + */ + public static ApiDeclaration getApiDeclaration(String sectionName, + Definition definition) { + ApiDeclaration result = new ApiDeclaration(); + + // fill API declaration main attributes + fillApiDeclarationMainAttributes(definition, result, sectionName); + + // fill API declaration resources + Collection usedModels = fillApiDeclarationResources(definition, + result, sectionName); + + // fill API declaration representations + fillApiDeclarationRepresentations(definition, result, usedModels); + + return result; + } + + /** + * Translates a Restlet Web API Definition to a Swagger resource listing. + * + * @param definition + * The Restlet Web API Definition. + * @return The corresponding resource listing + */ + public static ResourceListing getResourcelisting(Definition definition) { + ResourceListing result = new ResourceListing(); + + // fill resource listing main attributes + fillResourceListingMainAttributes(definition, result); + + // fill resource listing API list + fillResourceListingApis(definition, result); + + return result; + } + + /** + * Converts a Swagger parameter to an instance of + * {@link org.restlet.ext.apispark.internal.model.PayLoad}. + * + * @param parameter + * The Swagger parameter. + * @return An instance of + * {@link org.restlet.ext.apispark.internal.model.PayLoad}. + */ + private static PayLoad toEntity( + ResourceOperationParameterDeclaration parameter) { + PayLoad result = new PayLoad(); + if ("array".equals(parameter.getType())) { + result.setArray(true); + if (parameter.getItems() != null + && parameter.getItems().getType() != null) { + result.setType(parameter.getItems().getType()); + } else if (parameter.getItems() != null) { + result.setType(parameter.getItems().getRef()); + } + } else { + result.setArray(false); + result.setType(parameter.getType()); + } + return result; + } + + /** + * Converts a Swagger parameter to an instance of + * {@link org.restlet.ext.apispark.internal.model.PathVariable}. + * + * @param parameter + * The Swagger parameter. + * @return An instance of + * {@link org.restlet.ext.apispark.internal.model.PathVariable}. + */ + private static PathVariable toPathVariable( + ResourceOperationParameterDeclaration parameter) { + PathVariable result = new PathVariable(); + result.setName(parameter.getName()); + result.setDescription(parameter.getDescription()); + result.setType(SwaggerTypes.toDefinitionType(new SwaggerTypeFormat( + parameter.getType(), parameter.getFormat()))); + return result; + } + + /** + * Converts a Swagger parameter to an instance of + * {@link org.restlet.ext.apispark.internal.model.QueryParameter}. + * + * @param parameter + * The Swagger parameter. + * @return An instance of + * {@link org.restlet.ext.apispark.internal.model.QueryParameter}. + */ + private static QueryParameter toQueryParameter( + ResourceOperationParameterDeclaration parameter) { + QueryParameter result = new QueryParameter(); + result.setName(parameter.getName()); + result.setDescription(parameter.getDescription()); + result.setRequired(parameter.isRequired()); + result.setAllowMultiple(parameter.isAllowMultiple()); + result.setDefaultValue(parameter.getDefaultValue()); + if (parameter.getEnum_() != null && !parameter.getEnum_().isEmpty()) { + result.setEnumeration(new ArrayList()); + for (String value : parameter.getEnum_()) { + result.getEnumeration().add(value); + } + } + return result; + } + + /** + * Converts a Swagger model to an instance of + * {@link org.restlet.ext.apispark.internal.model.Representation}. + * + * @param model + * The Swagger model. + * @param name + * The name of the representation. + * @return An instance of + * {@link org.restlet.ext.apispark.internal.model.Representation}. + */ + private static Representation toRepresentation(ModelDeclaration model, + String name) { + Representation result = new Representation(); + result.setName(name); + result.setDescription(model.getDescription()); + + // Set properties + for (Entry swagProperties : model + .getProperties().entrySet()) { + TypePropertyDeclaration swagProperty = swagProperties.getValue(); + Property property = new Property(); + property.setName(swagProperties.getKey()); + + // Set property's type + boolean isArray = "array".equals(swagProperty.getType()); + if (isArray) { + property.setType(swagProperty.getItems().getType() != null ? swagProperty + .getItems().getType() : swagProperty.getItems() + .getRef()); + } else if (swagProperty.getType() != null) { + property.setType(swagProperty.getType()); + } else if (swagProperty.getRef() != null) { + property.setType(swagProperty.getRef()); + } + + if (model.getRequired() != null) { + property.setMinOccurs(model.getRequired().contains( + swagProperties.getKey()) ? 1 : 0); + } else { + property.setMinOccurs(0); + } + property.setMaxOccurs(isArray ? -1 : 1); + property.setDescription(swagProperty.getDescription()); + property.setMin(swagProperty.getMinimum()); + property.setMax(swagProperty.getMaximum()); + property.setUniqueItems(swagProperty.isUniqueItems()); + + result.getProperties().add(property); + LOGGER.log(Level.FINE, "Property " + property.getName() + " added."); + } + return result; + } + + /** + * Translates a Swagger documentation to a Restlet definition. + * + * @param listing + * The Swagger resource listing. + * @param apiDeclarations + * The list of Swagger API declarations. + * @return The Restlet definition. + * @throws org.restlet.ext.apispark.internal.conversion.TranslationException + */ + public static Definition translate(ResourceListing listing, + Map apiDeclarations) + throws TranslationException { + + validate(listing, apiDeclarations); + + try { + Definition definition = new Definition(); + + // fill main attributes of the Restlet Web API definition + String basePath = apiDeclarations.get( + (listing.getApis().get(0).getPath())).getBasePath(); + fillMainAttributes(definition, listing, basePath); + + fillContract(definition.getContract(), listing, apiDeclarations); + + LOGGER.log(Level.FINE, + "Definition successfully retrieved from Swagger definition"); + return definition; + } catch (Exception e) { + throw new TranslationException( + "compliance", + "Impossible to read your API definition, check your Swagger specs compliance", + e); + } + } + + /** + * Translates a Swagger API declaration to a Restlet Web API definition. + * + * @param apiDeclaration + * The Swagger API declaration + * @return the Restlet Web API definition + * @throws TranslationException + */ + public static Definition translate(ApiDeclaration apiDeclaration) + throws TranslationException { + try { + Definition definition = new Definition(); + definition.setContract(new Contract()); + definition.getEndpoints().add( + new Endpoint(apiDeclaration.getBasePath())); + + fillContract(definition.getContract(), apiDeclaration); + + LOGGER.log(Level.FINE, + "Definition successfully retrieved from Swagger definition"); + return definition; + } catch (Exception e) { + throw new TranslationException( + "compliance", + "Impossible to read your API definition, check your Swagger specs compliance", + e); + } + } + + /** + * Indicates if the given resource listing and list of API declarations + * match. + * + * @param resourceListing + * The Swagger resource listing. + * @param apiDeclarations + * The list of Swagger API declarations. + * @throws org.restlet.ext.apispark.internal.conversion.TranslationException + */ + private static void validate(ResourceListing resourceListing, + Map apiDeclarations) + throws TranslationException { + int rlSize = resourceListing.getApis().size(); + int adSize = apiDeclarations.size(); + if (rlSize < adSize) { + throw new TranslationException("file", + "One of your API declarations is not mapped in your resource listing"); + } else if (rlSize > adSize) { + throw new TranslationException("file", + "Some API declarations are missing"); + } + } + + /** + * Private constructor to ensure that the class acts as a true utility class + * i.e. it isn't instantiable and extensible. + */ + private SwaggerTranslator() { + } +} \ No newline at end of file diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerTypeFormat.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerTypeFormat.java new file mode 100644 index 0000000000..330ad19e76 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerTypeFormat.java @@ -0,0 +1,51 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2; + +/** + * Internal class representing a Swagger type + */ +public class SwaggerTypeFormat { + private String format; + + private String type; + + public SwaggerTypeFormat(String type) { + this(type, null); + } + + public SwaggerTypeFormat(String type, String format) { + this.type = type; + this.format = format; + } + + public String getFormat() { + return format; + } + + public String getType() { + return type; + } +} \ No newline at end of file diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerTypes.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerTypes.java new file mode 100644 index 0000000000..f1e126a58d --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerTypes.java @@ -0,0 +1,96 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2; + +/** + */ +public class SwaggerTypes { + + /** + * Converts Swagger types to Java types + * + * @param dataType + * The Swagger type + * @return The corresponding Java type + */ + public static String toDefinitionType(SwaggerTypeFormat dataType) { + if ("string".equals(dataType.getType())) { + if ("date".equals(dataType.getFormat())) { + return "date"; + } else if ("byte".equals(dataType.getFormat())) { + return "byte"; + } else { + return "string"; + } + } else if ("integer".equals(dataType.getType())) { + if ("int64".equals(dataType.getFormat())) { + return "long"; + } else { + return "integer"; + } + } else if ("number".equals(dataType.getType())) { + if ("float".equals(dataType.getFormat())) { + return "Float"; + } else { + return "double"; + } + } else if ("boolean".equals(dataType.getType())) { + return "boolean"; + } else { + return dataType.getType(); + } + } + + /** + * Converts Java types to Swagger types + * + * @param dataType + * The Java type + * @return The corresponding Swagger type + */ + public static SwaggerTypeFormat toSwaggerType(String dataType) { + if ("string".equals(dataType)) { + return new SwaggerTypeFormat("string"); + } else if ("byte".equals(dataType)) { + return new SwaggerTypeFormat("string", "byte"); + } else if ("short".equals(dataType)) { + return new SwaggerTypeFormat("integer", "int32"); + } else if ("integer".equals(dataType)) { + return new SwaggerTypeFormat("integer", "int32"); + } else if ("long".equals(dataType)) { + return new SwaggerTypeFormat("integer", "int64"); + } else if ("float".equals(dataType)) { + return new SwaggerTypeFormat("number", "float"); + } else if ("double".equals(dataType)) { + return new SwaggerTypeFormat("number", "double"); + } else if ("boolean".equals(dataType)) { + return new SwaggerTypeFormat("boolean"); + } else if ("date".equals(dataType)) { + return new SwaggerTypeFormat("string", "date"); + } else { + return new SwaggerTypeFormat(dataType); + } + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/SwaggerUtils.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerUtils.java similarity index 69% rename from modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/SwaggerUtils.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerUtils.java index 8e597058c3..45e66f3801 100644 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/SwaggerUtils.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/SwaggerUtils.java @@ -2,22 +2,13 @@ * Copyright 2005-2014 Restlet * * The contents of this file are subject to the terms of one of the following - * open source licenses: Apache 2.0 or LGPL 3.0 or LGPL 2.1 or CDDL 1.0 or EPL - * 1.0 (the "Licenses"). You can select the license that you prefer but you may - * not use this file except in compliance with one of these Licenses. + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. * * You can obtain a copy of the Apache 2.0 license at * http://www.opensource.org/licenses/apache-2.0 * - * You can obtain a copy of the LGPL 3.0 license at - * http://www.opensource.org/licenses/lgpl-3.0 - * - * You can obtain a copy of the LGPL 2.1 license at - * http://www.opensource.org/licenses/lgpl-2.1 - * - * You can obtain a copy of the CDDL 1.0 license at - * http://www.opensource.org/licenses/cddl1 - * * You can obtain a copy of the EPL 1.0 license at * http://www.opensource.org/licenses/eclipse-1.0 * @@ -31,7 +22,7 @@ * Restlet is a registered trademark of Restlet S.A.S. */ -package org.restlet.ext.apispark.internal.conversion; +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2; import java.io.File; import java.io.IOException; @@ -43,10 +34,12 @@ import org.restlet.data.ChallengeScheme; import org.restlet.data.MediaType; +import org.restlet.engine.util.StringUtils; +import org.restlet.ext.apispark.internal.conversion.TranslationException; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ApiDeclaration; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ResourceListing; +import org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model.ResourceListingApi; import org.restlet.ext.apispark.internal.model.Definition; -import org.restlet.ext.apispark.internal.model.swagger.ApiDeclaration; -import org.restlet.ext.apispark.internal.model.swagger.ResourceDeclaration; -import org.restlet.ext.apispark.internal.model.swagger.ResourceListing; import org.restlet.resource.ClientResource; import com.fasterxml.jackson.databind.ObjectMapper; @@ -66,7 +59,8 @@ private static ClientResource createAuthenticatedClientResource(String url, String userName, String password) { ClientResource cr = new ClientResource(url); cr.accept(MediaType.APPLICATION_JSON); - if (!isEmpty(userName) && !isEmpty(password)) { + if (!StringUtils.isNullOrEmpty(userName) + && !StringUtils.isNullOrEmpty(password)) { cr.setChallengeResponse(ChallengeScheme.HTTP_BASIC, userName, password); } @@ -83,30 +77,29 @@ private static ClientResource createAuthenticatedClientResource(String url, * @param password * The paswword for service authentication. * @return A {@link Definition}. - * @throws SwaggerConversionException + * @throws org.restlet.ext.apispark.internal.conversion.TranslationException */ public static Definition getDefinition(String swaggerUrl, String userName, - String password) throws SwaggerConversionException { + String password) throws TranslationException { // Check that URL is non empty and well formed if (swaggerUrl == null) { - throw new SwaggerConversionException("url", - "You did not provide any URL"); + throw new TranslationException("url", "You did not provide any URL"); } Pattern p = Pattern .compile("^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"); boolean remote = p.matcher(swaggerUrl).matches(); - ResourceListing resourceListing = new ResourceListing(); + ResourceListing resourceListing; Map apis = new HashMap(); if (remote) { LOGGER.log(Level.FINE, "Reading file: " + swaggerUrl); resourceListing = createAuthenticatedClientResource(swaggerUrl, userName, password).get(ResourceListing.class); - for (ResourceDeclaration api : resourceListing.getApis()) { + for (ResourceListingApi api : resourceListing.getApis()) { LOGGER.log(Level.FINE, "Reading file: " + swaggerUrl + api.getPath()); apis.put( - api.getPath().replaceAll("/", ""), + api.getPath(), createAuthenticatedClientResource( swaggerUrl + api.getPath(), userName, password) .get(ApiDeclaration.class)); @@ -119,28 +112,17 @@ public static Definition getDefinition(String swaggerUrl, String userName, ResourceListing.class); String basePath = resourceListingFile.getParent(); LOGGER.log(Level.FINE, "Base path: " + basePath); - for (ResourceDeclaration api : resourceListing.getApis()) { + for (ResourceListingApi api : resourceListing.getApis()) { LOGGER.log(Level.FINE, "Reading file " + basePath + api.getPath()); apis.put(api.getPath(), om.readValue(new File(basePath + api.getPath()), ApiDeclaration.class)); } } catch (IOException e) { - throw new SwaggerConversionException("file", e.getMessage()); + throw new TranslationException("file", e.getMessage()); } } - return SwaggerConverter.convert(resourceListing, apis); - } - - /** - * Indicates if the given velue is either null or empty. - * - * @param value - * The value. - * @return True if the value is either null or empty. - */ - private static boolean isEmpty(String value) { - return value == null || value.isEmpty(); + return SwaggerTranslator.translate(resourceListing, apis); } /** diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ApiDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ApiDeclaration.java similarity index 74% rename from modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ApiDeclaration.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ApiDeclaration.java index 0832826109..8662310b6e 100644 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ApiDeclaration.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ApiDeclaration.java @@ -1,4 +1,28 @@ -package org.restlet.ext.apispark.internal.model.swagger; +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; import java.util.ArrayList; import java.util.HashMap; @@ -10,70 +34,57 @@ @JsonInclude(Include.NON_NULL) public class ApiDeclaration { + // private String resourcePath"; + private List apis; + private String apiVersion; - private String swaggerVersion; + private AuthorizationsDeclaration authorizations; private String basePath; - private String resourcePath; - - private List produces; - private List consumes; - // private String resourcePath"; - private List apis; + private ApiInfo info; private Map models; - private AuthorizationsDeclaration authorizations; + private List produces; - private ApiInfo info; + private String resourcePath; - public String getApiVersion() { - return apiVersion; - } + private String swaggerVersion; - public void setApiVersion(String apiVersion) { - this.apiVersion = apiVersion; + public List getApis() { + if (apis == null) { + apis = new ArrayList(); + } + return apis; } - public String getSwaggerVersion() { - return swaggerVersion; + public String getApiVersion() { + return apiVersion; } - public void setSwaggerVersion(String swaggerVersion) { - this.swaggerVersion = swaggerVersion; + public AuthorizationsDeclaration getAuthorizations() { + return authorizations; } public String getBasePath() { return basePath; } - public void setBasePath(String basePath) { - this.basePath = basePath; - } - - public List getApis() { - if (apis == null) { - apis = new ArrayList(); + public List getConsumes() { + if (consumes == null) { + consumes = new ArrayList(); } - return apis; - } - - public void setApis(List apis) { - this.apis = apis; + return consumes; } public ApiInfo getInfo() { return info; } - public void setInfo(ApiInfo info) { - this.info = info; - } - public Map getModels() { if (models == null) { models = new HashMap(); @@ -81,45 +92,58 @@ public Map getModels() { return models; } - public void setModels(Map models) { - this.models = models; + public List getProduces() { + if (produces == null) { + produces = new ArrayList(); + } + return produces; } public String getResourcePath() { return resourcePath; } - public void setResourcePath(String resourcePath) { - this.resourcePath = resourcePath; + public String getSwaggerVersion() { + return swaggerVersion; } - public List getProduces() { - if (produces == null) { - produces = new ArrayList(); - } - return produces; + public void setApis(List apis) { + this.apis = apis; } - public void setProduces(List produces) { - this.produces = produces; + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; } - public List getConsumes() { - if (consumes == null) { - consumes = new ArrayList(); - } - return consumes; + public void setAuthorizations(AuthorizationsDeclaration authorizations) { + this.authorizations = authorizations; + } + + public void setBasePath(String basePath) { + this.basePath = basePath; } public void setConsumes(List consumes) { this.consumes = consumes; } - public AuthorizationsDeclaration getAuthorizations() { - return authorizations; + public void setInfo(ApiInfo info) { + this.info = info; } - public void setAuthorizations(AuthorizationsDeclaration authorizations) { - this.authorizations = authorizations; + public void setModels(Map models) { + this.models = models; + } + + public void setProduces(List produces) { + this.produces = produces; + } + + public void setResourcePath(String resourcePath) { + this.resourcePath = resourcePath; + } + + public void setSwaggerVersion(String swaggerVersion) { + this.swaggerVersion = swaggerVersion; } } diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ApiInfo.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ApiInfo.java similarity index 58% rename from modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ApiInfo.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ApiInfo.java index 65304d361a..c55aa9933e 100644 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ApiInfo.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ApiInfo.java @@ -1,67 +1,91 @@ -package org.restlet.ext.apispark.internal.model.swagger; +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; @JsonInclude(Include.NON_NULL) public class ApiInfo { - private String title; + private String contact; private String description; - private String termsOfServiceUrl; - - private String contact; - private String license; private String licenseUrl; - public String getTitle() { - return title; - } + private String termsOfServiceUrl; - public void setTitle(String title) { - this.title = title; + private String title; + + public String getContact() { + return contact; } public String getDescription() { return description; } - public void setDescription(String description) { - this.description = description; + public String getLicense() { + return license; } - public String getTermsOfServiceUrl() { - return termsOfServiceUrl; + public String getLicenseUrl() { + return licenseUrl; } - public void setTermsOfServiceUrl(String termsOfServiceUrl) { - this.termsOfServiceUrl = termsOfServiceUrl; + public String getTermsOfServiceUrl() { + return termsOfServiceUrl; } - public String getContact() { - return contact; + public String getTitle() { + return title; } public void setContact(String contact) { this.contact = contact; } - public String getLicense() { - return license; + public void setDescription(String description) { + this.description = description; } public void setLicense(String license) { this.license = license; } - public String getLicenseUrl() { - return licenseUrl; - } - public void setLicenseUrl(String licenseUrl) { this.licenseUrl = licenseUrl; } + + public void setTermsOfServiceUrl(String termsOfServiceUrl) { + this.termsOfServiceUrl = termsOfServiceUrl; + } + + public void setTitle(String title) { + this.title = title; + } } diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ApiKeyAuthorizationDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ApiKeyAuthorizationDeclaration.java new file mode 100644 index 0000000000..a04d91333b --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ApiKeyAuthorizationDeclaration.java @@ -0,0 +1,52 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class ApiKeyAuthorizationDeclaration extends AuthorizationDeclaration { + + private String keyname; + + private String passAs; + + public String getKeyname() { + return keyname; + } + + public String getPassAs() { + return passAs; + } + + public void setKeyname(String keyname) { + this.keyname = keyname; + } + + public void setPassAs(String passAs) { + this.passAs = passAs; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationCodeDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationCodeDeclaration.java new file mode 100644 index 0000000000..2474dcd6b7 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationCodeDeclaration.java @@ -0,0 +1,53 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class AuthorizationCodeDeclaration { + + private TokenEndpointDeclaration tokenEndpoint; + + private TokenRequestEndpointDeclaration tokenRequestEndpoint; + + public TokenEndpointDeclaration getTokenEndpoint() { + return tokenEndpoint; + } + + public TokenRequestEndpointDeclaration getTokenRequestEndpoint() { + return tokenRequestEndpoint; + } + + public void setTokenEndpoint(TokenEndpointDeclaration tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + } + + public void setTokenRequestEndpoint( + TokenRequestEndpointDeclaration tokenRequestEndpoint) { + this.tokenRequestEndpoint = tokenRequestEndpoint; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationDeclaration.java new file mode 100644 index 0000000000..d8b326d715 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationDeclaration.java @@ -0,0 +1,41 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class AuthorizationDeclaration { + private String type; + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationType.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationType.java new file mode 100644 index 0000000000..db4f028f7f --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationType.java @@ -0,0 +1,33 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +public abstract class AuthorizationType { + public final static String API_KEY = "apiKey"; + + public final static String BASIC_AUTH = "basicAuth"; + + public final static String OAUTH2 = "oauth2"; +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationsDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationsDeclaration.java new file mode 100644 index 0000000000..8bcd53f93a --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/AuthorizationsDeclaration.java @@ -0,0 +1,62 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class AuthorizationsDeclaration { + + private ApiKeyAuthorizationDeclaration apiKey; + + private BasicAuthorizationDeclaration basicAuth; + + private OAuth2AuthorizationDeclaration oauth2; + + public ApiKeyAuthorizationDeclaration getApiKey() { + return apiKey; + } + + public BasicAuthorizationDeclaration getBasicAuth() { + return basicAuth; + } + + public OAuth2AuthorizationDeclaration getOauth2() { + return oauth2; + } + + public void setApiKey(ApiKeyAuthorizationDeclaration apiKey) { + this.apiKey = apiKey; + } + + public void setBasicAuth(BasicAuthorizationDeclaration basicAuth) { + this.basicAuth = basicAuth; + } + + public void setOauth2(OAuth2AuthorizationDeclaration oauth2) { + this.oauth2 = oauth2; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/BasicAuthorizationDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/BasicAuthorizationDeclaration.java new file mode 100644 index 0000000000..af229848ed --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/BasicAuthorizationDeclaration.java @@ -0,0 +1,36 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class BasicAuthorizationDeclaration extends AuthorizationDeclaration { + + public BasicAuthorizationDeclaration() { + this.setType(AuthorizationType.BASIC_AUTH); + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/GrantTypesDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/GrantTypesDeclaration.java new file mode 100644 index 0000000000..0d3907750f --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/GrantTypesDeclaration.java @@ -0,0 +1,53 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class GrantTypesDeclaration { + + private AuthorizationCodeDeclaration authorization_code; + + private ImplicitDeclaration implicit; + + public AuthorizationCodeDeclaration getAuthorization_code() { + return authorization_code; + } + + public ImplicitDeclaration getImplicit() { + return implicit; + } + + public void setAuthorization_code( + AuthorizationCodeDeclaration authorization_code) { + this.authorization_code = authorization_code; + } + + public void setImplicit(ImplicitDeclaration implicit) { + this.implicit = implicit; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ImplicitDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ImplicitDeclaration.java new file mode 100644 index 0000000000..8e17d3e916 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ImplicitDeclaration.java @@ -0,0 +1,52 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class ImplicitDeclaration { + + private LoginEndpointDeclaration loginEndpoint; + + private String tokenName; + + public LoginEndpointDeclaration getLoginEndpoint() { + return loginEndpoint; + } + + public String getTokenName() { + return tokenName; + } + + public void setLoginEndpoint(LoginEndpointDeclaration loginEndpoint) { + this.loginEndpoint = loginEndpoint; + } + + public void setTokenName(String tokenName) { + this.tokenName = tokenName; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ItemsDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ItemsDeclaration.java new file mode 100644 index 0000000000..1527e864ea --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ItemsDeclaration.java @@ -0,0 +1,64 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonInclude(Include.NON_NULL) +public class ItemsDeclaration { + + private String format; + + @JsonProperty("$ref") + private String ref; + + private String type; + + public String getFormat() { + return format; + } + + public String getRef() { + return ref; + } + + public String getType() { + return type; + } + + public void setFormat(String format) { + this.format = format; + } + + public void setRef(String ref) { + this.ref = ref; + } + + public void setType(String type) { + this.type = type; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/LoginEndpointDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/LoginEndpointDeclaration.java new file mode 100644 index 0000000000..07283cc823 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/LoginEndpointDeclaration.java @@ -0,0 +1,42 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class LoginEndpointDeclaration { + + private String url; + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ModelDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ModelDeclaration.java similarity index 62% rename from modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ModelDeclaration.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ModelDeclaration.java index a6d4228820..a3a53ccd0b 100644 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ModelDeclaration.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ModelDeclaration.java @@ -1,4 +1,28 @@ -package org.restlet.ext.apispark.internal.model.swagger; +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; import java.util.ArrayList; import java.util.HashMap; diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/OAuth2AuthorizationDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/OAuth2AuthorizationDeclaration.java new file mode 100644 index 0000000000..579211acf6 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/OAuth2AuthorizationDeclaration.java @@ -0,0 +1,58 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import java.util.ArrayList; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class OAuth2AuthorizationDeclaration extends AuthorizationDeclaration { + + private GrantTypesDeclaration grantTypes; + + private List scopes; + + public GrantTypesDeclaration getGrantTypes() { + return grantTypes; + } + + public List getScopes() { + if (scopes == null) { + scopes = new ArrayList(); + } + return scopes; + } + + public void setGrantTypes(GrantTypesDeclaration grantTypes) { + this.grantTypes = grantTypes; + } + + public void setScopes(List scopes) { + this.scopes = scopes; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ResourceDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceDeclaration.java similarity index 50% rename from modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ResourceDeclaration.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceDeclaration.java index 4adafa0c85..8c3fe715a9 100644 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ResourceDeclaration.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceDeclaration.java @@ -1,4 +1,28 @@ -package org.restlet.ext.apispark.internal.model.swagger; +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; import java.util.ArrayList; import java.util.List; @@ -8,28 +32,16 @@ @JsonInclude(Include.NON_NULL) public class ResourceDeclaration { - private String path; - private String description; private List operations; - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } + private String path; public String getDescription() { return description; } - public void setDescription(String description) { - this.description = description; - } - public List getOperations() { if (operations == null) { operations = new ArrayList(); @@ -37,7 +49,19 @@ public List getOperations() { return operations; } + public String getPath() { + return path; + } + + public void setDescription(String description) { + this.description = description; + } + public void setOperations(List operations) { this.operations = operations; } + + public void setPath(String path) { + this.path = path; + } } diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ResourceListing.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceListing.java similarity index 50% rename from modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ResourceListing.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceListing.java index 902077301e..42d8a8ac08 100644 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/ResourceListing.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceListing.java @@ -1,4 +1,28 @@ -package org.restlet.ext.apispark.internal.model.swagger; +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; import java.util.ArrayList; import java.util.List; @@ -8,67 +32,76 @@ @JsonInclude(Include.NON_NULL) public class ResourceListing { + // private String resourcePath"; + private List apis; + private String apiVersion; - private String swaggerVersion; + private AuthorizationsDeclaration authorizations; private String basePath; - // private String resourcePath"; - private List apis; - private ApiInfo info; - private AuthorizationsDeclaration authorizations; + private String swaggerVersion; - public String getApiVersion() { - return apiVersion; + public ResourceListingApi getApi(String path) { + for (ResourceListingApi api : apis) { + if (path.equals(api.getPath())) { + return api; + } + } + return null; } - public void setApiVersion(String apiVersion) { - this.apiVersion = apiVersion; + public List getApis() { + if (apis == null) { + apis = new ArrayList(); + } + return apis; } - public String getSwaggerVersion() { - return swaggerVersion; + public String getApiVersion() { + return apiVersion; } - public void setSwaggerVersion(String swaggerVersion) { - this.swaggerVersion = swaggerVersion; + public AuthorizationsDeclaration getAuthorizations() { + return authorizations; } public String getBasePath() { return basePath; } - public void setBasePath(String basePath) { - this.basePath = basePath; + public ApiInfo getInfo() { + return info; } - public List getApis() { - if (apis == null) { - apis = new ArrayList(); - } - return apis; + public String getSwaggerVersion() { + return swaggerVersion; } - public void setApis(List apis) { + public void setApis(List apis) { this.apis = apis; } - public ApiInfo getInfo() { - return info; + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; } - public void setInfo(ApiInfo info) { - this.info = info; + public void setAuthorizations(AuthorizationsDeclaration authorizations) { + this.authorizations = authorizations; } - public AuthorizationsDeclaration getAuthorizations() { - return authorizations; + public void setBasePath(String basePath) { + this.basePath = basePath; } - public void setAuthorizations(AuthorizationsDeclaration authorizations) { - this.authorizations = authorizations; + public void setInfo(ApiInfo info) { + this.info = info; + } + + public void setSwaggerVersion(String swaggerVersion) { + this.swaggerVersion = swaggerVersion; } } diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceListingApi.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceListingApi.java new file mode 100644 index 0000000000..b778c5d3ec --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceListingApi.java @@ -0,0 +1,51 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class ResourceListingApi { + private String description; + + private String path; + + public String getDescription() { + return description; + } + + public String getPath() { + return path; + } + + public void setDescription(String description) { + this.description = description; + } + + public void setPath(String path) { + this.path = path; + } +} diff --git a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/swagger/ResourceOperationDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceOperationDeclaration.java similarity index 79% rename from modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/swagger/ResourceOperationDeclaration.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceOperationDeclaration.java index 54d63e676f..d4fd1abe84 100644 --- a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/swagger/ResourceOperationDeclaration.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceOperationDeclaration.java @@ -1,4 +1,28 @@ -package org.restlet.ext.swagger.internal.model.swagger; +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; import java.util.ArrayList; import java.util.List; @@ -11,58 +35,68 @@ @JsonInclude(Include.NON_NULL) @JsonIgnoreProperties("authorizations") public class ResourceOperationDeclaration { - private String method; - - private String nickname; + private AuthorizationsDeclaration authorizations; - private String type; + private List consumes; - @JsonProperty("$ref") - private String ref; + private String deprecated; private ItemsDeclaration items; - private List parameters; - - private String summary; + private String method; - private List responseMessages; + private String nickname; private String notes; - private AuthorizationsDeclaration authorizations; + private List parameters; private List produces; - private List consumes; + @JsonProperty("$ref") + private String ref; - private String deprecated; + private List responseMessages; + + private String summary; + + private String type; // private String notes; // "errorResponses":[ ... ] - public String getMethod() { - return method; + public AuthorizationsDeclaration getAuthorizations() { + return authorizations; } - public void setMethod(String method) { - this.method = method; + public List getConsumes() { + if (consumes == null) { + consumes = new ArrayList(); + } + return consumes; } - public String getNickname() { - return nickname; + public String getDeprecated() { + return deprecated; } - public void setNickname(String nickname) { - this.nickname = nickname; + public ItemsDeclaration getItems() { + if (items == null) { + items = new ItemsDeclaration(); + } + return items; } - public String getType() { - return type; + public String getMethod() { + return method; } - public void setType(String type) { - this.type = type; + public String getNickname() { + return nickname; + } + + public String getNotes() { + return notes; } public List getParameters() { @@ -72,17 +106,15 @@ public List getParameters() { return parameters; } - public void setParameters( - List parameters) { - this.parameters = parameters; - } - - public String getSummary() { - return summary; + public List getProduces() { + if (produces == null) { + produces = new ArrayList(); + } + return produces; } - public void setSummary(String summary) { - this.summary = summary; + public String getRef() { + return ref; } public List getResponseMessages() { @@ -92,73 +124,65 @@ public List getResponseMessages() { return responseMessages; } - public void setResponseMessages( - List responseMessages) { - this.responseMessages = responseMessages; + public String getSummary() { + return summary; } - public ItemsDeclaration getItems() { - if (items == null) { - items = new ItemsDeclaration(); - } - return items; + public String getType() { + return type; } - public void setItems(ItemsDeclaration items) { - this.items = items; + public void setAuthorizations(AuthorizationsDeclaration authorizations) { + this.authorizations = authorizations; } - public String getNotes() { - return notes; + public void setConsumes(List consumes) { + this.consumes = consumes; } - public void setNotes(String notes) { - this.notes = notes; + public void setDeprecated(String deprecated) { + this.deprecated = deprecated; } - public AuthorizationsDeclaration getAuthorizations() { - return authorizations; + public void setItems(ItemsDeclaration items) { + this.items = items; } - public void setAuthorizations(AuthorizationsDeclaration authorizations) { - this.authorizations = authorizations; + public void setMethod(String method) { + this.method = method; } - public List getProduces() { - if (produces == null) { - produces = new ArrayList(); - } - return produces; + public void setNickname(String nickname) { + this.nickname = nickname; } - public void setProduces(List produces) { - this.produces = produces; + public void setNotes(String notes) { + this.notes = notes; } - public List getConsumes() { - if (consumes == null) { - consumes = new ArrayList(); - } - return consumes; + public void setParameters( + List parameters) { + this.parameters = parameters; } - public void setConsumes(List consumes) { - this.consumes = consumes; + public void setProduces(List produces) { + this.produces = produces; } - public String getDeprecated() { - return deprecated; + public void setRef(String ref) { + this.ref = ref; } - public void setDeprecated(String deprecated) { - this.deprecated = deprecated; + public void setResponseMessages( + List responseMessages) { + this.responseMessages = responseMessages; } - public String getRef() { - return ref; + public void setSummary(String summary) { + this.summary = summary; } - public void setRef(String ref) { - this.ref = ref; + public void setType(String type) { + this.type = type; } } diff --git a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/swagger/ResourceOperationParameterDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceOperationParameterDeclaration.java similarity index 75% rename from modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/swagger/ResourceOperationParameterDeclaration.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceOperationParameterDeclaration.java index 42a2d79180..683434e861 100644 --- a/modules/org.restlet.ext.swagger/src/org/restlet/ext/swagger/internal/model/swagger/ResourceOperationParameterDeclaration.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResourceOperationParameterDeclaration.java @@ -1,4 +1,28 @@ -package org.restlet.ext.swagger.internal.model.swagger; +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; import java.util.ArrayList; import java.util.List; @@ -9,138 +33,138 @@ @JsonInclude(Include.NON_NULL) public class ResourceOperationParameterDeclaration { - public static final String PARAM_TYPE_PATH = "path"; - - public static final String PARAM_TYPE_QUERY = "query"; - public static final String PARAM_TYPE_BODY = "body"; + public static final String PARAM_TYPE_FORM = "form"; + public static final String PARAM_TYPE_HEADER = "header"; - public static final String PARAM_TYPE_FORM = "form"; + public static final String PARAM_TYPE_PATH = "path"; - private String paramType; + public static final String PARAM_TYPE_QUERY = "query"; - private String name; + private boolean allowMultiple; - private String description; + private String defaultValue; - private String type; + private String description; - private ItemsDeclaration items; + @JsonProperty("enum") + @JsonInclude(Include.NON_EMPTY) + private List enum_; private String format; - private boolean required; + private ItemsDeclaration items; + + private String maximum; private String minimum; - private String maximum; + private String name; - private String defaultValue; + private String paramType; - @JsonProperty("enum") - @JsonInclude(Include.NON_EMPTY) - private List enum_; + private boolean required; - private boolean allowMultiple; + private String type; - public String getParamType() { - return paramType; + public String getDefaultValue() { + return defaultValue; } - public void setParamType(String paramType) { - this.paramType = paramType; + public String getDescription() { + return description; } - public String getName() { - return name; + public List getEnum_() { + if (enum_ == null) { + enum_ = new ArrayList(); + } + return enum_; } - public void setName(String name) { - this.name = name; + public String getFormat() { + return format; } - public String getDescription() { - return description; + public ItemsDeclaration getItems() { + return items; } - public void setDescription(String description) { - this.description = description; + public String getMaximum() { + return maximum; } - public String getType() { - return type; + public String getMinimum() { + return minimum; } - public void setType(String type) { - this.type = type; + public String getName() { + return name; } - public String getFormat() { - return format; + public String getParamType() { + return paramType; } - public void setFormat(String format) { - this.format = format; + public String getType() { + return type; } - public boolean isRequired() { - return required; + public boolean isAllowMultiple() { + return allowMultiple; } - public void setRequired(boolean required) { - this.required = required; + public boolean isRequired() { + return required; } - public String getMinimum() { - return minimum; + public void setAllowMultiple(boolean allowMultiple) { + this.allowMultiple = allowMultiple; } - public void setMinimum(String minimum) { - this.minimum = minimum; + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; } - public String getMaximum() { - return maximum; + public void setDescription(String description) { + this.description = description; } - public void setMaximum(String maximum) { - this.maximum = maximum; + public void setEnum_(List enum_) { + this.enum_ = enum_; } - public String getDefaultValue() { - return defaultValue; + public void setFormat(String format) { + this.format = format; } - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; + public void setItems(ItemsDeclaration items) { + this.items = items; } - public List getEnum_() { - if (enum_ == null) { - enum_ = new ArrayList(); - } - return enum_; + public void setMaximum(String maximum) { + this.maximum = maximum; } - public void setEnum_(List enum_) { - this.enum_ = enum_; + public void setMinimum(String minimum) { + this.minimum = minimum; } - public boolean isAllowMultiple() { - return allowMultiple; + public void setName(String name) { + this.name = name; } - public void setAllowMultiple(boolean allowMultiple) { - this.allowMultiple = allowMultiple; + public void setParamType(String paramType) { + this.paramType = paramType; } - public ItemsDeclaration getItems() { - return items; + public void setRequired(boolean required) { + this.required = required; } - public void setItems(ItemsDeclaration items) { - this.items = items; + public void setType(String type) { + this.type = type; } } diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResponseMessageDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResponseMessageDeclaration.java new file mode 100644 index 0000000000..be074034c2 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ResponseMessageDeclaration.java @@ -0,0 +1,62 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class ResponseMessageDeclaration { + + private int code; + + private String message; + + private String responseModel; + + public int getCode() { + return code; + } + + public String getMessage() { + return message; + } + + public String getResponseModel() { + return responseModel; + } + + public void setCode(int code) { + this.code = code; + } + + public void setMessage(String message) { + this.message = message; + } + + public void setResponseModel(String responseModel) { + this.responseModel = responseModel; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ScopeDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ScopeDeclaration.java new file mode 100644 index 0000000000..7b7166abbb --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/ScopeDeclaration.java @@ -0,0 +1,52 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class ScopeDeclaration { + + private String description; + + private String scope; + + public String getDescription() { + return description; + } + + public String getScope() { + return scope; + } + + public void setDescription(String description) { + this.description = description; + } + + public void setScope(String scope) { + this.scope = scope; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/TokenEndpointDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/TokenEndpointDeclaration.java new file mode 100644 index 0000000000..19c1f568e9 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/TokenEndpointDeclaration.java @@ -0,0 +1,52 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class TokenEndpointDeclaration { + + private String tokenName; + + private String url; + + public String getTokenName() { + return tokenName; + } + + public String getUrl() { + return url; + } + + public void setTokenName(String tokenName) { + this.tokenName = tokenName; + } + + public void setUrl(String url) { + this.url = url; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/TokenRequestEndpointDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/TokenRequestEndpointDeclaration.java new file mode 100644 index 0000000000..53bf51c09f --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/TokenRequestEndpointDeclaration.java @@ -0,0 +1,62 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(Include.NON_NULL) +public class TokenRequestEndpointDeclaration { + + private String clientIdName; + + private String clientSecretName; + + private String url; + + public String getClientIdName() { + return clientIdName; + } + + public String getClientSecretName() { + return clientSecretName; + } + + public String getUrl() { + return url; + } + + public void setClientIdName(String clientIdName) { + this.clientIdName = clientIdName; + } + + public void setClientSecretName(String clientSecretName) { + this.clientSecretName = clientSecretName; + } + + public void setUrl(String url) { + this.url = url; + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/TypePropertyDeclaration.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/TypePropertyDeclaration.java similarity index 68% rename from modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/TypePropertyDeclaration.java rename to modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/TypePropertyDeclaration.java index a83141b3e1..a4c9c48805 100644 --- a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/model/swagger/TypePropertyDeclaration.java +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v1_2/model/TypePropertyDeclaration.java @@ -1,4 +1,28 @@ -package org.restlet.ext.apispark.internal.model.swagger; +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v1_2.model; import java.util.ArrayList; import java.util.List; @@ -9,100 +33,100 @@ @JsonInclude(Include.NON_NULL) public class TypePropertyDeclaration { - private String type; + private String description; - @JsonProperty("$ref") - private String ref; + @JsonProperty("enum") + @JsonInclude(Include.NON_EMPTY) + private List enum_; - private ItemsDeclaration items; + private String format; - private String description; + private ItemsDeclaration items; - private String format; + private String maximum; private String minimum; - private String maximum; + @JsonProperty("$ref") + private String ref; - private boolean uniqueItems; + private String type; - @JsonProperty("enum") - @JsonInclude(Include.NON_EMPTY) - private List enum_; + private boolean uniqueItems; - public String getType() { - return type; + public String getDescription() { + return description; } - public void setType(String type) { - this.type = type; + public List getEnum_() { + if (enum_ == null) { + enum_ = new ArrayList(); + } + return enum_; } public String getFormat() { return format; } - public void setFormat(String format) { - this.format = format; + public ItemsDeclaration getItems() { + return items; } - public String getMinimum() { - return minimum; + public String getMaximum() { + return maximum; } - public void setMinimum(String minimum) { - this.minimum = minimum; + public String getMinimum() { + return minimum; } - public String getMaximum() { - return maximum; + public String getRef() { + return ref; } - public void setMaximum(String maximum) { - this.maximum = maximum; + public String getType() { + return type; } public boolean isUniqueItems() { return uniqueItems; } - public void setUniqueItems(boolean uniqueItems) { - this.uniqueItems = uniqueItems; + public void setDescription(String description) { + this.description = description; } - public ItemsDeclaration getItems() { - return items; + public void setEnum_(List enum_) { + this.enum_ = enum_; } - public void setItems(ItemsDeclaration items) { - this.items = items; + public void setFormat(String format) { + this.format = format; } - public String getRef() { - return ref; + public void setItems(ItemsDeclaration items) { + this.items = items; } - public void setRef(String ref) { - this.ref = ref; + public void setMaximum(String maximum) { + this.maximum = maximum; } - public String getDescription() { - return description; + public void setMinimum(String minimum) { + this.minimum = minimum; } - public void setDescription(String description) { - this.description = description; + public void setRef(String ref) { + this.ref = ref; } - public List getEnum_() { - if (enum_ == null) { - enum_ = new ArrayList(); - } - return enum_; + public void setType(String type) { + this.type = type; } - public void setEnum_(List enum_) { - this.enum_ = enum_; + public void setUniqueItems(boolean uniqueItems) { + this.uniqueItems = uniqueItems; } } diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v2_0/Swagger2Translator.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v2_0/Swagger2Translator.java new file mode 100644 index 0000000000..99cb7d930c --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v2_0/Swagger2Translator.java @@ -0,0 +1,584 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v2_0; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Logger; + +import org.restlet.data.ChallengeScheme; +import org.restlet.engine.util.StringUtils; +import org.restlet.ext.apispark.internal.introspection.util.Types; +import org.restlet.ext.apispark.internal.model.Definition; +import org.restlet.ext.apispark.internal.model.Endpoint; +import org.restlet.ext.apispark.internal.model.Header; +import org.restlet.ext.apispark.internal.model.Operation; +import org.restlet.ext.apispark.internal.model.PathVariable; +import org.restlet.ext.apispark.internal.model.PayLoad; +import org.restlet.ext.apispark.internal.model.Property; +import org.restlet.ext.apispark.internal.model.QueryParameter; +import org.restlet.ext.apispark.internal.model.Representation; +import org.restlet.ext.apispark.internal.model.Resource; +import org.restlet.ext.apispark.internal.model.Response; +import org.restlet.ext.apispark.internal.utils.SampleUtils; + +import com.wordnik.swagger.models.ArrayModel; +import com.wordnik.swagger.models.Contact; +import com.wordnik.swagger.models.Info; +import com.wordnik.swagger.models.License; +import com.wordnik.swagger.models.ModelImpl; +import com.wordnik.swagger.models.Path; +import com.wordnik.swagger.models.RefModel; +import com.wordnik.swagger.models.Scheme; +import com.wordnik.swagger.models.Swagger; +import com.wordnik.swagger.models.auth.BasicAuthDefinition; +import com.wordnik.swagger.models.auth.SecuritySchemeDefinition; +import com.wordnik.swagger.models.parameters.BodyParameter; +import com.wordnik.swagger.models.parameters.HeaderParameter; +import com.wordnik.swagger.models.parameters.PathParameter; +import com.wordnik.swagger.models.properties.AbstractNumericProperty; +import com.wordnik.swagger.models.properties.AbstractProperty; +import com.wordnik.swagger.models.properties.ArrayProperty; +import com.wordnik.swagger.models.properties.BooleanProperty; +import com.wordnik.swagger.models.properties.DateProperty; +import com.wordnik.swagger.models.properties.DoubleProperty; +import com.wordnik.swagger.models.properties.FileProperty; +import com.wordnik.swagger.models.properties.FloatProperty; +import com.wordnik.swagger.models.properties.IntegerProperty; +import com.wordnik.swagger.models.properties.LongProperty; +import com.wordnik.swagger.models.properties.RefProperty; +import com.wordnik.swagger.models.properties.StringProperty; + +/** + * Translator : RWADEF <-> Swagger 2.0. + */ +public class Swagger2Translator { + + // TODO wait for Swagger class + private static class ByteProperty extends AbstractProperty { + private ByteProperty() { + setType("string"); + setFormat("byte"); + } + } + + // TODO wait for Swagger class + private static class ShortProperty extends AbstractProperty { + private ShortProperty() { + setType("integer"); + setFormat("int32"); // int16 not supported + } + } + + /** Internal logger. */ + protected static Logger LOGGER = Logger.getLogger(Swagger2Translator.class + .getName()); + + public static final String SWAGGER_VERSION = "2.0"; + + /** + * Fill Swagger "SecuritySchemeDefinition" objects from RWADef definition + * + * @param definition + * RWADef definition + * @param swagger + * Swagger definition + */ + private static void fillAuthentication(Definition definition, Swagger swagger) { + Map securitySchemes = new HashMap<>(); + + // Supported schemes + String httpBasic = ChallengeScheme.HTTP_BASIC.getName(); + + for (Endpoint endpoint : definition.getEndpoints()) { + + if (httpBasic.equals(endpoint.getAuthenticationProtocol())) { + securitySchemes.put(httpBasic, new BasicAuthDefinition()); + } + } + swagger.setSecurityDefinitions(securitySchemes.isEmpty() ? null : securitySchemes); + } + + /** + * Fill Swagger "Definitions" objects from RWADef definition + * + * @param definition + * RWADef definition + * @param swagger + * Swagger definition + */ + private static void fillDefinitions(Definition definition, Swagger swagger) { + for (Representation representation : definition.getContract() + .getRepresentations()) { + + if (representation.isRaw() + || Types.isPrimitiveType(representation.getName())) { + continue; + } + + if (StringUtils.isNullOrEmpty(representation.getName())) { + LOGGER.warning("A representation should have an identifier:" + + representation.getName()); + continue; + } + + /* Representation -> Model */ + ModelImpl modelSwagger = new ModelImpl(); + + fillModel(representation.getName(), + representation.getDescription(), + representation.getProperties(), swagger, modelSwagger); + } + } + + /** + * Fill Swagger "Info" object from RWADef definition + * + * @param definition + * RWADef definition + * @param swagger + * Swagger definition + */ + private static void fillInfo(Definition definition, Swagger swagger) { + Info infoSwagger = new Info(); + + infoSwagger.setTitle(definition.getContract().getName()); // required + infoSwagger.setDescription(definition.getContract().getDescription()); + infoSwagger.setVersion(definition.getVersion()); // required + + Contact contactSwagger = new Contact(); + if (definition.getContact() != null) { + contactSwagger.setName(definition.getContact().getName()); + contactSwagger.setEmail(definition.getContact().getEmail()); + contactSwagger.setUrl(definition.getContact().getUrl()); + } + infoSwagger.setContact(contactSwagger); + + License licenseSwagger = new License(); + if (definition.getLicense() != null) { + if (!StringUtils.isNullOrEmpty(definition.getLicense().getName())) { + org.restlet.ext.apispark.internal.model.License license = definition + .getLicense(); + licenseSwagger.setName(license.getName()); // required + licenseSwagger.setUrl(license.getUrl()); + infoSwagger.setLicense(licenseSwagger); + } else if (!StringUtils.isNullOrEmpty(definition.getLicense() + .getUrl())) { + LOGGER.warning("You must specify a license name"); + } + } + + swagger.setInfo(infoSwagger); // required + } + + /** + * Fills Swagger main attributes from Restlet Web API definition + * + * @param definition + * The Restlet Web API definition + * @param swagger + * The Swagger 2.0 definition + */ + private static void fillMainAttributes(Definition definition, + Swagger swagger) { + // basePath + if (definition.getEndpoints() != null + && !definition.getEndpoints().isEmpty()) { + Endpoint endpoint = definition.getEndpoints().get(0); + swagger.setHost(endpoint.getDomain() + + (endpoint.getPort() == null ? "" : (":" + endpoint + .getPort()))); + swagger.setBasePath(endpoint.getBasePath()); + // Should be any of "http", "https", "ws", "wss" + swagger.setSchemes(Arrays.asList(Scheme.forValue(endpoint + .getProtocol()))); + } + } + + /** + * Fill Swagger "Model" objects from RWADef. + * + * @param name + * The name of the Swagger model. + * @param description + * the description of the Swagger model. + * @param properties + * The list of RWADef properties of the Swagger model. + * @param swagger + * The Swagger definition. + * @param modelSwagger + * The Swagger model. + */ + private static void fillModel(String name, String description, + List properties, Swagger swagger, ModelImpl modelSwagger) { + modelSwagger.setName(name); + modelSwagger.setDescription(description); + + /* Property -> Property */ + for (Property property : properties) { + + com.wordnik.swagger.models.properties.Property propertySwagger; + + Object exampleObject = SampleUtils.getPropertyExampleValue(property); + String example = exampleObject == null ? null : exampleObject + .toString(); + + // property type + if (property.getMaxOccurs() != null + && (property.getMaxOccurs() > 1 || property.getMaxOccurs() == -1)) { + ArrayProperty arrayProperty = new ArrayProperty(); + com.wordnik.swagger.models.properties.Property itemProperty; + if (Types.isCompositeType(property.getType())) { + String compositePropertyType = name + StringUtils.firstUpper(property.getName()); + itemProperty = newPropertyForType(compositePropertyType); + // List of properties -> Model */ + ModelImpl ms = new ModelImpl(); + fillModel( + compositePropertyType, + null, property.getProperties(), swagger, ms); + } else { + itemProperty = newPropertyForType(property.getType()); + } + itemProperty.setExample(example); + arrayProperty.setItems(itemProperty); + propertySwagger = arrayProperty; + } else { + if (Types.isCompositeType(property.getType())) { + String compositePropertyType = name + StringUtils.firstUpper(property.getName()); + propertySwagger = newPropertyForType(compositePropertyType); + // List of properties -> Model */ + ModelImpl ms = new ModelImpl(); + fillModel( + compositePropertyType, + null, property.getProperties(), swagger, ms); + propertySwagger.setExample(example); + } else { + propertySwagger = newPropertyForType(property.getType()); + propertySwagger.setExample(example); + } + } + propertySwagger.setName(property.getName()); + propertySwagger.setDescription(property.getDescription()); + + // min and max + if (propertySwagger instanceof AbstractNumericProperty) { + AbstractNumericProperty abstractNumericProperty = (AbstractNumericProperty) propertySwagger; + try { + if (property.getMin() != null) { + abstractNumericProperty.setMinimum(Double + .valueOf(property.getMin())); + } + } catch (NumberFormatException e) { + LOGGER.warning("Min property is not a number: " + + property.getMin()); + } + try { + if (property.getMax() != null) { + abstractNumericProperty.setMaximum(Double + .valueOf(property.getMax())); + } + } catch (NumberFormatException e) { + LOGGER.warning("Max property is not a number: " + + property.getMax()); + } + } + modelSwagger.property(property.getName(), propertySwagger); + } + + swagger.addDefinition(modelSwagger.getName(), modelSwagger); + } + + private static void fillOperationParameters(Definition definition, + Resource resource, Operation operation, + com.wordnik.swagger.models.Operation operationSwagger) { + + // Path parameters + for (PathVariable pathVariable : resource.getPathVariables()) { + PathParameter pathParameterSwagger = new PathParameter(); + SwaggerTypeFormat swaggerTypeFormat = SwaggerTypes + .toSwaggerType(pathVariable.getType()); + pathParameterSwagger.setType(swaggerTypeFormat.getType()); // required + pathParameterSwagger.setFormat(swaggerTypeFormat.getFormat()); + pathParameterSwagger.setName(pathVariable.getName()); // required + pathParameterSwagger.setDescription(pathVariable.getDescription()); + // TODO: add when implemented + // pathParameterSwagger.setDefaultValue(pathVariable.getDefaultValue()); + operationSwagger.addParameter(pathParameterSwagger); + } + + // Body + if (operation.getInputPayLoad() != null) { + BodyParameter bodyParameterSwagger = new BodyParameter(); + bodyParameterSwagger.setName("body"); + + PayLoad inRepr = operation.getInputPayLoad(); + Representation representation = definition.getContract() + .getRepresentation(inRepr.getType()); + + if (representation != null && representation.isRaw()) { + ModelImpl modelImpl = new ModelImpl(); + modelImpl.setType(representation.getName()); + modelImpl.setDescription(representation.getDescription()); + bodyParameterSwagger.setSchema(modelImpl); + } else { + if (inRepr.isArray()) { + ArrayModel arrayModel = new ArrayModel(); + arrayModel.setType("array"); + // primitive or ref type + arrayModel.setItems(newPropertyForType(inRepr.getType())); + bodyParameterSwagger.setSchema(arrayModel); + } else { + if (Types.isPrimitiveType(inRepr.getType())) { + ModelImpl modelImpl = new ModelImpl(); + modelImpl.setType(inRepr.getType()); + bodyParameterSwagger.setSchema(modelImpl); + } else { + RefModel refModel = new RefModel(); + refModel.asDefault(inRepr.getType()); + bodyParameterSwagger.setSchema(refModel); + } + } + } + operationSwagger.addParameter(bodyParameterSwagger); + } + + // query parameters + for (QueryParameter queryParameter : operation.getQueryParameters()) { + com.wordnik.swagger.models.parameters.QueryParameter queryParameterSwagger = new com.wordnik.swagger.models.parameters.QueryParameter(); + queryParameterSwagger.setRequired(queryParameter.isRequired()); + queryParameterSwagger.setDefaultValue(queryParameter + .getDefaultValue()); + if (queryParameter.isAllowMultiple()) { + queryParameterSwagger.setType("array"); + queryParameterSwagger + .setItems(newPropertyForType(queryParameter.getType())); + // do not set "csv" as it's the default format + // queryParameterSwagger.setCollectionFormat("csv"); + } else { + queryParameterSwagger.setType(SwaggerTypes.toSwaggerType( + queryParameter.getType()).getType()); + queryParameterSwagger.setFormat(SwaggerTypes.toSwaggerType( + queryParameter.getType()).getFormat()); + } + queryParameterSwagger.setName(queryParameter.getName()); + queryParameterSwagger.setDescription(queryParameter + .getDescription()); + operationSwagger.addParameter(queryParameterSwagger); + } + + for (Header header : operation.getHeaders()) { + HeaderParameter headerParameterSwagger = new HeaderParameter(); + headerParameterSwagger.setRequired(header.isRequired()); + headerParameterSwagger.setDefaultValue(header.getDefaultValue()); + headerParameterSwagger.setType(SwaggerTypes.toSwaggerType( + header.getType()).getType()); + headerParameterSwagger.setFormat(SwaggerTypes.toSwaggerType( + header.getType()).getFormat()); + headerParameterSwagger.setName(header.getName()); + headerParameterSwagger.setDescription(header.getDescription()); + operationSwagger.addParameter(headerParameterSwagger); + } + } + + private static void fillOperationResponses(Definition definition, + Operation operation, + com.wordnik.swagger.models.Operation operationSwagger) { + for (Response response : operation.getResponses()) { + /* Response -> Response */ + com.wordnik.swagger.models.Response responseSwagger = new com.wordnik.swagger.models.Response(); + + // may be null + String description = response.getDescription(); + responseSwagger.setDescription((description != null) ? description + : response.getCode() + " status response"); // required + + // Response Schema + if (response.getOutputPayLoad() != null + && response.getOutputPayLoad().getType() != null) { + PayLoad entity = response.getOutputPayLoad(); + final Representation representation = definition.getContract() + .getRepresentation(entity.getType()); + + if (representation != null && representation.isRaw()) { + FileProperty fileProperty = new FileProperty(); + fileProperty + .setDescription(representation.getDescription()); + responseSwagger.setSchema(fileProperty); + } else if (entity.isArray()) { + ArrayProperty arrayProperty = new ArrayProperty(); + arrayProperty + .setItems(newPropertyForType(entity.getType())); + responseSwagger.setSchema(arrayProperty); + } else { + responseSwagger.setSchema(newPropertyForType(entity + .getType())); + } + } + + operationSwagger.addResponse(String.valueOf(response.getCode()), + responseSwagger); + + } + // TODO check that at least one success code is present + } + + /** + * Fill Swagger "Paths.Operations" objects from RWADef definition + * + * @param definition + * RWADef definition + * @param resource + * RWADef.resource definition + * @param pathSwagger + * Swagger.path definition + */ + private static void fillPathOperations(Definition definition, + Resource resource, Path pathSwagger) { + for (Operation operation : resource.getOperations()) { + + com.wordnik.swagger.models.Operation operationSwagger = new com.wordnik.swagger.models.Operation(); + operationSwagger.setTags(new ArrayList()); + operationSwagger.getTags().addAll(resource.getSections()); + + String method = operation.getMethod().toLowerCase(); + Path setResult = pathSwagger.set(method, operationSwagger); + if (setResult == null) { + LOGGER.warning("Method not supported:" + method); + return; + } + + String description = operation.getDescription(); + + if (description != null) { + operationSwagger + .setSummary(description.length() > 120 ? description + .substring(0, 120) : description); + } + operationSwagger.setDescription(description); + operationSwagger.setOperationId(operation.getName()); + operationSwagger.setConsumes(operation.getConsumes()); + operationSwagger.setProduces(operation.getProduces()); + // TODO add security + // operationSwagger.setSecurity(); + + fillOperationParameters(definition, resource, operation, + operationSwagger); + + fillOperationResponses(definition, operation, operationSwagger); + } + } + + /** + * Fill Swagger "Paths" objects from RWADef definition + * + * @param definition + * RWADef definition + * @param swagger + * Swagger definition + */ + private static void fillPaths(Definition definition, Swagger swagger) { + Map paths = new LinkedHashMap<>(); + + for (Resource resource : definition.getContract().getResources()) { + Path pathSwagger = new Path(); + + fillPathOperations(definition, resource, pathSwagger); + paths.put(resource.getResourcePath(), pathSwagger); + } + swagger.setPaths(paths); + } + + /** + * Translates a Restlet Web API Definition to a Swagger definition + * + * @param definition + * The Restlet Web API definition + * @return Swagger The translated Swagger 2.0 definition + */ + public static Swagger getSwagger(Definition definition) { + + // conversion + Swagger swagger = new Swagger(); + swagger.setSwagger(SWAGGER_VERSION); // required + + // fill Swagger main attributes + fillMainAttributes(definition, swagger); + + // fill authentication information + fillAuthentication(definition, swagger); + + // fill Swagger.info + fillInfo(definition, swagger); // required + + // fill Swagger.paths + fillPaths(definition, swagger); // required + + // fill Swagger.definitions + fillDefinitions(definition, swagger); + + // TODO add authorization attribute + + return swagger; + } + + /** + * Get new property for Swagger 2.0 for the primitive type of Rwadef. + * + * @param type + * Type Rwadef + * @return Type Swagger + */ + private static com.wordnik.swagger.models.properties.Property newPropertyForType( + String type) { + + switch (type.toLowerCase()) { + case "string": + return new StringProperty(); + case "byte": + return new ByteProperty(); + case "short": + return new ShortProperty(); + case "integer": + return new IntegerProperty(); + case "long": + return new LongProperty(); + case "float": + return new FloatProperty(); + case "double": + return new DoubleProperty(); + case "date": + return new DateProperty(); + case "boolean": + return new BooleanProperty(); + } + + // Reference to a representation + return new RefProperty().asDefault(type); + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v2_0/SwaggerTypeFormat.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v2_0/SwaggerTypeFormat.java new file mode 100644 index 0000000000..6f84486a1d --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v2_0/SwaggerTypeFormat.java @@ -0,0 +1,51 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v2_0; + +/** + * Internal class representing a Swagger type + */ +public class SwaggerTypeFormat { + private String format; + + private String type; + + public SwaggerTypeFormat(String type) { + this(type, null); + } + + public SwaggerTypeFormat(String type, String format) { + this.type = type; + this.format = format; + } + + public String getFormat() { + return format; + } + + public String getType() { + return type; + } +} \ No newline at end of file diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v2_0/SwaggerTypes.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v2_0/SwaggerTypes.java new file mode 100644 index 0000000000..fd5c24211e --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/conversion/swagger/v2_0/SwaggerTypes.java @@ -0,0 +1,97 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.conversion.swagger.v2_0; + +/** + * @author Manuel Boillod + */ +public class SwaggerTypes { + + /** + * Converts Swagger types to Java types + * + * @param dataType + * The Swagger type + * @return The corresponding Java type + */ + public static String toDefinitionType(SwaggerTypeFormat dataType) { + if ("string".equals(dataType.getType())) { + if ("date".equals(dataType.getFormat())) { + return "date"; + } else if ("byte".equals(dataType.getFormat())) { + return "byte"; + } else { + return "string"; + } + } else if ("integer".equals(dataType.getType())) { + if ("int64".equals(dataType.getFormat())) { + return "long"; + } else { + return "integer"; + } + } else if ("number".equals(dataType.getType())) { + if ("float".equals(dataType.getFormat())) { + return "Float"; + } else { + return "double"; + } + } else if ("boolean".equals(dataType.getType())) { + return "boolean"; + } else { + return dataType.getType(); + } + } + + /** + * Converts Java types to Swagger types + * + * @param dataType + * The Java type + * @return The corresponding Swagger type + */ + public static SwaggerTypeFormat toSwaggerType(String dataType) { + if ("string".equals(dataType)) { + return new SwaggerTypeFormat("string"); + } else if ("byte".equals(dataType)) { + return new SwaggerTypeFormat("string", "byte"); + } else if ("short".equals(dataType)) { + return new SwaggerTypeFormat("integer", "int32"); + } else if ("integer".equals(dataType)) { + return new SwaggerTypeFormat("integer", "int32"); + } else if ("long".equals(dataType)) { + return new SwaggerTypeFormat("integer", "int64"); + } else if ("float".equals(dataType)) { + return new SwaggerTypeFormat("number", "float"); + } else if ("double".equals(dataType)) { + return new SwaggerTypeFormat("number", "double"); + } else if ("boolean".equals(dataType)) { + return new SwaggerTypeFormat("boolean"); + } else if ("date".equals(dataType)) { + return new SwaggerTypeFormat("string", "date"); + } else { + return new SwaggerTypeFormat(dataType); + } + } +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/FirewallFilter.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/FirewallFilter.java new file mode 100644 index 0000000000..ed73d3e986 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/FirewallFilter.java @@ -0,0 +1,86 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall; + +import java.util.List; + +import org.restlet.Context; +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.ext.apispark.internal.firewall.rule.FirewallRule; +import org.restlet.routing.Filter; + +/** + * Filter that controls the incoming requests by applying a set of rules. + * + * @author Guillaume Blondeau + */ +public class FirewallFilter extends Filter { + + /** The list of associated {@link FirewallRule}. */ + protected final List rules; + + /** + * Constructor. + * + * @param context + * The context. + * @param rules + * The list of associated {@link FirewallRule}. + */ + public FirewallFilter(Context context, List rules) { + super(context); + this.rules = rules; + } + + /** + * Invokes each {@link FirewallRule#afterHandle(Request, Response)} method. + */ + @Override + public void afterHandle(Request request, Response response) { + for (FirewallRule rule : rules) { + rule.afterHandle(request, response); + } + } + + /** + * Applies each rules to the incoming request. + */ + @Override + public int beforeHandle(Request request, Response response) { + int result = Filter.CONTINUE; + + for (FirewallRule rule : rules) { + int value = rule.beforeHandle(request, response); + if (value != Filter.CONTINUE) { + return value; + } + result = value; + } + + return result; + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/BlockingHandler.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/BlockingHandler.java new file mode 100644 index 0000000000..a52e6f3369 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/BlockingHandler.java @@ -0,0 +1,68 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.handler; + +import java.util.logging.Level; + +import org.restlet.Context; +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.data.Status; +import org.restlet.ext.apispark.internal.firewall.handler.policy.LimitPolicy; +import org.restlet.ext.apispark.internal.firewall.rule.CounterResult; +import org.restlet.routing.Filter; + +/** + * {@link ThresholdHandler} that updates the response's status to + * {@link Status#CLIENT_ERROR_TOO_MANY_REQUESTS} when the limit is reached. + * + * @author Guillaume Blondeau + */ +public class BlockingHandler extends ThresholdHandler { + + /** + * Constructor. + * + * @param limitPolicy + * The limit policy. + */ + public BlockingHandler(LimitPolicy limitPolicy) { + super(limitPolicy); + } + + @Override + protected int thresholdReached(Request request, Response response, + CounterResult counterResult) { + Context.getCurrentLogger().log( + Level.FINE, + "The current request has been blocked because \"" + + counterResult.getCountedValue() + + "\" issued too many requests."); + + response.setStatus(Status.CLIENT_ERROR_TOO_MANY_REQUESTS); + return Filter.SKIP; + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/RateLimitationHandler.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/RateLimitationHandler.java new file mode 100644 index 0000000000..5356610cfb --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/RateLimitationHandler.java @@ -0,0 +1,82 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.handler; + +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.data.Header; +import org.restlet.engine.header.HeaderConstants; +import org.restlet.ext.apispark.internal.firewall.handler.policy.LimitPolicy; +import org.restlet.ext.apispark.internal.firewall.rule.CounterResult; +import org.restlet.ext.apispark.internal.firewall.rule.counter.PeriodicCounter; +import org.restlet.util.Series; + +/** + * {@link BlockingHandler} that sets the Rate limitation headers to the + * {@link Response}.
+ * Must be used in association with {@link PeriodicCounter}.
+ *
    + *
  • X-RateLimit-Remaining: The approximative number of requests left for the + * time window.
  • + *
  • X-RateLimit-Limit: The approximative number of request limit.
  • + *
  • X-RateLimit-Reset: The approximative remaining window before the rate + * limit resets in UTC epoch seconds
  • + *
+ * + * @author Guillaume Blondeau + */ +public class RateLimitationHandler extends BlockingHandler { + + /** + * Contructor. + * + * @param limitPolicy + */ + public RateLimitationHandler(LimitPolicy limitPolicy) { + super(limitPolicy); + } + + @Override + public int handle(Request request, Response response, + CounterResult counterResult) { + Series
headers = response.getHeaders(); + headers.set( + "X-RateLimit-Remaining", + Integer.toString(getLimit(request, + counterResult.getCountedValue()) + - counterResult.getConsumed())); + headers.set( + "X-RateLimit-Limit", + Integer.toString(getLimit(request, + counterResult.getCountedValue()))); + headers.set("X-RateLimit-Reset", + Long.toString(counterResult.getReset())); + response.getAttributes() + .put(HeaderConstants.ATTRIBUTE_HEADERS, headers); + + return super.handle(request, response, counterResult); + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/ThresholdHandler.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/ThresholdHandler.java new file mode 100644 index 0000000000..284a1b400e --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/ThresholdHandler.java @@ -0,0 +1,115 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.handler; + +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.ext.apispark.internal.firewall.handler.policy.LimitPolicy; +import org.restlet.ext.apispark.internal.firewall.rule.CounterResult; +import org.restlet.ext.apispark.internal.firewall.rule.policy.CountingPolicy; +import org.restlet.routing.Filter; + +/** + * Thanks to its {@link LimitPolicy} a {@link ThresholdHandler} throws an event + * when the limit is reached. + * + * @author Guillaume Blondeau + */ +public abstract class ThresholdHandler { + + /** The {@link LimitPolicy} associated to the {@link ThresholdHandler}. */ + private LimitPolicy limitPolicy; + + /** + * Constructor. + * + * @param limitPolicy + * The associated limit policy. + */ + public ThresholdHandler(LimitPolicy limitPolicy) { + this.setLimitPolicy(limitPolicy); + } + + /** + * Returns the limit associated to the given value. + * + * @param request + * The request to handle. + * @param countedValue + * The value returned by a {@link CountingPolicy}. + * @return Limit associated to the given value. + */ + public int getLimit(Request request, String countedValue) { + return this.limitPolicy.getLimit(request, countedValue); + } + + /** + * Default implementation checks whether the limit is reached. If so, it + * calls + * {@link ThresholdHandler#thresholdReached(Request, Response, CounterResult)} + * . + * + * @param request + * The request to handle. + * @param response + * The response to update. + * @param counterResult + * The state of the counter. + * @return The continuation status. + */ + public int handle(Request request, Response response, + CounterResult counterResult) { + if (getLimit(request, counterResult.getCountedValue()) < counterResult + .getConsumed()) { + return thresholdReached(request, response, counterResult); + } + return Filter.CONTINUE; + } + + /** + * Sets the {@link LimitPolicy}. + * + * @param limitPolicy + * The limit policy. + */ + public void setLimitPolicy(LimitPolicy limitPolicy) { + this.limitPolicy = limitPolicy; + } + + /** + * Method called when the defined limit is reached. + * + * @param request + * The request to handle. + * @param response + * The response to update. + * @param counterResult + * The state of the counter. + * @return The continuation status. + */ + protected abstract int thresholdReached(Request request, Response response, + CounterResult counterResult); + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/LimitPolicy.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/LimitPolicy.java new file mode 100644 index 0000000000..a8374ea4dc --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/LimitPolicy.java @@ -0,0 +1,49 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.handler.policy; + +import org.restlet.Request; +import org.restlet.ext.apispark.internal.firewall.rule.policy.CountingPolicy; + +/** + * Associates a limit to counted values extracted from the incoming + * {@link Request} thanks to a {@link CountingPolicy}. + * + * @author Guillaume Blondeau + */ +public abstract class LimitPolicy { + + /** + * Returns the limit associated to the given counted value. + * + * @param request + * The current request. + * @param countedValue + * The counted value. + * @return The limit associated to the given counted value. + */ + public abstract int getLimit(Request request, String countedValue); + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/PerGroupLimitPolicy.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/PerGroupLimitPolicy.java new file mode 100644 index 0000000000..7f3016ccaf --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/PerGroupLimitPolicy.java @@ -0,0 +1,125 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.handler.policy; + +import java.util.HashMap; +import java.util.Map; + +import org.restlet.Request; + +/** + * Defines a limit to sets of counted values. + * + * @author Guillaume Blondeau + */ +public class PerGroupLimitPolicy extends LimitPolicy { + + /** + * The default limit applies when the counted value has not been found in + * any group. + */ + public int defaultLimit; + + /** Maps a counted value to a group. */ + private Map groups; + + /** Maps a group name to a limit. */ + private Map limitsPerGroup; + + /** + * Constructor.
+ * Defines only the {@link PerGroupLimitPolicy#defaultLimit} to 0. + */ + public PerGroupLimitPolicy() { + this(0); + } + + /** + * Constructor.
+ * Defines only the {@link PerGroupLimitPolicy#defaultLimit}. + * + * @param defaultLimit + * The default limit. + */ + public PerGroupLimitPolicy(int defaultLimit) { + this(new HashMap(), new HashMap(), + defaultLimit); + } + + /** + * Constructor.
+ * + * @param limitsPerGroup + * The sets of limits per group. + * @param groups + * Maps counted values with groups. + * @param defaultLimit + * The default limit. + */ + public PerGroupLimitPolicy(Map limitsPerGroup, + Map groups, int defaultLimit) { + this.defaultLimit = defaultLimit; + this.limitsPerGroup = limitsPerGroup; + this.groups = groups; + } + + /** + * Associates a counted value with a group. + * + * @param countedValue + * The counted value. + * @param group + * The name of the group. + */ + public void addCountedValue(String countedValue, String group) { + groups.put(countedValue, group); + } + + /** + * Specifies a limit for a group. + * + * @param group + * The name of the group. + * @param limit + * The associated limit. + */ + public void addGroup(String group, int limit) { + limitsPerGroup.put(group, limit); + } + + @Override + public int getLimit(Request request, String countedValue) { + int result = defaultLimit; + String group = groups.get(countedValue); + if (group != null) { + if (limitsPerGroup.containsKey(group)) { + result = limitsPerGroup.get(group); + } + } + + return result; + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/PerValueLimitPolicy.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/PerValueLimitPolicy.java new file mode 100644 index 0000000000..b61faf7b8b --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/PerValueLimitPolicy.java @@ -0,0 +1,105 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.handler.policy; + +import java.util.HashMap; +import java.util.Map; + +import org.restlet.Request; + +/** + * Defines a limit for known counted values. + * + * @author Guillaume Blondeau + */ +public class PerValueLimitPolicy extends LimitPolicy { + + /** + * The default limit applies when the counted value has not been found in + * the list of known counted values. + */ + public int defaultLimit; + + /** Maps a counted value to a limit. */ + private Map limitsPerValue; + + /** + * Constructor.
+ * Defines only the {@link PerValueLimitPolicy#defaultLimit} to 0. + */ + public PerValueLimitPolicy() { + this(0); + } + + /** + * Constructor.
+ * Defines only the {@link PerValueLimitPolicy#defaultLimit}. + * + * @param defaultLimit + * The default limit. + */ + public PerValueLimitPolicy(int defaultLimit) { + this(new HashMap(), defaultLimit); + } + + /** + * Constructor.
+ * + * @param limitsPerValue + * The map of limits per counted value. + * @param defaultLimit + * The default limit. + */ + public PerValueLimitPolicy(Map limitsPerValue, + int defaultLimit) { + this.defaultLimit = defaultLimit; + this.limitsPerValue = limitsPerValue; + } + + /** + * Associates a limit to a counted value. + * + * @param countedValue + * The counted value. + * @param limit + * The associated limit. + */ + public void addCountedValue(String countedValue, int limit) { + limitsPerValue.put(countedValue, limit); + } + + @Override + public int getLimit(Request request, String countedValue) { + int result = defaultLimit; + if (countedValue != null) { + if (limitsPerValue.containsKey(countedValue)) { + result = limitsPerValue.get(countedValue); + } + } + + return result; + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/RoleLimitPolicy.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/RoleLimitPolicy.java new file mode 100644 index 0000000000..0115e4554d --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/RoleLimitPolicy.java @@ -0,0 +1,174 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.handler.policy; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.restlet.Request; +import org.restlet.security.Authenticator; +import org.restlet.security.Enroler; +import org.restlet.security.Role; + +/** + * Defines a limit to authenticated users based on their {@link Role}. Use this + * policy in conjunction with an {@link Enroler} (cf {@link Authenticator}) in + * order to associate roles to users. + * + * @author Guillaume Blondeau + */ +public class RoleLimitPolicy extends LimitPolicy { + + /** + * The default limit applied when the request's user has no role or his + * roles are not contained in {@link RoleLimitPolicy#limitsPerRole}. + */ + private int defaultLimit; + + /** Maps a role name to a limit. */ + private Map limitsPerRole; + + /** + * Constructor.
+ * Defines only the {@link RoleLimitPolicy#defaultLimit} to 0. + */ + public RoleLimitPolicy() { + this(new HashMap(), 0); + } + + /** + * Constructor.
+ * Defines only the {@link RoleLimitPolicy#defaultLimit}. + * + * @param defaultLimit + * The default limit. + */ + public RoleLimitPolicy(int defaultLimit) { + this(new HashMap(), defaultLimit); + } + + /** + * Constructor.
+ * Set the {@link RoleLimitPolicy#defaultLimit} to 0. + * + * @param limitsPerRole + * Maps role's name to a limit. + */ + public RoleLimitPolicy(Map limitsPerRole) { + this(limitsPerRole, 0); + } + + /** + * Constructor. + * + * @param limitsPerRole + * Maps role's name to a limit. + * @param defaultLimit + * The default limit applied when the incoming user has no role + * or any of his roles has been associated to a limit. + */ + public RoleLimitPolicy(Map limitsPerRole, int defaultLimit) { + this.limitsPerRole = limitsPerRole; + this.defaultLimit = defaultLimit; + } + + /** + * Specifies a limit for a role. + * + * @param role + * The name of the role. + * @param limit + * The associated limit. + */ + public void addRole(String role, int limit) { + limitsPerRole.put(role, limit); + } + + /** + * Returns the policy's default limit. + * + * @return Policy's default limit. + */ + public int getDefaultLimit() { + return defaultLimit; + } + + /** + * Returns the highest limit associated to the user's roles. + */ + @Override + public int getLimit(Request request, String countedValue) { + // TODO we don't rely on the counted value? + int result = 0; + List roles = request.getClientInfo().getRoles(); + // iterate over user's roles + for (Role role : roles) { + if (limitsPerRole.containsKey(role.getName()) + && (limitsPerRole.get(role.getName()) > result)) { + result = limitsPerRole.get(role.getName()); + } + } + + if (result == 0) { + result = defaultLimit; + } + + return result; + } + + /** + * Returns the {@link Map} defining limits corresponding to different + * {@link Role} + * + * @return Limits corresponding to different {@link Role} + */ + public Map getLimitsPerRole() { + return limitsPerRole; + } + + /** + * Set the policy's default limit. + * + * @param defaultLimit + * Policy's default limit. + */ + public void setDefaultLimit(int defaultLimit) { + this.defaultLimit = defaultLimit; + } + + /** + * Set the {@link Map} defining limits corresponding to different + * {@link Role} + * + * @param limitsPerRole + * {@link Map} defining limits corresponding to different + * {@link Role} + */ + public void setLimitsPerRole(Map limitsPerRole) { + this.limitsPerRole = limitsPerRole; + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/UniqueLimitPolicy.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/UniqueLimitPolicy.java new file mode 100644 index 0000000000..5a1b0c334f --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/handler/policy/UniqueLimitPolicy.java @@ -0,0 +1,54 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.handler.policy; + +import org.restlet.Request; + +/** + * Defines a single limit. + * + * @author Guillaume Blondeau + */ +public class UniqueLimitPolicy extends LimitPolicy { + + /** The single limit. */ + private int limit; + + /** + * Constructor. + * + * @param limit + * The associated limit. + */ + public UniqueLimitPolicy(int limit) { + this.limit = limit; + } + + @Override + public int getLimit(Request request, String countedValue) { + return limit; + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/rule/ConcurrentFirewallCounterRule.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/rule/ConcurrentFirewallCounterRule.java new file mode 100644 index 0000000000..5e69e20ab0 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/rule/ConcurrentFirewallCounterRule.java @@ -0,0 +1,79 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.rule; + +import java.util.concurrent.TimeUnit; + +import org.restlet.ext.apispark.internal.firewall.rule.counter.ConcurrentCounter; +import org.restlet.ext.apispark.internal.firewall.rule.policy.CountingPolicy; + +import com.google.common.cache.CacheBuilder; +import com.google.common.cache.CacheLoader; +import com.google.common.cache.LoadingCache; + +/** + * {@link FirewallCounterRule} specialized in counting concurrent requests. + * + * @author Guillaume Blondeau + */ +public class ConcurrentFirewallCounterRule extends FirewallCounterRule { + + /** Cache of {@link ConcurrentCounter}. */ + private LoadingCache cache; + + /** + * Contructor. + * + * @param countingPolicy + * The associated counting policy. + */ + public ConcurrentFirewallCounterRule(CountingPolicy countingPolicy) { + super(countingPolicy); + initializeCache(); + } + + @Override + protected void decrementCounter(String countedValue) { + ConcurrentCounter counter = cache.getUnchecked(countedValue); + counter.decrement(); + } + + @Override + protected CounterResult incrementCounter(String countedValue) { + ConcurrentCounter counter = cache.getUnchecked(countedValue); + return counter.increment(); + } + + private void initializeCache() { + CacheLoader loader = new CacheLoader() { + public ConcurrentCounter load(String key) { + return new ConcurrentCounter(); + } + }; + cache = CacheBuilder.newBuilder() + .expireAfterAccess(2, TimeUnit.MINUTES).build(loader); + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/rule/CounterResult.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/rule/CounterResult.java new file mode 100644 index 0000000000..4f832aebba --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/rule/CounterResult.java @@ -0,0 +1,142 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.rule; + +import org.restlet.ext.apispark.internal.firewall.rule.counter.ConcurrentCounter; +import org.restlet.ext.apispark.internal.firewall.rule.counter.Counter; +import org.restlet.ext.apispark.internal.firewall.rule.counter.PeriodicCounter; + +/** + * Gives the state of a {@link Counter}. + * + * @author Guillaume Blondeau + */ +public class CounterResult { + + /** The number of requests done by the associated counter. */ + private int consumed; + + /** The identifier of the counter. */ + private String countedValue; + + /** + * Time elapsed by the counter. Only available for the + * {@link PeriodicCounter}. Will be set to 0 by the + * {@link ConcurrentCounter}. + */ + private long elapsed; + + /** + * Time when the counter will be reset. Only available for the + * {@link PeriodicCounter}. Will be set to 0 by the + * {@link ConcurrentCounter}. + */ + private long reset; + + /** + * Returns the number of requests done by the associated {@link Counter}. + * + * @return The number of requests done by the associated {@link Counter}. + */ + public int getConsumed() { + return consumed; + } + + /** + * Returns the identifier of the counter. + * + * @return The identifier of the counter. + */ + public String getCountedValue() { + return countedValue; + } + + /** + * Returns the time elapsed by the counter. Only available for the + * {@link PeriodicCounter}. Will be set to 0 by the + * {@link ConcurrentCounter}. + * + * @return Time elapsed by the counter. Only available for the + * {@link PeriodicCounter}. Will be set to 0 by the + * {@link ConcurrentCounter}. + */ + public long getElapsed() { + return elapsed; + } + + /** + * Returns the time when the counter will be reset. Only available for the + * {@link PeriodicCounter}. Will be set to 0 by the + * {@link ConcurrentCounter}. + * + * @return Time when the counter will be reset. Only available for the + * {@link PeriodicCounter}. Will be set to 0 by the + * {@link ConcurrentCounter}. + */ + public long getReset() { + return reset; + } + + /** + * Sets the number of requests done by the associated {@link Counter}. + * + * @param consumed + */ + public void setConsumed(int consumed) { + this.consumed = consumed; + } + + /** + * Sets the value which identifies the counter. + * + * @param countedValue + */ + public void setCountedValue(String countedValue) { + this.countedValue = countedValue; + } + + /** + * Sets the time elapsed by the counter. Only available for the + * {@link PeriodicCounter}. Will be set to 0 by the + * {@link ConcurrentCounter}. + * + * @param elapsed + */ + public void setElapsed(long elapsed) { + this.elapsed = elapsed; + } + + /** + * Sets the time when the counter will be reset. Only available for the + * {@link PeriodicCounter}. Will be set to 0 by the + * {@link ConcurrentCounter}. + * + * @param reset + */ + public void setReset(long reset) { + this.reset = reset; + } + +} diff --git a/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/rule/FirewallCounterRule.java b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/rule/FirewallCounterRule.java new file mode 100644 index 0000000000..4d91e2a9d1 --- /dev/null +++ b/modules/org.restlet.ext.apispark/src/org/restlet/ext/apispark/internal/firewall/rule/FirewallCounterRule.java @@ -0,0 +1,195 @@ +/** + * Copyright 2005-2014 Restlet + * + * The contents of this file are subject to the terms of one of the following + * open source licenses: Apache 2.0 or or EPL 1.0 (the "Licenses"). You can + * select the license that you prefer but you may not use this file except in + * compliance with one of these Licenses. + * + * You can obtain a copy of the Apache 2.0 license at + * http://www.opensource.org/licenses/apache-2.0 + * + * You can obtain a copy of the EPL 1.0 license at + * http://www.opensource.org/licenses/eclipse-1.0 + * + * See the Licenses for the specific language governing permissions and + * limitations under the Licenses. + * + * Alternatively, you can obtain a royalty free commercial license with less + * limitations, transferable or non-transferable, directly at + * http://restlet.com/products/restlet-framework + * + * Restlet is a registered trademark of Restlet S.A.S. + */ + +package org.restlet.ext.apispark.internal.firewall.rule; + +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; + +import org.restlet.Context; +import org.restlet.Request; +import org.restlet.Response; +import org.restlet.ext.apispark.internal.firewall.handler.ThresholdHandler; +import org.restlet.ext.apispark.internal.firewall.rule.counter.Counter; +import org.restlet.ext.apispark.internal.firewall.rule.policy.CountingPolicy; +import org.restlet.routing.Filter; + +/** + * A {@link FirewallCounterRule} associates: + *