01: // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
02: // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
03: // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
04: // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
05: // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
06: // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
07: // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
08: // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
09: // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
10: // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
11: // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
12: // POSSIBILITY OF SUCH DAMAGE.
13: //
14: // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
15: package com.metaboss.applications.designstudio.userobjects;
16:
17: import com.metaboss.applications.designstudio.Application;
18: import com.metaboss.applications.designstudio.BasePropertiesDialog;
19: import com.metaboss.applications.designstudio.BaseUserObject;
20: import com.metaboss.applications.designstudio.propertiesdialogs.StorageTechnologyPropertiesDialog;
21: import com.metaboss.applications.designstudio.propertiesview.PropertiesTableModel;
22: import com.metaboss.sdlctools.models.metabossmodel.technologylibrarymodel.StorageTechnology;
23:
24: /* StorageTechnology user object */
25:
26: public class StorageTechnologyUserObject extends BaseUserObject {
27: private StorageTechnology mStorageTechnology = null;
28:
29: public StorageTechnologyUserObject(
30: StorageTechnology pStorageTechnology) {
31: super (pStorageTechnology, Application.STORAGE_ICON);
32: mStorageTechnology = pStorageTechnology;
33: }
34:
35: public StorageTechnologyUserObject(
36: StorageTechnology pStorageTechnology, String pCaption,
37: int pMode) {
38: super (pStorageTechnology, pCaption, pMode);
39: mStorageTechnology = pStorageTechnology;
40: }
41:
42: // return object root node captions
43: public String getRootNodeName() {
44: return Application.getString("storagetech_node");
45: }
46:
47: // load object properties into grid control
48: public void loadObjectProperties(PropertiesTableModel pModel)
49: throws Exception {
50: super .loadObjectProperties(pModel);
51: if (pModel == null || mStorageTechnology == null)
52: return;
53:
54: pModel.AddProperty("Implementation Generator Package",
55: mStorageTechnology.getImplementationGeneratorPackage());
56: pModel.AddProperty("Metadata Generator Package",
57: mStorageTechnology.getMetadataGeneratorPackage());
58: }
59:
60: public BasePropertiesDialog getObjectEditor() {
61: return new StorageTechnologyPropertiesDialog();
62: }
63: }
|