You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(19) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Frank B. J. <bi...@us...> - 2004-06-09 07:59:27
|
Update of /cvsroot/openbroad/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23895 Added Files: Installation.sxw Log Message: Initial version of the installation guide. Short descriptions of: * MySQL * JBoss * Apache --- NEW FILE: Installation.sxw --- (This appears to be a binary file; contents omitted.) |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:46:09
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view/control In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20108 Modified Files: PrintPreview.java Log Message: Default scale is now 100%. Code cleanup and formatting (still needs translation). Index: PrintPreview.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view/control/PrintPreview.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** PrintPreview.java 15 Apr 2004 12:36:13 -0000 1.1.1.1 --- PrintPreview.java 5 May 2004 08:46:01 -0000 1.2 *************** *** 18,372 **** package org.openbroad.client.user.view.control; - import java.awt.*; ! import java.awt.event.*; ! import java.awt.image.*; ! import java.util.*; ! import java.awt.print.*; ! import javax.swing.*; ! import javax.swing.border.*; ! import javax.swing.event.*; ! public class PrintPreview ! extends JFrame ! implements ActionListener { ! protected int m_wPage; ! protected int m_hPage; ! protected int m_orientation; ! protected Printable m_target; ! protected JComboBox m_cbScale,orintering; ! protected PreviewContainer m_preview; ! ! private JButton printKnap,annullerKnap; ! ! private int frameWidth = 800; ! private int frameHeight = 500; ! ! public PrintPreview(Printable target,String title, int orientation) ! { ! super(title); ! ! getContentPane().setLayout(new BorderLayout()); ! m_target = target; ! m_orientation = orientation; ! ! JToolBar tb = new JToolBar(); ! ! printKnap = new JButton("Udskriv"); ! printKnap.addActionListener(this); ! tb.add(printKnap); ! ! annullerKnap = new JButton("Luk"); ! annullerKnap.addActionListener(this); ! tb.add(annullerKnap); ! ! String[] scales = ! { ! "25 %", "50 %", "100 %" ! }; ! m_cbScale = new JComboBox(scales); ! m_cbScale.addActionListener(this); ! m_cbScale.setMaximumSize(m_cbScale.getPreferredSize()); ! m_cbScale.setEditable(true); ! tb.addSeparator(); ! tb.add(m_cbScale); ! getContentPane().add(tb, BorderLayout.NORTH); ! ! String[] typer = ! { ! "Portr�t","Landskab" ! }; ! orintering = new JComboBox(typer); ! orintering.addActionListener(this); ! orintering.setMaximumSize(orintering.getPreferredSize()); ! // tb.add(orintering); ! ! opret(m_target,m_orientation); ! ! setDefaultCloseOperation(DISPOSE_ON_CLOSE); ! ! java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); ! setSize(new java.awt.Dimension(frameWidth, frameHeight)); ! setLocation((screenSize.width - this.getWidth()) / 2, (screenSize.height - this.getHeight()) / 2); ! ! setVisible(true); ! } ! ! public void opret(Printable target,int orintering) ! { ! m_preview = new PreviewContainer(); ! m_target = target; ! m_orientation = orintering; ! ! PrinterJob prnJob = PrinterJob.getPrinterJob(); ! PageFormat pageFormat = prnJob.defaultPage(); ! pageFormat.setOrientation(m_orientation); ! ! if (pageFormat.getHeight()==0 || pageFormat.getWidth()==0) ! { ! System.err.println("Fejl i side st�rrelse"); ! return; ! } ! m_wPage = (int)(pageFormat.getWidth()); ! m_hPage = (int)(pageFormat.getHeight()); ! int scale = 25; ! int w = (int)(m_wPage*scale/100); ! int h = (int)(m_hPage*scale/100); ! ! int pageIndex = 0; ! try ! { ! while(true) ! { ! ! BufferedImage img = new BufferedImage(m_wPage,m_hPage, BufferedImage.TYPE_INT_RGB); ! Graphics grafik = img.getGraphics(); ! ! ! // BufferedImage img = new BufferedImage(m_wPage, m_hPage, ! // BufferedImage.TYPE_INT_RGB); ! // Graphics2D grafik = (Graphics2D) img.getGraphics(); ! // grafik.setRenderingHint(RenderingHints.KEY_ANTIALIASING, ! // RenderingHints.VALUE_ANTIALIAS_ON); ! ! grafik.setColor(Color.white); ! grafik.fillRect(0, 0, m_wPage, m_hPage); ! if (target.print(grafik, pageFormat, pageIndex) != Printable.PAGE_EXISTS) ! break; ! ! PagePreview pp = new PagePreview(w, h, img); ! m_preview.add(pp); ! pageIndex++; ! } ! } ! catch (PrinterException e) ! { ! e.printStackTrace(); ! System.err.println("Printing error: "+e.toString()); ! } ! ! JScrollPane ps = new JScrollPane(m_preview); ! getContentPane().add(ps, BorderLayout.CENTER); ! ! repaint(); ! } ! public void opdater() ! { ! String str = m_cbScale.getSelectedItem(). ! toString(); ! if (str.endsWith("%")) ! str = str.substring(0, str.length()-1); ! str = str.trim(); ! int scale = 0; ! try ! { scale = Integer.parseInt(str); } ! catch (NumberFormatException ex) ! { return; } ! int w = (int)(m_wPage*scale/100); ! int h = (int)(m_hPage*scale/100); ! ! Component[] comps = m_preview.getComponents(); ! for (int k=0; k<comps.length; k++) ! { ! if (!(comps[k] instanceof PagePreview)) ! continue; ! PagePreview pp = (PagePreview)comps[k]; ! pp.setScaledSize(w, h); ! } ! m_preview.doLayout(); ! m_preview.getParent().getParent().validate(); ! } ! public void actionPerformed(ActionEvent e) ! { ! if(e.getSource()==printKnap) ! { ! try ! { ! PrinterJob prnJob = PrinterJob.getPrinterJob(); ! PageFormat pageFormat = prnJob.defaultPage(); ! pageFormat.setOrientation(m_orientation); ! prnJob.setPrintable(m_target, pageFormat); ! ! if (!prnJob.printDialog()) ! return; ! setCursor( Cursor.getPredefinedCursor( ! Cursor.WAIT_CURSOR)); ! prnJob.print(); ! setCursor( Cursor.getPredefinedCursor( ! Cursor.DEFAULT_CURSOR)); ! dispose(); ! } ! catch (PrinterException ex) ! { ! ex.printStackTrace(); ! System.err.println("Printing error: "+ex.toString()); ! } ! } ! if(e.getSource()==annullerKnap) ! { ! dispose(); ! } ! if(e.getSource()==m_cbScale) ! { ! Thread runner = new Thread() ! { ! public void run() ! { ! opdater(); ! } ! }; ! runner.start(); ! } ! if(e.getSource()==orintering) ! { ! if(orintering.getSelectedIndex()==0) ! { ! opret(m_target,PageFormat.PORTRAIT); ! opdater(); ! } ! else if(orintering.getSelectedIndex()==1) ! { ! opret(m_target,PageFormat.LANDSCAPE); ! opdater(); ! } ! ! // System.out.println(orintering.getSelectedIndex()+""); ! } ! } ! ! ! class PreviewContainer ! extends JPanel ! { ! protected int H_GAP = 16; ! protected int V_GAP = 10; ! ! public Dimension getPreferredSize() ! { ! int n = getComponentCount(); ! if (n == 0) ! return new Dimension(H_GAP, V_GAP); ! Component comp = getComponent(0); ! Dimension dc = comp.getPreferredSize(); ! int w = dc.width; ! int h = dc.height; ! ! Dimension dp = getParent().getSize(); ! int nCol = Math.max((dp.width-H_GAP)/(w+H_GAP), 1); ! int nRow = n/nCol; ! if (nRow*nCol < n) ! nRow++; ! int ww = nCol*(w+H_GAP) + H_GAP; ! int hh = nRow*(h+V_GAP) + V_GAP; ! Insets ins = getInsets(); ! return new Dimension(ww+ins.left+ins.right, ! hh+ins.top+ins.bottom); ! } ! ! public Dimension getMaximumSize() ! { ! return getPreferredSize(); ! } ! ! public Dimension getMinimumSize() ! { ! return getPreferredSize(); ! } ! ! public void doLayout() ! { ! Insets ins = getInsets(); ! int x = ins.left + H_GAP; ! int y = ins.top + V_GAP; ! int n = getComponentCount(); ! if (n == 0) ! return; ! Component comp = getComponent(0); ! Dimension dc = comp.getPreferredSize(); ! int w = dc.width; ! int h = dc.height; ! Dimension dp = getParent().getSize(); ! int nCol = Math.max((dp.width-H_GAP)/(w+H_GAP), 1); ! int nRow = n/nCol; ! if (nRow*nCol < n) ! nRow++; ! int index = 0; ! for (int k = 0; k<nRow; k++) { ! for (int m = 0; m<nCol; m++) ! { ! if (index >= n) ! return; ! comp = getComponent(index++); ! comp.setBounds(x, y, w, h); ! x += w+H_GAP; ! } ! y += h+V_GAP; ! x = ins.left + H_GAP; } ! } ! } ! ! class PagePreview ! extends JPanel ! { ! protected int m_w; ! protected int m_h; ! protected Image m_source; ! protected Image m_img; ! ! public PagePreview(int w, int h, Image source) ! { ! m_w = w; ! m_h = h; ! m_source= source; ! m_img = m_source.getScaledInstance(m_w, m_h, ! Image.SCALE_SMOOTH); ! m_img.flush(); ! setBackground(Color.white); ! setBorder(new MatteBorder(1, 1, 2, 2, Color.black)); ! } ! ! public void setScaledSize(int w, int h) ! { ! m_w = w; ! m_h = h; ! m_img = m_source.getScaledInstance(m_w, m_h, ! Image.SCALE_SMOOTH); ! repaint(); ! } ! ! public Dimension getPreferredSize() ! { ! Insets ins = getInsets(); ! return new Dimension(m_w+ins.left+ins.right, ! m_h+ins.top+ins.bottom); ! } ! ! public Dimension getMaximumSize() ! { ! return getPreferredSize(); ! } ! ! public Dimension getMinimumSize() ! { ! return getPreferredSize(); ! } ! ! public void paint(Graphics g) ! { ! g.setColor(getBackground()); ! g.fillRect(0, 0, getWidth(), getHeight()); ! g.drawImage(m_img, 0, 0, this); ! paintBorder(g); ! } ! } ! } --- 18,358 ---- package org.openbroad.client.user.view.control; import java.awt.*; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.awt.image.BufferedImage; ! import java.awt.print.PageFormat; ! import java.awt.print.Printable; ! import java.awt.print.PrinterException; ! import java.awt.print.PrinterJob; import javax.swing.*; ! import javax.swing.border.MatteBorder; ! public class PrintPreview extends JFrame implements ActionListener { ! public PrintPreview(Printable target,String title, int orientation) ! { ! super(title); ! ! getContentPane().setLayout(new BorderLayout()); ! m_target = target; ! m_orientation = orientation; ! ! JToolBar tb = new JToolBar(); ! ! printKnap = new JButton("Udskriv"); ! printKnap.addActionListener(this); ! tb.add(printKnap); ! ! annullerKnap = new JButton("Luk"); ! annullerKnap.addActionListener(this); ! tb.add(annullerKnap); ! ! String[] scales = ! { ! "25 %", "50 %", "100 %" ! }; ! m_cbScale = new JComboBox(scales); ! m_cbScale.addActionListener(this); ! m_cbScale.setMaximumSize(m_cbScale.getPreferredSize()); ! m_cbScale.setEditable(true); ! m_cbScale.setSelectedIndex(2); ! tb.addSeparator(); ! tb.add(m_cbScale); ! getContentPane().add(tb, BorderLayout.NORTH); ! ! String[] typer = ! { ! "Portr�t","Landskab" ! }; ! orintering = new JComboBox(typer); ! orintering.addActionListener(this); ! orintering.setMaximumSize(orintering.getPreferredSize()); ! // tb.add(orintering); ! ! opret(m_target,m_orientation); ! ! setDefaultCloseOperation(DISPOSE_ON_CLOSE); ! ! Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); ! setSize(new Dimension(frameWidth, frameHeight)); ! setLocation((screenSize.width - this.getWidth()) / 2, (screenSize.height - this.getHeight()) / 2); ! ! setVisible(true); ! } ! ! public void opret(Printable target,int orintering) ! { ! m_preview = new PreviewContainer(); ! m_target = target; ! m_orientation = orintering; ! ! PrinterJob prnJob = PrinterJob.getPrinterJob(); ! PageFormat pageFormat = prnJob.defaultPage(); ! pageFormat.setOrientation(m_orientation); ! ! if (pageFormat.getHeight()==0 || pageFormat.getWidth()==0) ! { ! return; ! } ! m_wPage = (int)(pageFormat.getWidth()); ! m_hPage = (int)(pageFormat.getHeight()); ! int scale = 100; ! int w = (int)(m_wPage*scale/100); ! int h = (int)(m_hPage*scale/100); ! ! int pageIndex = 0; ! try ! { ! while(true) ! { ! BufferedImage img = new BufferedImage(m_wPage,m_hPage, BufferedImage.TYPE_INT_RGB); ! Graphics grafik = img.getGraphics(); ! grafik.setColor(Color.white); ! grafik.fillRect(0, 0, m_wPage, m_hPage); ! if (target.print(grafik, pageFormat, pageIndex) != Printable.PAGE_EXISTS) ! break; ! PagePreview pp = new PagePreview(w, h, img); ! m_preview.add(pp); ! pageIndex++; ! } ! } ! catch (PrinterException e) ! { ! e.printStackTrace(); ! System.err.println("Printing error: "+e.toString()); ! } ! ! JScrollPane ps = new JScrollPane(m_preview); ! getContentPane().add(ps, BorderLayout.CENTER); ! ! repaint(); ! } ! ! public void opdater() ! { ! String str = m_cbScale.getSelectedItem(). ! toString(); ! if (str.endsWith("%")) ! str = str.substring(0, str.length()-1); ! str = str.trim(); ! int scale = 0; ! try ! { scale = Integer.parseInt(str); } ! catch (NumberFormatException ex) ! { return; } ! int w = (int)(m_wPage*scale/100); ! int h = (int)(m_hPage*scale/100); ! ! Component[] comps = m_preview.getComponents(); ! for (int k=0; k<comps.length; k++) ! { ! if (!(comps[k] instanceof PagePreview)) ! continue; ! PagePreview pp = (PagePreview)comps[k]; ! pp.setScaledSize(w, h); ! } ! m_preview.doLayout(); ! m_preview.getParent().getParent().validate(); ! } ! ! public void actionPerformed(ActionEvent e) ! { ! if(e.getSource()==printKnap) ! { ! try ! { ! PrinterJob prnJob = PrinterJob.getPrinterJob(); ! PageFormat pageFormat = prnJob.defaultPage(); ! pageFormat.setOrientation(m_orientation); ! prnJob.setPrintable(m_target, pageFormat); ! if (!prnJob.printDialog()) ! return; ! setCursor( Cursor.getPredefinedCursor( ! Cursor.WAIT_CURSOR)); ! prnJob.print(); ! setCursor( Cursor.getPredefinedCursor( ! Cursor.DEFAULT_CURSOR)); ! dispose(); ! } ! catch (PrinterException ex) ! { ! ex.printStackTrace(); ! System.err.println("Printing error: "+ex.toString()); ! } ! } ! if(e.getSource()==annullerKnap) ! { ! dispose(); ! } ! if(e.getSource()==m_cbScale) ! { ! Thread runner = new Thread() ! { ! public void run() { ! opdater(); } ! }; ! runner.start(); ! } ! if(e.getSource()==orintering) ! { ! if(orintering.getSelectedIndex()==0) ! { ! opret(m_target,PageFormat.PORTRAIT); ! opdater(); ! } ! else if(orintering.getSelectedIndex()==1) ! { ! opret(m_target,PageFormat.LANDSCAPE); ! opdater(); ! } ! } ! } ! ! class PreviewContainer extends JPanel ! { ! public Dimension getPreferredSize() ! { ! int n = getComponentCount(); ! if (n == 0) ! return new Dimension(H_GAP, V_GAP); ! Component comp = getComponent(0); ! Dimension dc = comp.getPreferredSize(); ! int w = dc.width; ! int h = dc.height; ! ! Dimension dp = getParent().getSize(); ! int nCol = Math.max((dp.width-H_GAP)/(w+H_GAP), 1); ! int nRow = n/nCol; ! if (nRow*nCol < n) ! nRow++; ! ! int ww = nCol*(w+H_GAP) + H_GAP; ! int hh = nRow*(h+V_GAP) + V_GAP; ! Insets ins = getInsets(); ! return new Dimension(ww+ins.left+ins.right, ! hh+ins.top+ins.bottom); ! } ! ! public Dimension getMaximumSize() ! { ! return getPreferredSize(); ! } ! ! public Dimension getMinimumSize() ! { ! return getPreferredSize(); ! } ! ! public void doLayout() ! { ! Insets ins = getInsets(); ! int x = ins.left + H_GAP; ! int y = ins.top + V_GAP; ! ! int n = getComponentCount(); ! if (n == 0) ! return; ! Component comp = getComponent(0); ! Dimension dc = comp.getPreferredSize(); ! int w = dc.width; ! int h = dc.height; ! ! Dimension dp = getParent().getSize(); ! int nCol = Math.max((dp.width-H_GAP)/(w+H_GAP), 1); ! int nRow = n/nCol; ! if (nRow*nCol < n) ! nRow++; ! ! int index = 0; ! for (int k = 0; k<nRow; k++) ! { ! for (int m = 0; m<nCol; m++) ! { ! if (index >= n) ! return; ! comp = getComponent(index++); ! comp.setBounds(x, y, w, h); ! x += w+H_GAP; ! } ! y += h+V_GAP; ! x = ins.left + H_GAP; ! } ! } ! ! protected int H_GAP = 16; ! protected int V_GAP = 10; ! } ! ! class PagePreview extends JPanel ! { ! public PagePreview(int w, int h, Image source) ! { ! m_w = w; ! m_h = h; ! m_source= source; ! m_img = m_source.getScaledInstance(m_w, m_h, ! Image.SCALE_SMOOTH); ! m_img.flush(); ! setBackground(Color.white); ! setBorder(new MatteBorder(1, 1, 2, 2, Color.black)); ! } ! ! public void setScaledSize(int w, int h) ! { ! m_w = w; ! m_h = h; ! m_img = m_source.getScaledInstance(m_w, m_h, ! Image.SCALE_SMOOTH); ! repaint(); ! } ! ! public Dimension getPreferredSize() ! { ! Insets ins = getInsets(); ! return new Dimension(m_w+ins.left+ins.right, ! m_h+ins.top+ins.bottom); ! } ! ! public Dimension getMaximumSize() ! { ! return getPreferredSize(); ! } ! ! public Dimension getMinimumSize() ! { ! return getPreferredSize(); ! } ! ! public void paint(Graphics g) ! { ! g.setColor(getBackground()); ! g.fillRect(0, 0, getWidth(), getHeight()); ! g.drawImage(m_img, 0, 0, this); ! paintBorder(g); ! } ! ! protected int m_w; ! protected int m_h; ! protected Image m_source; ! protected Image m_img; ! } ! ! protected int m_wPage; ! protected int m_hPage; ! protected int m_orientation; ! protected Printable m_target; ! protected JComboBox m_cbScale,orintering; ! protected PreviewContainer m_preview; ! ! private JButton printKnap,annullerKnap; ! private int frameWidth = 800; ! private int frameHeight = 500; } |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:44:01
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view/control In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19656 Modified Files: Util.java Log Message: Changed the calendarToString to only return the time. It is only used on the print and it looks nicer that way. Index: Util.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view/control/Util.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Util.java 15 Apr 2004 12:36:13 -0000 1.1.1.1 --- Util.java 5 May 2004 08:43:50 -0000 1.2 *************** *** 129,135 **** int hour = cal.get(Calendar.HOUR_OF_DAY); int minute = cal.get(Calendar.MINUTE); ! int sekund = cal.get(Calendar.SECOND); ! return day+"-"+month+"-"+year +" "+hour+":"+minute+":"+sekund; } --- 129,148 ---- int hour = cal.get(Calendar.HOUR_OF_DAY); int minute = cal.get(Calendar.MINUTE); ! int second = cal.get(Calendar.SECOND); ! String hou = ""+hour; ! if( hour < 10 ) ! hou = "0"+hou; ! ! String min = ""+minute; ! if( minute < 10 ) ! min = "0"+min; ! ! String sec = ""+second; ! if( second < 10 ) ! sec = "0"+sec; ! ! //return day+"-"+month+"-"+year +" "+hour+":"+minute+":"+sekund; ! return hou+":"+min+":"+sec; } |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:41:15
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view/control In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19068 Modified Files: DataHolder.java Log Message: Added support for userroles. Index: DataHolder.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view/control/DataHolder.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** DataHolder.java 15 Apr 2004 12:36:13 -0000 1.1.1.1 --- DataHolder.java 5 May 2004 08:40:50 -0000 1.2 *************** *** 254,269 **** User tmpusr2 = new User( tmpusr.getUsername(), ! tmpusr.getPassword(), ! tmpusr.getName(), ! tmpusr.getAddress(), ! tmpusr.getCity(), ! tmpusr.getZip(), ! tmpusr.getState(), ! tmpusr.getCountry(), ! tmpusr.getPhone(), ! tmpusr.getCompany(), ! tmpusr.getFax(), ! tmpusr.getEmail(), ! tmpusr.getUrl()); userList[i] = tmpusr2; --- 254,270 ---- User tmpusr2 = new User( tmpusr.getUsername(), ! tmpusr.getPassword(), ! tmpusr.getName(), ! tmpusr.getAddress(), ! tmpusr.getCity(), ! tmpusr.getZip(), ! tmpusr.getState(), ! tmpusr.getCountry(), ! tmpusr.getPhone(), ! tmpusr.getCompany(), ! tmpusr.getFax(), ! tmpusr.getEmail(), ! tmpusr.getUrl(), ! tmpusr.getRoles()); userList[i] = tmpusr2; |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:39:30
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/control In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18777 Modified Files: DataHolder.java Log Message: Added support for userroles. Index: DataHolder.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/control/DataHolder.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** DataHolder.java 15 Apr 2004 12:36:19 -0000 1.1.1.1 --- DataHolder.java 5 May 2004 08:39:21 -0000 1.2 *************** *** 253,268 **** User tmpusr2 = new User( tmpusr.getUsername(), ! tmpusr.getPassword(), ! tmpusr.getName(), ! tmpusr.getAddress(), ! tmpusr.getCity(), ! tmpusr.getZip(), ! tmpusr.getState(), ! tmpusr.getCountry(), ! tmpusr.getPhone(), ! tmpusr.getCompany(), ! tmpusr.getFax(), ! tmpusr.getEmail(), ! tmpusr.getUrl()); userList[i] = tmpusr2; --- 253,269 ---- User tmpusr2 = new User( tmpusr.getUsername(), ! tmpusr.getPassword(), ! tmpusr.getName(), ! tmpusr.getAddress(), ! tmpusr.getCity(), ! tmpusr.getZip(), ! tmpusr.getState(), ! tmpusr.getCountry(), ! tmpusr.getPhone(), ! tmpusr.getCompany(), ! tmpusr.getFax(), ! tmpusr.getEmail(), ! tmpusr.getUrl(), ! tmpusr.getRoles() ); userList[i] = tmpusr2; |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:27:43
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/server/beans/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16707/view Modified Files: UserService.java Log Message: Deleted the ID field from the UserRole entity. Wasn't needed, because username and role could be the primary key. Index: UserService.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/server/beans/view/UserService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UserService.java 5 May 2004 07:48:04 -0000 1.2 --- UserService.java 5 May 2004 08:27:35 -0000 1.3 *************** *** 172,176 **** for( int i = 0; i < user.getRoles().length; i++ ) { ! UserRoleLocal userRoleLocal = userRoleLocalHome.create( null, user.getUsername(), (String) user.getRoles()[i] ); } } --- 172,176 ---- for( int i = 0; i < user.getRoles().length; i++ ) { ! UserRoleLocal userRoleLocal = userRoleLocalHome.create( user.getUsername(), (String) user.getRoles()[i] ); } } *************** *** 231,235 **** for( int i = 0; i < user.getRoles().length; i++ ) { ! UserRoleLocal userRoleLocal = userRoleLocalHome.create( null, user.getUsername(), (String) user.getRoles()[i] ); } } --- 231,235 ---- for( int i = 0; i < user.getRoles().length; i++ ) { ! UserRoleLocal userRoleLocal = userRoleLocalHome.create( user.getUsername(), (String) user.getRoles()[i] ); } } |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:27:43
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/server/beans/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16707/model Modified Files: UserRoleBean.java Log Message: Deleted the ID field from the UserRole entity. Wasn't needed, because username and role could be the primary key. Index: UserRoleBean.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/server/beans/model/UserRoleBean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UserRoleBean.java 5 May 2004 07:44:48 -0000 1.1 --- UserRoleBean.java 5 May 2004 08:27:35 -0000 1.2 *************** *** 23,26 **** --- 23,27 ---- import javax.ejb.RemoveException; import org.openbroad.server.interfaces.model.UserLocal; + import org.openbroad.server.interfaces.model.UserRolePK; /** *************** *** 34,38 **** * cmp-version = "2.x" * local-jndi-name = "ejb/entity/CMP/UserRole" - * primkey-field = "id" * * @ejb.finder --- 35,38 ---- *************** *** 58,64 **** * view-type = "local" */ ! public Integer ejbCreate(Integer id, String username, String role) throws CreateException { - setId(id); setRole(role); setUsername(username); --- 58,63 ---- * view-type = "local" */ ! public UserRolePK ejbCreate(String username, String role) throws CreateException { setRole(role); setUsername(username); *************** *** 67,71 **** } ! public void ejbPostCreate(Integer id, String username, String role) throws CreateException { } --- 66,70 ---- } ! public void ejbPostCreate(String username, String role) throws CreateException { } *************** *** 73,80 **** /** * @ejb.persistence ! * column-name = "id" ! * ! * @jboss.persistence ! * auto-increment = "true" * * @ejb.pk-field --- 72,76 ---- /** * @ejb.persistence ! * column-name = "username" * * @ejb.pk-field *************** *** 83,101 **** * view-type = "local" */ - public abstract Integer getId(); - - /** - * @ejb.interface-method - * view-type = "local" - */ - public abstract void setId(Integer id); - - /** - * @ejb.persistence - * column-name = "username" - * - * @ejb.interface-method - * view-type = "local" - */ public abstract String getUsername(); --- 79,82 ---- *************** *** 110,113 **** --- 91,96 ---- * column-name = "role" * + * @ejb.pk-field + * * @ejb.interface-method * view-type = "local" |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:17:46
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13312 Modified Files: openbroad_da_DK.properties Log Message: Tilføjet Rolle. Index: openbroad_da_DK.properties =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/languages/openbroad_da_DK.properties,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** openbroad_da_DK.properties 15 Apr 2004 12:36:19 -0000 1.1.1.1 --- openbroad_da_DK.properties 5 May 2004 08:17:24 -0000 1.2 *************** *** 174,175 **** --- 174,177 ---- needsrestart=Du skal genstarte f\u00F8r \u00E6ndringer tr\u00E6der i kraft. + + role=Rolle |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:17:25
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13278 Modified Files: openbroad.properties Log Message: Added Role. Index: openbroad.properties =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/languages/openbroad.properties,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** openbroad.properties 15 Apr 2004 12:36:19 -0000 1.1.1.1 --- openbroad.properties 5 May 2004 08:17:17 -0000 1.2 *************** *** 173,174 **** --- 173,176 ---- needsrestart=You need to restart before changes take place. + + role=Role |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:17:18
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13261 Modified Files: openbroad_en_US.properties Log Message: Added Role. Index: openbroad_en_US.properties =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/languages/openbroad_en_US.properties,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** openbroad_en_US.properties 15 Apr 2004 12:36:19 -0000 1.1.1.1 --- openbroad_en_US.properties 5 May 2004 08:17:10 -0000 1.2 *************** *** 173,174 **** --- 173,176 ---- needsrestart=You need to restart before changes take place. + + role=Role |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:13:45
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12608 Modified Files: TypeModel.java Log Message: Code cleanup and formatting. (It needed it) Index: TypeModel.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/model/TypeModel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TypeModel.java 15 Apr 2004 12:36:19 -0000 1.1.1.1 --- TypeModel.java 5 May 2004 08:13:37 -0000 1.2 *************** *** 19,135 **** import java.util.ResourceBundle; - import java.util.Vector; import javax.swing.table.DefaultTableModel; import org.openbroad.client.admin.view.control.DataHolder; import org.openbroad.shared.Type; - - /** * ! * @author OpenbroadGroup */ public class TypeModel extends DefaultTableModel { ! ! public TypeModel() ! { ! ! header = new String[] ! { ! ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("name") ! }; ! ! // try ! // { ! // ! // Context ctx = new InitialContext(); ! // Object temp = ctx.lookup("ejb/session/stateless/FileType"); ! // fileTypeRemoteHome = (FileTypeStatelessRemoteHome) PortableRemoteObject.narrow(temp,FileTypeStatelessRemoteHome.class); ! // fileTypeRemote = fileTypeRemoteHome.create(); ! // ! // } catch (ClassCastException e) ! // { ! // e.printStackTrace(); ! // } ! // catch (NamingException e) ! // { ! // e.printStackTrace(); ! // } ! // catch(CreateException e) ! // { ! // e.printStackTrace(); ! // } ! // catch(RemoteException e) ! // { ! // e.printStackTrace(); ! // } ! // ! getData(); ! } ! ! public void getData() ! { ! DataHolder.getInstance().refreshType(); ! // java.util.List typeList = new LinkedList(); ! typeArray = DataHolder.getInstance().getTypeList(); ! ! System.out.println("TEST1: "+typeArray.length); ! ! setRowCount(typeArray.length); ! for(int i=0;i<typeArray.length;i++) ! { ! ! org.openbroad.shared.Type type = (org.openbroad.shared.Type)typeArray[i]; ! ! ! if( type != null ) ! { ! setValueAt(type, i, 0); ! } ! } ! ! ! // try ! // { ! // liste = fileTypeRemote.getAll(); ! // ! // } ! // catch(RemoteException e) ! // { ! // e.printStackTrace(); ! // } ! ! // setRowCount(liste.size()); ! // for(int i=0;i<liste.size();i++) ! // { ! // Type obj = (Type) liste.get(i); ! // ! // setValueAt(obj.getName(),i,0); ! // } ! } ! public int getColumnCount() ! { ! return header.length; ! } ! public String getColumnName(int col) ! { ! return header[col]; ! } ! public boolean isCellEditable(int row, int col) ! { ! return false; ! } ! ! // private FileTypeStatelessRemoteHome fileTypeRemoteHome; ! // private FileTypeStatelessRemote fileTypeRemote; ! private String header[]; ! private Object[] typeArray; ! ! ! ! ! ! } --- 19,76 ---- import java.util.ResourceBundle; import javax.swing.table.DefaultTableModel; import org.openbroad.client.admin.view.control.DataHolder; import org.openbroad.shared.Type; /** * ! * @author Openbroad Group */ public class TypeModel extends DefaultTableModel { ! public TypeModel() ! { ! header = new String[] ! { ! ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("name") ! }; ! ! getData(); ! } ! ! public void getData() ! { ! DataHolder.getInstance().refreshType(); ! ! typeArray = DataHolder.getInstance().getTypeList(); ! ! setRowCount(typeArray.length); ! for(int i=0;i<typeArray.length;i++) ! { ! Type type = (Type)typeArray[i]; ! if( type != null ) ! { ! setValueAt(type, i, 0); ! } ! } ! } ! ! public int getColumnCount() ! { ! return header.length; ! } ! ! public String getColumnName(int col) ! { ! return header[col]; ! } ! ! public boolean isCellEditable(int row, int col) ! { ! return false; ! } ! ! private String header[]; ! private Object[] typeArray; } |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:11:44
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12268 Modified Files: UserModel.java Log Message: Code cleanup and formatting. (It needed it) Index: UserModel.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/model/UserModel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** UserModel.java 15 Apr 2004 12:36:19 -0000 1.1.1.1 --- UserModel.java 5 May 2004 08:11:35 -0000 1.2 *************** *** 16,27 **** */ - package org.openbroad.client.admin.view.model; - import java.util.*; - import java.rmi.*; - import javax.ejb.*; - import javax.naming.*; - import java.util.ResourceBundle; import java.util.Vector; --- 16,21 ---- *************** *** 36,153 **** public class UserModel extends DefaultTableModel { ! ! public UserModel() ! { ! header = new String[] ! { ! java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("username"), ! // java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("password"), ! java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("name"), ! java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("address"), ! java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("company"), ! java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("phone"), ! java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("email") ! // java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("fax"), ! // java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("url") ! }; ! ! // try ! // { ! // ! // Context ctx = new InitialContext(); ! // Object temp = ctx.lookup("ejb/session/stateless/User"); ! // userRemoteHome = (UserStatelessRemoteHome) PortableRemoteObject.narrow(temp,UserStatelessRemoteHome.class); ! // userRemote = userRemoteHome.create(); ! // ! // } catch (ClassCastException e) ! // { ! // e.printStackTrace(); ! // } ! // catch (NamingException e) ! // { ! // e.printStackTrace(); ! // } ! // catch(CreateException e) ! // { ! // e.printStackTrace(); ! // } ! // catch(RemoteException e) ! // { ! // e.printStackTrace(); ! // } ! ! getData(); ! } ! ! public void getData() ! { ! setRowCount(0); ! ! DataHolder.getInstance().refreshUser(); ! ! userArray = DataHolder.getInstance().getUserList(); ! ! for(int i=0;i<userArray.length;i++) ! { ! ! User user = (User)userArray[i]; ! ! ! if( user != null ) ! { ! Vector u = new Vector(); ! u.add(user); ! // u.add(user.getPassword()); ! u.add(user.getName()); ! u.add(user.getAddress()); ! // System.out.println("adress:" +user.getAddress()); ! u.add(user.getCompany()); ! u.add(user.getPhone()); ! // System.out.println("phone:" +user.getPhone()); ! u.add(user.getEmail()); ! addRow( u ); ! ! ! } ! } ! ! ! // try ! // { ! // liste = userRemote.getAll(); ! // ! // } ! // catch(RemoteException e) ! // { ! // e.printStackTrace(); ! // } ! ! // for(int i=0;i<liste.size();i++) ! // { ! // User obj = (User) liste.get(i); ! // ! // addRow(obj.getVector()); ! // } ! } ! public int getColumnCount() ! { ! return header.length; ! } ! public String getColumnName(int col) ! { ! return header[col]; ! } ! public boolean isCellEditable(int row, int col) ! { ! return false; ! } ! ! // private UserStatelessRemoteHome userRemoteHome; ! // private UserStatelessRemote userRemote; ! private String header[]; ! private Object[] userArray; ! ! ! ! } --- 30,91 ---- public class UserModel extends DefaultTableModel { ! ! public UserModel() ! { ! header = new String[] ! { ! ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("username"), ! ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("name"), ! ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("address"), ! ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("company"), ! ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("phone"), ! ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("email") ! }; ! ! getData(); ! } ! ! public void getData() ! { ! setRowCount(0); ! ! DataHolder.getInstance().refreshUser(); ! ! userArray = DataHolder.getInstance().getUserList(); ! ! for(int i=0;i<userArray.length;i++) ! { ! User user = (User)userArray[i]; ! ! if( user != null ) ! { ! Vector u = new Vector(); ! u.add(user); ! u.add(user.getName()); ! u.add(user.getAddress()); ! u.add(user.getCompany()); ! u.add(user.getPhone()); ! u.add(user.getEmail()); ! addRow( u ); ! } ! } ! } ! ! public int getColumnCount() ! { ! return header.length; ! } ! ! public String getColumnName(int col) ! { ! return header[col]; ! } ! ! public boolean isCellEditable(int row, int col) ! { ! return false; ! } ! ! private String header[]; ! private Object[] userArray; } |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:09:21
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11804 Modified Files: Admin.java Admin.form Log Message: A little code cleanup. Index: Admin.form =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/Admin.form,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Admin.form 15 Apr 2004 12:36:15 -0000 1.1.1.1 --- Admin.form 5 May 2004 08:09:12 -0000 1.2 *************** *** 51,55 **** </SyntheticProperties> <Events> ! <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="exitForm"/> </Events> <AuxValues> --- 51,55 ---- </SyntheticProperties> <Events> ! <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/> </Events> <AuxValues> *************** *** 92,96 **** </Layout> <SubComponents> ! <Component class="javax.swing.JButton" name="jButton4"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> --- 92,96 ---- </Layout> <SubComponents> ! <Component class="javax.swing.JButton" name="createUser"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> *************** *** 105,109 **** </Events> </Component> ! <Component class="javax.swing.JButton" name="jButton5"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> --- 105,109 ---- </Events> </Component> ! <Component class="javax.swing.JButton" name="editUser"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> *************** *** 118,122 **** </Events> </Component> ! <Component class="javax.swing.JButton" name="jButton6"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> --- 118,122 ---- </Events> </Component> ! <Component class="javax.swing.JButton" name="deleteUser"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> Index: Admin.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/Admin.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Admin.java 15 Apr 2004 12:36:15 -0000 1.1.1.1 --- Admin.java 5 May 2004 08:09:12 -0000 1.2 *************** *** 27,35 **** - - /** * - * @author OpenbroadGroup */ public class Admin extends javax.swing.JFrame --- 27,32 ---- *************** *** 45,49 **** model = new UserModel(); userTable.setModel(model); ! setVisible(true); } --- 42,46 ---- model = new UserModel(); userTable.setModel(model); ! setVisible(true); } *************** *** 54,60 **** userTab = new javax.swing.JPanel(); jPanel3 = new javax.swing.JPanel(); ! jButton4 = new javax.swing.JButton(); ! jButton5 = new javax.swing.JButton(); ! jButton6 = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); --- 51,57 ---- userTab = new javax.swing.JPanel(); jPanel3 = new javax.swing.JPanel(); ! createUser = new javax.swing.JButton(); ! editUser = new javax.swing.JButton(); ! deleteUser = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); *************** *** 92,96 **** public void windowClosing(java.awt.event.WindowEvent evt) { ! exitForm(evt); } }); --- 89,93 ---- public void windowClosing(java.awt.event.WindowEvent evt) { ! formWindowClosing(evt); } }); *************** *** 100,106 **** jPanel3.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT)); ! jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_new-16.png"))); ! jButton4.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("create")); ! jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) --- 97,103 ---- jPanel3.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT)); ! createUser.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_new-16.png"))); ! createUser.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("create")); ! createUser.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) *************** *** 110,118 **** }); ! jPanel3.add(jButton4); ! jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_edit-16.png"))); ! jButton5.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("edit")); ! jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) --- 107,115 ---- }); ! jPanel3.add(createUser); ! editUser.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_edit-16.png"))); ! editUser.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("edit")); ! editUser.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) *************** *** 122,131 **** }); ! jPanel3.add(jButton5); ! jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_delete-16.png"))); ! jButton6.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("delete")); ! jButton6.setToolTipText(""); ! jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) --- 119,128 ---- }); ! jPanel3.add(editUser); ! deleteUser.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_delete-16.png"))); ! deleteUser.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("delete")); ! deleteUser.setToolTipText(""); ! deleteUser.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) *************** *** 135,139 **** }); ! jPanel3.add(jButton6); userTab.add(jPanel3, java.awt.BorderLayout.NORTH); --- 132,136 ---- }); ! jPanel3.add(deleteUser); userTab.add(jPanel3, java.awt.BorderLayout.NORTH); *************** *** 326,329 **** --- 323,388 ---- }//GEN-END:initComponents + private void formWindowClosing(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowClosing + {//GEN-HEADEREND:event_formWindowClosing + System.exit(0); + }//GEN-LAST:event_formWindowClosing + + private void createUserActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_createUserActionPerformed + {//GEN-HEADEREND:event_createUserActionPerformed + new CreateUser(this,model).show(); + }//GEN-LAST:event_createUserActionPerformed + + private void editUserActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_editUserActionPerformed + {//GEN-HEADEREND:event_editUserActionPerformed + new UpdateUser(this,(org.openbroad.shared.User)userTable.getModel().getValueAt(userTable.getSelectedRow(),0),model).show(); + }//GEN-LAST:event_editUserActionPerformed + + private void deleteUserActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_deleteUserActionPerformed + {//GEN-HEADEREND:event_deleteUserActionPerformed + try + { + URL url = new URL("http://"+Config.getConfig().getProperty("server")+":8080/jboss-net/services/UserService"); + UserServiceRemoteServiceLocator userloc = new UserServiceRemoteServiceLocator(); + UserServiceSoapBindingStub usrstub = (UserServiceSoapBindingStub) userloc.getUserService(url); + + usrstub.setUsername( Config.getConfig().getProperty("username") ); + usrstub.setPassword( Config.getConfig().getProperty("password") ); + + org.openbroad.shared.User user = (org.openbroad.shared.User)userTable.getModel().getValueAt(userTable.getSelectedRow(),0); + org.openbroad.client.stub.User usr = new org.openbroad.client.stub.User(); + usr.setAddress(user.getAddress()); + usr.setCity(user.getCity()); + usr.setCompany(user.getCompany()); + usr.setCountry(user.getCountry()); + usr.setEmail(user.getEmail()); + usr.setFax(user.getFax()); + usr.setName(user.getName()); + usr.setPassword(user.getPassword()); + usr.setPhone(user.getPhone()); + usr.setState(user.getState()); + usr.setUrl(user.getUrl()); + usr.setUsername(user.getUsername()); + usr.setZip(user.getZip()); + usrstub.deleteUser(usr); + model.getData(); + } + catch( MalformedURLException murle ) + { + murle.printStackTrace(); + } + catch( ServiceException e ) + { + e.printStackTrace(); + } + catch( ClassCastException e ) + { + e.printStackTrace(); + } + catch( RemoteException e ) + { + e.printStackTrace(); + } + }//GEN-LAST:event_deleteUserActionPerformed + private void createInfoTypeActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_createInfoTypeActionPerformed {//GEN-HEADEREND:event_createInfoTypeActionPerformed *************** *** 417,421 **** int row = typeTable.getSelectedRow(); - // System.out.println("type "+typeModel.getValueAt(row, 0).getClass()); Object obj = typeModel.getValueAt(row, 0); org.openbroad.shared.Type t = (org.openbroad.shared.Type)obj; --- 476,479 ---- *************** *** 430,501 **** }//GEN-LAST:event_createTypeActionPerformed ! private void deleteUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteUserActionPerformed ! try ! { ! URL url = new URL("http://"+Config.getConfig().getProperty("server")+":8080/jboss-net/services/UserService"); ! UserServiceRemoteServiceLocator userloc = new UserServiceRemoteServiceLocator(); ! UserServiceSoapBindingStub usrstub = (UserServiceSoapBindingStub) userloc.getUserService(url); ! ! usrstub.setUsername( Config.getConfig().getProperty("username") ); ! usrstub.setPassword( Config.getConfig().getProperty("password") ); ! ! org.openbroad.shared.User user = (org.openbroad.shared.User)userTable.getModel().getValueAt(userTable.getSelectedRow(),0); ! org.openbroad.client.stub.User usr = new org.openbroad.client.stub.User(); ! usr.setAddress(user.getAddress()); ! usr.setCity(user.getCity()); ! usr.setCompany(user.getCompany()); ! usr.setCountry(user.getCountry()); ! usr.setEmail(user.getEmail()); ! usr.setFax(user.getFax()); ! usr.setName(user.getName()); ! usr.setPassword(user.getPassword()); ! usr.setPhone(user.getPhone()); ! usr.setState(user.getState()); ! usr.setUrl(user.getUrl()); ! usr.setUsername(user.getUsername()); ! usr.setZip(user.getZip()); ! usrstub.deleteUser(usr); ! model.getData(); ! } ! catch( MalformedURLException murle ) ! { ! murle.printStackTrace(); ! } ! catch( ServiceException e ) ! { ! e.printStackTrace(); ! } ! catch( ClassCastException e ) ! { ! e.printStackTrace(); ! } ! catch( RemoteException e ) ! { ! e.printStackTrace(); ! } ! ! }//GEN-LAST:event_deleteUserActionPerformed ! ! private void editUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editUserActionPerformed ! new UpdateUser(this,(org.openbroad.shared.User)userTable.getModel().getValueAt(userTable.getSelectedRow(),0),model); ! }//GEN-LAST:event_editUserActionPerformed ! ! private void createUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createUserActionPerformed ! new CreateUser(this,model); ! }//GEN-LAST:event_createUserActionPerformed ! ! /** Exit the Application */ ! private void exitForm(java.awt.event.WindowEvent evt)//GEN-FIRST:event_exitForm ! { ! System.exit(0); ! }//GEN-LAST:event_exitForm ! ! ! private UserModel model=null; ! private TypeModel typeModel=null; ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton createInfoType; private javax.swing.JButton deleteInfoType; private javax.swing.JPanel filTab; private javax.swing.JTable fileTable; --- 488,500 ---- }//GEN-LAST:event_createTypeActionPerformed ! private UserModel model = null; ! private TypeModel typeModel = null; ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton createInfoType; + private javax.swing.JButton createUser; private javax.swing.JButton deleteInfoType; + private javax.swing.JButton deleteUser; + private javax.swing.JButton editUser; private javax.swing.JPanel filTab; private javax.swing.JTable fileTable; *************** *** 505,511 **** private javax.swing.JButton jButton14; private javax.swing.JButton jButton15; - private javax.swing.JButton jButton4; - private javax.swing.JButton jButton5; - private javax.swing.JButton jButton6; private javax.swing.JButton jButton7; private javax.swing.JButton jButton8; --- 504,507 ---- |
From: Frank B. J. <bi...@us...> - 2004-05-05 08:02:15
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10462 Modified Files: CreateUser.form CreateUser.java Log Message: Added support for userroles. Index: CreateUser.form =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/CreateUser.form,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CreateUser.form 15 Apr 2004 12:36:16 -0000 1.1.1.1 --- CreateUser.form 5 May 2004 08:02:06 -0000 1.2 *************** *** 14,18 **** </SyntheticProperties> <Events> ! <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="closeDialog"/> </Events> <AuxValues> --- 14,18 ---- </SyntheticProperties> <Events> ! <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/> </Events> <AuxValues> *************** *** 39,43 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 39,43 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 51,55 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 51,55 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 63,67 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 63,67 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 75,79 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 75,79 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 87,91 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 87,91 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 99,103 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="5" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 99,103 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="5" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 111,115 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 111,115 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 123,127 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 123,127 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 135,139 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 135,139 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 147,151 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="9" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 147,151 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="9" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 159,163 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="10" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 159,163 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="10" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 171,175 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="11" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 171,175 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="11" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 183,187 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="12" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 183,187 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="12" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 201,207 **** <Property name="columns" type="int" value="15"/> </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="passwordActionPerformed"/> - </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> --- 201,204 ---- *************** *** 224,230 **** <Property name="columns" type="int" value="15"/> </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="companyActionPerformed"/> - </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> --- 221,224 ---- *************** *** 323,326 **** --- 317,347 ---- </Constraints> </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openbroad/client/languages/openbroad.properties" key="role" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="13" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="9" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JComboBox" name="role"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="2"> + <StringItem index="0" value="User"/> + <StringItem index="1" value="Admin"/> + </StringArray> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="1" gridY="13" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="9" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> </SubComponents> </Container> *************** *** 336,340 **** </Layout> <SubComponents> ! <Component class="javax.swing.JButton" name="jButton2"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> --- 357,361 ---- </Layout> <SubComponents> ! <Component class="javax.swing.JButton" name="close"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> *************** *** 346,350 **** </Properties> <Events> ! <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancelActionPerformed"/> </Events> </Component> --- 367,371 ---- </Properties> <Events> ! <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="closeActionPerformed"/> </Events> </Component> Index: CreateUser.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/CreateUser.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** CreateUser.java 15 Apr 2004 12:36:17 -0000 1.1.1.1 --- CreateUser.java 5 May 2004 08:02:06 -0000 1.2 *************** *** 17,41 **** package org.openbroad.client.admin.view; ! ! import org.openbroad.shared.User; ! import org.openbroad.client.admin.view.control.UserLogic; ! import org.openbroad.client.stub.*; ! import org.openbroad.client.user.view.control.Config; ! import java.net.URL; import java.net.MalformedURLException; import java.rmi.RemoteException; ! import javax.xml.rpc.ServiceException; import javax.swing.JOptionPane; ! import org.openbroad.client.admin.view.model.*; /** * - * @author rais */ ! public class CreateUser extends javax.swing.JDialog { /** Creates new form createUser */ ! public CreateUser(java.awt.Frame parent,UserModel model) { super(parent, true); --- 17,42 ---- package org.openbroad.client.admin.view; ! import java.awt.Frame; import java.net.MalformedURLException; + import java.net.URL; import java.rmi.RemoteException; ! import javax.swing.JDialog; import javax.swing.JOptionPane; ! import javax.xml.rpc.ServiceException; ! import org.openbroad.client.admin.view.control.Config; ! import org.openbroad.client.admin.view.control.UserLogic; ! import org.openbroad.client.admin.view.model.UserModel; ! import org.openbroad.client.stub.User; ! import org.openbroad.client.stub.UserServiceRemoteServiceLocator; ! import org.openbroad.client.stub.UserServiceSoapBindingStub; /** * */ ! public class CreateUser extends JDialog { /** Creates new form createUser */ ! public CreateUser(Frame parent, UserModel model) { super(parent, true); *************** *** 43,48 **** this.model=model; - - setVisible(true); } --- 44,47 ---- *************** *** 84,89 **** email = new javax.swing.JTextField(); url = new javax.swing.JTextField(); jPanel2 = new javax.swing.JPanel(); ! jButton2 = new javax.swing.JButton(); save = new javax.swing.JButton(); --- 83,90 ---- email = new javax.swing.JTextField(); url = new javax.swing.JTextField(); + jLabel14 = new javax.swing.JLabel(); + role = new javax.swing.JComboBox(); jPanel2 = new javax.swing.JPanel(); ! close = new javax.swing.JButton(); save = new javax.swing.JButton(); *************** *** 93,97 **** public void windowClosing(java.awt.event.WindowEvent evt) { ! closeDialog(evt); } }); --- 94,98 ---- public void windowClosing(java.awt.event.WindowEvent evt) { ! formWindowClosing(evt); } }); *************** *** 101,105 **** jLabel1.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("username")); gridBagConstraints = new java.awt.GridBagConstraints(); ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel1, gridBagConstraints); --- 102,106 ---- jLabel1.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("username")); gridBagConstraints = new java.awt.GridBagConstraints(); ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel1, gridBagConstraints); *************** *** 109,113 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel2, gridBagConstraints); --- 110,114 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel2, gridBagConstraints); *************** *** 117,121 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel3, gridBagConstraints); --- 118,122 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel3, gridBagConstraints); *************** *** 125,129 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel4, gridBagConstraints); --- 126,130 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel4, gridBagConstraints); *************** *** 133,137 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel5, gridBagConstraints); --- 134,138 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel5, gridBagConstraints); *************** *** 141,145 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 5; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel6, gridBagConstraints); --- 142,146 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 5; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel6, gridBagConstraints); *************** *** 149,153 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel7, gridBagConstraints); --- 150,154 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel7, gridBagConstraints); *************** *** 157,161 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 7; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel8, gridBagConstraints); --- 158,162 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 7; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel8, gridBagConstraints); *************** *** 165,169 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 8; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel9, gridBagConstraints); --- 166,170 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 8; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel9, gridBagConstraints); *************** *** 173,177 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 9; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel10, gridBagConstraints); --- 174,178 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 9; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel10, gridBagConstraints); *************** *** 181,185 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 10; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel11, gridBagConstraints); --- 182,186 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 10; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel11, gridBagConstraints); *************** *** 189,193 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 11; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel12, gridBagConstraints); --- 190,194 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 11; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel12, gridBagConstraints); *************** *** 197,201 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 12; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel13, gridBagConstraints); --- 198,202 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 12; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel13, gridBagConstraints); *************** *** 208,219 **** password.setColumns(15); - password.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(java.awt.event.ActionEvent evt) - { - passwordActionPerformed(evt); - } - }); - gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; --- 209,212 ---- *************** *** 232,243 **** company.setColumns(15); - company.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(java.awt.event.ActionEvent evt) - { - companyActionPerformed(evt); - } - }); - gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; --- 225,228 ---- *************** *** 319,337 **** jPanel1.add(url, gridBagConstraints); getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER); jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT)); ! jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_close-16.png"))); ! jButton2.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("close")); ! jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! cancelActionPerformed(evt); } }); ! jPanel2.add(jButton2); save.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_save-16.png"))); --- 304,338 ---- jPanel1.add(url, gridBagConstraints); + jLabel14.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("role")); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 13; + gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; + gridBagConstraints.insets = new java.awt.Insets(9, 3, 3, 3); + jPanel1.add(jLabel14, gridBagConstraints); + + role.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "User", "Admin" })); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 13; + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; + gridBagConstraints.insets = new java.awt.Insets(9, 3, 3, 3); + jPanel1.add(role, gridBagConstraints); + getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER); jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT)); ! close.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_close-16.png"))); ! close.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("close")); ! close.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! closeActionPerformed(evt); } }); ! jPanel2.add(close); save.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_save-16.png"))); *************** *** 352,442 **** setBounds((screenSize.width-376)/2, (screenSize.height-446)/2, 376, 446); }//GEN-END:initComponents ! ! private void cancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelActionPerformed ! setVisible(false); ! dispose(); ! }//GEN-LAST:event_cancelActionPerformed ! ! private void saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveActionPerformed ! org.openbroad.client.stub.User user = new org.openbroad.client.stub.User(); ! user.setUsername(username.getText()); ! user.setPassword(password.getText()); ! user.setName(name.getText()); ! user.setAddress(address.getText()); ! user.setCity(city.getText()); ! user.setZip(zip.getText()); ! user.setState(state.getText()); ! user.setCountry(country.getText()); ! user.setPhone(phone.getText()); ! user.setCompany(company.getText()); ! user.setFax(fax.getText()); ! user.setEmail(email.getText()); ! user.setUrl(url.getText()); ! ! if(UserLogic.create(user)) ! { ! try ! { ! URL url = new URL("http://"+Config.getConfig().getProperty("server")+":8080/jboss-net/services/UserService"); ! UserServiceRemoteServiceLocator userloc = new UserServiceRemoteServiceLocator(); ! UserServiceSoapBindingStub usrstub = (UserServiceSoapBindingStub) userloc.getUserService(url); ! ! usrstub.setUsername( Config.getConfig().getProperty("username") ); ! usrstub.setPassword( Config.getConfig().getProperty("password") ); ! ! usrstub.createUser(user); ! model.getData(); ! dispose(); ! } ! catch( MalformedURLException murle ) ! { ! murle.printStackTrace(); ! } ! catch( ServiceException e ) ! { ! e.printStackTrace(); ! } ! catch( ClassCastException e ) ! { ! e.printStackTrace(); ! } ! catch( RemoteException e ) ! { ! e.printStackTrace(); ! } ! ! } ! else ! { ! JOptionPane.showMessageDialog(this,"Du skal udfylder alle felter!"); ! ! } ! }//GEN-LAST:event_saveActionPerformed ! ! private void companyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_companyActionPerformed ! // TODO add your handling code here: ! }//GEN-LAST:event_companyActionPerformed ! ! private void passwordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_passwordActionPerformed ! // TODO add your handling code here: ! }//GEN-LAST:event_passwordActionPerformed ! ! /** Closes the dialog */ ! private void closeDialog(java.awt.event.WindowEvent evt)//GEN-FIRST:event_closeDialog ! { ! setVisible(false); ! dispose(); ! }//GEN-LAST:event_closeDialog ! ! private UserModel model=null; ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField address; private javax.swing.JTextField city; private javax.swing.JTextField company; private javax.swing.JTextField country; private javax.swing.JTextField email; private javax.swing.JTextField fax; - private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; --- 353,441 ---- setBounds((screenSize.width-376)/2, (screenSize.height-446)/2, 376, 446); }//GEN-END:initComponents ! ! private void formWindowClosing(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowClosing ! {//GEN-HEADEREND:event_formWindowClosing ! setVisible(false); ! dispose(); ! }//GEN-LAST:event_formWindowClosing ! ! private void closeActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_closeActionPerformed ! {//GEN-HEADEREND:event_closeActionPerformed ! setVisible(false); ! dispose(); ! }//GEN-LAST:event_closeActionPerformed ! ! private void saveActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_saveActionPerformed ! {//GEN-HEADEREND:event_saveActionPerformed ! User user = new User(); ! user.setUsername(username.getText()); ! user.setPassword(password.getText()); ! user.setName(name.getText()); ! user.setAddress(address.getText()); ! user.setCity(city.getText()); ! user.setZip(zip.getText()); ! user.setState(state.getText()); ! user.setCountry(country.getText()); ! user.setPhone(phone.getText()); ! user.setCompany(company.getText()); ! user.setFax(fax.getText()); ! user.setEmail(email.getText()); ! user.setUrl(url.getText()); ! ! Object[] rolea = new Object[1]; ! ! rolea[0] = ((String)role.getSelectedItem()).toLowerCase(); ! ! user.setRoles(rolea); ! ! if(UserLogic.create(user)) ! { ! try ! { ! URL url = new URL("http://"+Config.getConfig().getProperty("server")+":8080/jboss-net/services/UserService"); ! UserServiceRemoteServiceLocator userloc = new UserServiceRemoteServiceLocator(); ! UserServiceSoapBindingStub usrstub = (UserServiceSoapBindingStub) userloc.getUserService(url); ! ! usrstub.setUsername( Config.getConfig().getProperty("username") ); ! usrstub.setPassword( Config.getConfig().getProperty("password") ); ! ! usrstub.createUser(user); ! model.getData(); ! dispose(); ! } ! catch( MalformedURLException murle ) ! { ! murle.printStackTrace(); ! } ! catch( ServiceException e ) ! { ! e.printStackTrace(); ! } ! catch( ClassCastException e ) ! { ! e.printStackTrace(); ! } ! catch( RemoteException e ) ! { ! e.printStackTrace(); ! } ! ! } ! else ! { ! JOptionPane.showMessageDialog(this,"Du skal udfylder alle felter!"); ! } ! }//GEN-LAST:event_saveActionPerformed ! ! private UserModel model=null; ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField address; private javax.swing.JTextField city; + private javax.swing.JButton close; private javax.swing.JTextField company; private javax.swing.JTextField country; private javax.swing.JTextField email; private javax.swing.JTextField fax; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; *************** *** 444,447 **** --- 443,447 ---- private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; *************** *** 457,460 **** --- 457,461 ---- private javax.swing.JTextField password; private javax.swing.JTextField phone; + private javax.swing.JComboBox role; private javax.swing.JTextField state; private javax.swing.JTextField url; *************** *** 462,465 **** private javax.swing.JTextField zip; // End of variables declaration//GEN-END:variables - } --- 463,465 ---- |
From: Frank B. J. <bi...@us...> - 2004-05-05 07:57:50
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9428 Modified Files: UpdateUser.java UpdateUser.form Log Message: Added support for userroles. Index: UpdateUser.form =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/UpdateUser.form,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** UpdateUser.form 15 Apr 2004 12:36:18 -0000 1.1.1.1 --- UpdateUser.form 5 May 2004 07:57:41 -0000 1.2 *************** *** 14,18 **** </SyntheticProperties> <Events> ! <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="closeDialog"/> </Events> <AuxValues> --- 14,18 ---- </SyntheticProperties> <Events> ! <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/> </Events> <AuxValues> *************** *** 39,43 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 39,43 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 51,55 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 51,55 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 63,67 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 63,67 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="2" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 75,79 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 75,79 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 87,91 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 87,91 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 99,103 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="5" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 99,103 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="5" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 111,115 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 111,115 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="6" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 123,127 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 123,127 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 135,139 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 135,139 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 147,151 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="9" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 147,151 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="9" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 159,163 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="10" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 159,163 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="10" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 171,175 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="11" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 171,175 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="11" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 183,187 **** <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="12" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> --- 183,187 ---- <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> ! <GridBagConstraints gridX="0" gridY="12" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="3" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> </Constraint> </Constraints> *************** *** 202,208 **** <Property name="columns" type="int" value="15"/> </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="passwordActionPerformed"/> - </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> --- 202,205 ---- *************** *** 225,231 **** <Property name="columns" type="int" value="15"/> </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="companyActionPerformed"/> - </Events> <Constraints> <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> --- 222,225 ---- *************** *** 324,327 **** --- 318,351 ---- </Constraints> </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="org/openbroad/client/languages/openbroad.properties" key="role" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="0" gridY="13" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="9" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="13" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JComboBox" name="role"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="2"> + <StringItem index="0" value="user"/> + <StringItem index="1" value="admin"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_InitCodePost" type="java.lang.String" value="if( usr.getRoles() != null )
{
 String rolestr = (String) usr.getRoles()[0];
 role.setSelectedItem(rolestr);
}"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription"> + <GridBagConstraints gridX="1" gridY="13" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="9" insetsLeft="3" insetsBottom="3" insetsRight="3" anchor="17" weightX="0.0" weightY="0.0"/> + </Constraint> + </Constraints> + </Component> </SubComponents> </Container> *************** *** 337,341 **** </Layout> <SubComponents> ! <Component class="javax.swing.JButton" name="jButton2"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> --- 361,365 ---- </Layout> <SubComponents> ! <Component class="javax.swing.JButton" name="close"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> *************** *** 347,351 **** </Properties> <Events> ! <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancelActionPerformed"/> </Events> </Component> --- 371,375 ---- </Properties> <Events> ! <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="closeActionPerformed"/> </Events> </Component> Index: UpdateUser.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/admin/view/UpdateUser.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** UpdateUser.java 15 Apr 2004 12:36:19 -0000 1.1.1.1 --- UpdateUser.java 5 May 2004 07:57:41 -0000 1.2 *************** *** 37,51 **** { /** Creates new form createUser */ ! // public UpdateUser(java.awt.Frame parent, UserModel model) ! public UpdateUser(org.openbroad.client.admin.view.Admin parent,org.openbroad.shared.User user,UserModel model) { super(parent, true); initComponents(); username.setText(user.getUsername()); password.setText(user.getPassword()); - // System.out.println("pass: " +password.getText()); name.setText(user.getName()); address.setText(user.getAddress()); - // System.out.println("address: " +address.getText()); city.setText(user.getCity()); zip.setText(user.getZip()); --- 37,52 ---- { /** Creates new form createUser */ ! public UpdateUser(org.openbroad.client.admin.view.Admin parent, org.openbroad.shared.User user, UserModel model) { super(parent, true); + + this.usr = user; + initComponents(); + username.setText(user.getUsername()); password.setText(user.getPassword()); name.setText(user.getName()); address.setText(user.getAddress()); city.setText(user.getCity()); zip.setText(user.getZip()); *************** *** 53,64 **** country.setText(user.getCountry()); phone.setText(user.getPhone()); - // System.out.println("phone: " +phone.getText()); company.setText(user.getCompany()); fax.setText(user.getFax()); email.setText(user.getEmail()); url.setText(user.getUrl()); - this.model=model; ! setVisible(true); } --- 54,63 ---- country.setText(user.getCountry()); phone.setText(user.getPhone()); company.setText(user.getCompany()); fax.setText(user.getFax()); email.setText(user.getEmail()); url.setText(user.getUrl()); ! this.model = model; } *************** *** 100,105 **** email = new javax.swing.JTextField(); url = new javax.swing.JTextField(); jPanel2 = new javax.swing.JPanel(); ! jButton2 = new javax.swing.JButton(); save = new javax.swing.JButton(); --- 99,106 ---- email = new javax.swing.JTextField(); url = new javax.swing.JTextField(); + jLabel14 = new javax.swing.JLabel(); + role = new javax.swing.JComboBox(); jPanel2 = new javax.swing.JPanel(); ! close = new javax.swing.JButton(); save = new javax.swing.JButton(); *************** *** 109,113 **** public void windowClosing(java.awt.event.WindowEvent evt) { ! closeDialog(evt); } }); --- 110,114 ---- public void windowClosing(java.awt.event.WindowEvent evt) { ! formWindowClosing(evt); } }); *************** *** 117,121 **** jLabel1.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("username")); gridBagConstraints = new java.awt.GridBagConstraints(); ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel1, gridBagConstraints); --- 118,122 ---- jLabel1.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("username")); gridBagConstraints = new java.awt.GridBagConstraints(); ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel1, gridBagConstraints); *************** *** 125,129 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel2, gridBagConstraints); --- 126,130 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel2, gridBagConstraints); *************** *** 133,137 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel3, gridBagConstraints); --- 134,138 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel3, gridBagConstraints); *************** *** 141,145 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel4, gridBagConstraints); --- 142,146 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel4, gridBagConstraints); *************** *** 149,153 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel5, gridBagConstraints); --- 150,154 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel5, gridBagConstraints); *************** *** 157,161 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 5; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel6, gridBagConstraints); --- 158,162 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 5; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel6, gridBagConstraints); *************** *** 165,169 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel7, gridBagConstraints); --- 166,170 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel7, gridBagConstraints); *************** *** 173,177 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 7; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel8, gridBagConstraints); --- 174,178 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 7; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel8, gridBagConstraints); *************** *** 181,185 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 8; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel9, gridBagConstraints); --- 182,186 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 8; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel9, gridBagConstraints); *************** *** 189,193 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 9; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel10, gridBagConstraints); --- 190,194 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 9; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel10, gridBagConstraints); *************** *** 197,201 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 10; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel11, gridBagConstraints); --- 198,202 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 10; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel11, gridBagConstraints); *************** *** 205,209 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 11; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel12, gridBagConstraints); --- 206,210 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 11; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel12, gridBagConstraints); *************** *** 213,217 **** gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 12; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel13, gridBagConstraints); --- 214,218 ---- gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 12; ! gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel1.add(jLabel13, gridBagConstraints); *************** *** 225,236 **** password.setColumns(15); - password.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(java.awt.event.ActionEvent evt) - { - passwordActionPerformed(evt); - } - }); - gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; --- 226,229 ---- *************** *** 249,260 **** company.setColumns(15); - company.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(java.awt.event.ActionEvent evt) - { - companyActionPerformed(evt); - } - }); - gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; --- 242,245 ---- *************** *** 336,354 **** jPanel1.add(url, gridBagConstraints); getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER); jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT)); ! jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_close-16.png"))); ! jButton2.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("close")); ! jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! cancelActionPerformed(evt); } }); ! jPanel2.add(jButton2); save.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_save-16.png"))); --- 321,360 ---- jPanel1.add(url, gridBagConstraints); + jLabel14.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("role")); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 13; + gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; + gridBagConstraints.insets = new java.awt.Insets(9, 3, 3, 3); + jPanel1.add(jLabel14, gridBagConstraints); + + role.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "user", "admin" })); + if( usr.getRoles() != null ) + { + String rolestr = (String) usr.getRoles()[0]; + role.setSelectedItem(rolestr); + } + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 13; + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; + gridBagConstraints.insets = new java.awt.Insets(9, 3, 3, 3); + jPanel1.add(role, gridBagConstraints); + getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER); jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT)); ! close.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_close-16.png"))); ! close.setText(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("close")); ! close.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! closeActionPerformed(evt); } }); ! jPanel2.add(close); save.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/openbroad/client/ressources/icons16/stock_save-16.png"))); *************** *** 369,464 **** setBounds((screenSize.width-376)/2, (screenSize.height-446)/2, 376, 446); }//GEN-END:initComponents ! ! private void cancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelActionPerformed ! ! setVisible(false); ! dispose(); ! }//GEN-LAST:event_cancelActionPerformed ! ! private void saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveActionPerformed ! // TODO add your handling code here: ! ! org.openbroad.client.stub.User user = new org.openbroad.client.stub.User(); ! user.setUsername(username.getText()); ! user.setPassword(password.getText()); ! user.setName(name.getText()); ! user.setAddress(address.getText()); ! user.setCity(city.getText()); ! user.setZip(zip.getText()); ! user.setState(state.getText()); ! user.setCountry(country.getText()); ! user.setPhone(phone.getText()); ! // System.out.println("phone: " +phone.getText()); ! user.setCompany(company.getText()); ! // System.out.println("company: " +company.getText()); ! user.setFax(fax.getText()); ! user.setEmail(email.getText()); ! user.setUrl(url.getText()); ! ! if(UserLogic.update(user)) ! { ! try ! { ! URL url = new URL("http://"+Config.getConfig().getProperty("server")+":8080/jboss-net/services/UserService"); ! UserServiceRemoteServiceLocator userloc = new UserServiceRemoteServiceLocator(); ! UserServiceSoapBindingStub usrstub = (UserServiceSoapBindingStub) userloc.getUserService(url); ! ! usrstub.setUsername( Config.getConfig().getProperty("username") ); ! usrstub.setPassword( Config.getConfig().getProperty("password") ); ! ! usrstub.updateUser(user); ! model.getData(); ! dispose(); ! } ! catch( MalformedURLException murle ) ! { ! murle.printStackTrace(); ! } ! catch( ServiceException e ) ! { ! e.printStackTrace(); ! } ! catch( ClassCastException e ) ! { ! e.printStackTrace(); ! } ! catch( RemoteException e ) ! { ! e.printStackTrace(); ! } ! ! } ! else ! { ! JOptionPane.showMessageDialog(this,"Du skal udfylder alle felter!"); ! ! } ! }//GEN-LAST:event_saveActionPerformed ! ! private void companyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_companyActionPerformed ! // TODO add your handling code here: ! }//GEN-LAST:event_companyActionPerformed ! ! private void passwordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_passwordActionPerformed ! // TODO add your handling code here: ! }//GEN-LAST:event_passwordActionPerformed ! ! /** Closes the dialog */ ! private void closeDialog(java.awt.event.WindowEvent evt)//GEN-FIRST:event_closeDialog ! { ! setVisible(false); ! dispose(); ! }//GEN-LAST:event_closeDialog ! ! private UserModel model=null; ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField address; private javax.swing.JTextField city; private javax.swing.JTextField company; private javax.swing.JTextField country; private javax.swing.JTextField email; private javax.swing.JTextField fax; - private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; --- 375,465 ---- setBounds((screenSize.width-376)/2, (screenSize.height-446)/2, 376, 446); }//GEN-END:initComponents ! ! private void formWindowClosing(java.awt.event.WindowEvent evt)//GEN-FIRST:event_formWindowClosing ! {//GEN-HEADEREND:event_formWindowClosing ! setVisible(false); ! dispose(); ! }//GEN-LAST:event_formWindowClosing ! ! private void closeActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_closeActionPerformed ! {//GEN-HEADEREND:event_closeActionPerformed ! setVisible(false); ! dispose(); ! }//GEN-LAST:event_closeActionPerformed ! ! private void saveActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_saveActionPerformed ! {//GEN-HEADEREND:event_saveActionPerformed ! org.openbroad.client.stub.User user = new org.openbroad.client.stub.User(); ! user.setUsername(username.getText()); ! user.setPassword(password.getText()); ! user.setName(name.getText()); ! user.setAddress(address.getText()); ! user.setCity(city.getText()); ! user.setZip(zip.getText()); ! user.setState(state.getText()); ! user.setCountry(country.getText()); ! user.setPhone(phone.getText()); ! user.setCompany(company.getText()); ! user.setFax(fax.getText()); ! user.setEmail(email.getText()); ! user.setUrl(url.getText()); ! ! Object[] rolea = new Object[1]; ! ! rolea[0] = ((String)role.getSelectedItem()).toLowerCase(); ! ! user.setRoles(rolea); ! ! ! if(UserLogic.update(user)) ! { ! try ! { ! URL url = new URL("http://"+Config.getConfig().getProperty("server")+":8080/jboss-net/services/UserService"); ! UserServiceRemoteServiceLocator userloc = new UserServiceRemoteServiceLocator(); ! UserServiceSoapBindingStub usrstub = (UserServiceSoapBindingStub) userloc.getUserService(url); ! ! usrstub.setUsername( Config.getConfig().getProperty("username") ); ! usrstub.setPassword( Config.getConfig().getProperty("password") ); ! ! usrstub.updateUser(user); ! model.getData(); ! dispose(); ! } ! catch( MalformedURLException murle ) ! { ! murle.printStackTrace(); ! } ! catch( ServiceException e ) ! { ! e.printStackTrace(); ! } ! catch( ClassCastException e ) ! { ! e.printStackTrace(); ! } ! catch( RemoteException e ) ! { ! e.printStackTrace(); ! } ! ! } ! else ! { ! JOptionPane.showMessageDialog(this,"Du skal udfylder alle felter!"); ! } ! }//GEN-LAST:event_saveActionPerformed ! ! private UserModel model=null; ! private org.openbroad.shared.User usr; ! // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField address; private javax.swing.JTextField city; + private javax.swing.JButton close; private javax.swing.JTextField company; private javax.swing.JTextField country; private javax.swing.JTextField email; private javax.swing.JTextField fax; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; *************** *** 466,469 **** --- 467,471 ---- private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; *************** *** 479,482 **** --- 481,485 ---- private javax.swing.JTextField password; private javax.swing.JTextField phone; + private javax.swing.JComboBox role; private javax.swing.JTextField state; private javax.swing.JTextField url; *************** *** 484,487 **** private javax.swing.JTextField zip; // End of variables declaration//GEN-END:variables - } --- 487,489 ---- |
From: Frank B. J. <bi...@us...> - 2004-05-05 07:50:26
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7679 Modified Files: User.java Log Message: Added an array of roles. Index: User.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/shared/User.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** User.java 15 Apr 2004 12:36:22 -0000 1.1.1.1 --- User.java 5 May 2004 07:50:03 -0000 1.2 *************** *** 18,237 **** package org.openbroad.shared; ! import java.util.*; /** * @jboss-net.xml-schema urn="OpenBroad:User" */ ! public class User implements java.io.Serializable { - - /** Creates a new instance of User */ - public User(String username, String password, String name,String address, String city, String zip, - String state,String country, String phone,String company,String fax, String email,String url) - { - - this.username=username; - this.password=password; - this.name=name; - this.company=company; - this.address=address; - this.zip=zip; - this.city=city; - this.state=state; - this.country=country; - this.phone=phone; - this.fax=fax; - this.email=email; - this.url=url; - } - public User() - {} - public String getUsername() - { - return username; - } - - public String getPassword() - { - return password; - } - - public String getName() - { - return name; - } - - public String getCompany() - { - return company; - } - - public String getAddress() - { - return address; - } - - public String getZip() - { - return zip; - } - - public String getState() - { - return state; - } - - public String getCity() - { - return city; - } - - public String getCountry() - { - return country; - } - - public String getPhone() - { - return phone; - } - - public String getFax() - { - return fax; - } - - public String getEmail() - { - return email; - } - - public String getUrl() - { - return url; - } - - public String toString() - { - return getUsername(); - } ! /** ! * Setter for property address. ! * @param address New value of property address. ! */ ! public void setAddress(String address) { ! this.address=address; ! } ! ! /** ! * Setter for property city. ! * @param city New value of property city. ! */ ! public void setCity(String city) { ! this.city=city; ! } ! ! /** ! * Setter for property company. ! * @param company New value of property company. ! */ ! public void setCompany(String company) { ! this.company=company; ! } ! ! /** ! * Setter for property country. ! * @param country New value of property country. ! */ ! public void setCountry(String country) { ! this.country=country; ! } ! ! /** ! * Setter for property email. ! * @param email New value of property email. ! */ ! public void setEmail(String email) { ! this.email=email; ! } ! ! /** ! * Setter for property fax. ! * @param fax New value of property fax. ! */ ! public void setFax(String fax) { ! this.fax=fax; ! } ! ! /** ! * Setter for property name. ! * @param name New value of property name. ! */ ! public void setName(String name) { ! this.name=name; ! } ! ! /** ! * Setter for property password. ! * @param password New value of property password. ! */ ! public void setPassword(String password) { ! this.password=password; ! } ! ! /** ! * Setter for property phone. ! * @param phone New value of property phone. ! */ ! public void setPhone(String phone) { ! this.phone=phone; ! } ! ! /** ! * Setter for property state. ! * @param state New value of property state. ! */ ! public void setState(String state) { ! this.state=state; ! } ! ! /** ! * Setter for property url. ! * @param url New value of property url. ! */ ! public void setUrl(String url) { ! this.url=url; ! } ! ! /** ! * Setter for property username. ! * @param username New value of property username. ! */ ! public void setUsername(String username) { ! this.username=username; ! } ! ! /** ! * Setter for property zip. ! * @param zip New value of property zip. ! */ ! public void setZip(String zip) { ! this.zip=zip; ! } ! ! private String username; ! private String password; ! private String name; ! private String company; ! private String address; ! private String zip; ! private String city; ! private String state; ! private String country; ! private String phone; ! private String fax; ! private String email; ! private String url; ! } \ No newline at end of file --- 18,266 ---- package org.openbroad.shared; ! import java.io.Serializable; /** * @jboss-net.xml-schema urn="OpenBroad:User" */ ! public class User implements Serializable { ! /** Creates a new instance of User */ ! public User(String username, String password, String name,String address, ! String city, String zip, String state,String country, String phone, ! String company,String fax, String email, String url, Object[] roles) ! { ! ! this.username = username; ! this.password = password; ! this.name = name; ! this.company = company; ! this.address = address; ! this.zip = zip; ! this.city = city; ! this.state = state; ! this.country = country; ! this.phone = phone; ! this.fax = fax; ! this.email = email; ! this.url = url; ! this.roles = roles; ! } ! public User() ! {} ! public String getUsername() ! { ! return username; ! } ! ! public String getPassword() ! { ! return password; ! } ! ! public String getName() ! { ! return name; ! } ! ! public String getCompany() ! { ! return company; ! } ! ! public String getAddress() ! { ! return address; ! } ! ! public String getZip() ! { ! return zip; ! } ! ! public String getState() ! { ! return state; ! } ! ! public String getCity() ! { ! return city; ! } ! ! public String getCountry() ! { ! return country; ! } ! ! public String getPhone() ! { ! return phone; ! } ! ! public String getFax() ! { ! return fax; ! } ! ! public String getEmail() ! { ! return email; ! } ! ! public String getUrl() ! { ! return url; ! } ! ! public Object[] getRoles() ! { ! return roles; ! } ! ! public String toString() ! { ! return getUsername(); ! } ! ! /** ! * Setter for property address. ! * @param address New value of property address. ! */ ! public void setAddress(String address) ! { ! this.address = address; ! } ! ! /** ! * Setter for property city. ! * @param city New value of property city. ! */ ! public void setCity(String city) ! { ! this.city = city; ! } ! ! /** ! * Setter for property company. ! * @param company New value of property company. ! */ ! public void setCompany(String company) ! { ! this.company = company; ! } ! ! /** ! * Setter for property country. ! * @param country New value of property country. ! */ ! public void setCountry(String country) ! { ! this.country = country; ! } ! ! /** ! * Setter for property email. ! * @param email New value of property email. ! */ ! public void setEmail(String email) ! { ! this.email = email; ! } ! ! /** ! * Setter for property fax. ! * @param fax New value of property fax. ! */ ! public void setFax(String fax) ! { ! this.fax = fax; ! } ! ! /** ! * Setter for property name. ! * @param name New value of property name. ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! /** ! * Setter for property password. ! * @param password New value of property password. ! */ ! public void setPassword(String password) ! { ! this.password = password; ! } ! ! /** ! * Setter for property phone. ! * @param phone New value of property phone. ! */ ! public void setPhone(String phone) ! { ! this.phone = phone; ! } ! ! /** ! * Setter for property state. ! * @param state New value of property state. ! */ ! public void setState(String state) ! { ! this.state = state; ! } ! ! /** ! * Setter for property url. ! * @param url New value of property url. ! */ ! public void setUrl(String url) ! { ! this.url = url; ! } ! ! /** ! * Setter for property username. ! * @param username New value of property username. ! */ ! public void setUsername(String username) ! { ! this.username = username; ! } ! ! /** ! * Setter for property zip. ! * @param zip New value of property zip. ! */ ! public void setZip(String zip) ! { ! this.zip = zip; ! } ! ! /** ! * Setter for property role. ! * @param role New value of property role. ! */ ! public void setRoles(Object[] roles) ! { ! this.roles = roles; ! } ! ! private String username; ! private String password; ! private String name; ! private String company; ! private String address; ! private String zip; ! private String city; ! private String state; ! private String country; ! private String phone; ! private String fax; ! private String email; ! private String url; ! private Object[] roles; } \ No newline at end of file |
From: Frank B. J. <bi...@us...> - 2004-05-05 07:48:27
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/server/beans/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7180 Modified Files: UserService.java Log Message: Now userservice also handles userroles. Index: UserService.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/server/beans/view/UserService.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** UserService.java 15 Apr 2004 12:36:22 -0000 1.1.1.1 --- UserService.java 5 May 2004 07:48:04 -0000 1.2 *************** *** 27,33 **** --- 27,36 ---- import org.openbroad.server.interfaces.model.UserLocal; import org.openbroad.server.interfaces.model.UserLocalHome; + import org.openbroad.server.interfaces.model.UserRoleLocal; + import org.openbroad.server.interfaces.model.UserRoleLocalHome; import org.openbroad.shared.User; + /** * @author Openbroad Group *************** *** 49,54 **** * * @jboss-net.authorization ! * domain = "openbroad" ! * roles-allowed = "admin" */ --- 52,57 ---- * * @jboss-net.authorization ! * domain = "openbroad" ! * roles-allowed = "admin" */ *************** *** 74,79 **** Context ctx = new InitialContext(); ! Object temp = ctx.lookup("ejb/entity/CMP/User"); ! UserLocalHome userLocalHome = (UserLocalHome) temp; Collection c = userLocalHome.findAll(); --- 77,83 ---- Context ctx = new InitialContext(); ! UserLocalHome userLocalHome = (UserLocalHome) ctx.lookup("ejb/entity/CMP/User"); ! UserRoleLocalHome userRoleLocalHome = (UserRoleLocalHome) ctx.lookup("ejb/entity/CMP/UserRole"); ! Collection c = userLocalHome.findAll(); *************** *** 85,101 **** UserLocal ul = (UserLocal) i.next(); User u = new User(ul.getUsername(), ! ul.getPassword(), ! ul.getName(), ! ul.getAddress(), ! ul.getZip(), ! ul.getCity(), ! ul.getState(), ! ul.getCountry(), ! ul.getPhone(), ! ul.getCompany(), ! ul.getFax(), ! ul.getEmail(), ! ul.getUrl()); users[n] = u; --- 89,117 ---- UserLocal ul = (UserLocal) i.next(); + Collection uroles = userRoleLocalHome.findByUsername(ul.getUsername()); + + String[] roles = new String[uroles.size()]; + int nn = 0; + for( Iterator it = uroles.iterator(); it.hasNext(); nn++ ) + { + UserRoleLocal url = (UserRoleLocal) it.next(); + + roles[nn] = url.getRole(); + } + User u = new User(ul.getUsername(), ! ul.getPassword(), ! ul.getName(), ! ul.getAddress(), ! ul.getZip(), ! ul.getCity(), ! ul.getState(), ! ul.getCountry(), ! ul.getPhone(), ! ul.getCompany(), ! ul.getFax(), ! ul.getEmail(), ! ul.getUrl(), ! roles); users[n] = u; *************** *** 132,151 **** { Context ctx = new InitialContext(); ! Object temp = ctx.lookup("ejb/entity/CMP/User"); ! UserLocalHome userLocalHome = (UserLocalHome) temp; ! userLocalHome.create( user.getUsername(), ! user.getPassword(), ! user.getName(), ! user.getAddress(), ! user.getCity(), ! user.getZip(), ! user.getState(), ! user.getCountry(), ! user.getPhone(), ! user.getCompany(), ! user.getFax(), ! user.getEmail(), ! user.getUrl()); } catch( NamingException ne ) --- 148,178 ---- { Context ctx = new InitialContext(); ! UserLocalHome userLocalHome = (UserLocalHome) ctx.lookup("ejb/entity/CMP/User"); ! UserRoleLocalHome userRoleLocalHome = (UserRoleLocalHome) ctx.lookup("ejb/entity/CMP/UserRole"); ! ! ! UserLocal userLocal = userLocalHome.create( user.getUsername(), ! user.getPassword(), ! user.getName(), ! user.getAddress(), ! user.getCity(), ! user.getZip(), ! user.getState(), ! user.getCountry(), ! user.getPhone(), ! user.getCompany(), ! user.getFax(), ! user.getEmail(), ! user.getUrl()); ! ! ! if( user.getRoles() != null ) ! { ! for( int i = 0; i < user.getRoles().length; i++ ) ! { ! UserRoleLocal userRoleLocal = userRoleLocalHome.create( null, user.getUsername(), (String) user.getRoles()[i] ); ! } ! } } catch( NamingException ne ) *************** *** 171,176 **** { Context ctx = new InitialContext(); ! Object temp = ctx.lookup("ejb/entity/CMP/User"); ! UserLocalHome userLocalHome = (UserLocalHome) temp; UserLocal userLocal = userLocalHome.findByPrimaryKey(user.getUsername()); --- 198,204 ---- { Context ctx = new InitialContext(); ! UserLocalHome userLocalHome = (UserLocalHome) ctx.lookup("ejb/entity/CMP/User"); ! UserRoleLocalHome userRoleLocalHome = (UserRoleLocalHome) ctx.lookup("ejb/entity/CMP/UserRole"); ! UserLocal userLocal = userLocalHome.findByPrimaryKey(user.getUsername()); *************** *** 187,194 **** userLocal.setEmail(user.getEmail()); userLocal.setUrl(user.getUrl()); } ! catch(FinderException fe) { - } catch( NamingException ne ) --- 215,246 ---- userLocal.setEmail(user.getEmail()); userLocal.setUrl(user.getUrl()); + + + // Delete all old roles + Collection uroles = userRoleLocalHome.findByUsername(user.getUsername()); + + for( Iterator it = uroles.iterator(); it.hasNext(); ) + { + UserRoleLocal url = (UserRoleLocal) it.next(); + url.remove(); + } + + // Create the new roles + if( user.getRoles() != null ) + { + for( int i = 0; i < user.getRoles().length; i++ ) + { + UserRoleLocal userRoleLocal = userRoleLocalHome.create( null, user.getUsername(), (String) user.getRoles()[i] ); + } + } } ! catch( CreateException ce ) ! { ! } ! catch( FinderException fe ) ! { ! } ! catch( RemoveException re ) { } catch( NamingException ne ) *************** *** 212,233 **** { Context ctx = new InitialContext(); ! Object temp = ctx.lookup("ejb/entity/CMP/User"); ! UserLocalHome userLocalHome = (UserLocalHome) temp; ! UserLocal userLocal = userLocalHome.findByPrimaryKey(user.getUsername()); userLocal.remove(); } ! catch(FinderException fe) { - } ! catch(RemoveException re) { - } catch( NamingException ne ) { } - } --- 264,291 ---- { Context ctx = new InitialContext(); ! UserLocalHome userLocalHome = (UserLocalHome) ctx.lookup("ejb/entity/CMP/User"); ! UserRoleLocalHome userRoleLocalHome = (UserRoleLocalHome) ctx.lookup("ejb/entity/CMP/UserRole"); + UserLocal userLocal = userLocalHome.findByPrimaryKey(user.getUsername()); userLocal.remove(); + + // Delete all old roles + Collection uroles = userRoleLocalHome.findByUsername(user.getUsername()); + + for( Iterator it = uroles.iterator(); it.hasNext(); ) + { + UserRoleLocal url = (UserRoleLocal) it.next(); + url.remove(); + } } ! catch( FinderException fe ) { } ! catch( RemoveException re ) { } catch( NamingException ne ) { } } *************** *** 235,239 **** public void ejbCreate() { - return; } --- 293,296 ---- *************** *** 255,260 **** } - private SessionContext sessionContext; - } --- 312,315 ---- |
From: Frank B. J. <bi...@us...> - 2004-05-05 07:46:58
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/server/beans/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6892 Modified Files: UserBean.java Log Message: Updated code formatting and added the Licence at the top. Index: UserBean.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/server/beans/model/UserBean.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** UserBean.java 15 Apr 2004 12:36:21 -0000 1.1.1.1 --- UserBean.java 5 May 2004 07:46:49 -0000 1.2 *************** *** 1,7 **** package org.openbroad.server.beans.model; ! import javax.ejb.*; ! import java.util.*; ! import org.openbroad.server.interfaces.model.*; /** --- 1,26 ---- + /* + * Copyright 2004 The OpenBroad Group + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + package org.openbroad.server.beans.model; ! import java.util.Collection; ! import javax.ejb.CreateException; ! import javax.ejb.EntityBean; ! import javax.ejb.EntityContext; ! import javax.ejb.RemoveException; /** *************** *** 11,306 **** * * @ejb.bean ! * name="User" ! * type="CMP" ! * cmp-version="2.x" ! * local-jndi-name="ejb/entity/CMP/User" ! * primkey-field="username" * * @ejb.finder ! * signature="java.util.Collection findAll()" * * @ejb.persistence ! * table-name="usertable" * * @jboss.persistence ! * datasource="java:/OpenBroadDB" ! * datasource-mapping="mySQL" */ abstract public class UserBean implements EntityBean { ! /** ! * @ejb.create-method ! * view-type="local" ! */ ! public String ejbCreate(String userName,String password,String name,String address,String city,String zip,String state,String country,String phone,String company,String fax,String email,String url) throws CreateException ! { ! setUsername(userName); ! setPassword(password); ! setName(name); ! setAddress(address); ! setCity(city); ! setZip(zip); ! setState(state); ! setCountry(country); ! setPhone(phone); ! setCompany(company); ! setFax(fax); ! setEmail(email); ! setUrl(url); ! ! return null; ! } ! public void ejbPostCreate(String userName,String password,String name,String address,String city,String zip,String state,String country,String phone,String company,String fax,String email,String url) throws CreateException ! { ! } ! public void ejbRemove() throws RemoveException ! { ! } ! public void ejbLoad() ! { ! } ! public void ejbStore() ! { ! } ! public void ejbActivate() ! { ! } ! public void ejbPassivate() ! { ! } ! public void unsetEntityContext() ! { ! this.entityContext = null; ! } ! public void setEntityContext(EntityContext entityContext) ! { ! this.entityContext = entityContext; ! } ! /** ! * @ejb.persistence ! * column-name = "username" ! * ! * @ejb.pk-field ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getUsername(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setUsername(String userName); ! /** ! * @ejb.persistence ! * column-name = "password" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getPassword(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setPassword(String password); ! /** ! * @ejb.persistence ! * column-name = "address" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getAddress(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setAddress(String address); ! /** ! * @ejb.persistence ! * column-name = "name" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getName(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setName(String name); ! /** ! * @ejb.persistence ! * column-name = "city" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getCity(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setCity(String city); ! /** ! * @ejb.persistence ! * column-name = "zip" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getZip(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setZip(String zip); ! /** ! * @ejb.persistence ! * column-name = "state" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getState(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setState(String state); ! /** ! * @ejb.persistence ! * column-name = "country" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getCountry(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setCountry(String country); ! /** ! * @ejb.persistence ! * column-name = "phone" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getPhone(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setPhone(String phone); ! /** ! * @ejb.persistence ! * column-name = "company" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getCompany(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setCompany(String company); ! /** ! * @ejb.persistence ! * column-name = "fax" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getFax(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setFax(String fax); ! /** ! * @ejb.persistence ! * column-name = "email" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getEmail(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setEmail(String email); ! /** ! * @ejb.persistence ! * column-name = "url" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getUrl(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setUrl(String url); ! /** ! * @ejb.interface-method ! * view-type="local" ! * ! * @ejb.relation ! * name="File-User" ! * role-name="User-has-many-File" ! * xxxtarget-ejb="File" ! * xxxtarget-role-name="File-has-User" ! */ ! public abstract java.util.Collection getFiles(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setFiles(java.util.Collection files); ! /** ! * @ejb.interface-method ! * view-type="local" ! * ! * @ejb.relation ! * name="Playlist-User" ! * role-name="User-has-many-Playlist" ! * xxxtarget-ejb="Playlist" ! * xxxtarget-role-name="Playlist-has-User" ! * xxxtarget-multiple="no" ! */ ! public abstract java.util.Collection getPlaylists(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setPlaylists(java.util.Collection playlists); ! /** ! * @ejb.interface-method ! * view-type="local" ! * ! * @ejb.relation ! * name="Streamlog-User" ! * role-name="User-has-many-Streamlog" ! * xxxtarget-ejb="Streamlog" ! * xxxtarget-role-name="Streamlog-has-User" ! * xxxtarget-multiple="no" ! */ ! public abstract java.util.Collection getStreamLogs(); ! /** ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract void setStreamLogs(java.util.Collection streamLogs); ! ! ! ! private EntityContext entityContext; ! } - --- 30,358 ---- * * @ejb.bean ! * name = "User" ! * type = "CMP" ! * cmp-version = "2.x" ! * local-jndi-name = "ejb/entity/CMP/User" ! * primkey-field = "username" * * @ejb.finder ! * signature = "java.util.Collection findAll()" * * @ejb.persistence ! * table-name = "usertable" * * @jboss.persistence ! * datasource = "java:/OpenBroadDB" ! * datasource-mapping = "mySQL" */ abstract public class UserBean implements EntityBean { ! /** ! * @ejb.create-method ! * view-type = "local" ! */ ! public String ejbCreate( String userName, String password, String name, ! String address, String city, String zip, String state, String country, ! String phone, String company, String fax, String email, String url ) throws CreateException ! { ! setUsername(userName); ! setPassword(password); ! setName(name); ! setAddress(address); ! setCity(city); ! setZip(zip); ! setState(state); ! setCountry(country); ! setPhone(phone); ! setCompany(company); ! setFax(fax); ! setEmail(email); ! setUrl(url); ! ! return null; ! } ! ! public void ejbPostCreate( String userName, String password, String name, ! String address, String city, String zip, String state, String country, ! String phone, String company, String fax, String email, String url ) throws CreateException ! { ! } ! ! /** ! * @ejb.persistence ! * column-name = "username" ! * ! * @ejb.pk-field ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getUsername(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setUsername(String userName); ! ! /** ! * @ejb.persistence ! * column-name = "password" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getPassword(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setPassword(String password); ! ! /** ! * @ejb.persistence ! * column-name = "address" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getAddress(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setAddress(String address); ! ! /** ! * @ejb.persistence ! * column-name = "name" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getName(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setName(String name); ! ! /** ! * @ejb.persistence ! * column-name = "city" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getCity(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setCity(String city); ! ! /** ! * @ejb.persistence ! * column-name = "zip" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getZip(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setZip(String zip); ! ! /** ! * @ejb.persistence ! * column-name = "state" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getState(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setState(String state); ! ! /** ! * @ejb.persistence ! * column-name = "country" ! * ! * @ejb.interface-method ! * view-type="local" ! */ ! public abstract String getCountry(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setCountry(String country); ! ! /** ! * @ejb.persistence ! * column-name = "phone" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getPhone(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setPhone(String phone); ! ! /** ! * @ejb.persistence ! * column-name = "company" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getCompany(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setCompany(String company); ! ! /** ! * @ejb.persistence ! * column-name = "fax" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getFax(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setFax(String fax); ! ! /** ! * @ejb.persistence ! * column-name = "email" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getEmail(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setEmail(String email); ! ! /** ! * @ejb.persistence ! * column-name = "url" ! * ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract String getUrl(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setUrl(String url); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! * ! * @ejb.relation ! * name = "File-User" ! * role-name = "User-has-many-File" ! */ ! public abstract Collection getFiles(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setFiles(Collection files); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! * ! * @ejb.relation ! * name = "Playlist-User" ! * role-name = "User-has-many-Playlist" ! */ ! public abstract Collection getPlaylists(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setPlaylists(Collection playlists); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! * ! * @ejb.relation ! * name = "Streamlog-User" ! * role-name = "User-has-many-Streamlog" ! */ ! public abstract Collection getStreamLogs(); ! ! /** ! * @ejb.interface-method ! * view-type = "local" ! */ ! public abstract void setStreamLogs(Collection streamLogs); ! ! ! public void ejbRemove() throws RemoveException ! { ! } ! ! public void ejbLoad() ! { ! } ! ! public void ejbStore() ! { ! } ! ! public void ejbActivate() ! { ! } ! ! public void ejbPassivate() ! { ! } ! ! public void unsetEntityContext() ! { ! this.entityContext = null; ! } ! ! public void setEntityContext(EntityContext entityContext) ! { ! this.entityContext = entityContext; ! } ! ! private EntityContext entityContext; } |
From: Frank B. J. <bi...@us...> - 2004-05-05 07:44:58
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/server/beans/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6457 Added Files: UserRoleBean.java Log Message: Entity bean to represent the userroles table. --- NEW FILE: UserRoleBean.java --- /* * Copyright 2004 The OpenBroad Group * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.openbroad.server.beans.model; import javax.ejb.CreateException; import javax.ejb.EntityBean; import javax.ejb.EntityContext; import javax.ejb.RemoveException; import org.openbroad.server.interfaces.model.UserLocal; /** * UserRoleBean. * * @author OpenBroad Group * * @ejb.bean * name = "UserRole" * type = "CMP" * cmp-version = "2.x" * local-jndi-name = "ejb/entity/CMP/UserRole" * primkey-field = "id" * * @ejb.finder * signature = "java.util.Collection findAll()" * * @ejb.finder * signature = "java.util.Collection findByUsername(java.lang.String username)" * query = "SELECT OBJECT(ur) FROM UserRole as ur WHERE ur.username = ?1" * result-type-mapping = "Local" * method-intf = "LocalHome" * * @ejb.persistence * table-name = "userroles" * * @jboss.persistence * datasource = "java:/OpenBroadDB" * datasource-mapping = "mySQL" */ public abstract class UserRoleBean implements EntityBean { /** * @ejb.create-method * view-type = "local" */ public Integer ejbCreate(Integer id, String username, String role) throws CreateException { setId(id); setRole(role); setUsername(username); return null; } public void ejbPostCreate(Integer id, String username, String role) throws CreateException { } /** * @ejb.persistence * column-name = "id" * * @jboss.persistence * auto-increment = "true" * * @ejb.pk-field * * @ejb.interface-method * view-type = "local" */ public abstract Integer getId(); /** * @ejb.interface-method * view-type = "local" */ public abstract void setId(Integer id); /** * @ejb.persistence * column-name = "username" * * @ejb.interface-method * view-type = "local" */ public abstract String getUsername(); /** * @ejb.interface-method * view-type = "local" */ public abstract void setUsername(String username); /** * @ejb.persistence * column-name = "role" * * @ejb.interface-method * view-type = "local" */ public abstract String getRole(); /** * @ejb.interface-method * view-type = "local" */ public abstract void setRole(String role); public void ejbRemove() throws RemoveException { } public void ejbLoad() { } public void ejbStore() { } public void ejbActivate() { } public void ejbPassivate() { } public void unsetEntityContext() { this.entityContext = null; } public void setEntityContext(EntityContext entityContext) { this.entityContext = entityContext; } private EntityContext entityContext; } |
From: Frank B. J. <bi...@us...> - 2004-05-05 06:51:58
|
Update of /cvsroot/openbroad/openbroad In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29631 Modified Files: build.xml Log Message: Added check and copy for mail and activation jar. Changed the names of the properties in the build.property file. The property for the deploy folder is now changes to reflect the jboss/server/all folder instead. This is because, we then can copy the mail.jar and activation.jar from the lib folder instead. Index: build.xml =================================================================== RCS file: /cvsroot/openbroad/openbroad/build.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** build.xml 20 Apr 2004 16:35:16 -0000 1.3 --- build.xml 5 May 2004 06:51:49 -0000 1.4 *************** *** 96,100 **** <fileset file="${name}-${version}.zip"/> <!-- Undeploy already, so it is undeployed, when the new EAR file is deployed --> ! <fileset dir="${deploy.dest}" includes="${name}*.ear"/> </delete> </target> --- 96,100 ---- <fileset file="${name}-${version}.zip"/> <!-- Undeploy already, so it is undeployed, when the new EAR file is deployed --> ! <fileset dir="${prop.jbossall}/deploy" includes="${name}*.ear"/> </delete> </target> *************** *** 158,162 **** <!-- Compile the server source. --> ! <target depends="generate" name="servercompile"> <javac classpathref="classpath" destdir="${builddir}"> <src path="${srcdir}"/> --- 158,162 ---- <!-- Compile the server source. --> ! <target depends="generate,mailactivation" name="servercompile"> <javac classpathref="classpath" destdir="${builddir}"> <src path="${srcdir}"/> *************** *** 204,208 **** <target depends="ear" name="deploy"> <!-- Deploy the new EAR file --> ! <copy file="${serverdir}/${name}-${version}.ear" tofile="${deploy.dest}/${name}-${version}.ear"/> </target> --- 204,208 ---- <target depends="ear" name="deploy"> <!-- Deploy the new EAR file --> ! <copy file="${serverdir}/${name}-${version}.ear" tofile="${prop.jbossall}/deploy/${name}-${version}.ear"/> </target> *************** *** 216,264 **** <taskdef classpathref="axis.libs" resource="axis-tasks.properties"/> ! <echo><![CDATA[Wait ${deploy.sleep} seconds until the ear file is deployed]]></echo> ! <sleep seconds="${deploy.sleep}"/> ! <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/FileListService?wsdl"> ! <mapping namespace="http://${deploy.server}:8080/jboss-net/services/FileListService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/TypeService?wsdl"> ! <mapping namespace="http://${deploy.server}:8080/jboss-net/services/TypeService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/PlayListService?wsdl"> ! <mapping namespace="http://${deploy.server}:8080/jboss-net/services/PlayListService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/UploadService?wsdl"> ! <mapping namespace="http://${deploy.server}:8080/jboss-net/services/UploadService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/InfotypeService?wsdl"> ! <mapping namespace="http://${deploy.server}:8080/jboss-net/services/InfotypeService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/InfoService?wsdl"> ! <mapping namespace="http://${deploy.server}:8080/jboss-net/services/InfoService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/UserService?wsdl"> ! <mapping namespace="http://${deploy.server}:8080/jboss-net/services/UserService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/StreamLogService?wsdl"> ! <mapping namespace="http://${deploy.server}:8080/jboss-net/services/StreamLogService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/TestService?wsdl"> ! <mapping namespace="http://${deploy.server}:8080/jboss-net/services/TestService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> --- 216,264 ---- <taskdef classpathref="axis.libs" resource="axis-tasks.properties"/> ! <echo><![CDATA[Wait ${prop.deploysleep} seconds until the ear file is deployed]]></echo> ! <sleep seconds="${prop.deploysleep}"/> ! <axis-wsdl2java output="${srcdir}" url="http://${prop.jbossserver}:8080/jboss-net/services/FileListService?wsdl"> ! <mapping namespace="http://${prop.jbossserver}:8080/jboss-net/services/FileListService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${prop.jbossserver}:8080/jboss-net/services/TypeService?wsdl"> ! <mapping namespace="http://${prop.jbossserver}:8080/jboss-net/services/TypeService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${prop.jbossserver}:8080/jboss-net/services/PlayListService?wsdl"> ! <mapping namespace="http://${prop.jbossserver}:8080/jboss-net/services/PlayListService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${prop.jbossserver}:8080/jboss-net/services/UploadService?wsdl"> ! <mapping namespace="http://${prop.jbossserver}:8080/jboss-net/services/UploadService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${prop.jbossserver}:8080/jboss-net/services/InfotypeService?wsdl"> ! <mapping namespace="http://${prop.jbossserver}:8080/jboss-net/services/InfotypeService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${prop.jbossserver}:8080/jboss-net/services/InfoService?wsdl"> ! <mapping namespace="http://${prop.jbossserver}:8080/jboss-net/services/InfoService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${prop.jbossserver}:8080/jboss-net/services/UserService?wsdl"> ! <mapping namespace="http://${prop.jbossserver}:8080/jboss-net/services/UserService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${prop.jbossserver}:8080/jboss-net/services/StreamLogService?wsdl"> ! <mapping namespace="http://${prop.jbossserver}:8080/jboss-net/services/StreamLogService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> ! <axis-wsdl2java output="${srcdir}" url="http://${prop.jbossserver}:8080/jboss-net/services/TestService?wsdl"> ! <mapping namespace="http://${prop.jbossserver}:8080/jboss-net/services/TestService" package="${package}.client.stub"/> <mapping namespace="http://net.jboss.org/jmx" package="${package}.client.stub"/> <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> *************** *** 267,271 **** <!-- Compile the client source. --> ! <target depends="generate,stub,javalayer" name="clientcompile"> <javac classpathref="classpath" destdir="${builddir}"> <src path="${srcdir}"/> --- 267,271 ---- <!-- Compile the client source. --> ! <target depends="generate,stub,javalayer,mailactivation" name="clientcompile"> <javac classpathref="classpath" destdir="${builddir}"> <src path="${srcdir}"/> *************** *** 410,415 **** ******************************************************************* --> ! <!-- Do certain checks for libs --> <target name="checks"> <!-- Check for xdoclet --> <condition property="check.xdoclet"> --- 410,418 ---- ******************************************************************* --> ! <!-- HERE we check, to see if we already have the libs or we should --> ! <!-- download them. --> <target name="checks"> + <property file="build.properties"/> + <!-- Check for xdoclet --> <condition property="check.xdoclet"> *************** *** 424,428 **** <available file="xdoclet-${xdoclet.ver}/${jbossnet.jarfile}" type="file"/> </condition> ! <!-- Check for axis.zip --> <condition property="check.axis"> <and> --- 427,431 ---- <available file="xdoclet-${xdoclet.ver}/${jbossnet.jarfile}" type="file"/> </condition> ! <!-- Check for axis jars --> <condition property="check.axis"> <and> *************** *** 441,447 **** <available file="${libdir}/jl0.4.jar" type="file"/> </condition> <!-- Check for deploy property file --> <condition property="check.buildprop"> ! <available file="build.properties" type="file"/> </condition> </target> --- 444,462 ---- <available file="${libdir}/jl0.4.jar" type="file"/> </condition> + <!-- Check for mail and activation libs --> + <condition property="check.mailactivation"> + <and> + <available file="${libdir}/activation.jar" type="file"/> + <available file="${libdir}/mail.jar" type="file"/> + </and> + </condition> <!-- Check for deploy property file --> <condition property="check.buildprop"> ! <and> ! <available file="build.properties" type="file"/> ! <isset property="prop.jbossall" /> ! <isset property="prop.jbossserver" /> ! <isset property="prop.deploysleep" /> ! </and> </condition> </target> *************** *** 517,521 **** <!-- Get jl0.4.jar if not present --> <target depends="checks" name="javalayer" unless="check.javalayer"> ! <input addproperty="javalayer.get" validargs="Yes,No">It doesn't look like you've got JavaLayer xdoclet module! Download it?</input> <condition property="javalayer.abort"> --- 532,536 ---- <!-- Get jl0.4.jar if not present --> <target depends="checks" name="javalayer" unless="check.javalayer"> ! <input addproperty="javalayer.get" validargs="Yes,No">It doesn't look like you've got JavaLayer! Download it?</input> <condition property="javalayer.abort"> *************** *** 524,528 **** <!-- jl0.4.jar is needed, so abort build if not present. --> ! <fail if="javalayer.abort"><![CDATA[JavaLayer xdoclet needed You need JavaLayer to build this project. Get it from http://www.javazoom.net]]></fail> --- 539,543 ---- <!-- jl0.4.jar is needed, so abort build if not present. --> ! <fail if="javalayer.abort"><![CDATA[JavaLayer needed You need JavaLayer to build this project. Get it from http://www.javazoom.net]]></fail> *************** *** 535,550 **** </target> ! <!-- Ask for deploy properties if they are not present. --> <target depends="checks" name="buildprop" unless="check.buildprop"> ! <input addproperty="deployprop.dest">Please enter the full path to jboss's deploy folder:</input> ! <input addproperty="deployprop.server">Please enter the hostname for the jboss server:</input> ! <input addproperty="deployprop.sleep"> Please enter number of seconds, the build should wait until the EAR file is deployed on the server: </input> ! <echo file="build.properties"><![CDATA[deploy.dest=${deployprop.dest} ! deploy.server=${deployprop.server} ! deploy.sleep=${deployprop.sleep}]]></echo> </target> --- 550,582 ---- </target> ! <!-- Get mail and activation jar files --> ! <target depends="checks,buildprop" name="mailactivation" unless="check.mailactivation"> ! <input addproperty="mailactivation.get" validargs="Yes,No">It doesn't look like you've got the mail and activation jar files! Download it?</input> ! ! <condition property="mailactivation.abort"> ! <equals arg1="No" arg2="${mailactivation.get}"/> ! </condition> ! ! <!-- mail and activation jar is needed, so abort build if not present. --> ! <fail if="mailactivation.abort"><![CDATA[mail and activation needed ! You need the mail and activation jars to build this project. ! Get it from http://www.javazoom.net]]></fail> ! ! <copy file="${prop.jbossall}/lib/activation.jar" tofile="${libdir}/activation.jar"/> ! <copy file="${prop.jbossall}/lib/mail.jar" tofile="${libdir}/mail.jar"/> ! </target> ! ! <!-- Ask for properties if they are not present. --> <target depends="checks" name="buildprop" unless="check.buildprop"> ! <input addproperty="prop.jbossall">Please enter the full path to jboss's ALL folder:</input> ! <input addproperty="prop.jbossserver">Please enter the hostname for the jboss server:</input> ! <input addproperty="prop.deploysleep"> Please enter number of seconds, the build should wait until the EAR file is deployed on the server: </input> ! <echo file="build.properties"><![CDATA[prop.jbossall=${prop.jbossall} ! prop.jbossserver=${prop.jbossserver} ! prop.deploysleep=${prop.deploysleep}]]></echo> </target> *************** *** 552,556 **** <!-- ******************************************************************* ! * EXTRA TARGETS WHICH CAN BE USED BY NEEDS. ******************************************************************* --> --- 584,588 ---- <!-- ******************************************************************* ! * EXTRA TARGETS WHICH CAN BE USED WHEN NEEDED. ******************************************************************* --> |
From: Frank B. J. <bi...@us...> - 2004-04-26 17:31:17
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31820 Modified Files: OpenBroad.java Log Message: When uploading a file, we've got a NullPointerException, causing the progressbar to continue. Saving a playlist now refreshes the playlist in the dataholder. Index: OpenBroad.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view/OpenBroad.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpenBroad.java 20 Apr 2004 16:31:41 -0000 1.2 --- OpenBroad.java 26 Apr 2004 17:31:07 -0000 1.3 *************** *** 463,468 **** gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 2; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel7.add(plEndTime, gridBagConstraints); --- 463,468 ---- gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 2; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; jPanel7.add(plEndTime, gridBagConstraints); *************** *** 470,475 **** gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel7.add(plStartDate, gridBagConstraints); --- 470,475 ---- gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; jPanel7.add(plStartDate, gridBagConstraints); *************** *** 477,482 **** gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); jPanel7.add(plEndDate, gridBagConstraints); --- 477,482 ---- gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); + gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; jPanel7.add(plEndDate, gridBagConstraints); *************** *** 867,871 **** { format = new MaskFormatter("##:##"); - // format.setValidCharacters("0123456789"); }catch(Exception e) --- 867,870 ---- *************** *** 922,927 **** {//GEN-HEADEREND:event_savePlaylistActionPerformed - - if(OpenBroadLogic.create(name,plStartTime,plEndTime)) { --- 921,924 ---- *************** *** 1009,1012 **** --- 1006,1011 ---- murle.printStackTrace(); } + + DataHolder.getInstance().refreshPlaylist(); } }//GEN-LAST:event_savePlaylistActionPerformed *************** *** 1148,1156 **** for(int j=0;j<selectedSize;j++) array[j]=""+liste.get(j); - - // model = new PlaylistModel(array); - - // playListTabel.setModel(model); - } private void refreshDataHolder() --- 1147,1150 ---- *************** *** 1162,1166 **** {//GEN-HEADEREND:event_formComponentMoved - conf.setProperty("playListX",""+getX()); conf.setProperty("playListY",""+getY()); --- 1156,1159 ---- *************** *** 1168,1174 **** /** Exit the Application */ - private void exitForm(java.awt.event.WindowEvent evt)//GEN-FIRST:event_exitForm - { System.exit(0); --- 1161,1165 ---- *************** *** 1234,1240 **** usstub.addAttachment( new DataHandler( new FileDataSource(filesrc) ) ); serverProgress.setIndeterminate(true); usstub.uploadFile(filedata); - serverProgress.setIndeterminate(false); } catch( IOException ioe ) --- 1225,1231 ---- usstub.addAttachment( new DataHandler( new FileDataSource(filesrc) ) ); + serverProgress.setString(java.util.ResourceBundle.getBundle("org/openbroad/client/languages/openbroad").getString("uploading")); serverProgress.setIndeterminate(true); usstub.uploadFile(filedata); } catch( IOException ioe ) *************** *** 1246,1249 **** --- 1237,1244 ---- se.printStackTrace(); } + catch( NullPointerException npe ) + {} + + serverProgress.setIndeterminate(false); progressPanel.setVisible(false); |
From: Frank B. J. <bi...@us...> - 2004-04-21 16:34:48
|
Update of /cvsroot/openbroad/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25961 Added Files: DeveloperGuidelines.sxw Log Message: Developer guidelines. Initial version. --- NEW FILE: DeveloperGuidelines.sxw --- (This appears to be a binary file; contents omitted.) |
From: Frank B. J. <bi...@us...> - 2004-04-21 16:33:48
|
Update of /cvsroot/openbroad/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25669 Modified Files: DocumentTemplate.stw Log Message: Added document info on the first page. Index: DocumentTemplate.stw =================================================================== RCS file: /cvsroot/openbroad/docs/DocumentTemplate.stw,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 Binary files /tmp/cvsETJnEU and /tmp/cvso7TtIk differ |
From: Frank B. J. <bi...@us...> - 2004-04-20 16:35:29
|
Update of /cvsroot/openbroad/openbroad In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1723 Modified Files: build.xml Log Message: Version 0.4.1. The fast upload. Index: build.xml =================================================================== RCS file: /cvsroot/openbroad/openbroad/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** build.xml 16 Apr 2004 11:53:28 -0000 1.2 --- build.xml 20 Apr 2004 16:35:16 -0000 1.3 *************** *** 39,43 **** <!-- Project Information --> <property name="name" value="OpenBroad"/> ! <property name="version" value="0.4.0"/> <property name="vendor" value="OpenBroad Group"/> --- 39,43 ---- <!-- Project Information --> <property name="name" value="OpenBroad"/> ! <property name="version" value="0.4.1"/> <property name="vendor" value="OpenBroad Group"/> *************** *** 216,221 **** <taskdef classpathref="axis.libs" resource="axis-tasks.properties"/> ! <echo><![CDATA[Wait 10 seconds until the ear file is deployed]]></echo> ! <sleep seconds="15"/> <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/FileListService?wsdl"> --- 216,221 ---- <taskdef classpathref="axis.libs" resource="axis-tasks.properties"/> ! <echo><![CDATA[Wait ${deploy.sleep} seconds until the ear file is deployed]]></echo> ! <sleep seconds="${deploy.sleep}"/> <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/FileListService?wsdl"> *************** *** 234,238 **** <mapping namespace="http://xml.apache.org/xml-soap" package="${package}.client.stub"/> </axis-wsdl2java> - <axis-wsdl2java output="${srcdir}" url="http://${deploy.server}:8080/jboss-net/services/UploadService?wsdl"> <mapping namespace="http://${deploy.server}:8080/jboss-net/services/UploadService" package="${package}.client.stub"/> --- 234,237 ---- |
From: Frank B. J. <bi...@us...> - 2004-04-20 16:31:56
|
Update of /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv940 Modified Files: OpenBroad.form OpenBroad.java Log Message: Changed the way the upload of a file worked. It now uses SOAP Attachment to add a file to a method call. This way is much faster. Index: OpenBroad.java =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view/OpenBroad.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** OpenBroad.java 15 Apr 2004 12:36:10 -0000 1.1.1.1 --- OpenBroad.java 20 Apr 2004 16:31:41 -0000 1.2 *************** *** 23,42 **** import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; - import java.io.FileInputStream; import java.io.IOException; import java.rmi.RemoteException; import java.text.ParseException; import java.util.*; ! ! ! import org.openbroad.client.user.view.control.Config; [...1285 lines suppressed...] + private javax.swing.JButton refresh; private javax.swing.JButton savePlaylist; private javax.swing.JScrollPane scroll; *************** *** 1380,1386 **** private javax.swing.JMenu view; // End of variables declaration//GEN-END:variables ! ! ! } --- 1361,1367 ---- private javax.swing.JMenu view; // End of variables declaration//GEN-END:variables ! ! ! } Index: OpenBroad.form =================================================================== RCS file: /cvsroot/openbroad/openbroad/src/org/openbroad/client/user/view/OpenBroad.form,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** OpenBroad.form 15 Apr 2004 12:36:09 -0000 1.1.1.1 --- OpenBroad.form 20 Apr 2004 16:31:29 -0000 1.2 *************** *** 319,323 **** <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> <SubComponents> ! <Component class="javax.swing.JButton" name="jButton1"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> --- 319,323 ---- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/> <SubComponents> ! <Component class="javax.swing.JButton" name="refresh"> <Properties> <Property name="icon" type="javax.swing.Icon" editor="org.openide.explorer.propertysheet.editors.IconEditor"> *************** *** 329,333 **** </Properties> <Events> ! <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> </Events> </Component> --- 329,333 ---- </Properties> <Events> ! <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="refreshActionPerformed"/> </Events> </Component> |