01: /**
02: * $Id: ListUBTReportCommand.java,v 1.3 2005/11/07 17:40:30 cathywu Exp $
03: */package com.sun.portal.admin.cli.commands.ubt;
04:
05: import com.sun.portal.admin.cli.commands.GenericCommand;
06: import com.sun.portal.ubt.report.view.report.SupportedReports;
07: import com.sun.enterprise.cli.framework.CommandException;
08: import com.sun.enterprise.cli.framework.CommandValidationException;
09: import com.sun.enterprise.cli.framework.CLILogger;
10:
11: public class ListUBTReportCommand extends GenericCommand {
12:
13: public void runCommand() throws CommandException,
14: CommandValidationException {
15:
16: try {
17: String[] reportNames = SupportedReports.get();
18: CLILogger.getInstance().printMessage(
19: "------------------------------------------");
20: CLILogger.getInstance().printMessage(
21: "Supported UBT Reports");
22: CLILogger.getInstance().printMessage(
23: "------------------------------------------");
24: for (int i = 0; i < reportNames.length; i++) {
25: CLILogger.getInstance().printMessage(
26: reportNames[i] + "\n");
27: }
28:
29: } catch (Exception ex) {
30: throw new CommandException(
31: getLocalizedString(COMMAND_FAILED), ex);
32: }
33: }
34:
35: }
|