package com.zaranux.os.client.commands;
import com.zaranux.client.api.AsyncCallback;
import com.zaranux.client.java.io.PrintStream;
import com.zaranux.os.client.util.Log;
public class adduser extends Command {
@Override
protected void execute(final AsyncCallback<Boolean> callback) {
String[] args = getArgs();
if(args.length == 2)
{
String id = args[0];
String pass = args[1];
systemcall.createuser(id, pass, new AsyncCallback<Boolean>()
{
public void onSuccess(final Boolean b)
{
final PrintStream outPS = (PrintStream) System.out;
outPS.print("added : " + b ,new AsyncCallback<Boolean>()
{
public void onSuccess(Boolean b)
{
callback.onSuccess(true);
}
public void onFailure(Throwable t)
{
callback.onFailure(t);
}
});
}
public void onFailure(Throwable T)
{
}
}
);
}
}
}