Skip to content
Snippets Groups Projects
Commit 5ecfb47f authored by cramakri's avatar cramakri
Browse files

LMS-1594 Added jline to the referenced libraries and re-order handling of...

LMS-1594 Added jline to the referenced libraries and re-order handling of command line options to not request user/password unless all other required arguments have been supplied.

SVN: 16638
parent fbc84acd
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@
<attribute name="Main-Class" value="ch.systemsx.cisd.openbis.dss.client.api.cli.DssClient" />
<attribute name="Class-Path"
value="cisd-base.jar cisd-args4j.jar stream-supporting-httpinvoker.jar log4j.jar commons-lang.jar commons-io.jar commons-logging.jar
commons-codec.jar commons-httpclient.jar spring.jar" />
commons-codec.jar commons-httpclient.jar spring.jar jline.jar" />
<attribute name="Version" value="${version.number}" />
<attribute name="Build-Number"
value="${version.number} (r${revision.number},${clean.flag})" />
......
......@@ -97,9 +97,6 @@ class CommandPut extends AbstractCommand
@Override
public boolean isComplete()
{
if (false == super.isComplete())
return false;
if (getArguments().size() < 3)
return false;
......@@ -121,6 +118,9 @@ class CommandPut extends AbstractCommand
return false;
}
if (false == super.isComplete())
return false;
return true;
}
}
......
......@@ -56,14 +56,14 @@ class DataSetArguments extends GlobalArguments
@Override
public boolean isComplete()
{
if (false == super.isComplete())
return false;
if (getDataSetCode().length() < 1)
{
return false;
}
if (false == super.isComplete())
return false;
return true;
}
}
......@@ -100,6 +100,9 @@ class GlobalArguments
/**
* Check that the arguments make sense.
* <p>
* Note to subclassers -- this command might prompt the user for username and/or password and
* thus should be called as the last part of subclass overrides of this method.
*/
public boolean isComplete()
{
......@@ -108,6 +111,11 @@ class GlobalArguments
return true;
}
if (serverBaseUrl.length() < 1)
{
return false;
}
// At the moment, username, passowrd, and server base url should all be non-empty
// If username wasn't specified, read username and password from console
......@@ -146,10 +154,6 @@ class GlobalArguments
return false;
}
}
if (serverBaseUrl.length() < 1)
{
return false;
}
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment