You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devicemap.apache.org by wk...@apache.org on 2015/12/20 16:52:20 UTC
svn commit: r1721039 -
/devicemap/trunk/clients/1.0/java/console/src/main/java/org/apache/devicemap/console/DeviceMapConsole.java
Author: wkeil
Date: Sun Dec 20 15:52:19 2015
New Revision: 1721039
URL: http://svn.apache.org/viewvc?rev=1721039&view=rev
Log:
DMAP-186: Some arguments like debug/log won't work in Java Console
Task-Url: https://issues.apache.org/jira/browse/DMAP-186
Modified:
devicemap/trunk/clients/1.0/java/console/src/main/java/org/apache/devicemap/console/DeviceMapConsole.java
Modified: devicemap/trunk/clients/1.0/java/console/src/main/java/org/apache/devicemap/console/DeviceMapConsole.java
URL: http://svn.apache.org/viewvc/devicemap/trunk/clients/1.0/java/console/src/main/java/org/apache/devicemap/console/DeviceMapConsole.java?rev=1721039&r1=1721038&r2=1721039&view=diff
==============================================================================
--- devicemap/trunk/clients/1.0/java/console/src/main/java/org/apache/devicemap/console/DeviceMapConsole.java (original)
+++ devicemap/trunk/clients/1.0/java/console/src/main/java/org/apache/devicemap/console/DeviceMapConsole.java Sun Dec 20 15:52:19 2015
@@ -61,21 +61,31 @@ public class DeviceMapConsole {
@Command(name = "classify", description = "Classify User Agent")
public static final class Classify extends ToolCommand {
- @Option(name = "-i", description = "Input file")
- public String inFile;
+ @Option(name = "-f", description = "Load DeviceMap resouces from folder or \"default\"")
+ public String folder;
+ @Option(name = "-u", description = "Load DeviceMap resouces from URL or \"default\"")
+ public String url;
+
+ @Option(name = "-j", description = "Load DeviceMap resouces from JAR file in classpath")
+ public String jarFile="default";
+
@Arguments(description = "User Agent String to test")
public String userAgent;
@Override
public void run() {
- if (inFile != null && inFile.length() > 0) {
- LOG.info(getClass().getSimpleName() + " " + inFile);
- } else {
- LOG.info(getClass().getSimpleName());
- }
-
isVerbose = verbose;
+
+ if (jarFile != null) {
+ if (jarFile.length() > 0) {
+ LOG.info(getClass().getSimpleName() + " " + jarFile);
+ } else {
+ LOG.info(getClass().getSimpleName());
+ }
+ }
+
+
if (verbose) {
LOG.info("UA: " + userAgent + " (" + verbose + ")");