You can subscribe to this list here.
2005 |
Jan
|
Feb
(1) |
Mar
(45) |
Apr
(150) |
May
(145) |
Jun
(150) |
Jul
(79) |
Aug
(313) |
Sep
(160) |
Oct
(309) |
Nov
(115) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(160) |
Feb
(144) |
Mar
(127) |
Apr
(48) |
May
(102) |
Jun
(54) |
Jul
(245) |
Aug
(94) |
Sep
(152) |
Oct
(162) |
Nov
(166) |
Dec
(740) |
2007 |
Jan
(752) |
Feb
(437) |
Mar
(328) |
Apr
(373) |
May
(569) |
Jun
(399) |
Jul
(369) |
Aug
(627) |
Sep
(100) |
Oct
(306) |
Nov
(166) |
Dec
(282) |
2008 |
Jan
(68) |
Feb
(145) |
Mar
(180) |
Apr
(160) |
May
(277) |
Jun
(229) |
Jul
(1188) |
Aug
(51) |
Sep
(97) |
Oct
(99) |
Nov
(95) |
Dec
(170) |
2009 |
Jan
(39) |
Feb
(73) |
Mar
(120) |
Apr
(121) |
May
(104) |
Jun
(262) |
Jul
(57) |
Aug
(171) |
Sep
(131) |
Oct
(88) |
Nov
(64) |
Dec
(83) |
2010 |
Jan
(55) |
Feb
(67) |
Mar
(124) |
Apr
(64) |
May
(130) |
Jun
(75) |
Jul
(164) |
Aug
(64) |
Sep
(44) |
Oct
(17) |
Nov
(43) |
Dec
(31) |
2011 |
Jan
(21) |
Feb
(10) |
Mar
(43) |
Apr
(46) |
May
(52) |
Jun
(71) |
Jul
(7) |
Aug
(16) |
Sep
(51) |
Oct
(14) |
Nov
(33) |
Dec
(15) |
2012 |
Jan
(12) |
Feb
(61) |
Mar
(129) |
Apr
(76) |
May
(70) |
Jun
(52) |
Jul
(29) |
Aug
(41) |
Sep
(32) |
Oct
(23) |
Nov
(38) |
Dec
(26) |
2013 |
Jan
(35) |
Feb
(37) |
Mar
(51) |
Apr
(15) |
May
(52) |
Jun
(15) |
Jul
(23) |
Aug
(21) |
Sep
(46) |
Oct
(69) |
Nov
(57) |
Dec
(26) |
2014 |
Jan
(5) |
Feb
(13) |
Mar
(17) |
Apr
(1) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(16) |
Nov
(8) |
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:58:09
|
Update of /cvsroot/sblim/cmpi-dns/provider/Linux_DnsHintZone/mof In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/Linux_DnsHintZone/mof Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/Linux_DnsHintZone/mof added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:58:09
|
Update of /cvsroot/sblim/cmpi-dns/provider/CIM_ManagedSystemElement In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/CIM_ManagedSystemElement Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/CIM_ManagedSystemElement added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:58:09
|
Update of /cvsroot/sblim/cmpi-dns/provider/Linux_DnsIPAddress In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/Linux_DnsIPAddress Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/Linux_DnsIPAddress added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:58:09
|
Update of /cvsroot/sblim/cmpi-dns/provider In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider Log Message: Directory /cvsroot/sblim/cmpi-dns/provider added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:58:09
|
Update of /cvsroot/sblim/cmpi-dns/provider/CIM_CollectionOfMSEs/mof In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/CIM_CollectionOfMSEs/mof Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/CIM_CollectionOfMSEs/mof added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:58:09
|
Update of /cvsroot/sblim/cmpi-dns/provider/Linux_DnsAddressMatchList/mof In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/Linux_DnsAddressMatchList/mof Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/Linux_DnsAddressMatchList/mof added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:58:09
|
Update of /cvsroot/sblim/cmpi-dns/provider/Linux_DnsAllowTransferACLForZone In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/Linux_DnsAllowTransferACLForZone Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/Linux_DnsAllowTransferACLForZone added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:57:56
|
Update of /cvsroot/sblim/cmpi-dns/provider/Linux_DnsAddressMatchListOfService/mof In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/Linux_DnsAddressMatchListOfService/mof Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/Linux_DnsAddressMatchListOfService/mof added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:57:56
|
Update of /cvsroot/sblim/cmpi-dns/provider/Linux_DnsAllowNotifyACLForZone In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/Linux_DnsAllowNotifyACLForZone Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/Linux_DnsAllowNotifyACLForZone added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:57:56
|
Update of /cvsroot/sblim/cmpi-dns/provider/Linux_DnsAddressMatchListOfService In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/Linux_DnsAddressMatchListOfService Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/Linux_DnsAddressMatchListOfService added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:57:51
|
Update of /cvsroot/sblim/cmpi-dns/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/model Log Message: Directory /cvsroot/sblim/cmpi-dns/model added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:57:51
|
Update of /cvsroot/sblim/cmpi-dns/provider/CIM_ConcreteJob/mof In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/CIM_ConcreteJob/mof Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/CIM_ConcreteJob/mof added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:57:50
|
Update of /cvsroot/sblim/cmpi-dns/provider/CIM_CollectionOfMSEs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19906/provider/CIM_CollectionOfMSEs Log Message: Directory /cvsroot/sblim/cmpi-dns/provider/CIM_CollectionOfMSEs added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:56:39
|
Update of /cvsroot/sblim/cmpi-dns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19506/cmpi-dns Log Message: Directory /cvsroot/sblim/cmpi-dns added to the repository |
Update of /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns/gui/wizard/panels In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15299/jswing/org/sblim/wbemsmt/dns/gui/wizard/panels Added Files: ResourceRecordWizardData.java ResourceRecordWizardPage1.java ZoneWizardPage21.java ZoneWizardPage01.java ZoneWizardPage2.java ZoneWizardPage3c.java ZoneWizardPage5.java ACLWizardPage2.java ZoneWizardPage31.java ResourceRecordWizardPage5.java ZoneWizardPage3b.java ZoneWizardPage3a.java ACLWizardPage3.java ACLWizardPage1.java ZoneWizardData.java ResourceRecordWizardPage2.java ACLWizardData.java ZoneWizardPage1.java Log Message: WBEM-SMT DNS EUI component. First initial upload. --- NEW FILE: ZoneWizardPage1.java --- /** * ZoneWizardPage1.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Bert Lange <la...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> * Fernando Aires <fa...@br...> **/ /* * Created on Apr 4, 2005 * */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.BoxLayout; import javax.swing.ButtonGroup; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JRadioButton; import org.sblim.wbemsmt.dns.bl.fco.DNSZone; /** * Author L123394 * */ public class ZoneWizardPage1 extends JPanel { private JRadioButton jRadioButton = null; private JRadioButton jRadioButton1 = null; private JRadioButton jRadioButton3 = null; private JRadioButton jRadioButton4 = null; private JRadioButton jRadioButton5 = null; private JRadioButton jRadioButton6 = null; private ButtonGroup bGroup = new ButtonGroup(); private JPanel jPanel = null; private JPanel jPanel1 = null; private JPanel jPanel2 = null; private JLabel jLabel = null; /** * This is the default constructor */ public ZoneWizardPage1() { super(); initialize(); } public ButtonGroup getBGroup(){ return this.bGroup; } /** * This method initializes this * * @return void */ private void initialize() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.add(getJPanel(), null); this.add(getJPanel1(), null); this.add(getJPanel2(), null); bGroup.add(getJRadioButton4()); bGroup.add(getJRadioButton3()); bGroup.add(getJRadioButton1()); bGroup.add(getJRadioButton()); bGroup.add(getJRadioButton5()); bGroup.add(getJRadioButton6()); } /** * This method initializes jRadioButton * * @return javax.swing.JRadioButton */ private JRadioButton getJRadioButton() { if (jRadioButton == null) { jRadioButton = new JRadioButton(); jRadioButton.setText(DNSZone.CIM_VALUEMAP_TYPE[5]); jRadioButton.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); jRadioButton.setName(DNSZone.CIM_VALUEMAP_TYPE[5]); } return jRadioButton; } /** * This method initializes jRadioButton1 * * @return javax.swing.JRadioButton */ private JRadioButton getJRadioButton1() { if (jRadioButton1 == null) { jRadioButton1 = new JRadioButton(); jRadioButton1.setText(DNSZone.CIM_VALUEMAP_TYPE[4]); jRadioButton1.setName(DNSZone.CIM_VALUEMAP_TYPE[4]); jRadioButton1.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); } return jRadioButton1; } /** * This method initializes jRadioButton3 * * @return javax.swing.JRadioButton */ private JRadioButton getJRadioButton3() { if (jRadioButton3 == null) { jRadioButton3 = new JRadioButton(); jRadioButton3.setText(DNSZone.CIM_VALUEMAP_TYPE[2]); jRadioButton3.setName(DNSZone.CIM_VALUEMAP_TYPE[2]); jRadioButton3.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); } return jRadioButton3; } /** * This method initializes jRadioButton4 * * @return javax.swing.JRadioButton */ private JRadioButton getJRadioButton4() { if (jRadioButton4 == null) { jRadioButton4 = new JRadioButton(); jRadioButton4.setText(DNSZone.CIM_VALUEMAP_TYPE[1]); jRadioButton4.setName(DNSZone.CIM_VALUEMAP_TYPE[1]); jRadioButton4.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); } return jRadioButton4; } /** * This method initializes jRadioButton5 * * @return javax.swing.JRadioButton */ private JRadioButton getJRadioButton5() { if (jRadioButton5 == null) { jRadioButton5 = new JRadioButton(); jRadioButton5.setText(DNSZone.CIM_VALUEMAP_TYPE[3]); jRadioButton5.setName(DNSZone.CIM_VALUEMAP_TYPE[3]); jRadioButton5.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); } return jRadioButton5; } /** * This method initializes jRadioButton5 * * @return javax.swing.JRadioButton */ private JRadioButton getJRadioButton6() { if (jRadioButton6 == null) { jRadioButton6 = new JRadioButton(); jRadioButton6.setText("Reverse"); jRadioButton6.setName("Reverse"); jRadioButton6.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); } return jRadioButton6; } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); FlowLayout flowLayout5 = new FlowLayout(); jPanel = new JPanel(); jPanel.setLayout(flowLayout5); jPanel.setPreferredSize(new java.awt.Dimension(339,26)); jLabel.setText("Specify the type of the new Zone"); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); flowLayout5.setAlignment(java.awt.FlowLayout.LEFT); flowLayout5.setHgap(5); jPanel.add(jLabel, null); } return jPanel; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { GridLayout gridLayout4 = new GridLayout(); jPanel1 = new JPanel(); jPanel1.setLayout(gridLayout4); gridLayout4.setRows(6); gridLayout4.setHgap(0); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), "Select a type", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12), java.awt.Color.black)); jPanel1.add(getJRadioButton4(), null); jPanel1.add(getJRadioButton3(), null); jPanel1.add(getJRadioButton1(), null); jPanel1.add(getJRadioButton(), null); jPanel1.add(getJRadioButton5(), null); jPanel1.add(getJRadioButton6(), null); } return jPanel1; } /** * This method initializes jPanel2 * * @return javax.swing.JPanel */ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); } return jPanel2; } } --- NEW FILE: ZoneWizardPage01.java --- /** * ZoneWizardPage1.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Bert Lange <la...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> **/ /* * Created on Aug 13, 2005, ceron */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.BoxLayout; import javax.swing.ButtonGroup; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JRadioButton; /** * Author ceron * */ public class ZoneWizardPage01 extends JPanel { private JRadioButton jRadioButton6 = null; private ButtonGroup bGroup = new ButtonGroup(); private JPanel jPanel = null; private JPanel jPanel1 = null; private JPanel jPanel2 = null; private JLabel jLabel = null; private JRadioButton jRadioButton = null; private JRadioButton jRadioButton1 = null; /** * This is the default constructor */ public ZoneWizardPage01() { super(); initialize(); } public ButtonGroup getBGroup(){ return this.bGroup; } /** * This method initializes this * * @return void */ private void initialize() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.add(getJPanel(), null); this.add(getJPanel1(), null); this.add(getJPanel2(), null); bGroup.add(getJRadioButton1()); bGroup.add(getJRadioButton()); bGroup.add(getJRadioButton6()); } /** * This method initializes jRadioButton5 * * @return javax.swing.JRadioButton */ public JRadioButton getJRadioButton6() { if (jRadioButton6 == null) { jRadioButton6 = new JRadioButton(); jRadioButton6.setText("Create reverse zone for all master zones"); jRadioButton6.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); } return jRadioButton6; } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); FlowLayout flowLayout5 = new FlowLayout(); jPanel = new JPanel(); jPanel.setLayout(flowLayout5); jPanel.setPreferredSize(new java.awt.Dimension(339,26)); jLabel.setText("Specify the wizard type"); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); flowLayout5.setAlignment(java.awt.FlowLayout.LEFT); flowLayout5.setHgap(5); jPanel.add(jLabel, null); } return jPanel; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { GridLayout gridLayout4 = new GridLayout(); jPanel1 = new JPanel(); jPanel1.setLayout(gridLayout4); gridLayout4.setRows(6); gridLayout4.setHgap(0); jPanel1.add(getJRadioButton1(), null); jPanel1.add(getJRadioButton(), null); jPanel1.add(getJRadioButton6(), null); } return jPanel1; } /** * This method initializes jPanel2 * * @return javax.swing.JPanel */ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); } return jPanel2; } /** * This method initializes jRadioButton * * @return javax.swing.JRadioButton */ public JRadioButton getJRadioButton() { if (jRadioButton == null) { jRadioButton = new JRadioButton(); jRadioButton.setText("Create reverse zone for one master zone"); jRadioButton.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); } return jRadioButton; } /** * This method initializes jRadioButton1 * * @return javax.swing.JRadioButton */ public JRadioButton getJRadioButton1() { if (jRadioButton1 == null) { jRadioButton1 = new JRadioButton(); jRadioButton1.setText("Create reverse zone from resource records"); jRadioButton1.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); } return jRadioButton1; } } --- NEW FILE: ZoneWizardPage3b.java --- /** * ZoneWizardPage3b.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Bert Lange <la...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> * Fernando Aires <fa...@br...> **/ /* * Created on 05.04.2005 * */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; /** * Author L123394 * */ public class ZoneWizardPage3b extends JPanel { private JPanel jPanel = null; private JPanel jPanel1 = null; private JLabel jLabel = null; private JLabel jLabel1 = null; private JTextField jTextField = null; private JLabel jLabel2 = null; private JTextField jTextField1 = null; private JPanel jPanel4 = null; private JLabel jLabel3 = null; private JTextField jTextField2 = null; /** * This is the default constructor */ public ZoneWizardPage3b() { super(); initialize(); } /** * This method initializes this * * @return void */ private void initialize() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.setPreferredSize(new java.awt.Dimension(242,112)); this.add(getJPanel1(), null); this.add(getJPanel(), null); this.add(getJPanel4(), null); } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel3 = new JLabel(); GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); GridBagConstraints gridBagConstraints9 = new GridBagConstraints(); GridBagConstraints gridBagConstraints8 = new GridBagConstraints(); GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); GridBagConstraints gridBagConstraints6 = new GridBagConstraints(); jPanel = new JPanel(); jPanel.setLayout(new GridBagLayout()); jPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), "Name Server", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12), java.awt.Color.black)); jLabel2 = new JLabel(); jLabel2.setText("Name Server"); jLabel1 = new JLabel(); jLabel1.setText("IP Address "); jLabel1.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); gridBagConstraints6.gridx = 0; gridBagConstraints6.gridy = 0; gridBagConstraints6.ipadx = 0; gridBagConstraints6.ipady = 0; gridBagConstraints6.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints6.insets = new java.awt.Insets(5,5,5,5); gridBagConstraints7.gridx = 1; gridBagConstraints7.gridy = 0; gridBagConstraints7.weightx = 1.0; gridBagConstraints7.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints7.ipadx = 0; gridBagConstraints7.ipady = 0; gridBagConstraints7.insets = new java.awt.Insets(5,5,5,5); gridBagConstraints8.gridx = 0; gridBagConstraints8.gridy = 1; gridBagConstraints8.ipadx = 0; gridBagConstraints8.ipady = 0; gridBagConstraints8.insets = new java.awt.Insets(5,5,5,5); gridBagConstraints8.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints9.gridx = 1; gridBagConstraints9.gridy = 1; gridBagConstraints9.weightx = 1.0; gridBagConstraints9.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints9.ipadx = 0; gridBagConstraints9.ipady = 0; gridBagConstraints9.insets = new java.awt.Insets(5,5,5,5); jLabel2.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); gridBagConstraints2.gridx = 0; gridBagConstraints2.gridy = 2; gridBagConstraints2.insets = new java.awt.Insets(5,5,5,5); jLabel3.setText("Contact E-mail Address"); jLabel3.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); gridBagConstraints3.gridx = 1; gridBagConstraints3.gridy = 2; gridBagConstraints3.weightx = 1.0; gridBagConstraints3.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints3.insets = new java.awt.Insets(5,5,5,5); jPanel.add(jLabel2, gridBagConstraints6); jPanel.add(getJTextField1(), gridBagConstraints7); jPanel.add(jLabel1, gridBagConstraints8); jPanel.add(getJTextField(), gridBagConstraints9); jPanel.add(jLabel3, gridBagConstraints2); jPanel.add(getJTextField2(), gridBagConstraints3); } return jPanel; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { FlowLayout flowLayout5 = new FlowLayout(); jLabel = new JLabel(); jPanel1 = new JPanel(); jPanel1.setLayout(flowLayout5); jLabel.setText("Please specify the Name Server"); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); jPanel1.setPreferredSize(new java.awt.Dimension(339,26)); flowLayout5.setAlignment(java.awt.FlowLayout.LEFT); jPanel1.add(jLabel, null); } return jPanel1; } /** * This method initializes jTextField * * @return javax.swing.JTextField */ public JTextField getJTextField() { if (jTextField == null) { jTextField = new JTextField(30); jTextField.setName("ipAddress"); } return jTextField; } /** * This method initializes jTextField1 * * @return javax.swing.JTextField */ public JTextField getJTextField1() { if (jTextField1 == null) { jTextField1 = new JTextField(30); jTextField1.setName("serverName"); } return jTextField1; } /** * This method initializes jPanel4 * * @return javax.swing.JPanel */ private JPanel getJPanel4() { if (jPanel4 == null) { jPanel4 = new JPanel(); jPanel4.setPreferredSize(new java.awt.Dimension(10,120)); } return jPanel4; } /** * This method initializes jTextField2 * * @return javax.swing.JTextField */ public JTextField getJTextField2() { if (jTextField2 == null) { jTextField2 = new JTextField(); } return jTextField2; } } --- NEW FILE: ResourceRecordWizardPage1.java --- /** * ResourceRecordWizardPage1.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Fernando Aires <fa...@br...> * * Contributors: **/ /* * Created on 07.04.2005 * */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.BoxLayout; import javax.swing.DefaultListModel; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import org.sblim.wbemsmt.dns.bl.fco.DNSResourceRecord; /** * Author L123394 * */ public class ResourceRecordWizardPage1 extends JPanel{ private JPanel jPanel = null; private JPanel jPanel1 = null; private JLabel jLabel = null; String[] sl = new String[DNSResourceRecord.CIM_VALUEMAP_TYPE_DISPLAY.length-1]; private DNSResourceRecord record = null; private JList jList = null; private DefaultListModel defaultListModel = null; // @jve:decl-index=0: private JScrollPane jScrollPane = null; private JPanel jPanel2 = null; /** * This is the default constructor */ public ResourceRecordWizardPage1() { super(); initialize(); } /** * This method initializes this * * @return void */ private void initialize() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.add(getJPanel(), null); this.add(getJPanel1(), null); this.add(getJPanel2(), null); } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); FlowLayout flowLayout5 = new FlowLayout(); jPanel = new JPanel(); jPanel.setLayout(flowLayout5); jPanel.setPreferredSize(new java.awt.Dimension(20,26)); flowLayout5.setAlignment(java.awt.FlowLayout.LEFT); jLabel.setText("Specify the type of the new Resource Record"); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); jPanel.add(jLabel, null); } return jPanel; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { GridBagConstraints gridBagConstraints10 = new GridBagConstraints(); jPanel1 = new JPanel(); jPanel1.setLayout(new GridBagLayout()); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), "Select a type", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12), java.awt.Color.black)); jPanel1.setPreferredSize(new java.awt.Dimension(100,100)); gridBagConstraints10.weightx = 1.0; gridBagConstraints10.weighty = 1.0; gridBagConstraints10.fill = java.awt.GridBagConstraints.BOTH; jPanel1.add(getJScrollPane(), gridBagConstraints10); } return jPanel1; } /** * This method initializes jList * * @return javax.swing.JList */ public JList getJList() { if (jList == null) { jList = new JList(); jList.setModel(getDefaultListModel()); jList.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); jList.setName("typeRR"); jList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); System.arraycopy(DNSResourceRecord.CIM_VALUEMAP_TYPE_DISPLAY,1,sl,0,sl.length); jList.setListData(sl); } return jList; } /** * This method initializes defaultListModel * * @return javax.swing.DefaultListModel */ private DefaultListModel getDefaultListModel() { if (defaultListModel == null) { defaultListModel = new DefaultListModel(); defaultListModel.add(0, "Host (A)"); defaultListModel.add(1, "MailServer (MX)"); defaultListModel.add(2, "NameServer (NS)"); } return defaultListModel; } /** * This method initializes jScrollPane * * @return javax.swing.JScrollPane */ private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getJList()); } return jScrollPane; } /** * This method initializes jPanel2 * * @return javax.swing.JPanel */ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); } return jPanel2; } } --- NEW FILE: ACLWizardPage2.java --- /** * ACLWizardPage2.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Fernando Aires <fa...@br...> * * Contributors: **/ /* * Created on 26/07/2005 * */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.BoxLayout; import javax.swing.DefaultListModel; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; public class ACLWizardPage2 extends JPanel { private ACLWizardPage2 me = null; private JPanel jPanel = null; private JPanel jPanel1 = null; private JPanel jPanel2 = null; private JButton jButton = null; private JButton jButton1 = null; private JTextField jTextField = null; private JScrollPane jScrollPane = null; private JLabel jLabel = null; private JList jList = null; private DefaultListModel defaultListModel = null; // @jve:decl-index=0: /** * This is the default constructor */ public ACLWizardPage2() { super(); initialize(); } // public boolean validateAddressList(String[] l){ // // String s = null; // String[] t = null; // // for (int i=0;i<l.length;i++){ // s = l[i]; // t = s.split("\\."); // if(t.length!=4){ // if(s.indexOf("::")<0) return false; // } // } // return true; // } public boolean validateIP(String ip) { String[] t = null; t = ip.split("\\."); if(t.length!=4){ if(ip.indexOf(":")<0) return false; } return true; } public JPanel getNextWizardJPanel() { return new ACLWizardPage3(); } /** * This method initializes this * * @return void */ private void initialize() { this.me = this; this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.setPreferredSize(new java.awt.Dimension(100,136)); this.add(getJPanel(), null); this.add(getJPanel1(), null); this.add(getJPanel2(), null); } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); jPanel = new JPanel(); jPanel.setPreferredSize(new java.awt.Dimension(20,26)); jLabel.setText("Add Addresses to ACL"); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); jLabel.setPreferredSize(new java.awt.Dimension(257,15)); jPanel.add(jLabel, null); } return jPanel; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { GridBagConstraints gridBagConstraints11 = new GridBagConstraints(); GridBagConstraints gridBagConstraints10 = new GridBagConstraints(); GridBagConstraints gridBagConstraints9 = new GridBagConstraints(); GridBagConstraints gridBagConstraints8 = new GridBagConstraints(); jPanel1 = new JPanel(); jPanel1.setLayout(new GridBagLayout()); jPanel1.setPreferredSize(new java.awt.Dimension(100,100)); gridBagConstraints8.gridx = 1; gridBagConstraints8.gridy = 0; gridBagConstraints8.insets = new java.awt.Insets(5,5,5,5); gridBagConstraints8.anchor = java.awt.GridBagConstraints.NORTH; gridBagConstraints9.gridx = 1; gridBagConstraints9.gridy = 1; gridBagConstraints9.insets = new java.awt.Insets(5,5,5,5); gridBagConstraints9.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints10.gridx = 0; gridBagConstraints10.gridy = 1; gridBagConstraints10.weightx = 1.0; gridBagConstraints10.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints10.insets = new java.awt.Insets(5,5,5,5); gridBagConstraints11.gridx = 0; gridBagConstraints11.gridy = 0; gridBagConstraints11.weightx = 1.0; gridBagConstraints11.weighty = 1.0; gridBagConstraints11.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints11.insets = new java.awt.Insets(5,5,5,5); jPanel1.add(getJButton(), gridBagConstraints8); jPanel1.add(getJButton1(), gridBagConstraints9); jPanel1.add(getJTextField(), gridBagConstraints10); jPanel1.add(getJScrollPane(), gridBagConstraints11); } return jPanel1; } /** * This method initializes jPanel2 * * @return javax.swing.JPanel */ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); jPanel2.setPreferredSize(new java.awt.Dimension(10,10)); } return jPanel2; } /** * This method initializes jButton * * @return javax.swing.JButton */ private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setText("Remove"); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { while (jList.getSelectedIndex()>=0 ){ ((DefaultListModel) jList.getModel()).removeElementAt(jList.getSelectedIndex()); } } }); } return jButton; } /** * This method initializes jButton1 * * @return javax.swing.JButton */ private JButton getJButton1() { if (jButton1 == null) { jButton1 = new JButton(); jButton1.setText("Add"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { if(jTextField.getText()!=null) { if (!validateIP(jTextField.getText())){ JOptionPane.showMessageDialog(me, "Your input is not valid!", "ERROR", JOptionPane.ERROR_MESSAGE); return; } DefaultListModel list = (DefaultListModel) jList.getModel(); if(!list.contains(jTextField.getText())) list.addElement(jTextField.getText()); //((DefaultListModel) jList.getModel()).addElement(jTextField.getText()); jTextField.setText(null); } } }); } return jButton1; } /** * This method initializes jTextField * * @return javax.swing.JTextField */ private JTextField getJTextField() { if (jTextField == null) { jTextField = new JTextField(); } return jTextField; } /** * This method initializes jScrollPane * * @return javax.swing.JScrollPane */ private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setPreferredSize(new java.awt.Dimension(3,50)); jScrollPane.setViewportView(getJList()); } return jScrollPane; } /** * This method initializes jList * * @return javax.swing.JList */ public JList getJList() { if (jList == null) { jList = new JList(); jList.setModel(getDefaultListModel()); } return jList; } /** * This method initializes defaultListModel * * @return javax.swing.DefaultListModel */ private DefaultListModel getDefaultListModel() { if (defaultListModel == null) { defaultListModel = new DefaultListModel(); } return defaultListModel; } } --- NEW FILE: ZoneWizardPage31.java --- /** * ZoneWizardPage31.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on Aug 13, 2005, ceron */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.FlowLayout; import java.util.ArrayList; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import org.sblim.wbem.client.CIMClient; import org.sblim.wbemsmt.dns.bl.fco.DNSResourceRecord; import org.sblim.wbemsmt.dns.gui.ResourceRecordListComponent; import javax.swing.JScrollPane; import javax.swing.JList; import java.awt.GridBagLayout; import java.awt.GridBagConstraints; import javax.swing.DefaultListModel; /** * Author ceron * */ public class ZoneWizardPage31 extends JPanel { private JPanel jPanel = null; private JPanel jPanel1 = null; private JPanel jPanel2 = null; private JLabel jLabel = null; private CIMClient cimClient = null; private JScrollPane jScrollPane = null; private JList jList = null; private DefaultListModel defaultListModel = null; // @jve:decl-index=0: /** * This is the default constructor */ public ZoneWizardPage31(CIMClient cc) { super(); this.cimClient = cc; initialize(); } /** * This method initializes this * * @return void */ private void initialize() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.add(getJPanel(), null); this.add(getJPanel1(), null); this.add(getJPanel2(), null); ArrayList a = DNSResourceRecord.enumerateInstances(this.cimClient); ResourceRecordListComponent rrlc = null; DefaultListModel model = (DefaultListModel) getJList().getModel(); try{ for(int i=0; i<a.size();i++){ DNSResourceRecord rr = (DNSResourceRecord) a.get(i); if(rr.getType().shortValue()==DNSResourceRecord.CIM_TYPE_A){ rrlc = new ResourceRecordListComponent(rr); model.addElement(rrlc); } } }catch(Exception ex){ System.err.println("Error retrieving zone name"); } } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); FlowLayout flowLayout5 = new FlowLayout(); jPanel = new JPanel(); jPanel.setLayout(flowLayout5); jPanel.setPreferredSize(new java.awt.Dimension(339,26)); jLabel.setText("Select resource records"); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); flowLayout5.setAlignment(java.awt.FlowLayout.LEFT); flowLayout5.setHgap(5); jPanel.add(jLabel, null); } return jPanel; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); jPanel1 = new JPanel(); jPanel1.setLayout(new GridBagLayout()); gridBagConstraints1.gridx = 0; gridBagConstraints1.gridy = 0; gridBagConstraints1.weightx = 1.0; gridBagConstraints1.weighty = 1.0; gridBagConstraints1.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints1.ipadx = 41; gridBagConstraints1.ipady = -104; gridBagConstraints1.insets = new java.awt.Insets(20,10,20,10); jPanel1.add(getJScrollPane(), gridBagConstraints1); } return jPanel1; } /** * This method initializes jPanel2 * * @return javax.swing.JPanel */ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); } return jPanel2; } /** * This method initializes jScrollPane * * @return javax.swing.JScrollPane */ private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getJList()); } return jScrollPane; } /** * This method initializes jList * * @return javax.swing.JList */ public JList getJList() { if (jList == null) { jList = new JList(); jList.setModel(getDefaultListModel()); } return jList; } /** * This method initializes defaultListModel * * @return javax.swing.DefaultListModel */ private DefaultListModel getDefaultListModel() { if (defaultListModel == null) { defaultListModel = new DefaultListModel(); } return defaultListModel; } } --- NEW FILE: ResourceRecordWizardPage5.java --- /** * ResourceRecordWizardPage5.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Fernando Aires <fa...@br...> * * Contributors: **/ /* * Created on 07.04.2005 * */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextArea; import org.sblim.wbemsmt.dns.bl.fco.DNSResourceRecord; /** * Author L123394 * */ public class ResourceRecordWizardPage5 extends JPanel { private JPanel jPanel = null; private JPanel jPanel1 = null; private JPanel jPanel2 = null; private JLabel jLabel = null; private JTextArea jTextArea = null; private DNSResourceRecord record = null; /** * This is the default constructor */ public ResourceRecordWizardPage5() { super(); initialize(); } /*public ResourceRecordWizardPage5(DNSResourceRecord record) { super(); this.record = record; initialize(); }*/ /** * This method initializes this * * @return void */ private void initialize() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.add(getJPanel(), null); this.add(getJPanel1(), null); this.add(getJPanel2(), null); } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { FlowLayout flowLayout1 = new FlowLayout(); jLabel = new JLabel(); jPanel = new JPanel(); jPanel.setLayout(flowLayout1); jPanel.setPreferredSize(new java.awt.Dimension(339,26)); jLabel.setText("A new Resource Record will be created with the following values "); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); flowLayout1.setAlignment(java.awt.FlowLayout.LEFT); jPanel.add(jLabel, null); } return jPanel; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { GridBagConstraints gridBagConstraints18 = new GridBagConstraints(); jPanel1 = new JPanel(); jPanel1.setLayout(new GridBagLayout()); jPanel1.setPreferredSize(new java.awt.Dimension(310,80)); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), "Overview", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12), java.awt.Color.black)); gridBagConstraints18.gridx = 0; gridBagConstraints18.gridy = 0; gridBagConstraints18.weightx = 1.0; gridBagConstraints18.weighty = 1.0; gridBagConstraints18.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints18.insets = new java.awt.Insets(5,5,5,5); jPanel1.add(getJTextArea(), gridBagConstraints18); } return jPanel1; } /** * This method initializes jPanel2 * * @return javax.swing.JPanel */ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); jPanel2.setPreferredSize(new java.awt.Dimension(10,10)); } return jPanel2; } /** * This method initializes jTextArea * * @return javax.swing.JTextArea */ public JTextArea getJTextArea() { if (jTextArea == null) { jTextArea = new JTextArea(); jTextArea.setEditable(false); jTextArea.setPreferredSize(new java.awt.Dimension(0,160)); jTextArea.setBackground(new java.awt.Color(204,204,204)); jTextArea.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED))); } return jTextArea; } /*private String buildText() { StringBuffer sbText = new StringBuffer(); String na = "= n/a"+System.getProperty("line.separator"); try { sbText.append("Name "+"\t\t\t"); if (record.getName() != null) sbText.append("= "+record.getName()+System.getProperty("line.separator")); else sbText.append(na); sbText.append("Zone Name"+"\t\t\t"); if (record.getZoneName()!= null) sbText.append("= "+record.getZoneName()+System.getProperty("line.separator")); else sbText.append(na); sbText.append("Type"+"\t\t\t"); if (record.getTypeString()!= null) sbText.append("= "+record.getTypeString()+System.getProperty("line.separator")); else sbText.append(na); sbText.append("Value"+"\t\t\t"); if (record.getValue()!= null) sbText.append("= "+record.getValue()+System.getProperty("line.separator")); else sbText.append(na); sbText.append("Description"+"\t\t\t"); if (record.getDescription()!= null) sbText.append("= "+record.getDescription()+System.getProperty("line.separator")); else sbText.append(na); } catch (Exception nfe) { System.out.println("caught exception: "+nfe); nfe.printStackTrace(); } return sbText.toString(); }*/ } --- NEW FILE: ACLWizardPage3.java --- /** * ACLWizardPage3.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Fernando Aires <fa...@br...> * * Contributors: **/ /* * Created on 26/07/2005 * */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; public class ACLWizardPage3 extends JPanel { private JPanel jPanel = null; private JPanel jPanel1 = null; private JPanel jPanel2 = null; private JLabel jLabel = null; private JTextArea jTextArea = null; private JScrollPane jScrollPane = null; /** * This is the default constructor */ public ACLWizardPage3() { super(); initialize(); } public void cleanUP() { } // do nothing public boolean isLast() { return true; } public void saveData() { // aires TODO create it } public boolean isValid() { return true; } public JPanel getNextWizardJPanel() { return null; } /** * This method initializes this * * @return void */ private void initialize() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.setPreferredSize(new java.awt.Dimension(100,136)); this.add(getJPanel(), null); this.add(getJPanel1(), null); this.add(getJPanel2(), null); } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); jPanel = new JPanel(); jPanel.setPreferredSize(new java.awt.Dimension(20,26)); jLabel.setText("A new ACL will be created with the following values"); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); jLabel.setPreferredSize(new java.awt.Dimension(257,15)); jPanel.add(jLabel, null); } return jPanel; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { GridBagConstraints gridBagConstraints11 = new GridBagConstraints(); jPanel1 = new JPanel(); jPanel1.setLayout(new GridBagLayout()); jPanel1.setPreferredSize(new java.awt.Dimension(100,100)); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), "Overview", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12), java.awt.Color.black)); gridBagConstraints11.weightx = 1.0; gridBagConstraints11.weighty = 1.0; gridBagConstraints11.fill = java.awt.GridBagConstraints.BOTH; jPanel1.add(getJScrollPane(), gridBagConstraints11); } return jPanel1; } /** * This method initializes jPanel2 * * @return javax.swing.JPanel */ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); jPanel2.setPreferredSize(new java.awt.Dimension(10,10)); } return jPanel2; } /** * This method initializes jTextArea * * @return javax.swing.JTextArea */ public JTextArea getJTextArea() { if (jTextArea == null) { jTextArea = new JTextArea(); jTextArea.setEditable(false); jTextArea.setBackground(new java.awt.Color(204,204,204)); jTextArea.setPreferredSize(new java.awt.Dimension(0,0)); jTextArea.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED), "", javax.swing.border.TitledBorder.LEADING, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.black)); } return jTextArea; } /** * This method initializes jScrollPane * * @return javax.swing.JScrollPane */ private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getJTextArea()); } return jScrollPane; } } --- NEW FILE: ResourceRecordWizardPage2.java --- /** * ResourceRecordWizardPage2.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Fernando Aires <fa...@br...> * * Contributors: **/ /* * Created on 07.04.2005 * */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import org.sblim.wbemsmt.dns.bl.fco.DNSResourceRecord; /** * Author L123394 * */ public class ResourceRecordWizardPage2 extends JPanel { private JPanel jPanel = null; private JPanel jPanel1 = null; private JPanel jPanel2 = null; private JLabel jLabel = null; private DNSResourceRecord record = null; private JLabel jLabel1 = null; private JTextField jTextField = null; private JLabel jLabel2 = null; private JTextField jTextField1 = null; /** * This is the default constructor */ public ResourceRecordWizardPage2() { super(); initialize(); } public ResourceRecordWizardPage2(DNSResourceRecord record) { super(); this.record = record; initialize(); } /** * This method initializes this * * @return void */ private void initialize() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.add(getJPanel(), null); this.add(getJPanel1(), null); this.add(getJPanel2(), null); } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); FlowLayout flowLayout1 = new FlowLayout(); jPanel = new JPanel(); jPanel.setLayout(flowLayout1); jPanel.setPreferredSize(new java.awt.Dimension(339,26)); flowLayout1.setAlignment(java.awt.FlowLayout.LEFT); jLabel.setText("Specify settings for the new Resource Record"); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); jPanel.add(jLabel, null); } return jPanel; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { jLabel2 = new JLabel(); jLabel1 = new JLabel(); GridBagConstraints gridBagConstraints14 = new GridBagConstraints(); GridBagConstraints gridBagConstraints15 = new GridBagConstraints(); GridBagConstraints gridBagConstraints16 = new GridBagConstraints(); GridBagConstraints gridBagConstraints17 = new GridBagConstraints(); jPanel1 = new JPanel(); jPanel1.setLayout(new GridBagLayout()); jPanel1.setPreferredSize(new java.awt.Dimension(310,100)); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), "Specify values", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12), java.awt.Color.black)); gridBagConstraints14.gridx = 0; gridBagConstraints14.gridy = 0; gridBagConstraints14.insets = new java.awt.Insets(5,5,5,5); jLabel1.setText("Name"); jLabel1.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); gridBagConstraints15.gridx = 1; gridBagConstraints15.gridy = 0; gridBagConstraints15.weightx = 1.0; gridBagConstraints15.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints15.insets = new java.awt.Insets(5,5,5,5); gridBagConstraints16.gridx = 0; gridBagConstraints16.gridy = 1; gridBagConstraints16.insets = new java.awt.Insets(5,5,5,5); jLabel2.setText("Value"); jLabel2.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); gridBagConstraints17.gridx = 1; gridBagConstraints17.gridy = 1; gridBagConstraints17.weightx = 1.0; gridBagConstraints17.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints17.insets = new java.awt.Insets(5,5,5,5); jPanel1.add(jLabel1, gridBagConstraints14); jPanel1.add(getJTextField(), gridBagConstraints15); jPanel1.add(jLabel2, gridBagConstraints16); jPanel1.add(getJTextField1(), gridBagConstraints17); } return jPanel1; } /** * This method initializes jPanel2 * * @return javax.swing.JPanel */ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); jPanel2.setPreferredSize(new java.awt.Dimension(10,50)); } return jPanel2; } /** * This method initializes jTextField * * @return javax.swing.JTextField */ public JTextField getJTextField() { if (jTextField == null) { jTextField = new JTextField(); jTextField.setName("settingName"); // jTextField.getDocument().addDocumentListener(this); } return jTextField; } /** * This method initializes jTextField1 * * @return javax.swing.JTextField */ public JTextField getJTextField1() { if (jTextField1 == null) { jTextField1 = new JTextField(); jTextField1.setName("settingValue"); // jTextField1.getDocument().addDocumentListener(this); } return jTextField1; } /* public void changedUpdate(DocumentEvent e) { System.out.println("changed"); if (testInput(jTextField.getText(), jTextField1.getText())) { setNextButton(true); } else setNextButton(false); } public void insertUpdate(DocumentEvent e) { System.out.println("insert"); if (testInput(jTextField.getText(), jTextField1.getText())) { setNextButton(true); } else setNextButton(false); } public void removeUpdate(DocumentEvent e) { System.out.println("remove"); if (testInput(jTextField.getText(), jTextField1.getText())) { setNextButton(true); } else setNextButton(false); } private boolean testInput(String strTest1, String strTest2) { if (strTest1.trim().length() > 0 && strTest2.trim().length() > 0) return true; return false; } */ } --- NEW FILE: ZoneWizardPage5.java --- /** * ZoneWizardPage5.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Bert Lange <la...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> * Fernando Aires <fa...@br...> **/ /* * Created on 05.04.2005 * */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextArea; /** * Author L123394 * */ public class ZoneWizardPage5 extends JPanel { private JPanel jPanel = null; private JLabel jLabel = null; private JTextArea jTextArea = null; private JPanel jPanel1 = null; private JPanel jPanel2 = null; public ZoneWizardPage5() { super(); initialize(); } /** * This method initializes this * * @return void */ private void initialize() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.add(getJPanel(), null); this.add(getJPanel2(), null); this.add(getJPanel1(), null); } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); FlowLayout flowLayout14 = new FlowLayout(); jPanel = new JPanel(); jPanel.setLayout(flowLayout14); flowLayout14.setAlignment(java.awt.FlowLayout.LEFT); jLabel.setText("A new Zone will be created with the following values"); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); jPanel.setPreferredSize(new java.awt.Dimension(239,26)); jPanel.add(jLabel, null); } return jPanel; } /** * This method initializes jTextArea * * @return javax.swing.JTextArea */ public JTextArea getJTextArea() { if (jTextArea == null) { jTextArea = new JTextArea(); jTextArea.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED))); jTextArea.setBackground(new java.awt.Color(204,204,204)); jTextArea.setColumns(2); jTextArea.setEditable(false); } return jTextArea; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { jPanel1 = new JPanel(); jPanel1.setPreferredSize(new java.awt.Dimension(10,50)); } return jPanel1; } /** * This method initializes jPanel2 * * @return javax.swing.JPanel */ private JPanel getJPanel2() { if (jPanel2 == null) { GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); jPanel2 = new JPanel(); jPanel2.setLayout(new GridBagLayout()); gridBagConstraints3.gridx = 0; gridBagConstraints3.gridy = 0; gridBagConstraints3.weightx = 1.0; gridBagConstraints3.weighty = 1.0; gridBagConstraints3.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints3.insets = new java.awt.Insets(5,5,5,5); gridBagConstraints3.ipadx = 5; gridBagConstraints3.ipady = 5; jPanel2.setPreferredSize(new java.awt.Dimension(300,150)); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), "Overview", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12), java.awt.Color.black)); jPanel2.add(getJTextArea(), gridBagConstraints3); } return jPanel2; } } --- NEW FILE: ZoneWizardPage21.java --- /** * ZoneWizardPage21.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: * **/ /* * Created on Aug 13, 2005, ceron */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.FlowLayout; import java.awt.GridLayout; import java.util.ArrayList; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JComboBox; import org.sblim.wbem.client.CIMClient; import org.sblim.wbemsmt.dns.bl.fco.DNSMasterZone; import org.sblim.wbemsmt.dns.gui.ZoneListComponent; /** * Author ceron * */ public class ZoneWizardPage21 extends JPanel { private JPanel jPanel = null; private JPanel jPanel1 = null; private JPanel jPanel2 = null; private JLabel jLabel = null; private CIMClient cimClient = null; private JComboBox jComboBox = null; /** * This is the default constructor */ public ZoneWizardPage21(CIMClient cc) { super(); this.cimClient = cc; initialize(); } /** * This method initializes this * * @return void */ private void initialize() { this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200); this.add(getJPanel(), null); this.add(getJPanel1(), null); this.add(getJPanel2(), null); ArrayList a = DNSMasterZone.enumerateInstances(this.cimClient); ZoneListComponent zlc = null; try{ for(int i=0; i<a.size();i++){ DNSMasterZone zone = (DNSMasterZone) a.get(i); if(!"localhost".equalsIgnoreCase(zone.getName()) && !"0.0.127.in-addr.arpa".equalsIgnoreCase(zone.getName()) && zone.getName().toLowerCase().indexOf("in-addr.arpa")==-1){ zlc = new ZoneListComponent(zone); this.jComboBox.addItem(zlc); } } }catch(Exception ex){ System.err.println("Error retrieving zone name"); } } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel = new JLabel(); FlowLayout flowLayout5 = new FlowLayout(); jPanel = new JPanel(); jPanel.setLayout(flowLayout5); jPanel.setPreferredSize(new java.awt.Dimension(339,26)); jLabel.setText("Select a master zone"); jLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 12)); flowLayout5.setAlignment(java.awt.FlowLayout.LEFT); flowLayout5.setHgap(5); jPanel.add(jLabel, null); } return jPanel; } /** * This method initializes jPanel1 * * @return javax.swing.JPanel */ private JPanel getJPanel1() { if (jPanel1 == null) { GridLayout gridLayout4 = new GridLayout(); jPanel1 = new JPanel(); jPanel1.setLayout(gridLayout4); gridLayout4.setRows(6); gridLayout4.setHgap(0); jPanel1.add(getJComboBox(), null); } return jPanel1; } /** * This method initializes jPanel2 * * @return javax.swing.JPanel */ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); } return jPanel2; } /** * This method initializes jComboBox * * @return javax.swing.JComboBox */ public JComboBox getJComboBox() { if (jComboBox == null) { jComboBox = new JComboBox(); } return jComboBox; } } --- NEW FILE: ACLWizardData.java --- /** * ACLWizardData.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Fernando Aires <fa...@br...> * * Contributors: **/ /* * Created on 26/07/2005 * */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import org.sblim.wbem.client.CIMClient; import org.sblim.wbemsmt.dns.bl.fco.DNSAddressMatchList; public class ACLWizardData { private DNSAddressMatchList myACL = null; public ACLWizardData (CIMClient cimClient) { try{ this.myACL = new DNSAddressMatchList(cimClient); } catch (Exception e){ System.err.println("Failed to create an ACLWizardData object..."); } } public DNSAddressMatchList getACL() { return this.myACL; } } --- NEW FILE: ZoneWizardPage2.java --- /** * ZoneWizardPage2.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Bert Lange <la...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> * Fernando Aires <fa...@br...> **/ /* * Created on 04.04.2005 * */ package org.sblim.wbemsmt.dns.gui.wizard.panels; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; /** * Author L123394 * */ public class ZoneWizardPage2 extends JPanel { private JLabel jLabel = null; private JTextField jTextField = null; private JPanel jPanel = null; private JPanel jPanel1 = null; private JPanel jPanel2 = null; private JLabel jLabel1 = null; public ZoneWizardPage2() { super(); initialize(); } /** * This method initializes this * * @return void */ private void initialize() { jLabel = new JLabel(); this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setSize(300,200);... [truncated message content] |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:38:11
|
Update of /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15299/jswing/org/sblim/wbemsmt/dns/gui Added Files: RunDNSACLWizard.java IpAddressListComponent.java RunDNSRRWizard.java LogInDialog.java ServiceListComponent.java NetworkListComponent.java ResourceRecordListComponent.java TimeUnitComponent.java DNSApplication.java RunDNSZoneWizard.java ZoneListComponent.java AddressMatchListComponent.java Log Message: WBEM-SMT DNS EUI component. First initial upload. --- NEW FILE: ServiceListComponent.java --- /** * ServiceListComponent.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: **/ /* * Created on Jul 15, 2005, ceron */ package org.sblim.wbemsmt.dns.gui; import java.awt.Component; import org.sblim.wbemsmt.dns.bl.fco.DNSService; /** * Author ceron * */ public class ServiceListComponent extends Component { DNSService dnsService = null; public ServiceListComponent (DNSService service) { this.dnsService = service; } public DNSService getUserObject() { return this.dnsService; } public void setUserObject(DNSService service) { this.dnsService = service; } public String toString() { try { return this.dnsService.getName(); } catch (Exception e) { return "n/a"; } } } --- NEW FILE: TimeUnitComponent.java --- /** * TimeUnitComponent.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: **/ package org.sblim.wbemsmt.dns.gui; import java.awt.Component; /* * Created on May 28, 2005 * */ /** * Author tiagovm * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class TimeUnitComponent extends Component { String timeUnit = null; float convertFactorFromSecsToMe = 0; public TimeUnitComponent (String timeUnit, float convertFactorFromSecsToMe) { this.timeUnit = timeUnit; this.convertFactorFromSecsToMe = convertFactorFromSecsToMe; } public String getUserObject() { return this.timeUnit; } public void setUserObject(String timeUnit) { this.timeUnit = timeUnit; } public String toString() { return this.timeUnit; } public float getFactor(){ return this.convertFactorFromSecsToMe; } } --- NEW FILE: RunDNSZoneWizard.java --- /** * RunDNSZoneWizard.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Bert Lange <la...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> **/ /* * Created on 12.04.2005 * */ package org.sblim.wbemsmt.dns.gui; import java.awt.Dimension; import java.awt.Point; import org.sblim.wbem.cim.CIMNameSpace; import org.sblim.wbem.client.CIMClient; import org.sblim.wbem.client.PasswordCredential; import org.sblim.wbem.client.UserPrincipal; import org.sblim.wbemsmt.dns.gui.wizard.DNSZoneSwingAdapter; /** * Author L123394 * */ public class RunDNSZoneWizard extends DNSApplication { private CIMClient cimClient = null; public RunDNSZoneWizard(CIMClient cc){ this.cimClient = cc; } public CIMClient getCIMClient(){ return this.cimClient; } public static void main(String[] args) { CIMClient cimClient = null; try { String ipAddress = "127.0.0.1"; String userID = ""; char[] password = "".toCharArray(); CIMNameSpace cimNameSpace = null; UserPrincipal userPrincipal = null; PasswordCredential passwordCredential = null; userPrincipal = new UserPrincipal(userID!=null?userID:""); passwordCredential = new PasswordCredential(password!=null?password:new char[]{}); cimNameSpace = new CIMNameSpace("HTTP://" + ipAddress + ":5988/root/cimv2"); cimClient = new CIMClient(cimNameSpace, userPrincipal, passwordCredential); RunDNSZoneWizard dnsZoneWizard = new RunDNSZoneWizard(cimClient); try{ DNSZoneSwingAdapter zoneCreationWizard = new DNSZoneSwingAdapter(new Dimension(500,300),dnsZoneWizard, "Create DNS Zone"); zoneCreationWizard.startWizard(new Point(20, 20), true); zoneCreationWizard.dispose(); } catch (Exception ex) { ex.printStackTrace(); System.out.println("System internal error while creating z zone"); return; } }finally { cimClient.close(); } } } --- NEW FILE: ZoneListComponent.java --- /** * ZoneListComponent.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Wolfgang Taphorn <ta...@de...> * * Contributors: **/ package org.sblim.wbemsmt.dns.gui; import java.awt.Component; import org.sblim.wbemsmt.dns.bl.fco.DNSZone; /* * Created on Apr 6, 2005 * */ /** * Author taphorn * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class ZoneListComponent extends Component { DNSZone dnsZone = null; public ZoneListComponent (DNSZone dnsZone) { this.dnsZone = dnsZone; } public DNSZone getUserObject() { return this.dnsZone; } public void setUserObject(DNSZone dnsZone) { this.dnsZone = dnsZone; } public String toString() { try { return this.dnsZone.getName(); } catch (Exception e) { return "n/a"; } } } --- NEW FILE: RunDNSRRWizard.java --- /** * RunDNSRRWizard.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Bert Lange <la...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> **/ /* * Created on 12.04.2005 * */ package org.sblim.wbemsmt.dns.gui; import java.awt.Dimension; import java.awt.Point; import org.sblim.wbem.cim.CIMNameSpace; import org.sblim.wbem.client.CIMClient; import org.sblim.wbem.client.PasswordCredential; import org.sblim.wbem.client.UserPrincipal; import org.sblim.wbemsmt.dns.gui.wizard.DNSResourceRecordSwingAdapter; /** * Author L123394 */ public class RunDNSRRWizard extends DNSApplication { private CIMClient cimClient = null; public RunDNSRRWizard(CIMClient cc){ this.cimClient = cc; } public CIMClient getCIMClient(){ return this.cimClient; } public static void main(String[] args) { try { String ipAddress = "127.0.0.1"; String userID = ""; char[] password = "".toCharArray(); CIMNameSpace cimNameSpace = null; UserPrincipal userPrincipal = null; PasswordCredential passwordCredential = null; userPrincipal = new UserPrincipal(userID!=null?userID:""); passwordCredential = new PasswordCredential(password!=null?password:new char[]{}); cimNameSpace = new CIMNameSpace("HTTP://" + ipAddress + ":5988/root/cimv2"); CIMClient cimClient = new CIMClient(cimNameSpace, userPrincipal, passwordCredential); RunDNSRRWizard dnsRRWizard = new RunDNSRRWizard(cimClient); try{ DNSResourceRecordSwingAdapter rrCreationWizard = new DNSResourceRecordSwingAdapter(new Dimension(500,300),dnsRRWizard, "Create DNS Resource Record"); rrCreationWizard.startWizard(new Point(20, 20), true); rrCreationWizard.dispose(); } catch (Exception ex) { ex.printStackTrace(); System.out.println("System internal error while creating a resource record"); return; } cimClient.close(); } catch (Exception ex) { ex.printStackTrace(); System.out.println("caught exception in main: "+ex.getMessage()); return; } } } --- NEW FILE: LogInDialog.java --- /** * LogInDialog.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Wolfgang Taphorn <ta...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> **/ package org.sblim.wbemsmt.dns.gui; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; import org.sblim.wbem.cim.CIMNameSpace; import org.sblim.wbem.client.CIMClient; import org.sblim.wbem.client.PasswordCredential; import org.sblim.wbem.client.UserPrincipal; import org.sblim.wbemsmt.dns.bl.fco.DNSService; /* * Created on Apr 5, 2005 * */ /** * Author taphorn * */ public class LogInDialog extends JDialog { private JTextField serverAddress = null; private JTextField userID = null; private JPasswordField userPassword = null; private JButton jButton = null; private JButton jButton1 = null; //CimConnection cimConnection = null; CIMClient cimClient = null; private JPanel jPanel = null; private JLabel jLabel1 = null; private JLabel jLabel2 = null; private JLabel jLabel3 = null; /** * This is the default constructor */ public LogInDialog(JFrame parent, CIMClient cimClient) { super(parent, true); // if (cimConnection != null) { // this.cimClient = cimClient; // } else { // this.cimConnection = new CimConnection(); // } initialize(); } /** * This method initializes this * * @return void */ private void initialize() { this.setContentPane(getJPanel()); this.setResizable(false); this.setName("LogOnDialog"); this.setModal(true); this.setTitle("Log On To CIMOM"); this.setSize(300, 230); this.setVisible(false); } /** * This method initializes jTextField * * @return javax.swing.JTextField */ private JTextField getServerAddress() { if (serverAddress == null) { serverAddress = new JTextField(); // serverAddress.addActionListener(new java.awt.event.ActionListener() { // public void actionPerformed(java.awt.event.ActionEvent e) { // cimConnection.setIpAddress(e.getActionCommand()); // } // }); // serverAddress.addKeyListener(new java.awt.event.KeyAdapter() { // public void keyTyped(java.awt.event.KeyEvent e) { // cimConnection.setIpAddress(serverAddress.getText()+e.getKeyChar()); // // } // }); } return serverAddress; } /** * This method initializes jTextField1 * * @return javax.swing.JTextField */ private JTextField getUserID() { if (userID == null) { userID = new JTextField(); // userID.addKeyListener(new java.awt.event.KeyAdapter() { // public void keyTyped(java.awt.event.KeyEvent e) { // cimConnection.setUserID(userID.getText()+e.getKeyChar()); // } // }); } return userID; } /** * This method initializes jPasswordField * * @return javax.swing.JPasswordField */ private JPasswordField getUserPassword() { if (userPassword == null) { userPassword = new JPasswordField(); // userPassword.addKeyListener(new java.awt.event.KeyAdapter() { // public void keyTyped(java.awt.event.KeyEvent e) { // char[] password = new char[userPassword.getPassword().length + 1]; // for (int i=0; i<userPassword.getPassword().length; i++) { // password[i] = userPassword.getPassword()[i]; // } // password[userPassword.getPassword().length] = e.getKeyChar(); // cimConnection.setPassword(password); // } // }); } return userPassword; } /** * This method initializes jButton * * @return javax.swing.JButton */ private JButton getJButton() { if (jButton == null) { jButton = new JButton(); jButton.setText("OK"); jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { CIMNameSpace cimNameSpace = null; UserPrincipal userPrincipal = null; PasswordCredential passwordCredential = null; if (serverAddress.getText() == null || serverAddress.getText().trim().equals("")) { System.out.println("//TODO Please specify a host"); return; } userPrincipal = new UserPrincipal(userID.getText()!=null?userID.getText():""); passwordCredential = new PasswordCredential(userPassword.getPassword()!=null?userPassword.getPassword():new char[]{}); cimNameSpace = new CIMNameSpace("HTTP://" + serverAddress.getText() + ":5988/root/cimv2"); //cimConnection.setIpAddress(LogInDialog.this.serverAddress.getText()); //cimConnection.setUserID(LogInDialog.this.userID.getText()); //cimConnection.setPassword(LogInDialog.this.userPassword.getPassword()); //cimConnection.createConnection(); //cimClient = cimConnection.getCimClient(); cimClient = new CIMClient(cimNameSpace, userPrincipal, passwordCredential); try { System.out.println(DNSService.enumerateInstanceNames(cimClient)); LogInDialog.this.dispose(); } catch(Exception e1) { System.out.println("Request failed. Seems that CIMOM is not available: "+ e1.toString()); } } }); } return jButton; } /** * This method initializes jButton1 * * @return javax.swing.JButton */ private JButton getJButton1() { if (jButton1 == null) { jButton1 = new JButton(); jButton1.setText("Cancel"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { System.exit(0); } }); } return jButton1; } /** * This method initializes jPanel * * @return javax.swing.JPanel */ private JPanel getJPanel() { if (jPanel == null) { jLabel3 = new JLabel(); jLabel2 = new JLabel(); jLabel1 = new JLabel(); GridBagConstraints gridBagConstraints10 = new GridBagConstraints(); GridBagConstraints gridBagConstraints9 = new GridBagConstraints(); GridBagConstraints gridBagConstraints8 = new GridBagConstraints(); GridBagConstraints gridBagConstraints7 = new GridBagConstraints(); GridBagConstraints gridBagConstraints6 = new GridBagConstraints(); GridBagConstraints gridBagConstraints11 = new GridBagConstraints(); GridBagConstraints gridBagConstraints12 = new GridBagConstraints(); GridBagConstraints gridBagConstraints13 = new GridBagConstraints(); jPanel = new JPanel(); jPanel.setLayout(new GridBagLayout()); gridBagConstraints6.gridx = 1; gridBagConstraints6.gridy = 0; gridBagConstraints6.weightx = 1.0; gridBagConstraints6.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints6.insets = new java.awt.Insets(10,10,10,10); gridBagConstraints7.gridx = 0; gridBagConstraints7.gridy = 4; gridBagConstraints7.insets = new java.awt.Insets(10,10,10,10); gridBagConstraints7.weighty = 1.0D; gridBagConstraints7.fill = java.awt.GridBagConstraints.NONE; gridBagConstraints7.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints8.gridx = 1; gridBagConstraints8.gridy = 4; gridBagConstraints8.insets = new java.awt.Insets(10,10,10,10); gridBagConstraints9.gridx = 1; gridBagConstraints9.gridy = 1; gridBagConstraints9.weightx = 1.0; gridBagConstraints9.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints9.insets = new java.awt.Insets(0,10,10,10); gridBagConstraints10.gridx = 1; gridBagConstraints10.gridy = 2; gridBagConstraints10.weightx = 1.0; gridBagConstraints10.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints10.insets = new java.awt.Insets(0,10,10,10); gridBagConstraints11.gridx = 0; gridBagConstraints11.gridy = 0; gridBagConstraints11.insets = new java.awt.Insets(10,10,10,10); gridBagConstraints11.anchor = java.awt.GridBagConstraints.WEST; jLabel1.setText("Server Name"); gridBagConstraints12.gridx = 0; gridBagConstraints12.gridy = 1; gridBagConstraints12.insets = new java.awt.Insets(0,10,10,10); gridBagConstraints12.anchor = java.awt.GridBagConstraints.WEST; jLabel2.setText("User ID"); gridBagConstraints13.gridx = 0; gridBagConstraints13.gridy = 2; gridBagConstraints13.insets = new java.awt.Insets(0,10,10,10); gridBagConstraints13.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints13.weighty = 0.0D; jLabel3.setText("Password"); jPanel.add(getServerAddress(), gridBagConstraints6); jPanel.add(getJButton(), gridBagConstraints7); jPanel.add(getJButton1(), gridBagConstraints8); jPanel.add(getUserID(), gridBagConstraints9); jPanel.add(getUserPassword(), gridBagConstraints10); jPanel.add(jLabel1, gridBagConstraints11); jPanel.add(jLabel2, gridBagConstraints12); jPanel.add(jLabel3, gridBagConstraints13); } return jPanel; } } --- NEW FILE: DNSApplication.java --- /** * DNSApplication.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Wolfgang Taphorn <ta...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> * Fernando Aires <fa...@br...> **/ [...6194 lines suppressed...] DNSIPAddress ip = ((IpAddressListComponent)mastersList.getSelectedValue()).getUserObject(); masterPort.setText(ip.getPort()!=null?ip.getPort().toString():""); masterSecKey.setText(ip.getSecKey()!=null?ip.getSecKey():""); }catch(Exception ex){ System.err.println("System internal error while getting master of slave zone data"); } } } }); } return jButton48; } /** * Launches this application */ public static void main(String[] args) { DNSApplication application = new DNSApplication(); application.show(); } } // @jve:decl-index=0:visual-constraint="16,9" --- NEW FILE: RunDNSACLWizard.java --- /** * RunDNSACLWizard.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: **/ /* * Created on Jul 28, 2005, ceron */ package org.sblim.wbemsmt.dns.gui; import java.awt.Dimension; import java.awt.Point; import org.sblim.wbem.cim.CIMNameSpace; import org.sblim.wbem.client.CIMClient; import org.sblim.wbem.client.PasswordCredential; import org.sblim.wbem.client.UserPrincipal; import org.sblim.wbemsmt.dns.gui.wizard.DNSACLSwingAdapter; /** * Author ceron * */ public class RunDNSACLWizard extends DNSApplication { private CIMClient cimClient = null; public RunDNSACLWizard(CIMClient cc){ this.cimClient = cc; } public CIMClient getCIMClient(){ return this.cimClient; } public static void main(String[] args) { try { String ipAddress = "127.0.0.1"; String userID = ""; char[] password = "".toCharArray(); CIMNameSpace cimNameSpace = null; UserPrincipal userPrincipal = null; PasswordCredential passwordCredential = null; userPrincipal = new UserPrincipal(userID!=null?userID:""); passwordCredential = new PasswordCredential(password!=null?password:new char[]{}); cimNameSpace = new CIMNameSpace("HTTP://" + ipAddress + ":5988/root/cimv2"); CIMClient cimClient = new CIMClient(cimNameSpace, userPrincipal, passwordCredential); RunDNSRRWizard dnsRRWizard = new RunDNSRRWizard(cimClient); try{ DNSACLSwingAdapter aclCreationWizard = new DNSACLSwingAdapter(new Dimension(500,300),dnsRRWizard, "Create DNS ACL"); aclCreationWizard.startWizard(new Point(20, 20), true); aclCreationWizard.dispose(); } catch (Exception ex) { ex.printStackTrace(); System.out.println("System internal error while creating a resource record"); return; } cimClient.close(); } catch (Exception ex) { ex.printStackTrace(); System.out.println("caught exception in main: "+ex.getMessage()); return; } } } --- NEW FILE: ResourceRecordListComponent.java --- /** * ResourceRecordListComponent.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: **/ /* * Created on Jul 29, 2005, ceron */ package org.sblim.wbemsmt.dns.gui; import java.awt.Component; import org.sblim.wbemsmt.dns.bl.fco.DNSResourceRecord; /** * Author ceron * */ public class ResourceRecordListComponent extends Component{ DNSResourceRecord rr = null; public ResourceRecordListComponent (DNSResourceRecord r) { this.rr = r; } public DNSResourceRecord getUserObject() { return this.rr; } public void setUserObject(DNSResourceRecord r) { this.rr = r; } public String toString() { try { return (this.rr.getValue()+" from " + this.rr.getZoneName()); } catch (Exception e) { return "n/a"; } } } --- NEW FILE: AddressMatchListComponent.java --- /** * AddressMatchListComponent.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: **/ package org.sblim.wbemsmt.dns.gui; import java.awt.Component; import org.sblim.wbemsmt.dns.bl.fco.DNSAddressMatchList; /* * Created on Jun 3, 2005 */ /** * Author tiagovm * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public class AddressMatchListComponent extends Component { DNSAddressMatchList dnsAddressMatchList = null; public AddressMatchListComponent (DNSAddressMatchList aml) { this.dnsAddressMatchList = aml; } public DNSAddressMatchList getUserObject() { return this.dnsAddressMatchList; } public void setUserObject(DNSAddressMatchList aml) { this.dnsAddressMatchList = aml; } public String toString() { try { return this.dnsAddressMatchList.getName(); } catch (Exception e) { return "n/a"; } } } --- NEW FILE: NetworkListComponent.java --- /** * NetworkListComponent.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Rodrigo Ceron <rc...@br...> * * Contributors: **/ /* * Created on Jul 29, 2005, ceron */ package org.sblim.wbemsmt.dns.gui; import java.awt.Component; import org.sblim.wbemsmt.dns.bl.adapter.Network; /** * Author ceron * */ public class NetworkListComponent extends Component{ Network network = null; public NetworkListComponent (Network net) { this.network = net; } public Network getUserObject() { return this.network; } public void setUserObject(Network net) { this.network = net; } public String toString() { try { return this.network.getNameForReverseZone(); } catch (Exception e) { return "n/a"; } } } --- NEW FILE: IpAddressListComponent.java --- /* * Created on Aug 11, 2005, ceron */ package org.sblim.wbemsmt.dns.gui; import java.awt.Component; import org.sblim.wbemsmt.dns.bl.fco.DNSIPAddress; /** * Author ceron * */ public class IpAddressListComponent extends Component { DNSIPAddress dnsIpAddr = null; public IpAddressListComponent (DNSIPAddress dnsIpAddr) { this.dnsIpAddr = dnsIpAddr; } public DNSIPAddress getUserObject() { return this.dnsIpAddr; } public void setUserObject(DNSIPAddress dnsIpAddr) { this.dnsIpAddr = dnsIpAddr; } public String toString() { try { return this.dnsIpAddr.getIPAddress(); } catch (Exception e) { return "n/a"; } } } |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:38:11
|
Update of /cvsroot/sblim/wbemsmt-dns-eui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15299 Added Files: .cvsignore license.txt .classpath build.xml .project Log Message: WBEM-SMT DNS EUI component. First initial upload. --- NEW FILE: .cvsignore --- bin compile --- NEW FILE: build.xml --- <!-- * build.xml * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Wolfgang Taphorn <ta...@de...> * * Contributors: --> <project name="wbemsmt-dns-eui" default="package" basedir="." > <description> Build file of sblim wbemsmt-dns-eui project. </description> <property environment="env"/> <property name="project.packagepath" location="org/sblim/wbemsmt/dns/"/> <property name="cimClientPath" location="${env.SBLIM_CIMCLIENT}"/> <property name="DnsBlPath" location="${env.SBLIM_WBEMSMT_DNSBL}"/> <property name="WizardFramework" location="${env.SBLIM_TOOLS_WIZARDFRAMEWORK}"/> <target name="build"> <mkdir dir="${basedir}/compile"/> <javac destdir="${basedir}/compile" debug="true" listfiles="true" compiler="modern" srcdir="${basedir}"> <classpath> <path> <fileset dir="${cimClientPath}"> <include name="sblimCIMClient.jar"/> </fileset> <fileset dir="${DnsBlPath}"> <include name="wbemsmt-dns-bl.jar"/> </fileset> <fileset dir="${WizardFramework}"> <include name="tools-wizard_framework.jar"/> </fileset> </path> </classpath> </javac> </target> <target name="package" depends="clean, build"> <jar index="true" destfile="${basedir}/${ant.project.name}.jar" basedir="${basedir}/compile/" includes="**/*.class" /> </target> <target name="clean"> <delete dir="${basedir}/compile/" verbose="true"/> <delete file="${basedir}/${ant.project.name}.jar" verbose="true"/> </target> </project> --- NEW FILE: .classpath --- <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="jswing"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry combineaccessrules="false" kind="src" path="/cim-client"/> <classpathentry kind="src" path="/wbemsmt-tools-wizard-framework"/> <classpathentry kind="src" path="/sf-wbemsmt-dns-bl"/> <classpathentry kind="output" path="jswing"/> </classpath> --- NEW FILE: license.txt --- Common Public License Version 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 1. DEFINITIONS "Contribution" means: a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and b) in the case of each subsequent Contributor: i) changes to the Program, and ii) additions to the Program; where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. "Contributor" means any person or entity that distributes the Program. "Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. "Program" means the Contributions distributed in accordance with this Agreement. "Recipient" means anyone who receives the Program under this Agreement, including all Contributors. 2. GRANT OF RIGHTS a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. 3. REQUIREMENTS A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: a) it complies with the terms and conditions of this Agreement; and b) its license agreement: i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. When the Program is made available in source code form: a) it must be made available under this Agreement; and b) a copy of this Agreement must be included with each copy of the Program. Contributors may not remove or alter any copyright notices contained within the Program. Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. 4. COMMERCIAL DISTRIBUTION Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. 5. NO WARRANTY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. 6. DISCLAIMER OF LIABILITY EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. GENERAL If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>wbemsmt-dns-eui</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature> </natures> </projectDescription> |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:38:10
|
Update of /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns/gui/wizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15299/jswing/org/sblim/wbemsmt/dns/gui/wizard Added Files: DNSZoneSwingAdapter.java DNSResourceRecordWizardContainer.java DNSResourceRecordSwingAdapter.java DNSZoneWizardContainer.java DNSACLWizardContainer.java DNSACLSwingAdapter.java Log Message: WBEM-SMT DNS EUI component. First initial upload. --- NEW FILE: DNSACLSwingAdapter.java --- /** * DNSACLSwingAdapter.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Fernando Aires <fa...@br...> * * Contributors: * Rodrigo Ceron <rc...@br...> **/ /* * Created on Jul 27, 2005, aires */ package org.sblim.wbemsmt.dns.gui.wizard; import java.awt.Dimension; import java.util.Vector; import javax.swing.DefaultListModel; import javax.swing.JOptionPane; import javax.swing.JPanel; import org.sblim.wbemsmt.dns.bl.fco.DNSAddressMatchList; import org.sblim.wbemsmt.dns.gui.AddressMatchListComponent; import org.sblim.wbemsmt.dns.gui.DNSApplication; import org.sblim.wbemsmt.dns.gui.ServiceListComponent; import org.sblim.wbemsmt.dns.gui.wizard.panels.ACLWizardPage1; import org.sblim.wbemsmt.dns.gui.wizard.panels.ACLWizardPage2; import org.sblim.wbemsmt.dns.gui.wizard.panels.ACLWizardPage3; import org.sblim.wbemsmt.tools.wizard.adapter.IPageWizardAdapter; import org.sblim.wbemsmt.tools.wizard.adapter.SwingWizardAdapterBase; import org.sblim.wbemsmt.tools.wizard.container.IWizardContainer; public class DNSACLSwingAdapter extends SwingWizardAdapterBase implements IPageWizardAdapter { private DNSApplication owner = null; private DNSACLWizardContainer dnsContainer = null; private int actualPanelNumber = 0; public DNSACLSwingAdapter(Dimension dimension, DNSApplication owner, String wizardName) { super(owner); this.owner = owner; this.dnsContainer = new DNSACLWizardContainer(owner.getCIMClient(), wizardName); super.initialize(dimension, wizardName); try { super.initWizard((IWizardContainer)dnsContainer, this); } catch (Exception ex) { ex.printStackTrace(); return; } System.out.println("Wizard initialized"); } public void cleanUPPage(String panelName) { if (panelName.equals(DNSACLWizardContainer.ACLWIZARDPAGE1)); if (panelName.equals(DNSACLWizardContainer.ACLWIZARDPAGE2)) dnsContainer.getPages().put(panelName, new ACLWizardPage2()); if (panelName.equals(DNSACLWizardContainer.ACLWIZARDPAGE3)) dnsContainer.getPages().put(panelName, new ACLWizardPage3()); } public boolean savePageValues(String actualPanelName) { Vector result = new Vector(); String errorMsg = null; JPanel jPanel = (JPanel)(container.getPages().get(actualPanelName)); if (this.saveData(jPanel,result)) return true; errorMsg = result.toString().replaceAll("[\\[\\],]",""); JOptionPane.showMessageDialog(this, errorMsg, "ERROR", JOptionPane.ERROR_MESSAGE); return false; } public void setSummaryText(String nextPanelName) { JPanel panel = (JPanel)(container.getPages().get(nextPanelName)); StringBuffer sbText = new StringBuffer(); for (int i=0; i<dnsContainer.getSummary().length; i++) { sbText.append(dnsContainer.getSummary()[i]); } ( (ACLWizardPage3) panel).getJTextArea().setText(sbText.toString()); } public String wizardComplete() { System.out.println("count of used wizard panels: "+dnsContainer.getUsedPages().size()); try { dnsContainer.preWizardFinish(); } catch (Exception ex) { ex.printStackTrace(); JOptionPane.showMessageDialog(this, "Creation of DNSZone CIM instance failed.", "ERROR", JOptionPane.ERROR_MESSAGE); return ""; } int originalCount = owner.getJComboBox2().getItemCount(); owner.getJComboBox2().addItem(new AddressMatchListComponent(dnsContainer.createdACL)); owner.getJComboBox2().setSelectedIndex(originalCount); owner.getJComboBox7().addItem(new AddressMatchListComponent(dnsContainer.createdACL)); owner.getJComboBox1().addItem(new AddressMatchListComponent(dnsContainer.createdACL)); owner.getJComboBox8().addItem(new AddressMatchListComponent(dnsContainer.createdACL)); owner.getJComboBox9().addItem(new AddressMatchListComponent(dnsContainer.createdACL)); owner.getJComboBox11().addItem(new AddressMatchListComponent(dnsContainer.createdACL)); owner.getJComboBox12().addItem(new AddressMatchListComponent(dnsContainer.createdACL)); owner.getJComboBox13().addItem(new AddressMatchListComponent(dnsContainer.createdACL)); owner.getJComboBox14().addItem(new AddressMatchListComponent(dnsContainer.createdACL)); owner.getJComboBox15().addItem(new AddressMatchListComponent(dnsContainer.createdACL)); System.out.println("executed preWizardFinish()"); this.setVisible(false); this.dispose(); dnsContainer.postWizardFinish(); System.out.println("sent values from wizard to business logic"); return null; } private boolean saveData(JPanel jpanel, Vector result) { boolean error = false; if (container.getCurrentPageName().equals(DNSACLWizardContainer.ACLWIZARDPAGE1)) { String serviceName = null; try{ serviceName = (String) ((ServiceListComponent)((ACLWizardPage1) jpanel).getJComboBox().getSelectedItem()).getUserObject().getName(); }catch(Exception e){ System.err.println("System internal error while creating ACL: could not retrieve service name"); return false; } String name = ((ACLWizardPage1) jpanel).getJTextField().getText(); Short addressListType = new Short((short) ((ACLWizardPage1) jpanel).getJComboBox1().getSelectedIndex()); try { if(!dnsContainer.isValid(DNSAddressMatchList.CIM_PROPERTY_SERVICENAME, serviceName, result)) error = true; if(!dnsContainer.isValid(DNSAddressMatchList.CIM_PROPERTY_NAME, name, result)) error = true; if(!dnsContainer.isValid(DNSAddressMatchList.CIM_PROPERTY_ADDRESSLISTTYPE, addressListType, result)) error = true; dnsContainer.getACLWizardData().getACL().setServiceName(serviceName); dnsContainer.getACLWizardData().getACL().setName(name); dnsContainer.getACLWizardData().getACL().setAddressListType(addressListType); } catch (Exception e) { System.err.println("Unable to set type properly"); return false; } } if (dnsContainer.getCurrentPageName().equals(DNSACLWizardContainer.ACLWIZARDPAGE2)) { Object[] oList = null; oList = ((DefaultListModel) ((ACLWizardPage2) jpanel).getJList().getModel()).toArray(); String[] addressList = new String[oList.length]; for(int i=0; i<oList.length; i++) addressList[i] = (String) oList[i]; try { if(!dnsContainer.isValid(DNSAddressMatchList.CIM_PROPERTY_ADDRESSLIST, addressList, result)) return false; dnsContainer.getACLWizardData().getACL().setAddressList(addressList); } catch (Exception e) { System.err.println("Unable to set type properly"); return false; } } return true; } /** * @return Returns the dnsContainer. */ public DNSACLWizardContainer getDnsContainer() { return dnsContainer; } /** * @param dnsContainer The dnsContainer to set. */ public void setDnsContainer(DNSACLWizardContainer dnsContainer) { this.dnsContainer = dnsContainer; } } --- NEW FILE: DNSResourceRecordWizardContainer.java --- /** * DNSResourceRecordWizardContainer.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Fernando Aires <fa...@br...> * * Contributors: * Rodrigo Ceron <rc...@br...> **/ /* * Created on Jul 27, 2005, aires */ package org.sblim.wbemsmt.dns.gui.wizard; import java.util.HashMap; import java.util.Vector; import org.sblim.wbem.client.CIMClient; import org.sblim.wbemsmt.dns.bl.fco.DNSResourceRecord; import org.sblim.wbemsmt.dns.gui.wizard.panels.ResourceRecordWizardData; import org.sblim.wbemsmt.dns.gui.wizard.panels.ResourceRecordWizardPage1; import org.sblim.wbemsmt.dns.gui.wizard.panels.ResourceRecordWizardPage2; import org.sblim.wbemsmt.dns.gui.wizard.panels.ResourceRecordWizardPage5; import org.sblim.wbemsmt.exception.CimConnectionException; import org.sblim.wbemsmt.exception.InvalidParameterException; import org.sblim.wbemsmt.exception.PropertyNotFoundException; import org.sblim.wbemsmt.tools.wizard.container.IWizardContainer; import org.sblim.wbemsmt.tools.wizard.container.WizardContainerBase; public class DNSResourceRecordWizardContainer extends WizardContainerBase implements IWizardContainer { protected CIMClient cimClient = null; public ResourceRecordWizardData rrWizardData = null; public DNSResourceRecord createdResourceRecord = null; private String serviceName; public static final String RRWIZARDPAGE1 = "rrWizardPage1"; public static final String RRWIZARDPAGE2 = "rrWizardPage2"; public static final String RRWIZARDPAGE5 = "rrWizardPage5"; public DNSResourceRecordWizardContainer(CIMClient cimClient, String serviceName) { super(); this.cimClient = cimClient; this.serviceName = serviceName; } public void initWizardContainer() { if (hmPages == null) { hmPages = new HashMap(); if (wizardRunType.equals("JSWING")) { System.out.println("initWizardContainer - JSWING"); hmPages.put(RRWIZARDPAGE1, new ResourceRecordWizardPage1()); hmPages.put(RRWIZARDPAGE2, new ResourceRecordWizardPage2()); hmPages.put(RRWIZARDPAGE5, new ResourceRecordWizardPage5()); } else if (wizardRunType.equals("JSF")) { //aires TODO fill with JSF code } } if (hmPages.size() == 0) noPages = true; this.rrWizardData = new ResourceRecordWizardData(cimClient); } public String getNextWizardPageName() { System.out.println("next - currentPageName: "+getCurrentPageName()); if (getCurrentPageName().equals("")) { return RRWIZARDPAGE1; } if (getCurrentPageName().equals(RRWIZARDPAGE1)) { return RRWIZARDPAGE2; } if (getCurrentPageName().equals(RRWIZARDPAGE2)) { this.buildSummaryText(); return RRWIZARDPAGE5; } else return ""; } public boolean isLast(String pageName) { if (pageName.equals(RRWIZARDPAGE5)) { return true; } else return false; } public boolean isFirst(String pageName) { if (pageName.equals(RRWIZARDPAGE1)) { return true; } else return false; } public void cleanUP(String pageName) { System.out.println("cleanUP - currentPageName: "+pageName); if (pageName.equals(RRWIZARDPAGE1)) { try{ rrWizardData.getResourceRecord().setType(new Short((short)0)); } catch(Exception e){ e.printStackTrace(); } } if (pageName.equals(RRWIZARDPAGE2)) { rrWizardData.getResourceRecord().setName(""); rrWizardData.getResourceRecord().setValue(""); } if (pageName.equals(RRWIZARDPAGE5)) { } } public boolean isValid(String propertyName, Object value, Vector result) { try { if(propertyName.equals(DNSResourceRecord.CIM_PROPERTY_TYPE) || propertyName.equals(DNSResourceRecord.CIM_PROPERTY_NAME) || propertyName.equals(DNSResourceRecord.CIM_PROPERTY_VALUE) || propertyName.equals(DNSResourceRecord.CIM_PROPERTY_ZONENAME)){ if (!DNSResourceRecord.checkProperty(propertyName,value,rrWizardData.getResourceRecord().getType())){ result.add("Invalid " + propertyName + "\n"); } else return true; } } catch (Exception e) { System.err.println("Error defining Resource Record type"); } return false; } private void buildSummaryText() { summary = new String[3]; String na = "= n/a"+System.getProperty("line.separator"); try { summary[0] = new String("RR Type "); if (this.rrWizardData.getResourceRecord().getType() != null) summary[0] = summary[0]+("= "+this.rrWizardData.getResourceRecord().getTypeString()+System.getProperty("line.separator")); else summary[0] = summary[0]+(na); summary[1] = new String("RR Name "); if (this.rrWizardData.getResourceRecord().getName() != null && !this.rrWizardData.getResourceRecord().getName().trim().equals("")) summary[1] = summary[1]+("= "+this.rrWizardData.getResourceRecord().getName()+System.getProperty("line.separator")); else summary[1] = summary[1]+(na); summary[2] = new String("RR Value "); if (this.rrWizardData.getResourceRecord().getValue() != null && !this.rrWizardData.getResourceRecord().getValue().trim().equals("")) summary[2] = summary[2]+("= "+this.rrWizardData.getResourceRecord().getValue()+System.getProperty("line.separator")); else summary[2] = summary[2]+(na); } catch (PropertyNotFoundException nfe) { System.out.println("caught exception: "+nfe); } } public void preWizardFinish() throws InvalidParameterException, CimConnectionException, PropertyNotFoundException { System.out.println("calling preWizardFinish()"); DNSResourceRecord myRR = this.getResourceRecordWizardData().getResourceRecord(); try{ myRR.setFamily(new Short(DNSResourceRecord.CIM_FAMILY_INTERNET)); } catch (Exception e) { System.err.println("Could not get Property"); e.printStackTrace(); } createdResourceRecord = DNSResourceRecord.createInstance(cimClient, myRR); } public void postWizardFinish() { } /** * @return Returns the ResourceRecordWizardData. */ public ResourceRecordWizardData getResourceRecordWizardData() { return rrWizardData; } /** * @param rrWizardData The ResourceRecordWizardData to set. */ public void setResourceRecordWizardData(ResourceRecordWizardData rrWizardData) { this.rrWizardData = rrWizardData; } } --- NEW FILE: DNSResourceRecordSwingAdapter.java --- /** * DNSResourceRecordSwingAdapter.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Fernando Aires <fa...@br...> * * Contributors: * Rodrigo Ceron <rc...@br...> **/ /* * Created on Jul 27, 2005, aires */ package org.sblim.wbemsmt.dns.gui.wizard; import java.awt.Dimension; import java.util.Vector; import javax.swing.JOptionPane; import javax.swing.JPanel; import org.sblim.wbemsmt.dns.bl.fco.DNSResourceRecord; import org.sblim.wbemsmt.dns.bl.fco.DNSZone; import org.sblim.wbemsmt.dns.gui.DNSApplication; import org.sblim.wbemsmt.dns.gui.ZoneListComponent; import org.sblim.wbemsmt.dns.gui.wizard.panels.ResourceRecordWizardPage1; import org.sblim.wbemsmt.dns.gui.wizard.panels.ResourceRecordWizardPage2; import org.sblim.wbemsmt.dns.gui.wizard.panels.ResourceRecordWizardPage5; import org.sblim.wbemsmt.tools.wizard.adapter.IPageWizardAdapter; import org.sblim.wbemsmt.tools.wizard.adapter.SwingWizardAdapterBase; import org.sblim.wbemsmt.tools.wizard.container.IWizardContainer; public class DNSResourceRecordSwingAdapter extends SwingWizardAdapterBase implements IPageWizardAdapter { private DNSApplication owner = null; private DNSResourceRecordWizardContainer dnsContainer = null; private int actualPanelNumber = 0; public DNSResourceRecordSwingAdapter(Dimension dimension, DNSApplication owner, String wizardName) { super(owner); this.owner = owner; this.dnsContainer = new DNSResourceRecordWizardContainer(owner.getCIMClient(), wizardName); super.initialize(dimension, wizardName); try { super.initWizard((IWizardContainer)dnsContainer, this); } catch (Exception ex) { ex.printStackTrace(); return; } System.out.println("Wizard initialized"); } public void cleanUPPage(String panelName) { if (panelName.equals(DNSResourceRecordWizardContainer.RRWIZARDPAGE1)) dnsContainer.getPages().put(panelName, new ResourceRecordWizardPage1()); if (panelName.equals(DNSResourceRecordWizardContainer.RRWIZARDPAGE2)) dnsContainer.getPages().put(panelName, new ResourceRecordWizardPage2()); if (panelName.equals(DNSResourceRecordWizardContainer.RRWIZARDPAGE5)) dnsContainer.getPages().put(panelName, new ResourceRecordWizardPage5()); } public boolean savePageValues(String actualPanelName) { Vector result = new Vector(); String errorMsg = null; JPanel jPanel = (JPanel)(container.getPages().get(actualPanelName)); if (this.saveData(jPanel,result)) return true; errorMsg = result.toString().replaceAll("[\\[\\],]",""); JOptionPane.showMessageDialog(this, errorMsg, "ERROR", JOptionPane.ERROR_MESSAGE); return false; } public void setSummaryText(String nextPanelName) { JPanel panel = (JPanel)(container.getPages().get(nextPanelName)); StringBuffer sbText = new StringBuffer(); for (int i=0; i<dnsContainer.getSummary().length; i++) { sbText.append(dnsContainer.getSummary()[i]); } ( (ResourceRecordWizardPage5) panel).getJTextArea().setText(sbText.toString()); } public String wizardComplete() { System.out.println("count of used wizard panels: "+dnsContainer.getUsedPages().size()); try { dnsContainer.preWizardFinish(); } catch (Exception ex) { ex.printStackTrace(); JOptionPane.showMessageDialog(this, "Creation of DNS resource record instance failed.", "ERROR", JOptionPane.ERROR_MESSAGE); return ""; } DNSZone myZone = (DNSZone) ((ZoneListComponent) owner.getJComboBox10().getSelectedItem()).getUserObject(); owner.displayValuesZoneOpt(myZone); owner.displayValuesDetails(myZone); System.out.println("executed preWizardFinish()"); this.setVisible(false); this.dispose(); dnsContainer.postWizardFinish(); System.out.println("sent values from wizard to business logic"); return null; } private boolean saveData(JPanel jpanel, Vector result) { boolean error = false; if (container.getCurrentPageName().equals(DNSResourceRecordWizardContainer.RRWIZARDPAGE1)) { String sType = ((String) ((ResourceRecordWizardPage1) jpanel).getJList().getSelectedValue()); try { String zoneName = ((DNSZone) ((ZoneListComponent) owner.getJComboBox10().getSelectedItem()).getUserObject()).getName(); Short type = dnsContainer.getResourceRecordWizardData().getResourceRecord().getMappedType(sType); if(!dnsContainer.isValid(DNSResourceRecord.CIM_PROPERTY_ZONENAME, zoneName, result)) error = true; if(!dnsContainer.isValid(DNSResourceRecord.CIM_PROPERTY_TYPE, type, result)) error = true; if(error) return false; dnsContainer.getResourceRecordWizardData().getResourceRecord().setZoneName(zoneName); dnsContainer.getResourceRecordWizardData().getResourceRecord().setType(type); } catch (Exception e) { System.err.println("Unable to set type properly"); return false; } } if (dnsContainer.getCurrentPageName().equals(DNSResourceRecordWizardContainer.RRWIZARDPAGE2)) { String name = ((ResourceRecordWizardPage2) jpanel).getJTextField().getText(); String value = ((ResourceRecordWizardPage2) jpanel).getJTextField1().getText(); try { if (!dnsContainer.isValid(DNSResourceRecord.CIM_PROPERTY_NAME, name, result)) error = true; if (!dnsContainer.isValid(DNSResourceRecord.CIM_PROPERTY_VALUE, value, result)) error = true; if(error) return false; dnsContainer.getResourceRecordWizardData().getResourceRecord().setName(name); dnsContainer.getResourceRecordWizardData().getResourceRecord().setValue(value); } catch (Exception e) { System.err.println("Unable to set type properly"); return false; } } return true; } /** * @return Returns the dnsContainer. */ public DNSResourceRecordWizardContainer getDnsContainer() { return dnsContainer; } /** * @param dnsContainer The dnsContainer to set. */ public void setDnsContainer(DNSResourceRecordWizardContainer dnsContainer) { this.dnsContainer = dnsContainer; } } --- NEW FILE: DNSZoneWizardContainer.java --- /** * DNSZoneWizardContainer.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Bert Lange <la...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> **/ /* * Created on Jul 26, 2005, ceron */ package org.sblim.wbemsmt.dns.gui.wizard; import java.util.ArrayList; import java.util.HashMap; import java.util.Vector; import org.sblim.wbem.cim.CIMException; import org.sblim.wbem.client.CIMClient; import org.sblim.wbemsmt.dns.bl.adapter.ReverseZone; import org.sblim.wbemsmt.dns.bl.fco.DNSForwardZone; import org.sblim.wbemsmt.dns.bl.fco.DNSHintZone; import org.sblim.wbemsmt.dns.bl.fco.DNSIPAddress; import org.sblim.wbemsmt.dns.bl.fco.DNSMasterZone; import org.sblim.wbemsmt.dns.bl.fco.DNSResourceRecord; import org.sblim.wbemsmt.dns.bl.fco.DNSSlaveZone; import org.sblim.wbemsmt.dns.bl.fco.DNSZone; //import org.sblim.wbemsmt.dns.gui.wizard.panels.ReverseZoneWizardPage1; //import org.sblim.wbemsmt.dns.gui.wizard.panels.ReverseZoneWizardPage3; //import org.sblim.wbemsmt.dns.gui.wizard.panels.ReverseZoneWizardPage4; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardData; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage01; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage1; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage2; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage21; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage31; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage3a; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage3b; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage3c; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage5; import org.sblim.wbemsmt.exception.CimConnectionException; import org.sblim.wbemsmt.exception.InvalidParameterException; import org.sblim.wbemsmt.exception.PropertyNotFoundException; import org.sblim.wbemsmt.tools.wizard.container.IWizardContainer; import org.sblim.wbemsmt.tools.wizard.container.WizardContainerBase; /** * Author B. Lange * @version 02.06.05 * * Implementation sample for DNSZone creation wizard task with common parts for JSF/SWING user interface * */public class DNSZoneWizardContainer extends WizardContainerBase implements IWizardContainer { protected CIMClient cimClient = null; public ZoneWizardData zoneWizardData = null; public DNSZone createdDNSZone = null; private String serviceName; public static final String ZONEWIZARDPAGE1 = "zoneWizardPage1"; public static final String ZONEWIZARDPAGE2 = "zoneWizardPage2"; public static final String ZONEWIZARDPAGE3a = "zoneWizardPage3a"; public static final String ZONEWIZARDPAGE3b = "zoneWizardPage3b"; public static final String ZONEWIZARDPAGE3c = "zoneWizardPage3c"; public static final String ZONEWIZARDPAGE5 = "zoneWizardPage5"; //reverse zone pages public static final String ZONEWIZARDPAGE01 = "zoneWizardPage01"; public static final String ZONEWIZARDPAGE21 = "zoneWizardPage21"; public static final String ZONEWIZARDPAGE31 = "zoneWizardPage31"; public static final String FINISHPAGE1 = "finishPage"; public DNSZoneWizardContainer(CIMClient cimClient, String serviceName) { super(); this.cimClient = cimClient; this.serviceName = serviceName; } public void initWizardContainer() { if (hmPages == null) { hmPages = new HashMap(); if (wizardRunType.equals("JSWING")) { System.out.println("initWizardContainer - JSWING"); hmPages.put(ZONEWIZARDPAGE1, new ZoneWizardPage1()); hmPages.put(ZONEWIZARDPAGE2, new ZoneWizardPage2()); hmPages.put(ZONEWIZARDPAGE3a, new ZoneWizardPage3a()); hmPages.put(ZONEWIZARDPAGE3b, new ZoneWizardPage3b()); hmPages.put(ZONEWIZARDPAGE3c, new ZoneWizardPage3c()); hmPages.put(ZONEWIZARDPAGE5, new ZoneWizardPage5()); hmPages.put(ZONEWIZARDPAGE01, new ZoneWizardPage01()); hmPages.put(ZONEWIZARDPAGE21, new ZoneWizardPage21(this.cimClient)); hmPages.put(ZONEWIZARDPAGE31, new ZoneWizardPage31(this.cimClient)); } else if (wizardRunType.equals("JSF")) { System.out.println("initWizardContainer - JSF"); hmPages.put(ZONEWIZARDPAGE1, ZONEWIZARDPAGE1); hmPages.put(ZONEWIZARDPAGE2, ZONEWIZARDPAGE2); hmPages.put(ZONEWIZARDPAGE3a, ZONEWIZARDPAGE3a); hmPages.put(ZONEWIZARDPAGE3b, ZONEWIZARDPAGE3b); hmPages.put(ZONEWIZARDPAGE5, ZONEWIZARDPAGE5); } } if (hmPages.size() == 0) noPages = true; this.zoneWizardData = new ZoneWizardData(cimClient); } public String getNextWizardPageName() { System.out.println("next - currentPageName: "+getCurrentPageName()); if (getCurrentPageName().equals("")) { return ZONEWIZARDPAGE1; } if (getCurrentPageName().equals(ZONEWIZARDPAGE1)) { if(zoneWizardData.getReverse()) return ZONEWIZARDPAGE01; else return ZONEWIZARDPAGE2; } if (getCurrentPageName().equals(ZONEWIZARDPAGE3a)) { this.buildSummaryText(); return ZONEWIZARDPAGE5; } if (getCurrentPageName().equals(ZONEWIZARDPAGE3b)) { this.buildSummaryText(); return ZONEWIZARDPAGE5; } if (getCurrentPageName().equals(ZONEWIZARDPAGE3c)) { this.buildSummaryText(); return ZONEWIZARDPAGE5; } if (getCurrentPageName().equals(ZONEWIZARDPAGE01)) { switch(zoneWizardData.getReverseWizardType()){ case 1: this.buildSummaryText(); return ZONEWIZARDPAGE5; case 2: return ZONEWIZARDPAGE21; case 3: return ZONEWIZARDPAGE31; } } if (getCurrentPageName().equals(ZONEWIZARDPAGE21)) { this.buildSummaryText(); return ZONEWIZARDPAGE5; } if (getCurrentPageName().equals(ZONEWIZARDPAGE31)) { this.buildSummaryText(); return ZONEWIZARDPAGE5; } if (getCurrentPageName().equals(ZONEWIZARDPAGE2)) { try { if (zoneWizardData.getDNSZone().getType() != null) { if (zoneWizardData.getDNSZone().getType().equals(new Short(DNSZone.TYPE_MASTER))) { return ZONEWIZARDPAGE3b; } else if(zoneWizardData.getDNSZone().getType().equals(new Short(DNSZone.TYPE_SLAVE))|| zoneWizardData.getDNSZone().getType().equals(new Short(DNSZone.TYPE_STUB))){ return ZONEWIZARDPAGE3a; } else if(zoneWizardData.getDNSZone().getType().equals(new Short(DNSZone.TYPE_FORWARD))){ return ZONEWIZARDPAGE3c; } else { this.buildSummaryText(); return ZONEWIZARDPAGE5; } } }catch (Exception ex) { ex.printStackTrace(); return ""; } } return ""; } public boolean isLast(String pageName) { if (pageName.equals(ZONEWIZARDPAGE5)) { return true; } else return false; } public boolean isFirst(String pageName) { if (pageName.equals(ZONEWIZARDPAGE1)) { return true; } else return false; } public void cleanUP(String pageName) { // cleanUP could be necessary for data object and for page object System.out.println("cleanUP - currentPageName: "+pageName); if (pageName.equals(ZONEWIZARDPAGE1)) { zoneWizardData.setZone("Unknown"); } if (pageName.equals(ZONEWIZARDPAGE2)) { zoneWizardData.getDNSZone().setName(""); } if (pageName.equals(ZONEWIZARDPAGE01)) { zoneWizardData.clearReverseZoneAdapter(); } if (pageName.equals(ZONEWIZARDPAGE3a)) { zoneWizardData.setIpAddresses(null); } if (pageName.equals(ZONEWIZARDPAGE3b)) { DNSMasterZone mz = (DNSMasterZone) zoneWizardData.getDNSZone(); mz.setContact(""); mz.setSoaServer(""); DNSResourceRecord aRR = this.zoneWizardData.getAResourceRecord(); aRR.setName(""); aRR.setValue(""); DNSResourceRecord nsRR = this.zoneWizardData.getNSResourceRecord(); nsRR.setName(""); nsRR.setValue(""); } if (pageName.equals(ZONEWIZARDPAGE3c)) { zoneWizardData.setIpAddresses(null); try{ ((DNSForwardZone)zoneWizardData.getDNSZone()).setForward(new Short((short)0)); }catch(Exception ex){ System.err.println("Error while resetting forward attribute"); ex.printStackTrace(); } } if (pageName.equals(ZONEWIZARDPAGE5)) { } } public boolean isValid(String propertyName, Object value, Vector result) { try{ if(propertyName == DNSZone.CIM_PROPERTY_NAME || propertyName == DNSZone.CIM_PROPERTY_TYPE || propertyName == DNSMasterZone.CIM_PROPERTY_CONTACT || propertyName == DNSMasterZone.CIM_PROPERTY_SERVER) if(!DNSMasterZone.checkProperty(propertyName, value)){ result.add("Invalid " + propertyName + "\n"); return false; }else return true; else if(propertyName == DNSResourceRecord.CIM_PROPERTY_NAME){ DNSResourceRecord nsrr = zoneWizardData.getNSResourceRecord(); if(!DNSResourceRecord.checkProperty(propertyName,value,nsrr.getType())){ result.add("Ivalid " + propertyName + "\n"); return false; }else return true; }else if(propertyName == DNSResourceRecord.CIM_PROPERTY_VALUE){ DNSResourceRecord arr = zoneWizardData.getAResourceRecord(); if(!DNSResourceRecord.checkProperty(propertyName,value,arr.getType())){ result.add("Ivalid " + propertyName + "\n"); return false; } else return true; }else if(propertyName == DNSIPAddress.CIM_PROPERTY_IPADDRESS){ if(!DNSIPAddress.checkProperty(propertyName,value)){ result.add("Ivalid " + propertyName + "\n"); return false; }else return true; } }catch (Exception e){ e.printStackTrace(); return false; } result.add("Property "+ propertyName + " not found"); return false; } private void buildSummaryText() { summary = new String[5]; String na = "= n/a"+System.getProperty("line.separator"); try { if(zoneWizardData.getReverse()){ String line1 = new String("Reverse zones ="); String[] names = zoneWizardData.getReverseZoneAdapter().getReverseZoneNames(); for(int i=0;i<names.length;i++) line1 = line1 + " " + names[i] + ","; summary[0] = line1; summary[1] = ""; summary[2] = ""; summary[3] = ""; summary[4] = ""; }else{ String line1 = new String("Zone Name "); if (this.zoneWizardData.getDNSZone().getName() != null && !this.zoneWizardData.getDNSZone().getName().trim().equals("")) line1 = line1+("= "+this.zoneWizardData.getDNSZone().getName()+System.getProperty("line.separator")); else line1 = line1+(na); summary[0] = line1; String line2 = new String("Zone Type "); if (this.zoneWizardData.getDNSZone().getTypeString() != null && !this.zoneWizardData.getDNSZone().getTypeString().trim().equals("")) line2 = line2+("= "+this.zoneWizardData.getDNSZone().getTypeString()+System.getProperty("line.separator")); else line2 = line2+(na); summary[1] = line2; if (this.zoneWizardData.getDNSZone().getType().shortValue() == DNSZone.TYPE_MASTER) { String line3 = new String("Zone Contact "); DNSMasterZone mz = (DNSMasterZone) this.zoneWizardData.getDNSZone(); if (mz.getContact()!= null && !mz.getContact().trim().equals("")) line3 = line3+("= "+mz.getContact()+System.getProperty("line.separator")); else line3 = line3+(na); summary[2] = line3; String line4 = new String("NameServer Name "); if (zoneWizardData.getNSResourceRecord().getValue() != null && !this.zoneWizardData.getNSResourceRecord().getValue().trim().equals("")) line4 = line4+("= "+zoneWizardData.getNSResourceRecord().getValue()+System.getProperty("line.separator")); else line4 = line4+(na); summary[3] = line4; String line5 = new String("NameServer IP "); if (mz.getSoaServer() != null && !mz.getSoaServer().trim().equals("")) line5 = line5+("= "+mz.getSoaServer()+System.getProperty("line.separator")); else line5 = line5+(na); summary[4] = line5; } else if(this.zoneWizardData.getDNSZone().getType().shortValue() == DNSZone.TYPE_SLAVE || this.zoneWizardData.getDNSZone().getType().shortValue() == DNSZone.TYPE_STUB){ String line3 = new String("Master Servers "); if (this.zoneWizardData.getIpAddresses() != null){ String[] m = this.zoneWizardData.getIpAddresses(); line3 = line3+("= "); for (int i=0;i<m.length;i++) line3 = line3+(" "+m[i]+","); line3 = line3 + System.getProperty("line.separator"); }else line3 = line3+(na); summary[2] = line3; summary[3] = ""; summary[4] = ""; }else if(this.zoneWizardData.getDNSZone().getType().shortValue() == DNSZone.TYPE_FORWARD){ String line4 = new String("Forwarders "); String line3 = new String("Forward "); line3 = line3 + "= " + ((DNSForwardZone)this.zoneWizardData.getDNSZone()).getForwardString() + System.getProperty("line.separator"); if (this.zoneWizardData.getIpAddresses() != null){ String[] m = this.zoneWizardData.getIpAddresses(); line4 = line4+("= "); for (int i=0;i<m.length;i++) line4 = line4+(" "+m[i]+","); line4 = line4 + System.getProperty("line.separator"); }else line4 = line4+(na); summary[2] = line3; summary[3] = line4; summary[4] = ""; } else{ summary[2] = ""; summary[3] = ""; summary[4] = ""; } } } catch (PropertyNotFoundException nfe) { System.out.println("caught exception: "+nfe); } } public void preWizardFinish() throws InvalidParameterException, CimConnectionException, PropertyNotFoundException { System.out.println("calling preWizardFinish()"); DNSResourceRecord aRR = this.getZoneWizardData().getAResourceRecord(); DNSResourceRecord nsRR = this.getZoneWizardData().getNSResourceRecord(); String info = ""; ArrayList mastersOfSlave = new ArrayList(); String[] ipAddresses = this.getZoneWizardData().getIpAddresses(); try { if((this.zoneWizardData.getDNSZone().getType()!=null?this.zoneWizardData.getDNSZone().getType().shortValue():DNSZone.TYPE_UNKNOWN) == DNSZone.TYPE_MASTER) { nsRR.setName(""); //abreviation of zone name, BIND9 nsRR.setZoneName(this.getZoneWizardData().getDNSZone().getName()); nsRR.setFamily(new Short(DNSResourceRecord.CIM_FAMILY_INTERNET)); aRR.setName(nsRR.getValue()); aRR.setZoneName(this.getZoneWizardData().getDNSZone().getName()); aRR.setFamily(new Short(DNSResourceRecord.CIM_FAMILY_INTERNET)); }else if((this.zoneWizardData.getDNSZone().getType()!=null?this.zoneWizardData.getDNSZone().getType().shortValue():DNSZone.TYPE_UNKNOWN) == DNSZone.TYPE_SLAVE || (this.zoneWizardData.getDNSZone().getType()!=null?this.zoneWizardData.getDNSZone().getType().shortValue():DNSZone.TYPE_UNKNOWN) == DNSZone.TYPE_STUB){ for(int i=0; i<ipAddresses.length;i++){ DNSIPAddress ip = new DNSIPAddress(this.cimClient); ip.setIPAddress(ipAddresses[i]); ip.setZoneName(this.getZoneWizardData().getDNSZone().getName()); mastersOfSlave.add(ip); } }else if((this.zoneWizardData.getDNSZone().getType()!=null?this.zoneWizardData.getDNSZone().getType().shortValue():DNSZone.TYPE_UNKNOWN) == DNSZone.TYPE_FORWARD){ } } catch (Exception e) { System.err.println("Could not get Property"); e.printStackTrace(); } try{ //check here the type of the DNS zone to create and create the derived type if(zoneWizardData.getReverse()){ ReverseZone revZone = null; DNSMasterZone zone = null; DNSResourceRecord r = null; ArrayList revZones = zoneWizardData.getReverseZoneAdapter().createReverseZones(); ArrayList records = null; for(int i=0; i<revZones.size();i++){ revZone = (ReverseZone) revZones.get(i); zone = revZone.getZone(); try{ DNSMasterZone.createInstance(this.cimClient,zone); }catch(CIMException e){ if(e.getDescription().indexOf("ALREADY_EXISTS")==-1) System.err.println("Error while creating reverse zone "+zone.getName()); } records = revZone.getZoneResourceRecords(); for(int j=0;j<records.size();j++){ r = (DNSResourceRecord) records.get(j); try{ DNSResourceRecord.createInstance(this.cimClient,r); }catch(CIMException e){ if(e.getDescription().indexOf("ALREADY_EXISTS")==-1) System.err.println("Error while creating reverse zone resource record "+r.getName()); continue; } } } } else if ((this.zoneWizardData.getDNSZone().getType()!=null?this.zoneWizardData.getDNSZone().getType().shortValue():DNSZone.TYPE_UNKNOWN) == DNSZone.TYPE_MASTER) { createdDNSZone = DNSMasterZone.createInstance(this.cimClient,(DNSMasterZone)this.getZoneWizardData().getDNSZone()); info = "Created Master zone only"; DNSResourceRecord.createInstance(this.cimClient, this.zoneWizardData.getNSResourceRecord()); info = "Created Master zone and NS resource record only"; DNSResourceRecord.createInstance(this.cimClient, this.zoneWizardData.getAResourceRecord()); }else if((this.zoneWizardData.getDNSZone().getType()!=null?this.zoneWizardData.getDNSZone().getType().shortValue():DNSZone.TYPE_UNKNOWN) == DNSZone.TYPE_SLAVE || (this.zoneWizardData.getDNSZone().getType()!=null?this.zoneWizardData.getDNSZone().getType().shortValue():DNSZone.TYPE_UNKNOWN) == DNSZone.TYPE_STUB){ createdDNSZone = DNSSlaveZone.createInstance(this.cimClient,(DNSSlaveZone)this.getZoneWizardData().getDNSZone()); info = "Created slave zone only"; for(int i=0; i<mastersOfSlave.size();i++){ DNSIPAddress.createInstance(cimClient,(DNSIPAddress)mastersOfSlave.get(i)); info = "Created slave zone and reference to some of its masters"; } }else if((this.zoneWizardData.getDNSZone().getType()!=null?this.zoneWizardData.getDNSZone().getType().shortValue():DNSZone.TYPE_UNKNOWN) == DNSZone.TYPE_HINT){ createdDNSZone = DNSHintZone.createInstance(this.cimClient,(DNSHintZone)this.getZoneWizardData().getDNSZone()); }else if((this.zoneWizardData.getDNSZone().getType()!=null?this.zoneWizardData.getDNSZone().getType().shortValue():DNSZone.TYPE_UNKNOWN) == DNSZone.TYPE_FORWARD){ createdDNSZone = DNSForwardZone.createInstance(this.cimClient,(DNSForwardZone)this.getZoneWizardData().getDNSZone()); } }catch(CIMException e){ throw new CIMException(info); } } public void postWizardFinish() { } /** * @return Returns the zoneWizardData. */ public ZoneWizardData getZoneWizardData() { return zoneWizardData; } /** * @param zoneWizardData The zoneWizardData to set. */ public void setZoneWizardData(ZoneWizardData zoneWizardData) { this.zoneWizardData = zoneWizardData; } } --- NEW FILE: DNSZoneSwingAdapter.java --- /** * DNSZoneSwingAdapter.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Bert Lange <la...@de...> * * Contributors: * Rodrigo Ceron <rc...@br...> **/ /* * Created on Jul 26, 2005, ceron */ package org.sblim.wbemsmt.dns.gui.wizard; import java.awt.Dimension; import java.util.ArrayList; import java.util.Enumeration; import java.util.Vector; import javax.swing.DefaultListModel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JRadioButton; import org.sblim.wbemsmt.dns.bl.adapter.ReverseZoneAdapter; import org.sblim.wbemsmt.dns.bl.fco.DNSForwardZone; import org.sblim.wbemsmt.dns.bl.fco.DNSMasterZone; import org.sblim.wbemsmt.dns.bl.fco.DNSResourceRecord; import org.sblim.wbemsmt.dns.bl.fco.DNSZone; import org.sblim.wbemsmt.dns.gui.DNSApplication; import org.sblim.wbemsmt.dns.gui.ResourceRecordListComponent; import org.sblim.wbemsmt.dns.gui.ZoneListComponent; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage01; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage1; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage2; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage21; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage31; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage3a; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage3b; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage3c; import org.sblim.wbemsmt.dns.gui.wizard.panels.ZoneWizardPage5; import org.sblim.wbemsmt.tools.wizard.adapter.IPageWizardAdapter; import org.sblim.wbemsmt.tools.wizard.adapter.SwingWizardAdapterBase; import org.sblim.wbemsmt.tools.wizard.container.IWizardContainer; /** * Author B. Lange * @version 02.06.05 * * Implementation sample for DNSZone creation wizard task controlling JSwing wizard pages * */public class DNSZoneSwingAdapter extends SwingWizardAdapterBase implements IPageWizardAdapter { private DNSApplication owner = null; private DNSZoneWizardContainer dnsContainer = null; private int actualPanelNumber = 0; public DNSZoneSwingAdapter(Dimension dimension, DNSApplication owner, String wizardName) { super(owner); this.owner = owner; this.dnsContainer = new DNSZoneWizardContainer(owner.getCIMClient(), wizardName); super.initialize(dimension, wizardName); try { super.initWizard((IWizardContainer)dnsContainer, this); } catch (Exception ex) { ex.printStackTrace(); return; } System.out.println("Wizard initialized"); } public void cleanUPPage(String panelName) { if (panelName.equals(DNSZoneWizardContainer.ZONEWIZARDPAGE1)) { } if (panelName.equals(DNSZoneWizardContainer.ZONEWIZARDPAGE2)) { dnsContainer.getPages().put(panelName, new ZoneWizardPage2()); } if (panelName.equals(DNSZoneWizardContainer.ZONEWIZARDPAGE3a)) { dnsContainer.getPages().put(panelName, new ZoneWizardPage3a()); } if (panelName.equals(DNSZoneWizardContainer.ZONEWIZARDPAGE3b)) { dnsContainer.getPages().put(panelName, new ZoneWizardPage3b()); } if (panelName.equals(DNSZoneWizardContainer.ZONEWIZARDPAGE3c)) { dnsContainer.getPages().put(panelName, new ZoneWizardPage3c()); } if (panelName.equals(DNSZoneWizardContainer.ZONEWIZARDPAGE01)) { dnsContainer.getPages().put(panelName, new ZoneWizardPage01()); } if (panelName.equals(DNSZoneWizardContainer.ZONEWIZARDPAGE5)) { } } public boolean savePageValues(String actualPanelName) { Vector result = new Vector(); String errorMsg = null; JPanel jPanel = (JPanel)(container.getPages().get(actualPanelName)); if (this.saveData(jPanel,result)) return true; errorMsg = result.toString().replaceAll("[\\[\\],]",""); JOptionPane.showMessageDialog(this, errorMsg, "ERROR", JOptionPane.ERROR_MESSAGE); return false; } public void setSummaryText(String nextPanelName) { JPanel panel = (JPanel)(container.getPages().get(nextPanelName)); StringBuffer sbText = new StringBuffer(); for (int i=0; i<dnsContainer.getSummary().length; i++) { sbText.append(dnsContainer.getSummary()[i]); } ((ZoneWizardPage5) panel).getJTextArea().setText(sbText.toString()); } public String wizardComplete() { System.out.println("count of used wizard panels: "+dnsContainer.getUsedPages().size()); try { dnsContainer.preWizardFinish(); } catch (Exception ex) { ex.printStackTrace(); JOptionPane.showMessageDialog(this, "DNS Zone wizard failed: " + ex.getMessage(), "ERROR", JOptionPane.ERROR_MESSAGE); return ""; } if(!dnsContainer.zoneWizardData.getReverse()){ int originalCount = owner.getJComboBox10().getItemCount(); owner.getJComboBox10().addItem(new ZoneListComponent(dnsContainer.createdDNSZone)); owner.getJComboBox10().setSelectedIndex(originalCount); owner.getJComboBox3().addItem(new ZoneListComponent(dnsContainer.createdDNSZone)); owner.getJComboBox3().setSelectedIndex(originalCount); owner.displayValuesZoneOpt(dnsContainer.createdDNSZone); }else{ owner.initializeZoneCombos(); } System.out.println("executed preWizardFinish()"); this.setVisible(false); this.dispose(); dnsContainer.postWizardFinish(); System.out.println("sent values from wizard to business logic"); return null; } private boolean saveData(JPanel jpanel, Vector result) { boolean error = false; if (container.getCurrentPageName().equals(DNSZoneWizardContainer.ZONEWIZARDPAGE1)) { JRadioButton button = null; Enumeration eButtons = ((ZoneWizardPage1)jpanel).getBGroup().getElements(); boolean selected = false; while (eButtons.hasMoreElements()) { button = (JRadioButton) eButtons.nextElement(); if (button.isSelected()) { selected = true; break; } } dnsContainer.zoneWizardData.setZone(button.getName()); if (!dnsContainer.isValid(DNSZone.CIM_PROPERTY_TYPE, new Boolean(selected), result)) return false; try{ if(!dnsContainer.zoneWizardData.getReverse()) dnsContainer.zoneWizardData.getDNSZone().setType(button.getName()); else dnsContainer.zoneWizardData.getDNSZone().setType("Master"); }catch(Exception e){ e.printStackTrace(); return false; } } //Check zone name if (dnsContainer.getCurrentPageName().equals(DNSZoneWizardContainer.ZONEWIZARDPAGE2)) { if (!dnsContainer.isValid(DNSZone.CIM_PROPERTY_NAME, ((ZoneWizardPage2)jpanel).getJTextField().getText(), result)) return false; dnsContainer.zoneWizardData.getDNSZone().setName(((ZoneWizardPage2)jpanel).getJTextField().getText()); } //Slave zone specific if (dnsContainer.getCurrentPageName().equals(DNSZoneWizardContainer.ZONEWIZARDPAGE3a)) { DefaultListModel model = (DefaultListModel)((ZoneWizardPage3a)jpanel).getJList().getModel(); Object[] o = model.toArray(); if(o.length==0){ result.add("A slave needs at least one master!"); return false; } String[] s = new String[o.length]; for(int i=0; i<o.length;i++) s[i] = (String) o[i]; dnsContainer.zoneWizardData.setIpAddresses(s); } //Master zone specific if (dnsContainer.getCurrentPageName().equals(DNSZoneWizardContainer.ZONEWIZARDPAGE3b)) { DNSResourceRecord aRR = dnsContainer.zoneWizardData.getAResourceRecord(); DNSResourceRecord nsRR = dnsContainer.zoneWizardData.getNSResourceRecord(); try{ aRR.setType(new Short(DNSResourceRecord.CIM_TYPE_A)); nsRR.setType(new Short(DNSResourceRecord.CIM_TYPE_NS)); }catch (Exception e) { System.err.println("Error while setting zone resource record type"); e.printStackTrace(); } if(!dnsContainer.isValid(DNSMasterZone.CIM_PROPERTY_CONTACT, (((ZoneWizardPage3b)jpanel).getJTextField2().getText()), result)) error = true; if(!dnsContainer.isValid(DNSMasterZone.CIM_PROPERTY_SERVER, (((ZoneWizardPage3b)jpanel).getJTextField1().getText()), result)) error = true; if(!dnsContainer.isValid(DNSResourceRecord.CIM_PROPERTY_VALUE, (((ZoneWizardPage3b)jpanel).getJTextField().getText()), result)) error = true; if(error) return false; ((DNSMasterZone)dnsContainer.zoneWizardData.getDNSZone()).setContact(((ZoneWizardPage3b)jpanel).getJTextField2().getText()); ((DNSMasterZone)dnsContainer.zoneWizardData.getDNSZone()).setSoaServer(((ZoneWizardPage3b)jpanel).getJTextField1().getText()); try { nsRR.setValue(((ZoneWizardPage3b)jpanel).getJTextField1().getText()); aRR.setName(((ZoneWizardPage3b)jpanel).getJTextField1().getText()); aRR.setValue(((ZoneWizardPage3b)jpanel).getJTextField().getText()); } catch (Exception e) { System.err.println("Error while creating zone resource record"); e.printStackTrace(); } } //Forward zone specific if (dnsContainer.getCurrentPageName().equals(DNSZoneWizardContainer.ZONEWIZARDPAGE3c)) { DNSForwardZone zone = (DNSForwardZone) dnsContainer.zoneWizardData.getDNSZone(); DefaultListModel model = (DefaultListModel)((ZoneWizardPage3c)jpanel).getJList().getModel(); Object[] o = model.toArray(); String[] s = new String[o.length]; if(o.length>0){ for(int i=0; i<o.length;i++) s[i] = (String) o[i]; dnsContainer.zoneWizardData.setIpAddresses(s); zone.setForwarders(s); } try{ if(((ZoneWizardPage3c)jpanel).getJRadioButton().isSelected()) zone.setForward(new Short(DNSForwardZone.FORWARD_ONLY)); else if(((ZoneWizardPage3c)jpanel).getJRadioButton1().isSelected()) zone.setForward(new Short(DNSForwardZone.FORWARD_FIRST)); }catch(Exception ex){ System.err.println("Error while setting forward attribute"); ex.printStackTrace(); } } //Reverse Zone - create all of them if (dnsContainer.getCurrentPageName().equals(DNSZoneWizardContainer.ZONEWIZARDPAGE01)) { if(((ZoneWizardPage01)jpanel).getJRadioButton6().isSelected()){ dnsContainer.zoneWizardData.setReverseWizardType((short)1); dnsContainer.zoneWizardData.setReverseZoneAdapter(); ReverseZoneAdapter revZoneAdapter = dnsContainer.zoneWizardData.getReverseZoneAdapter(); revZoneAdapter.builReverseInfo(); return true; }else if(((ZoneWizardPage01)jpanel).getJRadioButton().isSelected()){ dnsContainer.zoneWizardData.setReverseWizardType((short)2); return true; } else if(((ZoneWizardPage01)jpanel).getJRadioButton1().isSelected()){ dnsContainer.zoneWizardData.setReverseWizardType((short)3); return true; } result.add("Select a valid wizard"); return false; } if (dnsContainer.getCurrentPageName().equals(DNSZoneWizardContainer.ZONEWIZARDPAGE21)) { if( ((ZoneWizardPage21)jpanel).getJComboBox().getSelectedIndex()>=0){ DNSMasterZone zone = (DNSMasterZone)((ZoneListComponent)((ZoneWizardPage21)jpanel).getJComboBox().getSelectedItem()).getUserObject(); dnsContainer.zoneWizardData.setReverseZoneAdapter(zone); ReverseZoneAdapter revZoneAdapter = dnsContainer.zoneWizardData.getReverseZoneAdapter(); revZoneAdapter.builReverseInfo(); return true; } result.add("Select a master zone"); return false; } if (dnsContainer.getCurrentPageName().equals(DNSZoneWizardContainer.ZONEWIZARDPAGE31)) { if( ((ZoneWizardPage31)jpanel).getJList().getSelectedIndex()>=0){ ArrayList rrs = new ArrayList(); DefaultListModel model = (DefaultListModel) ((ZoneWizardPage31)jpanel).getJList().getModel(); int[] indices = ((ZoneWizardPage31)jpanel).getJList().getSelectedIndices(); for(int i=0; i<indices.length;i++) rrs.add(((ResourceRecordListComponent)model.get(indices[i])).getUserObject()); dnsContainer.zoneWizardData.setReverseZoneAdapter(rrs); ReverseZoneAdapter revZoneAdapter = dnsContainer.zoneWizardData.getReverseZoneAdapter(); revZoneAdapter.builReverseInfo(); return true; } result.add("Select at least one resource record"); return false; } return true; } /** * @return Returns the dnsContainer. */ public DNSZoneWizardContainer getDnsContainer() { return dnsContainer; } /** * @param dnsContainer The dnsContainer to set. */ public void setDnsContainer(DNSZoneWizardContainer dnsContainer) { this.dnsContainer = dnsContainer; } } --- NEW FILE: DNSACLWizardContainer.java --- /** * DNSACLWizardContainer.java * * (C) Copyright IBM Corp. 2005 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. * * You can obtain a current copy of the Common Public License from * http://www.opensource.org/licenses/cpl1.0.php * * Author: Fernando Aires <fa...@br...> * * Contributors: * Rodrigo Ceron <rc...@br...> * **/ /* * Created on Jul 27, 2005, aires */ package org.sblim.wbemsmt.dns.gui.wizard; import java.util.HashMap; import java.util.Vector; import org.sblim.wbem.client.CIMClient; import org.sblim.wbemsmt.dns.bl.fco.DNSAddressMatchList; import org.sblim.wbemsmt.dns.gui.wizard.panels.ACLWizardData; import org.sblim.wbemsmt.dns.gui.wizard.panels.ACLWizardPage1; import org.sblim.wbemsmt.dns.gui.wizard.panels.ACLWizardPage2; import org.sblim.wbemsmt.dns.gui.wizard.panels.ACLWizardPage3; import org.sblim.wbemsmt.exception.CimConnectionException; import org.sblim.wbemsmt.exception.InvalidParameterException; import org.sblim.wbemsmt.exception.PropertyNotFoundException; import org.sblim.wbemsmt.tools.wizard.container.IWizardContainer; import org.sblim.wbemsmt.tools.wizard.container.WizardContainerBase; public class DNSACLWizardContainer extends WizardContainerBase implements IWizardContainer { protected CIMClient cimClient = null; public ACLWizardData aclWizardData = null; public DNSAddressMatchList createdACL = null; private String serviceName; public static final String ACLWIZARDPAGE1 = "aclWizardPage1"; public static final String ACLWIZARDPAGE2 = "aclWizardPage2"; public static final String ACLWIZARDPAGE3 = "aclWizardPage3"; public DNSACLWizardContainer(CIMClient cimClient, String serviceName) { super(); this.cimClient = cimClient; this.serviceName = serviceName; } public void initWizardContainer() { if (hmPages == null) { hmPages = new HashMap(); if (wizardRunType.equals("JSWING")) { System.out.println("initWizardContainer - JSWING"); hmPages.put(ACLWIZARDPAGE1, new ACLWizardPage1(this.cimClient)); hmPages.put(ACLWIZARDPAGE2, new ACLWizardPage2()); hmPages.put(ACLWIZARDPAGE3, new ACLWizardPage3()); } else if (wizardRunType.equals("JSF")) { //aires TODO fill with JSF code } } if (hmPages.size() == 0) noPages = true; this.aclWizardData = new ACLWizardData(cimClient); } public String getNextWizardPageName() { System.out.println("next - currentPageName: "+getCurrentPageName()); if (getCurrentPageName().equals("")) { return ACLWIZARDPAGE1; } if (getCurrentPageName().equals(ACLWIZARDPAGE1)) { return ACLWIZARDPAGE2; } if (getCurrentPageName().equals(ACLWIZARDPAGE2)) { this.buildSummaryText(); return ACLWIZARDPAGE3; } else return ""; } public boolean isLast(String pageName) { if (pageName.equals(ACLWIZARDPAGE3)) { return true; } else return false; } public boolean isFirst(String pageName) { if (pageName.equals(ACLWIZARDPAGE1)) { return true; } else return false; } public void cleanUP(String pageName) { System.out.println("cleanUP - currentPageName: "+pageName); if (pageName.equals(ACLWIZARDPAGE1)) { try{ aclWizardData.getACL().setName(""); aclWizardData.getACL().setServiceName(""); aclWizardData.getACL().setAddressListType(new Short((short)0)); } catch(Exception e){ e.printStackTrace(); } } if (pageName.equals(ACLWIZARDPAGE2)) { String[] emptyList = new String[0]; aclWizardData.getACL().setAddressList(emptyList); } if (pageName.equals(ACLWIZARDPAGE3)) { } } public boolean isValid(String propertyName, Object value, Vector result) { try { if(propertyName.equals(DNSAddressMatchList.CIM_PROPERTY_NAME) || propertyName.equals(DNSAddressMatchList.CIM_PROPERTY_SERVICENAME) || propertyName.equals(DNSAddressMatchList.CIM_PROPERTY_ADDRESSLISTTYPE) || propertyName.equals(DNSAddressMatchList.CIM_PROPERTY_ADDRESSLIST)) { if(! aclWizardData.getACL().checkProperty(propertyName,value)){ result.add("Invalid "+ propertyName +"\n"); } else return true; } } catch (Exception e) { System.err.println("Error defining Resource Record type"); } return false; } private void buildSummaryText() { summary = new String[4]; String na = "= n/a"+System.getProperty("line.separator"); try { summary[0] = new String("RR Service Name "); if (this.aclWizardData.getACL().getServiceName() != null && !this.aclWizardData.getACL().getServiceName().trim().equals("")) summary[0] = summary[0]+("= "+this.aclWizardData.getACL().getServiceName()+System.getProperty("line.separator")); else summary[0] = summary[0]+(na); summary[1] = new String("RR Name "); if (this.aclWizardData.getACL().getName() != null && !this.aclWizardData.getACL().getName().trim().equals("")) summary[1] = summary[1]+("= "+this.aclWizardData.getACL().getName()+System.getProperty("line.separator")); else summary[1] = summary[1]+(na); summary[2] = new String("RR Addr List Type "); if (this.aclWizardData.getACL().getAddressListType() != null) summary[2] = summary[2]+("= "+this.aclWizardData.getACL().getAddressListTypeString()+System.getProperty("line.separator")); else summary[2] = summary[2]+(na); summary[3] = new String("RR Address List "); if (this.aclWizardData.getACL().getAddressList() != null) { boolean printed = false; for(int i=0; i<this.aclWizardData.getACL().getAddressList().length; i++) { if (this.aclWizardData.getACL().getAddressList()[i] != null && !((String) this.aclWizardData.getACL().getAddressList()[i]).trim().equals("")) { if (!printed) summary[3] = summary[3]+("= "); else summary[3] = summary[3]+(", "); printed = true; summary[3] = summary[3]+this.aclWizardData.getACL().getAddressList()[i]; } } if(printed) summary[3] = summary[3]+System.getProperty("line.separator"); else summary[3] = summary[3]+("none")+System.getProperty("line.separator"); } else summary[3]=summary[3]+(na); } catch (PropertyNotFoundException nfe) { System.out.println("caught exception: "+nfe); } } public void preWizardFinish() throws InvalidParameterException, CimConnectionException, PropertyNotFoundException { System.out.println("calling preWizardFinish()"); DNSAddressMatchList myACL = this.getACLWizardData().getACL(); createdACL = DNSAddressMatchList.createInstance(cimClient, myACL); } public void postWizardFinish() { } /** * @return Returns the ResourceRecordWizardData. */ public ACLWizardData getACLWizardData() { return aclWizardData; } /** * @param rrWizardData The ResourceRecordWizardData to set. */ public void setACLWizardData(ACLWizardData aclWizardData) { this.aclWizardData = aclWizardData; } } |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:37:42
|
Update of /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15133/jswing/org/sblim/wbemsmt/dns Log Message: Directory /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:37:41
|
Update of /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15133/jswing/org/sblim/wbemsmt Log Message: Directory /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:37:41
|
Update of /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15133/jswing/org/sblim/wbemsmt/dns/gui Log Message: Directory /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns/gui added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:37:41
|
Update of /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15133/jswing/org/sblim Log Message: Directory /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:37:41
|
Update of /cvsroot/sblim/wbemsmt-dns-eui/jswing/org In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15133/jswing/org Log Message: Directory /cvsroot/sblim/wbemsmt-dns-eui/jswing/org added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:37:41
|
Update of /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns/gui/wizard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15133/jswing/org/sblim/wbemsmt/dns/gui/wizard Log Message: Directory /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns/gui/wizard added to the repository |
From: Wolfgang T. <ta...@us...> - 2005-08-16 15:37:41
|
Update of /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns/gui/wizard/panels In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15133/jswing/org/sblim/wbemsmt/dns/gui/wizard/panels Log Message: Directory /cvsroot/sblim/wbemsmt-dns-eui/jswing/org/sblim/wbemsmt/dns/gui/wizard/panels added to the repository |