@Override
public void execute(ActionMessagePrinter printer)
throws CmdLineActionException {
try {
if (factory != null) {
Protocol protocol = factory.newInstance();
if (lastVerificationResult = verifier.verify(protocol, getSite(),
getAuthentication())) {
printer.println("Protocol '"
+ protocol.getClass().getCanonicalName()
+ "' PASSED verification!");
} else {
printer.println("Protocol '"
+ protocol.getClass().getCanonicalName()
+ "' FAILED verification!");
}
} else {
Protocol protocol = getProtocolManager().getProtocolBySite(
getSite(), getAuthentication(), verifier);
if (lastVerificationResult = protocol != null) {
printer.println("Protocol '"
+ protocol.getClass().getCanonicalName()
+ "' PASSED verification!");
} else {
printer.println("No Protocol determined, FAILED verification!");
}
}