2012-03-23 11:03:48 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
2012-05-24 13:17:46 -07:00
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2012-03-23 11:03:48 -07:00
|
|
|
|
|
|
|
package org.mozilla.gecko.sync;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
2012-06-10 16:44:50 -07:00
|
|
|
public abstract class CommandRunner {
|
|
|
|
public final int argCount;
|
|
|
|
|
|
|
|
public CommandRunner(int argCount) {
|
|
|
|
this.argCount = argCount;
|
|
|
|
}
|
|
|
|
|
2012-06-19 10:54:23 -07:00
|
|
|
public abstract void executeCommand(GlobalSession session, List<String> args);
|
2012-06-10 16:44:50 -07:00
|
|
|
|
|
|
|
public boolean argumentsAreValid(List<String> args) {
|
|
|
|
return args != null &&
|
|
|
|
args.size() == argCount;
|
|
|
|
}
|
2012-03-23 11:03:48 -07:00
|
|
|
}
|