01: /*
02: * Copyright 2006-2007 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: package org.romaframework.wizard.command;
17:
18: import org.romaframework.core.config.Configurable;
19:
20: /**
21: * Manager of Wizard Command implementations.
22: *
23: * @author Luca Garulli (luca.garulli@assetdata.it)
24: */
25: public class WizardCommandManager extends Configurable<WizardCommand> {
26: private static WizardCommandManager instance = new WizardCommandManager();
27:
28: public static WizardCommandManager getInstance() {
29: return instance;
30: }
31:
32: /**
33: * Assure to discover the wizard command implementation using lower case name.
34: */
35: @Override
36: public WizardCommand getConfiguration(String objectName) {
37: return super .getConfiguration(objectName);
38: }
39:
40: /**
41: * Assure to register wizard command implementation using lower case name.
42: */
43: @Override
44: public void addConfiguration(String objectName, WizardCommand object) {
45: objectName = objectName.toLowerCase();
46: super.addConfiguration(objectName, object);
47: }
48: }
|