diff --git a/code/client-java.iml b/code/client-java.iml index 74e5b09..9b8e598 100644 --- a/code/client-java.iml +++ b/code/client-java.iml @@ -1,6 +1,11 @@ - + + + + @@ -12,20 +17,12 @@ - - - - - - - - - - + + diff --git a/code/pom.xml b/code/pom.xml index 456c85d..70d9b65 100644 --- a/code/pom.xml +++ b/code/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.scientiamobile.wurflcloud client-java - 1.0.14 + 1.0.15 jar wurfl-cloud-client @@ -62,6 +62,8 @@ 1.2.0 1.6.4 2.10.2 + 1.7 + 1.7 @@ -280,7 +282,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.8.1 1.7 1.7 diff --git a/code/src/main/java/com/scientiamobile/wurflcloud/CloudClient.java b/code/src/main/java/com/scientiamobile/wurflcloud/CloudClient.java index f1a3b6a..fe920d0 100755 --- a/code/src/main/java/com/scientiamobile/wurflcloud/CloudClient.java +++ b/code/src/main/java/com/scientiamobile/wurflcloud/CloudClient.java @@ -70,8 +70,6 @@ public class CloudClient extends Loggable implements ICloudClientRequest, Consta /** * The HTTP Headers that will be used to query the WURFL Cloud Server in Map format. - * - * @var array */ private final Map reqHeaders = new LinkedHashMap(); @@ -100,14 +98,14 @@ public class CloudClient extends Loggable implements ICloudClientRequest, Consta /** * Construct a new CloudClient object * - * @param request - * @param response - * @param cfg - * @param searchCapabilities - * @param credentials - * @param cache - * @param recoveryManager - * @param clientManager + * @param request the HTTP servlet request object + * @param response HTTP servlet response object + * @param cfg cloud clinet configuration + * @param searchCapabilities list of capabilities to get + * @param credentials wurfl cloud credentials + * @param cache cache implementation + * @param clientManager cloud client manager + * @param proxy proxy to use for connections */ protected CloudClient(HttpServletRequest request, HttpServletResponse response, CloudClientConfig cfg, String[] searchCapabilities, Credentials credentials, IWurflCloudCache cache, CloudClientManager clientManager, Proxy proxy) { this.response = response; @@ -455,7 +453,7 @@ public Object queryCloudForCapability(String capabilityName, AbstractDevice devi * Queries cache, then cloud. * If cloud is not available, tries a recovery answer. * - * @return + * @return an AbstractDevice implementation * @throws IOException */ protected AbstractDevice detectDevice() throws IOException { @@ -549,9 +547,9 @@ private long updateListeners(CloudResponse cloudResponse) { /** * Reads response from cloud. * - * @param connection - * @return - * @throws IOException + * @param connection the HTTP connection object + * @return the content from cloud response + * @throws IOException in case of connection issues */ private String processContent(URLConnection connection) throws IOException { final char[] buffer = new char[0x10000]; diff --git a/code/src/main/java/com/scientiamobile/wurflcloud/CloudClientLoader.java b/code/src/main/java/com/scientiamobile/wurflcloud/CloudClientLoader.java index 3744307..84956d3 100755 --- a/code/src/main/java/com/scientiamobile/wurflcloud/CloudClientLoader.java +++ b/code/src/main/java/com/scientiamobile/wurflcloud/CloudClientLoader.java @@ -44,7 +44,7 @@ public class CloudClientLoader extends Loggable implements Constants, Serializab /** * Constructs a CloudClientLoader by reading all the configuration properties (including the API Key) from the configuration file. - * @throws Exception + * @throws Exception if any error loading cloud configuration occurs */ public CloudClientLoader() throws Exception { this (null, null, null); @@ -53,7 +53,7 @@ public CloudClientLoader() throws Exception { /** * Constructs a CloudClientLoader with proxy configuration represented by a {@link Proxy} object * @param apiKey required key for Cloud Client use. - * @throws Exception + * @throws Exception if any error loading cloud configuration occurs */ public CloudClientLoader(String apiKey) throws Exception { this(apiKey, null, null); @@ -64,8 +64,8 @@ public CloudClientLoader(String apiKey) throws Exception { * @param apiKey the API key * @param proxyIp the proxy IP * @param proxyPort the proxy port - * @param proxyType the {@link Proxy.Type} representing the proxy protocol - * @throws Exception + * @param proxyType the {Proxy.Type representing the proxy protocol + * @throws Exception if any error loading cloud configuration occurs */ public CloudClientLoader(String apiKey, String proxyIp, int proxyPort, Proxy.Type proxyType) throws Exception { this(apiKey, new Proxy(proxyType, new InetSocketAddress(proxyIp, proxyPort))); @@ -75,8 +75,8 @@ public CloudClientLoader(String apiKey, String proxyIp, int proxyPort, Proxy.Typ * Constructs a CloudClientLoader with proxy configuration * @param proxyIp the proxy IP * @param proxyPort the proxy port - * @param proxyType the {@link Proxy.Type} representing the proxy protocol - * @throws Exception + * @param proxyType the Proxy.Type representing the proxy protocol + * @throws Exception if any error loading cloud configuration occurs */ public CloudClientLoader(String proxyIp, int proxyPort, Proxy.Type proxyType) throws Exception { this(null, new Proxy(proxyType, new InetSocketAddress(proxyIp, proxyPort))); @@ -84,8 +84,8 @@ public CloudClientLoader(String proxyIp, int proxyPort, Proxy.Type proxyType) th /** * Constructs a CloudClientLoader without specific proxy configuration - * @param the {@link Proxy} to be used to connect to cloud server - * @throws Exception + * @param proxy Proxy class to be used to connect to cloud server + * @throws Exception if any error loading cloud configuration occurs */ public CloudClientLoader(Proxy proxy) throws Exception { this(null, null, proxy); @@ -94,8 +94,8 @@ public CloudClientLoader(Proxy proxy) throws Exception { /** * Constructs a CloudClientLoader without specific proxy configuration * @param apiKey required key for Cloud Client use. - * @param the {@link Proxy} to be used to connect to cloud server - * @throws Exception + * @param proxy Proxy class to be used to connect to cloud server + * @throws Exception if any error loading cloud configuration occurs */ public CloudClientLoader(String apiKey, Proxy proxy) throws Exception { this(apiKey, null, proxy); @@ -104,8 +104,8 @@ public CloudClientLoader(String apiKey, Proxy proxy) throws Exception { /** * Constructs a CloudClientLoader with proxy configuration represented by a {@link Proxy} object * @param apiKey required key for Cloud Client use. - * @param the .properties file path to be used - * @throws Exception + * @param propertiesFile .properties file path to be used + * @throws Exception if any error loading cloud configuration occurs */ public CloudClientLoader(String apiKey, String propertiesFile) throws Exception { this(apiKey, propertiesFile, null); @@ -114,11 +114,11 @@ public CloudClientLoader(String apiKey, String propertiesFile) throws Exception /** * Constructs a CloudClientLoader with proxy configuration * @param apiKey the API key - * @param the .properties file path to be used + * @param propertiesFile the .properties file path to be used * @param proxyIp the proxy IP * @param proxyPort the proxy port - * @param proxyType the {@link Proxy.Type} representing the proxy protocol - * @throws Exception + * @param proxyType the Proxy.Type representing the proxy protocol + * @throws Exception if any error loading cloud configuration occurs */ public CloudClientLoader(String apiKey, String propertiesFile, String proxyIp, int proxyPort, Proxy.Type proxyType) throws Exception { this(apiKey, propertiesFile, new Proxy(proxyType, new InetSocketAddress(proxyIp, proxyPort))); @@ -127,9 +127,9 @@ public CloudClientLoader(String apiKey, String propertiesFile, String proxyIp, i /** * Constructs a CloudClientLoader without specific proxy configuration * @param apiKey required key for Cloud Client use. - * @param the .properties file path to be used - * @param the {@link Proxy} to be used to connect to cloud server - * @throws Exception + * @param propertiesFile the .properties file path to be used + * @param proxy the Proxy class to be used to connect to cloud server + * @throws Exception if any error loading cloud configuration occurs */ public CloudClientLoader(String apiKey, String propertiesFile, Proxy proxy) throws Exception { diff --git a/code/src/main/java/com/scientiamobile/wurflcloud/CloudListener.java b/code/src/main/java/com/scientiamobile/wurflcloud/CloudListener.java index 7c47cbf..dcf8d7e 100755 --- a/code/src/main/java/com/scientiamobile/wurflcloud/CloudListener.java +++ b/code/src/main/java/com/scientiamobile/wurflcloud/CloudListener.java @@ -17,8 +17,8 @@ public interface CloudListener { /** - * Tells the listener when a specific {@link CloudEvent} has been raised. - * @param {@link CloudEvent} The raised CloudEvent + * Tells the listener when a specific CloudEvent has been raised. + * @param evt CloudEvent The raised CloudEvent * */ void processEvent(CloudEvent evt); diff --git a/code/src/main/java/com/scientiamobile/wurflcloud/cache/EhcachePremiumCloudCache.java b/code/src/main/java/com/scientiamobile/wurflcloud/cache/EhcachePremiumCloudCache.java index e1e06af..d5b4eae 100755 --- a/code/src/main/java/com/scientiamobile/wurflcloud/cache/EhcachePremiumCloudCache.java +++ b/code/src/main/java/com/scientiamobile/wurflcloud/cache/EhcachePremiumCloudCache.java @@ -21,7 +21,7 @@ import java.util.Map; /** - * Cache implementation using Java {@linkplain http://ehcache.org/} Ehcache implementation. + * Cache implementation using Java Ehcache implementation (http://www.ehcache.org/). */ public class EhcachePremiumCloudCache extends AbstractUseragentWurflCloudCache { diff --git a/code/src/main/java/com/scientiamobile/wurflcloud/cache/IWurflCloudCache.java b/code/src/main/java/com/scientiamobile/wurflcloud/cache/IWurflCloudCache.java index fd313b4..66c78a1 100755 --- a/code/src/main/java/com/scientiamobile/wurflcloud/cache/IWurflCloudCache.java +++ b/code/src/main/java/com/scientiamobile/wurflcloud/cache/IWurflCloudCache.java @@ -64,7 +64,7 @@ public interface IWurflCloudCache extends Constants { /** * Sets the last loaded WURFL timestamp in the cache provider - * @see IWurflCloudCache.getMtime() + * @link IWurflCloudCache.#getMtime() * * @param server_mtime The new time to set * @return True if the new time was set successfully, false otherwise @@ -74,7 +74,7 @@ public interface IWurflCloudCache extends Constants { /** * Clears the cache provider * - * @return True if the purge succeded, false otherwise + * @return True if the purge succeeded, false otherwise */ public boolean purge(); diff --git a/code/src/main/java/com/scientiamobile/wurflcloud/cache/SimpleCookieCache.java b/code/src/main/java/com/scientiamobile/wurflcloud/cache/SimpleCookieCache.java index f6919a6..710bf46 100644 --- a/code/src/main/java/com/scientiamobile/wurflcloud/cache/SimpleCookieCache.java +++ b/code/src/main/java/com/scientiamobile/wurflcloud/cache/SimpleCookieCache.java @@ -93,7 +93,7 @@ public AbstractDevice getDeviceFromID(String key) { * @param response * @param key * @param device - * @return + * @return true if device has been set properly, false if any error occurred */ public boolean setDevice(HttpServletResponse response, String key, AbstractDevice device) { String cookieVal; diff --git a/code/src/main/java/com/scientiamobile/wurflcloud/device/AbstractDevice.java b/code/src/main/java/com/scientiamobile/wurflcloud/device/AbstractDevice.java index 51dafbf..292812f 100755 --- a/code/src/main/java/com/scientiamobile/wurflcloud/device/AbstractDevice.java +++ b/code/src/main/java/com/scientiamobile/wurflcloud/device/AbstractDevice.java @@ -91,7 +91,7 @@ public String getId() { /** * Gets the response type. - * @see {@link ResponseType} + * @see ResponseType * * Possible values are: * - cache: from local cache diff --git a/code/src/main/java/com/scientiamobile/wurflcloud/device/CacheDevice.java b/code/src/main/java/com/scientiamobile/wurflcloud/device/CacheDevice.java index 60cfa0a..ace3aec 100755 --- a/code/src/main/java/com/scientiamobile/wurflcloud/device/CacheDevice.java +++ b/code/src/main/java/com/scientiamobile/wurflcloud/device/CacheDevice.java @@ -20,7 +20,7 @@ public class CacheDevice extends AbstractDevice { /** * Builds an AbstractDevice object using "cache" as response type. - * @param d The device to use + * @param device The device to use */ public CacheDevice(AbstractDevice device) { super(device.getCapabilities(), ResponseType.cache, device.getId(), device.getErrors()); diff --git a/code/src/main/java/com/scientiamobile/wurflcloud/utils/Constants.java b/code/src/main/java/com/scientiamobile/wurflcloud/utils/Constants.java index ea98ff7..6cdd3f1 100755 --- a/code/src/main/java/com/scientiamobile/wurflcloud/utils/Constants.java +++ b/code/src/main/java/com/scientiamobile/wurflcloud/utils/Constants.java @@ -24,7 +24,7 @@ public interface Constants { /** * The version of this client */ - String CLIENT_VERSION = "1.0.14"; + String CLIENT_VERSION = "1.0.15"; /** * Accepted encoding enum. diff --git a/examples/pom.xml b/examples/pom.xml index c75cc9b..72bf165 100755 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -5,7 +5,7 @@ com.scientiamobile.wurflcloud client-example - 1.0.14 + 1.0.15 war WURFL Cloud Client example webapp