01: /*
02: * Copyright 2006 Luca Garulli (luca.garulli@assetdata.it)
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.romaframework.wizard.command.impl;
18:
19: import org.romaframework.wizard.command.BaseWizardCommand;
20:
21: /**
22: * This wizard create a brand new project. See help to know syntax.
23: *
24: * @author Luca Garulli (luca.garulli@assetdata.it)
25: */
26: public class UpgradeWizard extends BaseWizardCommand {
27: public String getName() {
28: return "upgrade";
29: }
30:
31: public String getParameters() {
32: return "[<module-name>]";
33: }
34:
35: public void execute(String[] iParameters) {
36: if (iParameters.length < 2)
37: syntaxError();
38:
39: // TODO HTTP CLIENT TO DISCOVER MODULES VERSIONS
40: }
41:
42: public void help() {
43: StringBuffer buffer = new StringBuffer();
44: buffer.append(getCommandHelp());
45: buffer
46: .append("\n where: <module-name> is the module you want to upgrade");
47: buffer
48: .append("\n <module-version> is the version you want to upgrade. If not specified the latest one will be taken");
49: buffer.append("\n");
50: buffer.append("\nExamples:");
51: buffer.append("\n");
52: buffer
53: .append("\nroma "
54: + getName()
55: + " * > will upgrade all modules to the latest version available");
56: buffer
57: .append("\nroma "
58: + getName()
59: + " * 1.0rc2 > will upgrade all modules to the version 1.0rc2");
60: buffer
61: .append("\nroma "
62: + getName()
63: + " database-hsqldb > will upgrade only the module 'database-hsqldb' to the latest version available");
64:
65: getIO().getOutput().println(buffer);
66: }
67: }
|