opencoe-cvs Mailing List for OpenCOE
Status: Alpha
Brought to you by:
rbroberg
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(17) |
Nov
(17) |
Dec
|
---|
From: <rbr...@us...> - 2003-11-25 08:17:42
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps In directory sc8-pr-cvs1:/tmp/cvs-serv3026/src/COE/src/COE/java/org/opencoe/coe/kernel/apps Modified Files: ApplicationManager.java _ApplicationManagerTree.java Log Message: [ 845321 ] Extend COE to handle optional Application data Index: ApplicationManager.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/ApplicationManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ApplicationManager.java 15 Nov 2003 19:49:34 -0000 1.3 --- ApplicationManager.java 25 Nov 2003 04:37:04 -0000 1.4 *************** *** 88,91 **** --- 88,93 ---- // load profile names into an Array ArrayList tmp = COE_get_current_profiles.getOutput(); + ArrayList tmp2 = new ArrayList(); + _OpenCOECmdExec COE_get_app_reserved_data; // for every profile name *************** *** 119,123 **** for (int j = 0; j < tmp.size(); j++) { t = (String) tmp.get(j); ! System.out.println("testout: " + t); StringTokenizer st = new StringTokenizer(t, ":"); a = new _OpenCOEApp(st.nextToken(), st.nextToken(), --- 121,125 ---- for (int j = 0; j < tmp.size(); j++) { t = (String) tmp.get(j); ! //System.out.println("testout: " + t); StringTokenizer st = new StringTokenizer(t, ":"); a = new _OpenCOEApp(st.nextToken(), st.nextToken(), *************** *** 128,131 **** --- 130,153 ---- } p.assignApp(a); + + // set class path if available + cmd = new String[]{"COE_HOME/bin/COE_get_app_reserved_data", + a.getName(), + p.getScope(), + "-f7", + "-f8"}; + COE_get_app_reserved_data = new _OpenCOECmdExec(cmd); + tmp2.clear(); + tmp2 = COE_get_app_reserved_data.getOutput(); + if (tmp2.size() > 0) { + t = (String) tmp2.get(0); + st = new StringTokenizer(t, ":"); + if (st.hasMoreElements()) { + a.setInitClass(st.nextToken()); + } + if (st.hasMoreElements()) { + a.setInitClassPath(st.nextToken()); + } + } } } Index: _ApplicationManagerTree.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/_ApplicationManagerTree.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** _ApplicationManagerTree.java 15 Nov 2003 19:49:34 -0000 1.2 --- _ApplicationManagerTree.java 25 Nov 2003 04:37:04 -0000 1.3 *************** *** 69,77 **** _OpenCOEApp n = (_OpenCOEApp) node; String c; if (n.getInitClass() != null) { c = n.getInitClass(); System.out.println("Node::initclass::"+c); //ClassLoader cl = new ClassLoader(); ! initLoadClass(c); } else { --- 69,79 ---- _OpenCOEApp n = (_OpenCOEApp) node; String c; + String p; if (n.getInitClass() != null) { c = n.getInitClass(); + p = n.getInitClassPath(); System.out.println("Node::initclass::"+c); //ClassLoader cl = new ClassLoader(); ! initLoadClass(c,p); } else { *************** *** 91,101 **** } ! private static Class initLoadClass (String c) { Class cc = null; - ClassLoader cl = ClassLoader.getSystemClassLoader(); try { ! Object co = cl.loadClass(c).newInstance(); ! //cc = (Class)co; ! //co.getClass().show(); } catch (ClassNotFoundException cnfe) { System.err.println("_ApplicationManagerTree::initLoadClass::ClassNotFound::"+c); --- 93,122 ---- } ! //private static Class initLoadClass (String c, String p) { ! private Class initLoadClass (String c, String p) { Class cc = null; try { ! if (p != null) { ! try { ! ! System.out.println("_ApplicationManagerTree::initLoadClass::try url::"+p); ! //java.net.URL[] urls = new java.net.URL[]{ ! //new java.net.URL("file://"+p)}; ! //java.net.URLClassLoader cl = ! //new java.net.URLClassLoader(urls); ! ClassLoader cl = ! new java.net.URLClassLoader( ! new java.net.URL[] { ! new java.net.URL("file://"+p)}, ! getClass().getClassLoader() ); ! //ClassLoader cl = ClassLoader.getSystemClassLoader(); ! Object co = cl.loadClass(c).newInstance(); ! } catch (java.net.MalformedURLException mue) { ! System.out.println("_ApplicationManagerTree::initLoadClass::bad url::"+p); ! } ! } else { ! ClassLoader cl = ClassLoader.getSystemClassLoader(); ! Object co = cl.loadClass(c).newInstance(); ! } } catch (ClassNotFoundException cnfe) { System.err.println("_ApplicationManagerTree::initLoadClass::ClassNotFound::"+c); |
From: <rbr...@us...> - 2003-11-25 06:29:38
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/util In directory sc8-pr-cvs1:/tmp/cvs-serv3026/src/COE/src/COE/java/org/opencoe/coe/kernel/util Modified Files: _OpenCOEApp.java Log Message: [ 845321 ] Extend COE to handle optional Application data Index: _OpenCOEApp.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/util/_OpenCOEApp.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** _OpenCOEApp.java 15 Nov 2003 19:49:35 -0000 1.2 --- _OpenCOEApp.java 25 Nov 2003 04:37:04 -0000 1.3 *************** *** 33,36 **** --- 33,37 ---- private ImageIcon icon = new ImageIcon("/h/COE/data/Icons/gnome-run.png"); private String initclass; + private String initclasspath; *************** *** 171,174 **** --- 172,185 ---- } + /** + * Sets the initClassPath attribute of the _OpenCOEApp object + * + *@param initclasspath The new initClassPath value + */ + public void setInitClassPath(String initclasspath) { + System.out.println("_OpenCOEApp::setInitClassPath::"+initclasspath); + this.initclasspath = initclasspath; + } + /// getter methods /////////////////////////////////// *************** *** 251,254 **** --- 262,275 ---- return initclass; } + + /** + * Gets the initclasspath attribute of the _OpenCOEApp object + * + *@return The initClassPath value + */ + public String getInitClassPath() { + return initclasspath; + } } + |
From: <rbr...@us...> - 2003-11-25 06:29:38
|
Update of /cvsroot/opencoe/coekernel/src/UserMgmt/src/OpenCOE/build In directory sc8-pr-cvs1:/tmp/cvs-serv3026/src/UserMgmt/src/OpenCOE/build Modified Files: build.xml Log Message: [ 845321 ] Extend COE to handle optional Application data Index: build.xml =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/UserMgmt/src/OpenCOE/build/build.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** build.xml 2 Nov 2003 16:12:32 -0000 1.2 --- build.xml 25 Nov 2003 04:37:04 -0000 1.3 *************** *** 347,350 **** --- 347,352 ---- <include name="${name}/bin/COE_add_app_data"/> <include name="${name}/bin/COE_delete_app_data"/> + <include name="${name}/bin/COE_add_app_reserved_data"/> + <include name="${name}/bin/COE_delete_app_reserved_data"/> </tarfileset> *************** *** 354,357 **** --- 356,360 ---- <include name="${name}/bin/COE_delete_current_profile"/> <include name="${name}/bin/COE_get_app_data"/> + <include name="${name}/bin/COE_get_app_reserved_data"/> <include name="${name}/bin/COE_get_current_profiles"/> <include name="${name}/bin/COE_get_error_string"/> |
From: <rbr...@us...> - 2003-11-25 06:29:25
|
Update of /cvsroot/opencoe/coekernel/src/UserMgmt/src/UserMgmt/bin In directory sc8-pr-cvs1:/tmp/cvs-serv5330/src/UserMgmt/src/UserMgmt/bin Added Files: COE_add_app_reserved_data COE_delete_app_reserved_data COE_get_app_reserved_data Log Message: [ 845321 ] Extend COE to handle optional Application data --- NEW FILE: COE_add_app_reserved_data --- #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w #- # Copyright (C) 2002, Federal Linux Systems # License: GNU Lesser General Public License, v2.1 #- use strict; use Coe; my $PRGM="COE_add_app_reserved_data"; my $VERSION="@VERSION@"; if (@ARGV == 0) { &useage; exit 202; } sub useage { print "Useage: $PRGM [options] \"<AppName>\" <Scope> "; print "-f<N> \"<Value>\" [-f<N> \"<Value>\"]*\n"; } my $arg1; my $newstr=""; my $app=""; my $ascope="a"; my $i; my @appdat; my @fieldval=("","","","","","","","","","",""); my @oldval=("","","","","","","","","","",""); my @newval; while (@ARGV > 0 ){ $arg1=cleanString(shift,1); if ("$arg1" eq "-h") { &useage; exit 0; } elsif ("$arg1" eq "-H") { coeMan("COE_COMP/UserMgmt/docs/man/$PRGM"); exit 0; } elsif ("$arg1" eq "-V") { print "VERSION: $VERSION\n"; exit 0; } else { $app=$arg1; $ascope=cleanString(shift,1); while (@ARGV > 0) { # the argument is formatted "-f<N> Value" # so I am parsing the first arg for N # and using that to define array postion N+3 with Value # I should only allow for reserved num 1-6 # The +5 normalizes the string positions 7-12 # where 0 is first string field $arg1=cleanString(shift,3); $_=$arg1; s/-f//; $i=$_; $fieldval[$i+5]=cleanString(shift,1); } } } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # do simple sanity checks # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # is this a legal scope ? if ( "$ascope" eq "l" || "$ascope" eq "local") { $ascope="local"; } elsif ("$ascope" eq "g" || "$ascope" eq "global") { $ascope="global"; } else { &useage; exit 202; } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # define some stuff # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # path for the App data file my $coedat=coeFileConv "COE_USER/$ascope/Profiles/.AppData.dat"; # App.dat format => appname:appnorm:acctgrp:exec:args:icon # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # cat out the App.dat file, removing the app string for alteration # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| $i=0; #open file, "$APPDAT" || die "Cannot open file $APPDAT: $!\n"; my $COEDAT = readFile ($coedat); while (<$COEDAT>) { chomp(); if (/^$app:/) { @oldval=split(':'); } else { $appdat[$i++]=$_; } } close $COEDAT; # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # exit if no such app is found with COE_NO_SUCH_APP # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| if ("$oldval[0]" eq "") { exit 205; } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # construct a new app string to replace the old one # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # if a new value is defined, use it, else default to the old value #$newval[0]=$oldval[0]; #$newval[1]=$oldval[1]; #$newval[2]=$oldval[2]; #$newval[3]=$oldval[3]; #$newval[4]=$oldval[4]; #$newval[5]=$oldval[5]; #$newval[6]=$oldval[6]; #$newval[7]=$oldval[7]; #$newval[8]=$oldval[8]; #$newval[9]=$oldval[9]; @newval=@oldval; $i=5; while ($i < 12) { if ("$fieldval[$i]" ne "") { $newval[$i]=$fieldval[$i]; } else { $newval[$i]=$oldval[$i]; } $i++; } # build the new user string $i=1; $newstr=$newval[0]; while ($i < 10) { $newstr=$newstr.":".$newval[$i++]; } chomp($newstr); # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # rewrite the file with the old data and the new user string # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| #open file, (">$APPDAT") || die "Cannot open file $APPDAT: $!\n"; open COEDAT, (">$coedat") || die "Cannot open file $coedat: $!\n"; foreach (@appdat) { print COEDAT "$_\n"; } print COEDAT "$newstr\n"; close COEDAT; exit 0; --- NEW FILE: COE_delete_app_reserved_data --- #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w #- # Copyright (C) 2002, Federal Linux Systems # License: GNU Lesser General Public License, v2.1 #- use strict; use Coe; my $PRGM="COE_delete_app_reserved_data"; my $VERSION="@VERSION@"; if (@ARGV == 0) { &useage; exit 202; } sub useage { print "Useage: $PRGM [options] {App} {Scope} {-f<N>} {-f<N>} ...\n"; } my $arg1; my $newstr; my $newval; my $oldval; my $app="0"; my $ascope="a"; my $coedat; my $COEDAT; my $i; my @newval; my @profdat; my @oldval; my @fieldval = ("z", "z", "z", "z", "z", "z", "z", "z", "z", "z"); while (@ARGV > 0 ){ $arg1=cleanString(shift,1); if ("$arg1" eq "-h") { &useage; exit; } elsif ("$arg1" eq "-H") { coeMan("COE_COMP/UserMgmt/docs/man/$PRGM"); exit 0; } elsif ("$arg1" eq "-V") { print "VERSION: $VERSION\n"; exit 0; } else { $app=$arg1; $ascope=cleanString(shift,1); $i=0; while (@ARGV > 0) { # the argument is formatted "-f<N>" # so I am parsing the first arg for N # and using that to define array postion N+3 with aflag # I should only allow for reserved num 1-6 # The +5 normalizes the string positions 6-13 # where 0 is first string field # zremq is just a nonsense string used as a flag $arg1=cleanString(shift,1); $_=$arg1; s/-f//; $i=$_; $fieldval[$i+5]=cleanString("zremq", 1); } } } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # do simple sanity checks # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # is this a legal scope ? if ( "$ascope" eq "l" || "$ascope" eq "local" ) { $ascope="local"; } elsif ("$ascope" eq "g" || "$ascope" eq "global") { $ascope="global"; } else { &useage; } # does this acct group exist? # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # define some stuff # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # path for the App data COEDAT $coedat=coeFileConv "COE_USER/$ascope/Profiles/.AppData.dat"; # App.dat format:: appname:appnorm:acctgrp:exec:args:icon # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # cat out the App.dat COEDAT, removing the user string for alteration # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| $i=0; $COEDAT=readFile ($coedat); while (<$COEDAT>) { if (/^$app:/) { chomp(); @oldval=split(':'); } else { $profdat[$i++]=cleanString($_,3); } } close $COEDAT; #- does this app exist if ( $#oldval < 0 ) { exit 205; } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # construct a new user string to replace the old one nulling defined fields # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # build the new user string $newstr=$oldval[0]; $newstr=$newstr.":".$oldval[1]; $newstr=$newstr.":".$oldval[2]; $newstr=$newstr.":".$oldval[3]; $i=5; while ($i < 12) { if ("$fieldval[$i]" eq "zremq") { $newstr=$newstr.":"; } else { $newstr=$newstr.":".$oldval[$i]; } $i++; } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # rewrite the COEDAT with the old data and the new user string # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| open COEDAT, (">$coedat") || die "Cannot open COEDAT $coedat: $!\n"; foreach (@profdat) { print COEDAT "$_\n"; } print COEDAT "$newstr\n"; close COEDAT; --- NEW FILE: COE_get_app_reserved_data --- #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w #- # Copyright (C) 2002, Federal Linux Systems # License: GNU Lesser General Public License, v2.1 #- use strict; use Coe; my $PRGM="COE_get_app_reserved_data"; my $VERSION="@VERSION@"; if (@ARGV == 0) { &useage; exit 202; } sub useage { print "Useage: $PRGM [options] {App} {Scope} {-f<N>} {-f<N>} ...\n"; } my $arg1; my $newstr; my $newval; my $oldval; my $app="0"; my $ascope="a"; my $coedat; my $COEDAT; my $cnt=0; my $i; my @newval; my @profdat; my @oldval; my @fieldval = ("z", "z", "z", "z", "z", "z", "z", "z", "z", "z"); while (@ARGV > 0 ){ $arg1=cleanString(shift,1); if ("$arg1" eq "-h") { &useage; exit; } elsif ("$arg1" eq "-H") { coeMan("COE_COMP/UserMgmt/docs/man/$PRGM"); exit 0; } elsif ("$arg1" eq "-V") { print "VERSION: $VERSION\n"; exit 0; } else { $app=$arg1; $ascope=cleanString(shift,1); $i=0; while (@ARGV > 0) { # the argument is formatted "-f<N>" # so I am parsing the first arg for N # and using that to define array postion N+3 with aflag # I should only allow for reserved num 1-6 # The +5 normalizes the string positions 6-13 # where 0 is first string field # zremq is just a nonsense string used as a flag $arg1=cleanString(shift,1); $_=$arg1; s/-f//; $i=$_; $fieldval[$cnt++]=$i-1; } } } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # do simple sanity checks # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # is this a legal scope ? if ( "$ascope" eq "l" || "$ascope" eq "local" ) { $ascope="local"; } elsif ("$ascope" eq "g" || "$ascope" eq "global") { $ascope="global"; } else { &useage; } # does this acct group exist? # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # define some stuff # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # path for the App data COEDAT $coedat=coeFileConv "COE_USER/$ascope/Profiles/.AppData.dat"; # App.dat format:: appname:appnorm:acctgrp:exec:args:icon # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # cat out the App.dat COEDAT, removing the user string for alteration # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| $i=0; $COEDAT=readFile ($coedat); while (<$COEDAT>) { if (/^$app:/) { chomp(); @oldval=split(':'); } else { $profdat[$i++]=cleanString($_,3); } } close $COEDAT; #- does this app exist if ( $#oldval < 0 ) { exit 205; } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # construct a new user string to replace the old one nulling defined fields # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # build the new user string $newstr=$oldval[$fieldval[0]]; for ($i=1; $i<$cnt; $i++) { if ("$oldval[$fieldval[$i]]" ne "") { $newstr=$newstr.":".$oldval[$fieldval[$i]]; } else { $newstr=$newstr.":"; } } # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| # print the discoverd fields # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| print "$newstr\n"; |
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps In directory sc8-pr-cvs1:/tmp/cvs-serv25433/java/org/opencoe/coe/kernel/apps Modified Files: ApplicationManager.java ProfileSelector.java _ApplicationManagerModel.java _ApplicationManagerTree.java Log Message: [ 841518 ] COESegInstall incorrectly parses args in Icons [ 841521 ] ApplicationManager mishandles arguments for commands Index: ApplicationManager.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/ApplicationManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ApplicationManager.java 21 Jun 2002 22:43:57 -0000 1.2 --- ApplicationManager.java 15 Nov 2003 19:49:34 -0000 1.3 *************** *** 1,28 **** /** ! * Copyright (C) 2002, Federal Linux Systems ! * ! * The project home for this software is http://www.opencoe.org ! * ! * This segment is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * ! * This segment is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! **/ ! package org.opencoe.coe.kernel.apps; import org.opencoe.coe.kernel.util.*; /* ! * An example provided by tutorial reader Olivier Berlanger. */ import javax.swing.*; --- 1,21 ---- /** ! * Copyright (C) 2002, Federal Linux Systems The project home for this software ! * is http://www.opencoe.org This segment is free software; you can ! * redistribute it and/or modify it under the terms of the GNU Lesser General ! * Public License as published by the Free Software Foundation; either version ! * 2.1 of the License, or (at your option) any later version. This segment is ! * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ! * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more ! * details. You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! package org.opencoe.coe.kernel.apps; import org.opencoe.coe.kernel.util.*; /* ! * An example provided by tutorial reader Olivier Berlanger. */ import javax.swing.*; *************** *** 31,134 **** import java.util.*; public class ApplicationManager extends JFrame { ! _ApplicationManagerTree tree; - public ApplicationManager() { - super("ApplicationManager tree demo"); - // add window listener - addWindowListener(new WindowAdapter() { - public void windowClosing(WindowEvent e) { - System.exit(0); - } - }); - // construct the tree - tree = new _ApplicationManagerTree(getProfileGraph()); - JScrollPane scrollPane = new JScrollPane(tree); - scrollPane.setPreferredSize(new Dimension(200, 200)); ! // construct the content pane ! JPanel contentPane = new JPanel(new BorderLayout()); ! contentPane.add(scrollPane, BorderLayout.CENTER); ! setContentPane(contentPane); ! } ! public _OpenCOEProfile getProfileGraph(){ ! _OpenCOEProfile p; // tmp variable for a profile ! _OpenCOEApp a; // tmp variable for an application ! String t; // tmp variable for profile name ! ArrayList profile = new ArrayList(); ! ArrayList apps = new ArrayList(); - // Create the top level (root) Profile - _OpenCOEProfile rootProfile = - new _OpenCOEProfile("OpenCOE Profile Manager", - "Dummy Profile for App Manager"); ! // get current profiles from COE tool ! _OpenCOECmdExec COE_get_current_profiles = ! new _OpenCOECmdExec("COE_HOME/bin/COE_get_current_profiles"); ! // load profile names into an Array ! ArrayList tmp=COE_get_current_profiles.getOutput(); ! // for every profile name ! // create a profile ! // and assign it to the root profile ! for (int i=0; i<tmp.size(); i++) { ! t=(String)tmp.get(i); ! StringTokenizer st = new StringTokenizer(t, ":"); ! p = new _OpenCOEProfile ! (st.nextToken(),"Test Profile", st.nextToken()); ! profile.add(p); ! rootProfile.assignProfile(p); ! } ! // for every profile, get COE assigned applications ! for (int i=0; i<profile.size(); i++) ! { ! // construct the command line for the COE call ! p = (_OpenCOEProfile)profile.get(i); ! //"\""+p.getName()+"\"", ! String[] cmd = new String[]{"COE_HOME/bin/COE_get_profileapp_data", ! p.getName(), ! p.getScope() }; ! _OpenCOECmdExec COE_get_current_apps = new _OpenCOECmdExec(cmd); ! // flush the temp array and load it with a list of apps ! tmp.clear(); ! tmp=COE_get_current_apps.getOutput(); ! // for every application in the list, ! // create an application ! // and assign to it to the profile ! for (int j=0; j<tmp.size(); j++) { ! t=(String)tmp.get(j); ! System.out.println("testout: "+t); ! StringTokenizer st = new StringTokenizer(t, ":"); ! a = new _OpenCOEApp (st.nextToken(), st.nextToken(), ! st.nextToken(), st.nextToken(), ! st.nextToken()); ! p.assignApp(a); } - } - - // Create and Assign default Applications (root level apps) - _OpenCOEApp rootApp1 = - new _OpenCOEApp("Web Browser"); - _OpenCOEApp rootApp2 = - new _OpenCOEApp("Chat Client"); - rootApp1.setExecPath("COE_HOME/COTS/WEBBr/bin/netscape"); - rootApp2.setExecPath("COE_HOME/COTS/IRCC/bin/IRCC_zircon.init"); - rootProfile.assignApp(rootApp1); - rootProfile.assignApp(rootApp2); ! return rootProfile; ! } ! public static void main(String[] args) { ! // create a frame ! JFrame mainFrame = new ApplicationManager(); ! mainFrame.pack(); ! mainFrame.setVisible(true); ! } } --- 24,165 ---- import java.util.*; + /** + * Description of the Class + * + *@author rbroberg + *@created November 14, 2003 + *@history 20031113:rb - reformatted + */ public class ApplicationManager extends JFrame { ! _ApplicationManagerTree tree; ! ArrayList profile; ! ArrayList apps; ! _OpenCOEProfile rootProfile; ! /** ! * Constructor for the ApplicationManager object ! */ ! public ApplicationManager() { ! super("ApplicationManager tree demo"); ! // add window listener ! addWindowListener( ! new WindowAdapter() { ! public void windowClosing(WindowEvent e) { ! System.exit(0); ! } ! }); ! // construct the tree ! tree = new _ApplicationManagerTree(getProfileGraph()); ! JScrollPane scrollPane = new JScrollPane(tree); ! scrollPane.setPreferredSize(new Dimension(200, 200)); ! // construct the content pane ! JPanel contentPane = new JPanel(new BorderLayout()); ! contentPane.add(scrollPane, BorderLayout.CENTER); ! setContentPane(contentPane); ! } ! /** ! * Gets the profileGraph attribute of the ApplicationManager object ! * ! *@return The profileGraph value ! */ ! public _OpenCOEProfile getProfileGraph() { ! _OpenCOEProfile p; ! // tmp variable for a profile ! _OpenCOEApp a; ! // tmp variable for an application ! String t; ! // tmp variable for profile name ! profile = new ArrayList(); ! apps = new ArrayList(); ! // Create the top level (root) Profile ! rootProfile = ! new _OpenCOEProfile("OpenCOE Profile Manager", ! "Dummy Profile for App Manager"); ! // get current profiles from COE tool ! _OpenCOECmdExec COE_get_current_profiles = ! new _OpenCOECmdExec("COE_HOME/bin/COE_get_current_profiles"); ! // load profile names into an Array ! ArrayList tmp = COE_get_current_profiles.getOutput(); ! // for every profile name ! // create a profile ! // and assign it to the root profile ! for (int i = 0; i < tmp.size(); i++) { ! t = (String) tmp.get(i); ! StringTokenizer st = new StringTokenizer(t, ":"); ! p = new _OpenCOEProfile ! (st.nextToken(), "Test Profile", st.nextToken()); ! profile.add(p); ! rootProfile.assignProfile(p); ! } ! for (int i = 0; i < profile.size(); i++) { ! // construct the command line for the COE call ! p = (_OpenCOEProfile) profile.get(i); ! //"\""+p.getName()+"\"", ! String[] cmd = new String[]{"COE_HOME/bin/COE_get_profileapp_data", ! p.getName(), ! p.getScope()}; ! _OpenCOECmdExec COE_get_current_apps = new _OpenCOECmdExec(cmd); ! ! // flush the temp array and load it with a list of apps ! tmp.clear(); ! tmp = COE_get_current_apps.getOutput(); ! ! // for every application in the list, ! // create an application ! // and assign to it to the profile ! for (int j = 0; j < tmp.size(); j++) { ! t = (String) tmp.get(j); ! System.out.println("testout: " + t); ! StringTokenizer st = new StringTokenizer(t, ":"); ! a = new _OpenCOEApp(st.nextToken(), st.nextToken(), ! st.nextToken(), st.nextToken(), ! st.nextToken()); ! if (st.hasMoreElements()) { ! a.setArgs(st.nextToken()); ! } ! p.assignApp(a); ! } } ! // Create and Assign default Applications (root level apps) ! // for every profile, get COE assigned applications ! _OpenCOEApp rootApp0 = ! new _OpenCOEApp("Profile Selector"); ! rootApp0.setExecPath("COE_HOME/bin/ProfileSelector"); ! rootApp0.setInitClass("org.opencoe.coe.kernel.apps.ProfileSelector"); ! rootProfile.assignApp(rootApp0); ! _OpenCOEApp rootApp1 = ! new _OpenCOEApp("Web Browser"); ! //_OpenCOEApp rootApp2 = ! //new _OpenCOEApp("Chat Client"); ! rootApp1.setExecPath("COE_APPS/MOZILLA/mozilla"); ! //rootApp2.setExecPath("COE_HOME/COTS/IRCC/bin/IRCC_zircon.init"); ! rootProfile.assignApp(rootApp1); ! //rootProfile.assignApp(rootApp2); ! ! return rootProfile; ! } ! ! /** ! * The main program for the ApplicationManager class ! * ! *@param args The command line arguments ! */ ! public static void main(String[] args) { ! // create a frame ! JFrame mainFrame = new ApplicationManager(); ! mainFrame.pack(); ! mainFrame.setVisible(true); ! } } + Index: ProfileSelector.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/ProfileSelector.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ProfileSelector.java 16 Aug 2003 23:19:39 -0000 1.3 --- ProfileSelector.java 15 Nov 2003 19:49:34 -0000 1.4 *************** *** 41,44 **** --- 41,45 ---- initComponents (); pack (); + show(); } *************** *** 220,229 **** for (int i=0; i<selectedList.getItemCount(); i++) System.out.println(selectedList.getItem(i)); ! System.exit (0); } else if (source == applyButton) { for (int i=0; i<selectedList.getItemCount(); i++) System.out.println(selectedList.getItem(i)); } else if (source == quitButton) { ! System.exit (0); } else if (source == selectButton) { // this might be kinda of stupid --- 221,232 ---- for (int i=0; i<selectedList.getItemCount(); i++) System.out.println(selectedList.getItem(i)); ! //System.exit (0); ! close(); } else if (source == applyButton) { for (int i=0; i<selectedList.getItemCount(); i++) System.out.println(selectedList.getItem(i)); } else if (source == quitButton) { ! // System.exit (0); ! close(); } else if (source == selectButton) { // this might be kinda of stupid *************** *** 286,290 **** this_list.deselect(i); } - public void refreshAll () { --- 289,292 ---- *************** *** 329,332 **** --- 331,338 ---- + private void close() { + dispose(); + } + /** * @param args the command line arguments *************** *** 336,341 **** } - - // Variables declaration - do not modify private JPanel assignPanel; private JLabel assignLabel; --- 342,345 ---- Index: _ApplicationManagerModel.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/_ApplicationManagerModel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** _ApplicationManagerModel.java 19 Apr 2002 15:18:00 -0000 1.1.1.1 --- _ApplicationManagerModel.java 15 Nov 2003 19:49:34 -0000 1.2 *************** *** 1,24 **** /** ! * Copyright (C) 2002, Federal Linux Systems ! * ! * The project home for this software is http://www.opencoe.org ! * ! * This segment is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * ! * This segment is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! **/ ! package org.opencoe.coe.kernel.apps; import org.opencoe.coe.kernel.util.*; --- 1,17 ---- /** ! * Copyright (C) 2002, Federal Linux Systems The project home for this software ! * is http://www.opencoe.org This segment is free software; you can ! * redistribute it and/or modify it under the terms of the GNU Lesser General ! * Public License as published by the Free Software Foundation; either version ! * 2.1 of the License, or (at your option) any later version. This segment is ! * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ! * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more ! * details. You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! package org.opencoe.coe.kernel.apps; import org.opencoe.coe.kernel.util.*; *************** *** 27,108 **** import java.util.Vector; public class _ApplicationManagerModel implements TreeModel { ! private boolean showAncestors; ! private Vector treeModelListeners = new Vector(); ! private _OpenCOEProfile rootProfile; - public _ApplicationManagerModel(_OpenCOEProfile root) { - showAncestors = false; - rootProfile = root; - } //////////////// TreeModel interface implementation /////////////////////// ! /** ! * Adds a listener for the TreeModelEvent posted after the tree changes. ! */ ! public void addTreeModelListener(TreeModelListener l) { ! treeModelListeners.addElement(l); ! } - /** - * Returns the child of parent at index index in the parent's child array. - */ - public Object getChild(Object parent, int index) { - _OpenCOEProfile p = (_OpenCOEProfile)parent; - return p.getCombined(index); - } ! /** ! * Returns the number of children of parent. ! */ ! public int getChildCount(Object parent) { ! _OpenCOEProfile p = (_OpenCOEProfile)parent; ! return p.getCombinedCount(); ! } - /** - * Returns the index of child in parent. - */ - public int getIndexOfChild(Object parent, Object child) { - _OpenCOEProfile p = (_OpenCOEProfile)parent; - return p.getIndexOfCombined(child); - } ! /** ! * Returns the root of the tree. ! */ ! public Object getRoot() { ! return rootProfile; ! } ! /** ! * Returns true if node is a leaf. ! */ ! public boolean isLeaf(Object node) { ! String nodename = node.getClass().getName(); ! //System.out.println("isLeaf nodename: "+nodename); ! if (nodename.equals("org.opencoe.coe.kernel.util._OpenCOEProfile")){ ! return false; ! } else { ! return true; } - } ! /** ! * Removes a listener previously added with addTreeModelListener(). ! */ ! public void removeTreeModelListener(TreeModelListener l) { ! treeModelListeners.removeElement(l); ! } ! /** ! * Messaged when the user has altered the value for the item ! * identified by path to newValue. Not used by this model. ! */ ! public void valueForPathChanged(TreePath path, Object newValue) { ! System.out.println("*** valueForPathChanged : " ! + path + " --> " + newValue); ! } } --- 20,146 ---- import java.util.Vector; + /** + * Description of the Class + * + *@author rbroberg + *@created November 14, 2003 + *@history 20031113:rb - reformatted + */ public class _ApplicationManagerModel implements TreeModel { ! private boolean showAncestors; ! private Vector treeModelListeners = new Vector(); ! private _OpenCOEProfile rootProfile; ! ! ! /** ! * Constructor for the _ApplicationManagerModel object ! * ! *@param root Description of the Parameter ! */ ! public _ApplicationManagerModel(_OpenCOEProfile root) { ! showAncestors = false; ! rootProfile = root; ! } //////////////// TreeModel interface implementation /////////////////////// ! /** ! * Adds a listener for the TreeModelEvent posted after the tree changes. ! * ! *@param l The feature to be added to the TreeModelListener attribute ! */ ! public void addTreeModelListener(TreeModelListener l) { ! treeModelListeners.addElement(l); ! } ! /** ! * Returns the child of parent at index index in the parent's child array. ! * ! *@param parent Description of the Parameter ! *@param index Description of the Parameter ! *@return The child value ! */ ! public Object getChild(Object parent, int index) { ! _OpenCOEProfile p = (_OpenCOEProfile) parent; ! return p.getCombined(index); ! } ! /** ! * Returns the number of children of parent. ! * ! *@param parent Description of the Parameter ! *@return The childCount value ! */ ! public int getChildCount(Object parent) { ! _OpenCOEProfile p = (_OpenCOEProfile) parent; ! return p.getCombinedCount(); ! } ! ! /** ! * Returns the index of child in parent. ! * ! *@param parent Description of the Parameter ! *@param child Description of the Parameter ! *@return The indexOfChild value ! */ ! public int getIndexOfChild(Object parent, Object child) { ! _OpenCOEProfile p = (_OpenCOEProfile) parent; ! return p.getIndexOfCombined(child); } ! /** ! * Returns the root of the tree. ! * ! *@return The root value ! */ ! public Object getRoot() { ! return rootProfile; ! } ! ! /** ! * Returns true if node is a leaf. ! * ! *@param node Description of the Parameter ! *@return The leaf value ! */ ! public boolean isLeaf(Object node) { ! String nodename = node.getClass().getName(); ! //System.out.println("isLeaf nodename: "+nodename); ! if (nodename.equals("org.opencoe.coe.kernel.util._OpenCOEProfile")) { ! return false; ! } else { ! return true; ! } ! ! } ! ! ! /** ! * Removes a listener previously added with addTreeModelListener(). ! * ! *@param l Description of the Parameter ! */ ! public void removeTreeModelListener(TreeModelListener l) { ! treeModelListeners.removeElement(l); ! } ! ! ! /** ! * Messaged when the user has altered the value for the item identified by ! * path to newValue. Not used by this model. ! * ! *@param path Description of the Parameter ! *@param newValue Description of the Parameter ! */ ! public void valueForPathChanged(TreePath path, Object newValue) { ! System.out.println("*** valueForPathChanged : " ! + path + " --> " + newValue); ! } } + Index: _ApplicationManagerTree.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/_ApplicationManagerTree.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** _ApplicationManagerTree.java 19 Apr 2002 15:18:00 -0000 1.1.1.1 --- _ApplicationManagerTree.java 15 Nov 2003 19:49:34 -0000 1.2 *************** *** 1,24 **** /** ! * Copyright (C) 2002, Federal Linux Systems ! * ! * The project home for this software is http://www.opencoe.org ! * ! * This segment is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * ! * This segment is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! **/ ! package org.opencoe.coe.kernel.apps; import org.opencoe.coe.kernel.util.*; --- 1,17 ---- /** ! * Copyright (C) 2002, Federal Linux Systems The project home for this software ! * is http://www.opencoe.org This segment is free software; you can ! * redistribute it and/or modify it under the terms of the GNU Lesser General ! * Public License as published by the Free Software Foundation; either version ! * 2.1 of the License, or (at your option) any later version. This segment is ! * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ! * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more ! * details. You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! package org.opencoe.coe.kernel.apps; import org.opencoe.coe.kernel.util.*; *************** *** 27,71 **** import javax.swing.event.*; public class _ApplicationManagerTree extends JTree { ! _ApplicationManagerModel model; - public _ApplicationManagerTree(_OpenCOEProfile graphNode) { - super(new _ApplicationManagerModel(graphNode)); - getSelectionModel().setSelectionMode( - TreeSelectionModel.SINGLE_TREE_SELECTION); - DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer(); - Icon appIcon = new ImageIcon("/h/COE/data/Icons/gnome-run.png"); - Icon profIcon = new ImageIcon("/h/COE/data/Icons/gnome-folder.png"); - renderer.setLeafIcon(appIcon); - renderer.setClosedIcon(profIcon); - renderer.setOpenIcon(profIcon); - setCellRenderer(renderer); ! //Listen for when the selection changes. ! addTreeSelectionListener(new TreeSelectionListener() { ! public void valueChanged(TreeSelectionEvent e) { ! //DefaultMutableTreeNode node = (DefaultMutableTreeNode) ! //getLastSelectedPathComponent(); ! Object node = (Object) ! getLastSelectedPathComponent(); ! ! if (node == null) return; ! // Object nodeInfo = node.getUserObject(); ! //if (_ApplicationManagerModel.isLeaf(node)) { ! String nodename = node.getClass().getName(); ! //System.out.println("2 - nodename = "+nodename); ! if (nodename.equals("org.opencoe.coe.kernel.util._OpenCOEApp")){ ! _OpenCOEApp n = (_OpenCOEApp)node; ! String c = n.getExecPath(); ! System.out.println("Application node: "+c); ! _OpenCOECmdExec launch_app = new _OpenCOECmdExec(c, true); ! } else { ! System.out.println("Profile node:"); ! } } ! }); ! } } --- 20,110 ---- import javax.swing.event.*; + /** + * Description of the Class + * + *@author rbroberg + *@created November 14, 2003 + *@history 20031113:rb - reformatted + */ public class _ApplicationManagerTree extends JTree { ! _ApplicationManagerModel model; ! /** ! * Constructor for the _ApplicationManagerTree object ! * ! *@param graphNode Description of the Parameter ! */ ! public _ApplicationManagerTree(_OpenCOEProfile graphNode) { ! super(new _ApplicationManagerModel(graphNode)); ! getSelectionModel().setSelectionMode( ! TreeSelectionModel.SINGLE_TREE_SELECTION); ! DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer(); ! Icon appIcon = new ImageIcon("/h/COE/data/Icons/gnome-run.png"); ! Icon profIcon = new ImageIcon("/h/COE/data/Icons/gnome-folder.png"); ! renderer.setLeafIcon(appIcon); ! renderer.setClosedIcon(profIcon); ! renderer.setOpenIcon(profIcon); ! setCellRenderer(renderer); ! //Listen for when the selection changes. ! addTreeSelectionListener( ! new TreeSelectionListener() { ! ! public void valueChanged(TreeSelectionEvent e) { ! //DefaultMutableTreeNode node = (DefaultMutableTreeNode) ! //getLastSelectedPathComponent(); ! Object node = (Object) ! getLastSelectedPathComponent(); ! ! if (node == null) { ! return; ! } ! ! // Object nodeInfo = node.getUserObject(); ! //if (_ApplicationManagerModel.isLeaf(node)) { ! String nodename = node.getClass().getName(); ! //System.out.println("2 - nodename = "+nodename); ! if (nodename.equals("org.opencoe.coe.kernel.util._OpenCOEApp")) { ! _OpenCOEApp n = (_OpenCOEApp) node; ! String c; ! if (n.getInitClass() != null) { ! c = n.getInitClass(); ! System.out.println("Node::initclass::"+c); ! //ClassLoader cl = new ClassLoader(); ! initLoadClass(c); ! ! } else { ! if (n.getArgs() != null) { ! c = n.getExecPath() + " " + n.getArgs(); ! } else { ! c = n.getExecPath(); ! } ! System.out.println("Application node: " + c); ! _OpenCOECmdExec launch_app = new _OpenCOECmdExec(c, true); ! } ! } else { ! System.out.println("Profile node:"); ! } ! } ! }); ! } ! private static Class initLoadClass (String c) { ! Class cc = null; ! ClassLoader cl = ClassLoader.getSystemClassLoader(); ! try { ! Object co = cl.loadClass(c).newInstance(); ! //cc = (Class)co; ! //co.getClass().show(); ! } catch (ClassNotFoundException cnfe) { ! System.err.println("_ApplicationManagerTree::initLoadClass::ClassNotFound::"+c); ! } catch (java.lang.InstantiationException ie) { ! System.err.println("_ApplicationManagerTree::initLoadClass::InstantiationException::"+c); ! } catch (java.lang.IllegalAccessException ie) { ! System.err.println("_ApplicationManagerTree::initLoadClass::IllegalAccessException::"+c); } ! return cc; ! } } |
From: <rbr...@us...> - 2003-11-15 19:49:38
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/util In directory sc8-pr-cvs1:/tmp/cvs-serv25433/java/org/opencoe/coe/kernel/util Modified Files: _OpenCOEApp.java Log Message: [ 841518 ] COESegInstall incorrectly parses args in Icons [ 841521 ] ApplicationManager mishandles arguments for commands Index: _OpenCOEApp.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/util/_OpenCOEApp.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** _OpenCOEApp.java 19 Apr 2002 15:18:00 -0000 1.1.1.1 --- _OpenCOEApp.java 15 Nov 2003 19:49:35 -0000 1.2 *************** *** 1,91 **** /** ! * Copyright (C) 2002, Federal Linux Systems ! * ! * The project home for this software is http://www.opencoe.org ! * ! * This segment is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * ! * This segment is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! **/ ! package org.opencoe.coe.kernel.util; import javax.swing.Icon; import javax.swing.ImageIcon; public class _OpenCOEApp { ! private String label; ! private String name; ! private String acctgrp; ! private String iconpath = new String("/h/COE/data/Icons/gnome-run.png"); ! private String execpath; ! private String args; ! private ImageIcon icon = new ImageIcon("/h/COE/data/Icons/gnome-run.png"); /// constructor methods /////////////////////////////////// ! public _OpenCOEApp(String name) { ! this.name = name; ! this.label = name; ! } ! public _OpenCOEApp(String label, String name, String acctgrp, String iconpath) { ! this.label = label; ! this.name = name; ! this.acctgrp = acctgrp; ! this.iconpath = iconpath; ! this.icon = new ImageIcon(iconpath); ! } - public _OpenCOEApp(String label, String name, String acctgrp, - String iconpath , String execpath) { - this.label = label; - this.name = name; - this.acctgrp = acctgrp; - this.iconpath = iconpath; - this.icon = new ImageIcon(iconpath); - this.execpath = execpath; - } ! public _OpenCOEApp(String label, String name, String acctgrp, ! String iconpath , String execpath, String args) { ! this.label = label; ! this.name = name; ! this.acctgrp = acctgrp; ! this.iconpath = iconpath; ! this.icon = new ImageIcon(iconpath); ! this.execpath = execpath; ! this.args = args; ! } /// setter methods /////////////////////////////////// ! public void setLabel(String label) { this.label = label; } ! public void setAcctGrp(String acctGrp) { this.acctgrp = acctgrp; } ! public void setExecPath(String execpath) { this.execpath = execpath; } ! public void setArgs(String args) { this.args = args; } ! public void setIconPath(String iconpath) { this.iconpath = iconpath; ! this.icon = new ImageIcon(iconpath); } /// getter methods /////////////////////////////////// ! public String toString() { return name; } ! public String getName() { return name; } ! public String getLabel() { return label; } ! public String getIconPath() { return iconpath; } ! public ImageIcon getIcon() { return icon; } ! public String getExecPath() { return execpath; } ! public String getArgs() { return args; } } --- 1,254 ---- /** ! * Copyright (C) 2002, Federal Linux Systems The project home for this software ! * is http://www.opencoe.org This segment is free software; you can ! * redistribute it and/or modify it under the terms of the GNU Lesser General ! * Public License as published by the Free Software Foundation; either version ! * 2.1 of the License, or (at your option) any later version. This segment is ! * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ! * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more ! * details. You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! package org.opencoe.coe.kernel.util; import javax.swing.Icon; import javax.swing.ImageIcon; + /** + * Description of the Class + * + *@author rbroberg + *@created November 14, 2003 + */ public class _OpenCOEApp { ! private String label; ! private String name; ! private String acctgrp; ! private String iconpath = new String("/h/COE/data/Icons/gnome-run.png"); ! private String execpath; ! private String args; ! private ImageIcon icon = new ImageIcon("/h/COE/data/Icons/gnome-run.png"); ! private String initclass; ! /// constructor methods /////////////////////////////////// ! /** ! * Constructor for the _OpenCOEApp object ! ! *@param name Description of the Parameter ! */ ! public _OpenCOEApp(String name) { ! this.name = name; ! this.label = name; ! } ! ! /** ! * Constructor for the _OpenCOEApp object ! * ! *@param label Description of the Parameter ! *@param name Description of the Parameter ! *@param acctgrp Description of the Parameter ! *@param iconpath Description of the Parameter ! */ ! public _OpenCOEApp(String label, String name, String acctgrp, String iconpath) { ! this.label = label; ! this.name = name; ! this.acctgrp = acctgrp; ! this.iconpath = iconpath; ! this.icon = new ImageIcon(iconpath); ! } ! /** ! * Constructor for the _OpenCOEApp object ! * ! *@param label Description of the Parameter ! *@param name Description of the Parameter ! *@param acctgrp Description of the Parameter ! *@param iconpath Description of the Parameter ! *@param execpath Description of the Parameter ! */ ! public _OpenCOEApp(String label, String name, String acctgrp, ! String iconpath, String execpath) { ! this.label = label; ! this.name = name; ! this.acctgrp = acctgrp; ! this.iconpath = iconpath; ! this.icon = new ImageIcon(iconpath); ! this.execpath = execpath; ! } ! ! ! /** ! * Constructor for the _OpenCOEApp object ! * ! *@param label Description of the Parameter ! *@param name Description of the Parameter ! *@param acctgrp Description of the Parameter ! *@param iconpath Description of the Parameter ! *@param execpath Description of the Parameter ! *@param args Description of the Parameter ! */ ! public _OpenCOEApp(String label, String name, String acctgrp, ! String iconpath, String execpath, String args) { ! this.label = label; ! this.name = name; ! this.acctgrp = acctgrp; ! this.iconpath = iconpath; ! this.icon = new ImageIcon(iconpath); ! this.execpath = execpath; ! this.args = args; ! } ! /// setter methods /////////////////////////////////// ! /** ! * Sets the label attribute of the _OpenCOEApp object ! * ! *@param label The new label value ! */ ! public void setLabel(String label) { ! this.label = label; ! } ! ! ! /** ! * Sets the acctGrp attribute of the _OpenCOEApp object ! * ! *@param acctGrp The new acctGrp value ! */ ! public void setAcctGrp(String acctGrp) { ! this.acctgrp = acctgrp; ! } ! ! ! /** ! * Sets the execPath attribute of the _OpenCOEApp object ! * ! *@param execpath The new execPath value ! */ ! public void setExecPath(String execpath) { ! this.execpath = execpath; ! } ! ! ! /** ! * Sets the args attribute of the _OpenCOEApp object ! * ! *@param args The new args value ! */ ! public void setArgs(String args) { ! this.args = args; ! } ! ! ! /** ! * Sets the iconPath attribute of the _OpenCOEApp object ! * ! *@param iconpath The new iconPath value ! */ ! public void setIconPath(String iconpath) { ! this.iconpath = iconpath; ! this.icon = new ImageIcon(iconpath); ! } ! ! ! /** ! * Sets the initClass attribute of the _OpenCOEApp object ! * ! *@param initclass The new initPath value ! */ ! public void setInitClass(String initclass) { ! System.out.println("_OpenCOEApp::setInitClass::"+initclass); ! this.initclass = initclass; ! } ! /// getter methods /////////////////////////////////// ! /** ! * Description of the Method ! * ! *@return Description of the Return Value ! */ ! public String toString() { ! return name; ! } ! ! ! /** ! * Gets the name attribute of the _OpenCOEApp object ! * ! *@return The name value ! */ ! public String getName() { ! return name; ! } ! ! ! /** ! * Gets the label attribute of the _OpenCOEApp object ! * ! *@return The label value ! */ ! public String getLabel() { ! return label; ! } ! ! ! /** ! * Gets the iconPath attribute of the _OpenCOEApp object ! * ! *@return The iconPath value ! */ ! public String getIconPath() { ! return iconpath; ! } ! ! ! /** ! * Gets the icon attribute of the _OpenCOEApp object ! * ! *@return The icon value ! */ ! public ImageIcon getIcon() { ! return icon; ! } ! ! ! /** ! * Gets the execPath attribute of the _OpenCOEApp object ! * ! *@return The execPath value ! */ ! public String getExecPath() { ! return execpath; ! } ! ! ! /** ! * Gets the args attribute of the _OpenCOEApp object ! * ! *@return The args value ! */ ! public String getArgs() { ! return args; ! } ! ! /** ! * Gets the initclass attribute of the _OpenCOEApp object ! * ! *@return The initClass value ! */ ! public String getInitClass() { ! return initclass; ! } } + |
From: <rbr...@us...> - 2003-11-15 19:49:38
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/build In directory sc8-pr-cvs1:/tmp/cvs-serv25433/build Modified Files: build.xml Log Message: [ 841518 ] COESegInstall incorrectly parses args in Icons [ 841521 ] ApplicationManager mishandles arguments for commands Index: build.xml =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/build/build.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** build.xml 8 Oct 2003 05:05:43 -0000 1.8 --- build.xml 15 Nov 2003 19:49:34 -0000 1.9 *************** *** 2,6 **** <!-- Segment Version --> ! <property name="VERSION" value="1.1.4.0"/> <!-- Segment Architecture --> --- 2,6 ---- <!-- Segment Version --> ! <property name="VERSION" value="1.1.4.1"/> <!-- Segment Architecture --> |
From: <rbr...@us...> - 2003-11-15 19:49:37
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/bin In directory sc8-pr-cvs1:/tmp/cvs-serv25433/bin Modified Files: COESegInstall Log Message: [ 841518 ] COESegInstall incorrectly parses args in Icons [ 841521 ] ApplicationManager mishandles arguments for commands Index: COESegInstall =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/bin/COESegInstall,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** COESegInstall 8 Oct 2003 05:05:43 -0000 1.13 --- COESegInstall 15 Nov 2003 19:49:34 -0000 1.14 *************** *** 604,608 **** # args $_=$t[2]; ! s/$exec//; $args=$_; --- 604,608 ---- # args $_=$t[2]; ! s/$exec //; $args=$_; |
From: <rbr...@us...> - 2003-11-02 16:34:20
|
Update of /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/docs In directory sc8-pr-cvs1:/tmp/cvs-serv1826/docs Log Message: Directory /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/docs added to the repository |
From: <rbr...@us...> - 2003-11-02 16:32:13
|
Update of /cvsroot/opencoe/coekernel/src/UAM/src/UAM/docs In directory sc8-pr-cvs1:/tmp/cvs-serv1529/docs Log Message: Directory /cvsroot/opencoe/coekernel/src/UAM/src/UAM/docs added to the repository |
From: <rbr...@us...> - 2003-11-02 16:12:35
|
Update of /cvsroot/opencoe/coekernel/src/UserMgmt/src/OpenCOE/build In directory sc8-pr-cvs1:/tmp/cvs-serv30469/UserMgmt/src/OpenCOE/build Modified Files: build.xml Log Message: modify versions for pre release of 1.1.4.2 Index: build.xml =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/UserMgmt/src/OpenCOE/build/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 8 Oct 2003 05:28:00 -0000 1.1 --- build.xml 2 Nov 2003 16:12:32 -0000 1.2 *************** *** 12,16 **** <!-- Segment Version --> ! <property name="version" value="1.1.4.1"/> <!-- Segment Full Name --> --- 12,16 ---- <!-- Segment Version --> ! <property name="version" value="1.1.4.2"/> <!-- Segment Full Name --> |
From: <rbr...@us...> - 2003-11-02 16:12:35
|
Update of /cvsroot/opencoe/coekernel/src/UAM/src/OpenCOE/build In directory sc8-pr-cvs1:/tmp/cvs-serv30469/UAM/src/OpenCOE/build Modified Files: build.xml Log Message: modify versions for pre release of 1.1.4.2 Index: build.xml =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/UAM/src/OpenCOE/build/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 8 Oct 2003 05:28:00 -0000 1.1 --- build.xml 2 Nov 2003 16:12:32 -0000 1.2 *************** *** 12,16 **** <!-- Segment Version --> ! <property name="version" value="1.1.4.1"/> <!-- Segment Full Name --> --- 12,16 ---- <!-- Segment Version --> ! <property name="version" value="1.1.4.2"/> <!-- Segment Full Name --> |
From: <rbr...@us...> - 2003-11-02 16:12:35
|
Update of /cvsroot/opencoe/coekernel/src/OS/src/OpenCOE/build In directory sc8-pr-cvs1:/tmp/cvs-serv30469/OS/src/OpenCOE/build Modified Files: build.xml Log Message: modify versions for pre release of 1.1.4.2 Index: build.xml =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OpenCOE/build/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 8 Oct 2003 05:27:59 -0000 1.1 --- build.xml 2 Nov 2003 16:12:32 -0000 1.2 *************** *** 12,16 **** <!-- Segment Version --> ! <property name="version" value="1.1.4.1"/> <!-- Segment Full Name --> --- 12,16 ---- <!-- Segment Version --> ! <property name="version" value="1.1.4.2"/> <!-- Segment Full Name --> |
From: <rbr...@us...> - 2003-11-02 16:12:35
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/OpenCOE/build In directory sc8-pr-cvs1:/tmp/cvs-serv30469/COE/src/OpenCOE/build Modified Files: build.xml Log Message: modify versions for pre release of 1.1.4.2 Index: build.xml =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/OpenCOE/build/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 8 Oct 2003 05:27:59 -0000 1.1 --- build.xml 2 Nov 2003 16:12:31 -0000 1.2 *************** *** 12,16 **** <!-- Segment Version --> ! <property name="version" value="1.1.4.1"/> <!-- Segment Full Name --> --- 12,16 ---- <!-- Segment Version --> ! <property name="version" value="1.1.4.2"/> <!-- Segment Full Name --> |
From: <rbr...@us...> - 2003-11-02 16:12:34
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/OpenCOE/SEGROOT/SegDescrip In directory sc8-pr-cvs1:/tmp/cvs-serv30469/COE/src/OpenCOE/SEGROOT/SegDescrip Modified Files: PostInstall Log Message: modify versions for pre release of 1.1.4.2 Index: PostInstall =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/OpenCOE/SEGROOT/SegDescrip/PostInstall,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PostInstall 8 Oct 2003 05:27:59 -0000 1.1 --- PostInstall 2 Nov 2003 16:12:31 -0000 1.2 *************** *** 12,15 **** --- 12,16 ---- # # History: 20030928 Initial Release + # History: 20031026 Fix /h/data/local/SysAdm/NET_SERVER # # --+----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| *************** *** 32,36 **** #- setup directory for COEInstaller ! mkdir -p ${COE_DATA}/local/SysAdm/NET_SERVER/toc chown -R COE:SA ${COE_DATA}/local/SysAdm chmod -R 775 ${COE_DATA}/local/SysAdm --- 33,38 ---- #- setup directory for COEInstaller ! mkdir -p ${COE_DATA}/local/SysAdm/NET_SERVER ! chown -R COE:SA ${COE_DATA}/local/SysAdm chmod -R 775 ${COE_DATA}/local/SysAdm |
From: <rbr...@us...> - 2003-11-02 16:05:38
|
Update of /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin In directory sc8-pr-cvs1:/tmp/cvs-serv28773 Modified Files: OS_get_disk_data Log Message: 20031102:rb:832571 - LINUX OS_get_disk_data fails on long mounts Index: OS_get_disk_data =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_get_disk_data,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OS_get_disk_data 2 Nov 2003 16:01:25 -0000 1.3 --- OS_get_disk_data 2 Nov 2003 16:05:35 -0000 1.4 *************** *** 11,15 **** my $dir; ! @data=coeExec("/bin/df -k"); shift (@data); --- 11,15 ---- my $dir; ! @data=coeExec("/bin/df -Pk"); shift (@data); |
From: <rbr...@us...> - 2003-11-02 16:01:33
|
Update of /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin In directory sc8-pr-cvs1:/tmp/cvs-serv27736 Modified Files: OS_add_group OS_add_user OS_delete_group OS_delete_user OS_get_disk_data OS_get_group_data OS_get_next_gid OS_get_next_uid OS_get_uid OS_get_user_data OS_get_user_group_data OS_mod_user Log Message: 20031102:rb:834603 - OS perl scripts using /usr/bin/perl Index: OS_add_group =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_add_group,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** OS_add_group 18 Aug 2003 02:11:34 -0000 1.7 --- OS_add_group 2 Nov 2003 16:01:25 -0000 1.8 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib -w use strict; --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w use strict; Index: OS_add_user =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_add_user,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** OS_add_user 18 Aug 2003 02:11:34 -0000 1.9 --- OS_add_user 2 Nov 2003 16:01:25 -0000 1.10 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib -w -U #- the -U flag is used to overcome insecure warning on mkdir --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w -U #- the -U flag is used to overcome insecure warning on mkdir Index: OS_delete_group =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_delete_group,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** OS_delete_group 18 Aug 2003 02:11:34 -0000 1.7 --- OS_delete_group 2 Nov 2003 16:01:25 -0000 1.8 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib -w use strict; --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w use strict; Index: OS_delete_user =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_delete_user,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** OS_delete_user 18 Aug 2003 02:11:34 -0000 1.7 --- OS_delete_user 2 Nov 2003 16:01:25 -0000 1.8 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib -w use strict; --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w use strict; Index: OS_get_disk_data =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_get_disk_data,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OS_get_disk_data 15 Jun 2002 00:54:10 -0000 1.2 --- OS_get_disk_data 2 Nov 2003 16:01:25 -0000 1.3 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I /h/COE/lib -w use Coe; --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I /h/COE/lib -w use Coe; Index: OS_get_group_data =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_get_group_data,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OS_get_group_data 18 Aug 2003 02:11:34 -0000 1.6 --- OS_get_group_data 2 Nov 2003 16:01:25 -0000 1.7 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib -U #- The -U flag is to force /usr/bin/groups --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -U #- The -U flag is to force /usr/bin/groups Index: OS_get_next_gid =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_get_next_gid,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OS_get_next_gid 18 Aug 2003 02:11:34 -0000 1.6 --- OS_get_next_gid 2 Nov 2003 16:01:25 -0000 1.7 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib #- the -w flag gives a "Use of unitialized value in substr" error in Coe.lib --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib #- the -w flag gives a "Use of unitialized value in substr" error in Coe.lib Index: OS_get_next_uid =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_get_next_uid,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** OS_get_next_uid 18 Aug 2003 02:11:34 -0000 1.7 --- OS_get_next_uid 2 Nov 2003 16:01:25 -0000 1.8 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib #- the use of the -w flag generates "Use of uninitialized value in substr" in Coe.pm --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib #- the use of the -w flag generates "Use of uninitialized value in substr" in Coe.pm Index: OS_get_uid =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_get_uid,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OS_get_uid 15 Jun 2002 00:54:10 -0000 1.2 --- OS_get_uid 2 Nov 2003 16:01:26 -0000 1.3 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib -w #- the use of -w generates "Use of uninitialized value in substr" in Coe.pm --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w #- the use of -w generates "Use of uninitialized value in substr" in Coe.pm Index: OS_get_user_data =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_get_user_data,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** OS_get_user_data 18 Aug 2003 02:11:34 -0000 1.8 --- OS_get_user_data 2 Nov 2003 16:01:26 -0000 1.9 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib -w use strict; --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w use strict; Index: OS_get_user_group_data =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_get_user_group_data,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OS_get_user_group_data 18 Aug 2003 02:11:34 -0000 1.6 --- OS_get_user_group_data 2 Nov 2003 16:01:26 -0000 1.7 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib -U # The -U forces the insecure dependency in /usr/bin/groups --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -U # The -U forces the insecure dependency in /usr/bin/groups Index: OS_mod_user =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/bin/OS_mod_user,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** OS_mod_user 18 Aug 2003 02:11:34 -0000 1.8 --- OS_mod_user 2 Nov 2003 16:01:26 -0000 1.9 *************** *** 1,3 **** ! #!/usr/bin/perl -T -I/h/COE/lib -w use strict; --- 1,3 ---- ! #!/h/COE/Comp/PERL5/bin/perl -T -I/h/COE/lib -w use strict; |
From: <rbr...@us...> - 2003-10-26 17:13:51
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/util In directory sc8-pr-cvs1:/tmp/cvs-serv763/java/org/opencoe/coe/kernel/util Added Files: _OpenCOESegment.java Log Message: 20031026:rb:829389 - COEInstaller Requires,Conflicts, and Release includes new classes _OpenCOESegment and _OpenCOETextDialog --- NEW FILE: _OpenCOESegment.java --- /** * Copyright (C) 2002, Federal Linux Systems The project home for this software * is http://www.opencoe.org This segment is free software; you can * redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version * 2.1 of the License, or (at your option) any later version. This segment is * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.opencoe.coe.kernel.util; import java.util.*; import java.io.File; import java.io.FileReader; import java.io.BufferedReader; /** * Description of the Class * *@author root *@created October 24, 2003 *@history 20031026:rb:829389 - COEInstaller Requires,Conflicts, and Release */ public class _OpenCOESegment { // SegDescrip files private File segDescripDir; private File deInstallFile; private File fileAttribsFile; private File installedFile; private File licenseFile; private File releaseNotesFile; private File postInstallFile; private File preInstallFile; private File segInfoFile; private File segNameFile; private File validatedFile; private File versionFile; // File Attribs Permissions private Vector fileAttribs; // Installed Properties private String installation; // ReleaseNotes Properties private String releasenotes; // SegInfo Properties private String accountgroup; private java.util.Vector apppaths; private String earliest; private java.util.Vector exceptions; private java.util.Vector conflicts; private java.util.Vector requires; private String cpu; private String disk; private String memory; private String opsys; private String partition; private String tempspace; private String classification; private java.util.Vector iconfiles; private java.util.Vector menufiles; private java.util.Vector permissionfiles; private String service; private java.util.Vector groups; private java.util.Vector passwords; private java.util.Vector services; // SegName Properties private String name; private String type; private String prefix; private String segment; // Validated Properties private String validation; // Version Properties private String version; // Segment attributes private boolean installed; private boolean validated; // File Reader handles File inputFile; FileReader in; BufferedReader buff; boolean eof; String[] prop; /// constructor methods /////////////////////////////////// /** * Constructor for the _OpenCOESegment object */ public _OpenCOESegment() { init(); } /** * Constructor for the _OpenCOESegment object * *@param dir Description of the Parameter */ public _OpenCOESegment(File dir) { init(); readSegDescrip(dir); } /** * Description of the Method */ private void init() { // Installed Properties installation = new String(); // ReleaseNotes Properties releasenotes = new String(); // SegInfo Properties //- accountgroup accountgroup = new String(); //- apppaths //apppaths = new Vector(); //- coeservices groups = new Vector(); passwords = new Vector(); services = new Vector(); //- community //- comm.deinstall //- compat //earliest = new String(); //exceptions = new Vector(); //list = new Vector(); //- conflicts conflicts = new Vector(); //- data //data = new Vector(); //- database //database = new Vector(); //- dceclientdef //- decserverdef //- fileslist //- hardware cpu = new String(); disk = new String(); memory = new String(); opsys = new String(); partition = new String(); tempspace = new String(); //- help //- icons iconfiles = new Vector(); //- menus menufiles = new Vector(); //- network //- permissions permissionfiles = new Vector(); //- processes //- process group //- priviledged process //- registry //- reqrdscripts //- requires requires = new Vector(); //- security classification = new String(); //- shared file // SegName Properties name = new String(); type = new String(); prefix = new String(); segment = new String(); // Validated Properties validation = new String(); // Version Properties version = new String(); // Segment attributes installed = false; validated = false; } /** * Description of the Method * *@param dir Description of the Parameter */ public void readSegDescrip(File dir) { this.segDescripDir = dir; //System.out.println("_OpenCOESegment::readSegDescrip::" + segDescripDir.getAbsolutePath()); deInstallFile = new File(segDescripDir.getAbsolutePath() + "/DEINSTALL"); if (deInstallFile.canRead()) { readDeInstallFile(); } else { deInstallFile = null; } fileAttribsFile = new File(segDescripDir.getAbsolutePath() + "/FileAttribs"); if (fileAttribsFile.canRead()) { readFileAttribsFile(); } else { fileAttribsFile = null; } installedFile = new File(segDescripDir.getAbsolutePath() + "/Installed"); if (installedFile.canRead()) { readInstalledFile(); } else { installedFile = null; } licenseFile = new File(segDescripDir.getAbsolutePath() + "/License"); if (licenseFile.canRead()) { readLicenseFile(); } else { licenseFile = null; } releaseNotesFile = new File(segDescripDir.getAbsolutePath() + "/ReleaseNotes"); readReleaseNotesFile(); preInstallFile = new File(segDescripDir.getAbsolutePath() + "/PreInstall"); if (preInstallFile.canRead()) { readPreInstallFile(); } else { preInstallFile = null; } postInstallFile = new File(segDescripDir.getAbsolutePath() + "/PostInstall"); if (postInstallFile.canRead()) { readPostInstallFile(); } else { postInstallFile = null; } segInfoFile = new File(segDescripDir.getAbsolutePath() + "/SegInfo"); if (segInfoFile.canRead()) { readSegInfoFile(); } else { segInfoFile = null; } segNameFile = new File(segDescripDir.getAbsolutePath() + "/SegName"); readSegNameFile(); validatedFile = new File(segDescripDir.getAbsolutePath() + "/Validated"); if (validatedFile.canRead()) { readValidatedFile(); } else { validatedFile = null; } versionFile = new File(segDescripDir.getAbsolutePath() + "/VERSION"); if (versionFile.canRead()) { readVersionFile(); } else { versionFile = null; } } /** * Description of the Method */ private void readDeInstallFile() { } /** * Description of the Method */ private void readFileAttribsFile() { } /** * Description of the Method */ private void readInstalledFile() { } /** * Description of the Method */ private void readLicenseFile() { } /** * Description of the Method */ private void readPreInstallFile() { } /** * Description of the Method */ private void readPostInstallFile() { } /** * Description of the Method */ private void readReleaseNotesFile() { try { buff = new BufferedReader(new FileReader(releaseNotesFile)); eof = false; while (!eof) { String line = buff.readLine(); if (line == null) { eof = true; } else { releasenotes = releasenotes + "\n" + line; } } } catch (java.io.FileNotFoundException fnfe) { releaseNotesFile = null; } catch (java.io.IOException ioe) { releaseNotesFile = null; } } /** * Description of the Method */ private void readSegInfoFile() { String section = new String(); String subsection = new String(); try { buff = new BufferedReader(new FileReader(segInfoFile)); eof = false; while (!eof) { String line = buff.readLine(); if (line == null) { eof = true; } else { line = line.trim(); } //System.out.println("SegInfo::" + section + "::" + line); if (line == null) { //line = line.trim(); } else if (line.matches("\\[AcctGroup\\]")) { section = "AcctGroup"; subsection = ""; } else if (line.matches("\\[AppPaths\\]")) { section = "AppPaths"; subsection = ""; } else if (line.matches("\\[COEServices\\]")) { section = "COEServices"; subsection = ""; } else if (line.matches("\\[Community\\]")) { section = "Community"; subsection = ""; } else if (line.matches("\\[Comm.deinstall\\]")) { section = "Community"; subsection = ""; } else if (line.matches("\\[Compat\\]")) { section = "Community"; subsection = ""; } else if (line.matches("\\[Conflicts\\]")) { section = "Conflicts"; subsection = ""; } else if (line.matches("\\[Data\\]")) { section = "Data"; subsection = ""; } else if (line.matches("\\[Database\\]")) { section = "Database"; subsection = ""; } else if (line.matches("\\[DCEClientDef\\]")) { section = "DCEClientDef"; subsection = ""; } else if (line.matches("\\[DCEServerDef\\]")) { section = "DCEServerDef"; subsection = ""; } else if (line.matches("\\[Direct\\]")) { section = "Direct"; subsection = ""; } else if (line.matches("\\[FilesList\\]")) { section = "FilesList"; subsection = ""; } else if (line.matches("\\[Hardware\\]")) { section = "Hardware"; subsection = ""; } else if (line.matches("\\[Help\\]")) { section = "Help"; subsection = ""; } else if (line.matches("\\[Icons\\]")) { section = "Icons"; subsection = ""; } else if (line.matches("\\[Menus\\]")) { section = "Menus"; subsection = ""; } else if (line.matches("\\[Network\\]")) { section = "Network"; subsection = ""; } else if (line.matches("\\[Permissions\\]")) { section = "Permissions"; subsection = ""; } else if (line.matches("\\[Processes\\]")) { section = "Processes"; subsection = ""; } else if (line.matches("\\[Process Group\\]")) { section = "Process Group"; subsection = ""; } else if (line.matches("\\[Registry\\]")) { section = "Registry"; subsection = ""; } else if (line.matches("\\[ReqrdScripts\\]")) { section = "ReqrdScripts"; subsection = ""; } else if (line.matches("\\[Requires\\]")) { section = "Requires"; subsection = ""; } else if (line.matches("\\[Security\\]")) { section = "Security"; subsection = ""; } else if (line.matches("\\[SharedFile\\]")) { section = "SharedFile"; subsection = ""; } else if (section.equals("AcctGroup")) { accountgroup = line; } else if (section.equals("AppPaths") && line.matches("^$.+=.+$")) { // list of Windows executables to add to PATH } else if (section.equals("COEServices")) { if (line.matches("^$GROUPS")) { subsection = "GROUPS"; } else if (line.matches("^$PASSWORDS")) { subsection = "PASSWORDS"; } else if (line.matches("^$SERVICES")) { subsection = "SERVICES"; } else if (subsection.matches("GROUPS") && line.matches("^\\w+:")) { groups.add(line); } else if (subsection.matches("GROUPS") && line.matches("^\\w+:")) { passwords.add(line); } else if (subsection.matches("GROUPS") && line.matches("^\\w+:")) { services.add(line); } } else if (section.equals("Community")) { if (line.matches("^$APPEND")) { subsection = "APPEND"; } else if (line.matches("^$COMMENT")) { subsection = "COMMENT"; } else if (line.matches("^$DELETE")) { subsection = "DELETE"; } else if (line.matches("^$FILE")) { subsection = "FILE"; } else if (line.matches("^$INSERT")) { subsection = "INSERT"; } else if (line.matches("^$REPLACE")) { subsection = "REPLACE"; } else if (line.matches("^$SUBSTR")) { subsection = "SUBSTR"; } else if (line.matches("^$UNCOMMENT")) { subsection = "UNCOMMENT"; } } else if (section.equals("Comm.deinstall")) { if (line.matches("^$APPEND")) { subsection = "APPEND"; } else if (line.matches("^$COMMENT")) { subsection = "COMMENT"; } else if (line.matches("^$DELETE")) { subsection = "DELETE"; } else if (line.matches("^$FILE")) { subsection = "FILE"; } else if (line.matches("^$INSERT")) { subsection = "INSERT"; } else if (line.matches("^$REPLACE")) { subsection = "REPLACE"; } else if (line.matches("^$SUBSTR")) { subsection = "SUBSTR"; } else if (line.matches("^$UNCOMMENT")) { subsection = "UNCOMMENT"; } } else if (section.equals("Compat")) { if (line.matches("^$EARLIST")) { subsection = "EARLIEST"; } else if (line.matches("^$EXCEPTIONS")) { subsection = "EXCEPTIONS"; } else if (line.matches("^$LIST")) { subsection = "LIST"; } else if (subsection.equals("EARLIEST")) { } else if (subsection.equals("EXCEPTIONS")) { } else if (subsection.equals("LIST")) { } //} else if (section.equals("Conflicts") && line.matches("^[a-zA-Z]+")) { } else if (section.equals("Conflicts")) { conflicts.add(line); } else if (section.equals("Data") && line.matches("^$.+=.+$")) { //data=line; } else if (section.equals("Database") && line.matches("^$.+=.+$")) { if (line.matches("^$DATABASE_ID")) { subsection = "DATABASE_ID"; } else if (line.matches("^$REFERENCES")) { subsection = "REFERENCES"; } else if (line.matches("^$MODIFIERS")) { subsection = "MODIFIERS"; } else if (line.matches("^$ROLES")) { subsection = "ROLES"; } else if (line.matches("^$SCOPE")) { subsection = "SCOPE"; } else if (line.matches("^$ACCESSES")) { subsection = "ACCESSES"; } } else if (section.equals("DCEClientDef") && line.matches("^$.+=.+$")) { if (line.matches("^$ATTRIBUTE")) { subsection = "ATTRIBUTE"; } else if (line.matches("^$DCECLIENT")) { subsection = "DCECLIENT"; } else if (line.matches("^$DCEGROUP")) { subsection = "DCEGROUP"; } else if (line.matches("^$DFSFILES")) { subsection = "DFSFILES"; } else if (line.matches("^$INTERFACE")) { subsection = "INTERFACE"; } } else if (section.equals("DCEServerDef") && line.matches("^$.+=.+$")) { if (line.matches("^$ACLMGRDEFAULT")) { subsection = "ACLMGRDEFAULT"; } else if (line.matches("^$ACLMGRINFO")) { subsection = "ACLMGRINFO"; } else if (line.matches("^$ACLMGRTYPE")) { subsection = "ACLMGRTYPE"; } else if (line.matches("^$ACLMGRUUID")) { subsection = "ACLMGRUUID"; } else if (line.matches("^$ATTRIBUTE")) { subsection = "ATTRIBUTE"; } else if (line.matches("^$AUDITINFO")) { subsection = "AUDITINFO"; } else if (line.matches("^$DCEADMINGROUP")) { subsection = "DCEADMINGROUP"; } else if (line.matches("^$DCEBOOT")) { subsection = "DCEBOOT"; } else if (line.matches("^$DCEGROUP")) { subsection = "DCEGROUP"; } else if (line.matches("^$DCESERVICE")) { subsection = "DCESERVICE"; } else if (line.matches("^$DEBUGMESSAGES")) { subsection = "DEBUGMESSAGES"; } else if (line.matches("^$DFSFiles")) { subsection = "DFSFiles"; } else if (line.matches("^$INTEFACE")) { subsection = "INTERFACE"; } else if (line.matches("^$MGMTMAPPING")) { subsection = "MGMTMAPPING"; } else if (line.matches("^$MESSAGES")) { subsection = "MESSAGES"; } else if (line.matches("^$OBJUUID")) { subsection = "OBJUUID"; } else if (line.matches("^$PERMISSION")) { subsection = "PERMISSION"; } else if (line.matches("^$RPCSECURITY")) { subsection = "RPCSECURITY"; } else if (line.matches("^$SERVERTHREAD")) { subsection = "SERVERTHREAD"; } else if (line.matches("^$SERVICEABILITY")) { subsection = "SERVICEABILITY"; } else if (line.matches("^$UUID")) { subsection = "UUID"; } } else if (section.equals("Direct") && line.matches("^$.+=.+$")) { if (line.matches("^$ACCTADD")) { subsection = "ACCTADD"; } else if (line.matches("^$ACCTDEL")) { subsection = "ACCTDEL"; } else if (line.matches("^$CMDLINE")) { subsection = "CMDLINE"; } else if (line.matches("^$KEY")) { subsection = "KEY"; } else if (line.matches("^$NOCOMPRESS")) { subsection = "NOCOMPRESS"; } else if (line.matches("^$PROFADD")) { subsection = "PROFADD"; } else if (line.matches("^$PROFDEL")) { subsection = "PROFDEL"; } else if (line.matches("^$PROFSWITCH")) { subsection = "PROFSWITCH"; } else if (line.matches("^$READ_ONLY")) { subsection = "READ_ONLY"; } else if (line.matches("^$REBOOT")) { subsection = "REBOOT"; } else if (line.matches("^$REMOTE")) { subsection = "REMOTE"; } else if (line.matches("^$ROOT")) { subsection = "ROOT"; } else if (line.matches("^$SELF_CONTAINER")) { subsection = "SELF_CONTAINER"; } else if (line.matches("^$SUPERUSER")) { subsection = "SUPERUSER"; } else if (line.matches("^$USES_UNINSTALL")) { subsection = "USES_UNINSTALL"; } } else if (section.equals("FilesList") && line.matches("^$.+=.+$")) { if (line.matches("^$DIRS")) { subsection = "DIRS"; } else if (line.matches("^$FILES")) { subsection = "FILES"; } else if (line.matches("^$PATH")) { subsection = "PATH"; } } else if (section.equals("Hardware") && line.matches("^$.+=.+$")) { // line is of form "$KEY=value"; prop = line.split("="); // Search for new object if (prop[0].equals("$OPSYS")) { opsys = prop[1]; } else if (prop[0].equals("$CPU")) { cpu = prop[1]; } else if (prop[0].equals("$DISK")) { disk = prop[1]; } else if (prop[0].equals("$MEMORY")) { memory = prop[1]; } else if (prop[0].equals("$PARTITION")) { partition = prop[1]; } else if (prop[0].equals("$TEMPSAPCE")) { tempspace = prop[1]; } } else if (section.equals("Help") && line.matches("^$.+=.+$")) { if (line.matches("^$HTML")) { subsection = "HTML"; } else if (line.matches("^$MAN")) { subsection = "MAN"; } else if (line.matches("^$MSHELP")) { subsection = "MSHELP"; } else if (line.matches("^$TEXT")) { subsection = "TEXT"; } else if (line.matches("^$OTHER")) { subsection = "OTHER"; } } else if (section.equals("Icons") && line.matches("^\\w+")) { iconfiles.add(line); } else if (section.equals("Menus") && line.matches("^\\w+")) { menufiles.add(line); } else if (section.equals("Network") && line.matches("^$.+=.+$")) { if (line.matches("^$HOST")) { subsection = "HOST"; } else if (line.matches("^$KEY")) { subsection = "KEY"; } else if (line.matches("^$MOUNT")) { subsection = "MOUNT"; } else if (line.matches("^$NETMASK")) { subsection = "NETMASK"; } else if (line.matches("^$SERVERS")) { subsection = "SERVERS"; } } else if (section.equals("Permissions") && line.matches("^\\w+")) { permissionfiles.add(line); } else if (section.equals("Processes") && line.matches("^$.+=.+$")) { if (line.matches("^$BOOT")) { subsection = "BOOT"; } else if (line.matches("^$BACKGROUND")) { subsection = "BACKGROUND"; } else if (line.matches("^$PERIODIC")) { subsection = "PERIODIC"; } else if (line.matches("^$RUN_ONCE")) { subsection = "RUN_ONCE"; } else if (line.matches("^$SESSION")) { subsection = "SESSION"; } else if (line.matches("^$SESSION_EXIT")) { subsection = "SESSION_EXIT"; } } else if (section.equals("Process Group") && line.matches("^$.+=.+$")) { } else if (section.equals("Registry") && line.matches("^$.+=.+$")) { } else if (section.equals("ReqrdScripts") && line.matches("^$.+=.+$")) { } else if (section.equals("Requires")) { requires.add(line); } else if (section.equals("Security") && line.matches("^$.+=.+$")) { } else if (section.equals("SharedFile") && line.matches("^$.+=.+$")) { } } } catch (java.io.FileNotFoundException fnfe) { segNameFile = null; } catch (java.io.IOException ioe) { segNameFile = null; } } /** * Description of the Method */ private void readSegNameFile() { try { buff = new BufferedReader(new FileReader(segNameFile)); eof = false; while (!eof) { String line = buff.readLine(); if (line == null) { eof = true; } else if (line.trim().matches("^$.+=.+$")) { // line is of form "$KEY=value"; line = line.trim(); prop = line.split("="); // Search for new object if (prop[0].equals("$NAME")) { name = prop[1]; } else if (prop[0].equals("$TYPE")) { type = prop[1]; } else if (prop[0].equals("$PREFIX")) { prefix = prop[1]; } else if (prop[0].equals("$SEGMENT")) { segment = prop[1]; } } } } catch (java.io.FileNotFoundException fnfe) { segNameFile = null; } catch (java.io.IOException ioe) { segNameFile = null; } } /** * Description of the Method */ private void readValidatedFile() { } /** * Description of the Method */ private void readVersionFile() { } /// setter methods /////////////////////////////////// /// getter methods /////////////////////////////////// /** * Gets the releaseNotes attribute of the _OpenCOESegment object * *@return The releaseNotes value */ public String getReleaseNotes() { return releasenotes; } /** * Gets the requires attribute of the _OpenCOESegment object * *@return The requires value */ public java.util.Vector getRequires() { return requires; } /** * Gets the conflicts attribute of the _OpenCOESegment object * *@return The conflicts value */ public java.util.Vector getConflicts() { return conflicts; } } |
From: <rbr...@us...> - 2003-10-26 17:13:51
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps In directory sc8-pr-cvs1:/tmp/cvs-serv763/java/org/opencoe/coe/kernel/apps Modified Files: COEDialog.java COEInstaller.java Log Message: 20031026:rb:829389 - COEInstaller Requires,Conflicts, and Release includes new classes _OpenCOESegment and _OpenCOETextDialog Index: COEDialog.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/COEDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** COEDialog.java 16 Aug 2003 23:19:39 -0000 1.2 --- COEDialog.java 26 Oct 2003 17:12:49 -0000 1.3 *************** *** 32,35 **** --- 32,41 ---- import java.beans.*; //Property change stuff + import java.io.*; + import java.awt.*; + import java.awt.event.*; + import javax.swing.*; + + public class COEDialog extends WindowAdapter { private int maxX = 500; *************** *** 474,475 **** --- 480,540 ---- } + class COETextDialog extends JDialog + { + // Instance attributes used in this dialog + private JFrame parentFrame; + private JScrollPane scrollPane1; + + + // Dialog constructor + public COETextDialog(JFrame parentFrame, String title, JTextArea ta ) + { + // Make sure we call the parent + super( parentFrame ); + + // Save the owner frame in case we need it later + this.parentFrame = parentFrame; + + // Set the characteristics for this dialog instance + setTitle( title ); + setSize( 300, 400 ); + setDefaultCloseOperation( DISPOSE_ON_CLOSE ); + + + // Create a panel for the components + JPanel topPanel = new JPanel(); + topPanel.setLayout( new BorderLayout() ); + getContentPane().add( topPanel ); + + // Populate the panel with something the user + // can play with + CreateTopPane( topPanel, ta ); + + } + + + private void CreateTopPane( JPanel topPanel, JTextArea ta ) + { + // Create a text area + JTextArea area = ta; + + // Create the scrolling pane for the text area + scrollPane1 = new JScrollPane(); + scrollPane1.getViewport().add( area ); + topPanel.add( scrollPane1, BorderLayout.CENTER ); + + // Create button panel + JPanel buttonPanel = new JPanel(); + //buttonPanel.setLayout( new BoxLayout() ); + JButton okButton = new JButton("OK"); + okButton.addActionListener( + new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + hide(); + } + }); + //buttonPanel.add( okButton, BorderLayout.CENTER ); + buttonPanel.add( okButton ); + topPanel.add( buttonPanel, BorderLayout.SOUTH ); + } + } Index: COEInstaller.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/COEInstaller.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** COEInstaller.java 25 Oct 2003 05:21:54 -0000 1.11 --- COEInstaller.java 26 Oct 2003 17:12:49 -0000 1.12 *************** *** 16,31 **** import org.opencoe.coe.kernel.util.*; ! /* ! * JFrame.java * ! * @author rbroberg ! * @created January 29, 2001, 1:01 PM ! * @version ! * @history 20031024:rb:829386 - COEInstaller Menu Source items are nonfunctional ! * @history 20031019:rb:821280 - COEInstaller handles URI poorly ! * @history 20031018:rb:825985 - COEInstaller S/W row cells should not be editable ! * @history 20031018:rb:825973 - COEInstaller Available Disks not used */ - public class COEInstaller extends javax.swing.JFrame { --- 16,31 ---- import org.opencoe.coe.kernel.util.*; ! /** ! * COEInstaller.java * ! *@author rbroberg ! *@created January 29, 2001, 1:01 PM ! *@version ! *@history 20031026:rb:829389 - COEInstaller Requires,Conflicts, and Release ! *@history 20031024:rb:829386 - COEInstaller Menu Source items are ! *@history 20031019:rb:821280 - COEInstaller handles URI poorly ! *@history 20031018:rb:825985 - COEInstaller S/W row cells should not be ! *@history 20031018:rb:825973 - COEInstaller Available Disks not used */ public class COEInstaller extends javax.swing.JFrame { *************** *** 47,50 **** --- 47,51 ---- */ private void initComponents() { + thisinstaller = this; jMenuBar1 = new javax.swing.JMenuBar(); fileMenu = new javax.swing.JMenu(); *************** *** 108,112 **** buttonInstallButton = new javax.swing.JButton(); buttonExitButton = new javax.swing.JButton(); ! // 20031019:rb:821280 - COEInstaller handles URI poorly srcDialog = new COEInstallerSourceDialog(this, true); --- 109,113 ---- buttonInstallButton = new javax.swing.JButton(); buttonExitButton = new javax.swing.JButton(); ! // 20031019:rb:821280 - COEInstaller handles URI poorly srcDialog = new COEInstallerSourceDialog(this, true); *************** *** 117,120 **** --- 118,124 ---- coeEnv = new _OpenCOEEnv(); + //20031025:rb - + tocpath = new String(); + //# +----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| //# Set up the Menu *************** *** 194,198 **** new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! jMenuItem6ActionPerformed(evt); } } --- 198,202 ---- new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! showReleaseNotes("Installed"); } } *************** *** 217,224 **** --- 221,249 ---- contentsMenu.setText("Contents"); relnotesContentsMenuItem.setText("Release Notes"); + relnotesContentsMenuItem.addActionListener( + new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + showReleaseNotes("Available"); + } + } + ); contentsMenu.add(relnotesContentsMenuItem); requiredContentsMenuItem.setText("Required SW"); + requiredContentsMenuItem.addActionListener( + new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + showRequires("Available"); + } + } + ); contentsMenu.add(requiredContentsMenuItem); conflictsContentsMenuItem.setText("Conflicts"); + conflictsContentsMenuItem.addActionListener( + new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + showConflicts("Available"); + } + } + ); contentsMenu.add(conflictsContentsMenuItem); jMenuBar1.add(contentsMenu); *************** *** 514,517 **** --- 539,549 ---- swInstalledRelnotesButton.setText("Release Notes"); swInstalledButtonPanel.add(swInstalledRelnotesButton); + //20031025:rb:829389 - COEInstaller Requires,Conflicts, and Release Notes + swInstalledRelnotesButton.addActionListener( + new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + showReleaseNotes("Installed"); + } + }); //# -------------------------------------------------------------- *************** *** 555,559 **** tocArray[i][9], tocArray[i][10], ! "/h"}; availArray[i][0] = newrow[0]; availArray[i][1] = newrow[1]; --- 587,591 ---- tocArray[i][9], tocArray[i][10], ! coeEnv.getCoeApps()}; availArray[i][0] = newrow[0]; availArray[i][1] = newrow[1]; *************** *** 561,564 **** --- 593,601 ---- availArray[i][3] = newrow[3]; availArray[i][4] = newrow[4]; + if (newrow[0].equals("COTS")) { + newrow[5] = coeEnv.getCoeCots(); + } else if (newrow[0].equals("ACCOUNT GROUP")) { + newrow[5] = coeEnv.getCoeAcct(); + } availArray[i][5] = newrow[5]; swAvailableTableModel.addRow(newrow); *************** *** 634,637 **** --- 671,681 ---- swAvailableRelnotesButton.setText("Release Notes"); swAvailableButtonPanel.add(swAvailableRelnotesButton); + //20031025:rb:829389 - COEInstaller Requires,Conflicts, and Release Notes + swAvailableRelnotesButton.addActionListener( + new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + showReleaseNotes("Available"); + } + }); //# -------------------------------------------------------------- *************** *** 640,643 **** --- 684,694 ---- swAvailableRequiresButton.setText("Requires"); swAvailableButtonPanel.add(swAvailableRequiresButton); + //20031025:rb:829389 - COEInstaller Requires,Conflicts, and Release Notes + swAvailableRequiresButton.addActionListener( + new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + showRequires("Available"); + } + }); //# -------------------------------------------------------------- *************** *** 646,649 **** --- 697,707 ---- swAvailableConflictsButton.setText("Conflicts"); swAvailableButtonPanel.add(swAvailableConflictsButton); + //20031025:rb:829389 - COEInstaller Requires,Conflicts, and Release Notes + swAvailableConflictsButton.addActionListener( + new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + showConflicts("Available"); + } + }); swAvailablePanel.add(swAvailableButtonPanel, java.awt.BorderLayout.SOUTH); *************** *** 824,828 **** } else { for (int i = 0; i < rows.length; i++) { ! String sep = "-"; String segstr = tocarr[rows[i]][4] + sep + tocarr[rows[i]][7] + sep + --- 882,887 ---- } else { for (int i = 0; i < rows.length; i++) { ! //String sep = "-"; ! String sep = coeEnv.getFileSep(); String segstr = tocarr[rows[i]][4] + sep + tocarr[rows[i]][7] + sep + *************** *** 843,847 **** // get seginfo FtpDownload ftpsrc = new FtpDownload("rhinohide.cx", cfgSourceLabel6.getText() + "/" + segstr + "/SegDescrip/SegInfo", segdesc); ! ftpsrc = new FtpDownload("rhinohide.cx", cfgSourceLabel6.getText() + "/" + segstr + "/SegDescrip/SegName", segdesc); System.out.println("FTP seg download start"); repstr = coeEnv.getCoeData() + "/local/SysAdm/NET_SERVER"; --- 902,906 ---- // get seginfo FtpDownload ftpsrc = new FtpDownload("rhinohide.cx", cfgSourceLabel6.getText() + "/" + segstr + "/SegDescrip/SegInfo", segdesc); ! //ftpsrc = new FtpDownload("rhinohide.cx", cfgSourceLabel6.getText() + "/" + segstr + "/SegDescrip/SegName", segdesc); System.out.println("FTP seg download start"); repstr = coeEnv.getCoeData() + "/local/SysAdm/NET_SERVER"; *************** *** 898,914 **** String cmdstr = "COE_HOME/bin/COESegInstall"; String flagstr = "-d"; ! Integer cnt = new Integer(rows[i]); ! String disk = (String) swInstalledTable.getValueAt(cnt.intValue(), 5); ! java.util.StringTokenizer st = new java.util.StringTokenizer(disk, "/"); ! // the first token is null ! st.nextToken(); ! String pathstr = "/" + st.nextToken(); ! String segstr = st.nextToken(); ! while (st.hasMoreTokens()) { ! pathstr = pathstr + "/" + segstr; ! segstr = st.nextToken(); ! } ! //20030816:rb - remove whitespace on end of line ! segstr = segstr.trim(); String[] cmd3 = {sudostr, cmdstr, flagstr, pathstr, segstr}; System.out.println(sudostr + " " + cmdstr + " " + flagstr + " " + pathstr + " " + segstr); --- 957,965 ---- String cmdstr = "COE_HOME/bin/COESegInstall"; String flagstr = "-d"; ! //Integer cnt = new Integer(rows[i]); ! //java.io.File disk = new java.io.File ((String) swInstalledTable.getValueAt(cnt.intValue(), 5)); ! java.io.File disk = new java.io.File((String) swInstalledTable.getValueAt(rows[i], 5)); ! String segstr = disk.getName(); ! String pathstr = disk.getParent(); String[] cmd3 = {sudostr, cmdstr, flagstr, pathstr, segstr}; System.out.println(sudostr + " " + cmdstr + " " + flagstr + " " + pathstr + " " + segstr); *************** *** 949,960 **** final String[][] newArray = new String[tmptoc.size()][6]; for (int i = 0; i < tmptoc.size(); i++) { ! String str = (String) tmptoc.get(i); ! java.util.StringTokenizer st = new java.util.StringTokenizer(str, ":"); ! String type = st.nextToken(); ! String name = st.nextToken(); ! String version = st.nextToken(); ! String classi = st.nextToken(); ! String size = st.nextToken(); ! String disk = st.nextToken(); String[] newstr = new String[]{type, name, version, classi, size, disk}; --- 1000,1011 ---- final String[][] newArray = new String[tmptoc.size()][6]; for (int i = 0; i < tmptoc.size(); i++) { ! String[] str = ((String) tmptoc.get(i)).split(":"); ! String type = str[0]; ! String name = str[1]; ! String version = str[2]; ! String classi = str[3]; ! String size = str[4]; ! str = str[5].split("\\s"); ! String disk = str[1]; String[] newstr = new String[]{type, name, version, classi, size, disk}; *************** *** 992,996 **** * get the new stuff */ ! tocArray = getTOC(cfgSourceLabel6.getText()); for (int i = 0; i < tocArray.length; i++) { String[] newrow = new String[]{tocArray[i][7], --- 1043,1048 ---- * get the new stuff */ ! tocpath = cfgSourceLabel6.getText(); ! tocArray = getTOC(tocpath); for (int i = 0; i < tocArray.length; i++) { String[] newrow = new String[]{tocArray[i][7], *************** *** 1015,1020 **** if (cfgSourceLabel2.getText().equals("ftp")) { System.out.println("FTP download start"); ! FtpDownload ftpsrc = new FtpDownload("rhinohide.cx", path + "/toc", coeEnv.getCoeData() + "/local/SysAdm/NET_SERVER"); ! path = coeEnv.getCoeData() + "/local/SysAdm/NET_SERVER"; System.out.println("FTP download end"); } --- 1067,1073 ---- if (cfgSourceLabel2.getText().equals("ftp")) { System.out.println("FTP download start"); ! tocpath = coeEnv.getCoeData() + "/local/SysAdm/NET_SERVER"; ! FtpDownload ftpsrc = new FtpDownload("rhinohide.cx", path + "/toc", tocpath); ! path = tocpath; System.out.println("FTP download end"); } *************** *** 1074,1078 **** //new String(reppath+"/"+segment+"/TOC/"+segment+"/SegDescrip/SegName"); String segnamepath = ! new String(reppath + "/" + segment + "/SegDescrip/SegName"); /* --- 1127,1131 ---- //new String(reppath+"/"+segment+"/TOC/"+segment+"/SegDescrip/SegName"); String segnamepath = ! new String(tocpath + "/" + segment + "/SegDescrip/SegName"); /* *************** *** 1321,1327 **** //20031006:rb - Use Coe Env Variables to set install path private org.opencoe.coe.kernel.util._OpenCOEEnv coeEnv; ! // 20031019:rb:821280 - COEInstaller handles URI poorly private org.opencoe.coe.kernel.apps.COEInstallerSourceDialog srcDialog; // 20031018:rb:825985 - COEInstaller S/W row cells should not be editable /** --- 1374,1384 ---- //20031006:rb - Use Coe Env Variables to set install path private org.opencoe.coe.kernel.util._OpenCOEEnv coeEnv; ! // 20031019:rb:821280 - COEInstaller handles URI poorly private org.opencoe.coe.kernel.apps.COEInstallerSourceDialog srcDialog; + private javax.swing.JFrame thisinstaller; + private String tocpath; + + // 20031018:rb:825985 - COEInstaller S/W row cells should not be editable /** *************** *** 1338,1341 **** --- 1395,1399 ---- private boolean DEBUG = false; + /** * Sets the data attribute of the COEInstallerTableModel object *************** *** 1493,1496 **** --- 1551,1666 ---- } + + /** + * Description of the Method + * + *@param mode Description of the Parameter 20031025:rb:829389 - COEInstaller + * Requires,Conflicts, and Release Notes + */ + private void showReleaseNotes(String mode) { + + String path = new String(); + if (mode.equals("Installed")) { + // get first selected Installed segment + int[] rows = swInstalledTable.getSelectedRows(); + path = (String) swInstalledTable.getValueAt(rows[0], 5); + path.trim(); + path = path + "/SegDescrip"; + } else { + // get first selected Available segment + int[] rows = swAvailableTable.getSelectedRows(); + String segtype = (String) swAvailableTable.getValueAt(rows[0], 0); + // Segdir: PREFIX-TYPE-VERSION-ARCH + String sep = coeEnv.getFileSep(); + String segstr = tocArray[rows[0]][4] + sep + + tocArray[rows[0]][7] + sep + + tocArray[rows[0]][8] + sep + + tocArray[rows[0]][3]; + path = tocpath + "/" + segstr + "/SegDescrip"; + } + + // create segment object + System.out.println("COEInstaller::showReleaseNotes::path=" + path); + _OpenCOESegment thisseg = new _OpenCOESegment(new java.io.File(path)); + COETextDialog dialog = new COETextDialog(thisinstaller, "Release Notes", + new javax.swing.JTextArea(thisseg.getReleaseNotes())); + dialog.show(); + } + + + /** + * Description of the Method + * + *@param mode Description of the Parameter 20031025:rb:829389 - COEInstaller + * Requires,Conflicts, and Release Notes + */ + private void showRequires(String mode) { + + String path = new String(); + + if (mode.equals("Installed")) { + path = path + "/SegDescrip"; + } else { + // get first selected Available segment + int[] rows = swAvailableTable.getSelectedRows(); + String segtype = (String) swAvailableTable.getValueAt(rows[0], 0); + // Segdir: PREFIX-TYPE-VERSION-ARCH + String sep = coeEnv.getFileSep(); + String segstr = tocArray[rows[0]][4] + sep + + tocArray[rows[0]][7] + sep + + tocArray[rows[0]][8] + sep + + tocArray[rows[0]][3]; + path = tocpath + "/" + segstr + "/SegDescrip"; + } + + // create segment object + _OpenCOESegment thisseg = new _OpenCOESegment(new java.io.File(path)); + String requires = new String(); + for (java.util.Enumeration e = thisseg.getRequires().elements(); e.hasMoreElements(); ) { + requires = requires + "\n" + (String) e.nextElement(); + } + + COETextDialog dialog = new COETextDialog(thisinstaller, "Requires", + new javax.swing.JTextArea(requires)); + dialog.show(); + } + + + /** + * Description of the Method + * + *@param mode Description of the Parameter 20031025:rb:829389 - COEInstaller + * Requires,Conflicts, and Release Notes + */ + private void showConflicts(String mode) { + + String path = new String(); + + if (mode.equals("Installed")) { + path = path + "/SegDescrip"; + } else { + // get first selected Available segment + int[] rows = swAvailableTable.getSelectedRows(); + String segtype = (String) swAvailableTable.getValueAt(rows[0], 0); + // Segdir: PREFIX-TYPE-VERSION-ARCH + String sep = coeEnv.getFileSep(); + String segstr = tocArray[rows[0]][4] + sep + + tocArray[rows[0]][7] + sep + + tocArray[rows[0]][8] + sep + + tocArray[rows[0]][3]; + path = tocpath + "/" + segstr + "/SegDescrip"; + } + + // create segment object + _OpenCOESegment thisseg = new _OpenCOESegment(new java.io.File(path)); + String conflicts = new String(); + for (java.util.Enumeration e = thisseg.getConflicts().elements(); e.hasMoreElements(); ) { + conflicts = conflicts + "\n" + (String) e.nextElement(); + } + + COETextDialog dialog = new COETextDialog(thisinstaller, "Conflicts", + new javax.swing.JTextArea(conflicts)); + dialog.show(); + } } |
From: <rbr...@us...> - 2003-10-26 17:13:51
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/data/NET_SERVER/TESTAPP-SOFTWARE-1.0.0.0-COE_ALL/SegDescrip In directory sc8-pr-cvs1:/tmp/cvs-serv763/data/NET_SERVER/TESTAPP-SOFTWARE-1.0.0.0-COE_ALL/SegDescrip Modified Files: SegInfo Log Message: 20031026:rb:829389 - COEInstaller Requires,Conflicts, and Release includes new classes _OpenCOESegment and _OpenCOETextDialog Index: SegInfo =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/data/NET_SERVER/TESTAPP-SOFTWARE-1.0.0.0-COE_ALL/SegDescrip/SegInfo,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SegInfo 10 Oct 2003 03:15:46 -0000 1.1 --- SegInfo 26 Oct 2003 17:12:49 -0000 1.2 *************** *** 12,17 **** --- 12,19 ---- [Requires] + COE Component Parent:COE:/h/COE:4.2.0.0 [Conflicts] + Anti COE Component Parent:NOCOE:/h/NOCOE:4.2.0.0 [Security] |
From: <rbr...@us...> - 2003-10-26 17:13:48
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/data/NET_SERVER/TESTAPP-SOFTWARE-1.0.0.0-COE_ALL In directory sc8-pr-cvs1:/tmp/cvs-serv763/data/NET_SERVER/TESTAPP-SOFTWARE-1.0.0.0-COE_ALL Modified Files: TESTAPP-SOFTWARE-1.0.0.0-COE_ALL.tar Log Message: 20031026:rb:829389 - COEInstaller Requires,Conflicts, and Release includes new classes _OpenCOESegment and _OpenCOETextDialog Index: TESTAPP-SOFTWARE-1.0.0.0-COE_ALL.tar =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/data/NET_SERVER/TESTAPP-SOFTWARE-1.0.0.0-COE_ALL/TESTAPP-SOFTWARE-1.0.0.0-COE_ALL.tar,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsM07YIW and /tmp/cvsEdHZRI differ |
From: <rbr...@us...> - 2003-10-25 05:25:59
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps In directory sc8-pr-cvs1:/tmp/cvs-serv9970/COE/java/org/opencoe/coe/kernel/apps Modified Files: COEInstaller.java Log Message: 20031024:rb:829386 - COEInstaller Menu Source items are nonfunctional Index: COEInstaller.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/COEInstaller.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** COEInstaller.java 19 Oct 2003 17:04:24 -0000 1.10 --- COEInstaller.java 25 Oct 2003 05:21:54 -0000 1.11 *************** *** 22,28 **** * @created January 29, 2001, 1:01 PM * @version ! * 20031019:rb:821280 - COEInstaller handles URI poorly ! * 20031018:rb:825985 - COEInstaller S/W row cells should not be editable ! * 20031018:rb:825973 - COEInstaller Available Disks not used */ --- 22,29 ---- * @created January 29, 2001, 1:01 PM * @version ! * @history 20031024:rb:829386 - COEInstaller Menu Source items are nonfunctional ! * @history 20031019:rb:821280 - COEInstaller handles URI poorly ! * @history 20031018:rb:825985 - COEInstaller S/W row cells should not be editable ! * @history 20031018:rb:825973 - COEInstaller Available Disks not used */ *************** *** 165,169 **** new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! SelectActionPerformed(evt); } } --- 166,172 ---- new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! //20031024:rb:829386 - COEInstaller Menu Source items are nonfunctional ! //SelectActionPerformed(evt); ! showCOEInstallerSourceDialog(); } } *************** *** 174,178 **** new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! jMenuItem5ActionPerformed(evt); } } --- 177,183 ---- new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! //20031024:rb:829386 - COEInstaller Menu Source items are nonfunctional ! //jMenuItem5ActionPerformed(evt); ! readTOC(cfgSourceLabel6.getText()); } } |
From: <rbr...@us...> - 2003-10-23 04:39:49
|
Update of /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/data In directory sc8-pr-cvs1:/tmp/cvs-serv25759/data Modified Files: sudoers Log Message: 20031022:rb:828645 - OS_delete_user calls sudo for rm -rf Index: sudoers =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/OS/src/OS/LINUX_I686/data/sudoers,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sudoers 17 Jun 2002 21:53:50 -0000 1.2 --- sudoers 23 Oct 2003 02:46:06 -0000 1.3 *************** *** 25,29 **** /bin/chmod, \ /bin/chown, \ ! /usr/bin/chfn Cmnd_Alias INIT = /sbin/init, \ --- 25,30 ---- /bin/chmod, \ /bin/chown, \ ! /usr/bin/chfn, \ ! /bin/rm Cmnd_Alias INIT = /sbin/init, \ |
Update of /cvsroot/opencoe/coekernel/src/UAM/src/UAM/java/org/opencoe/coe/uam In directory sc8-pr-cvs1:/tmp/cvs-serv23787/UAM/java/org/opencoe/coe/uam Modified Files: UAM_EditGroup.java UAM_EditProfile.java UAM_EditUser.java UAM_Manager.java _UAM_ManagerModel.java _UAM_ManagerTree.java Log Message: 20031022:rb:828634 - Change title for UAManager JavaStyle refactor Index: UAM_EditGroup.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/UAM/src/UAM/java/org/opencoe/coe/uam/UAM_EditGroup.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** UAM_EditGroup.java 21 Jun 2002 22:43:57 -0000 1.3 --- UAM_EditGroup.java 23 Oct 2003 02:32:05 -0000 1.4 *************** *** 1,31 **** /** ! * Copyright (C) 2002, Federal Linux Systems ! * ! * The project home for this software is http://www.opencoe.org ! * ! * This segment is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * ! * This segment is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! **/ ! ! /* ! * UAM_EditGroup.java ! * ! * Created on March 25, 2001, 6:03 PM */ ! ! package org.opencoe.coe.uam; import org.opencoe.coe.kernel.util.*; --- 1,17 ---- /** ! * Copyright (C) 2002, Federal Linux Systems The project home for this software ! * is http://www.opencoe.org This segment is free software; you can ! * redistribute it and/or modify it under the terms of the GNU Lesser General ! * Public License as published by the Free Software Foundation; either version ! * 2.1 of the License, or (at your option) any later version. This segment is ! * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ! * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more ! * details. You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ ! package org.opencoe.coe.uam; import org.opencoe.coe.kernel.util.*; *************** *** 33,336 **** /** * ! * @author rbroberg ! * @version */ - public class UAM_EditGroup extends javax.swing.JDialog implements java.awt.event.ActionListener { ! /** Creates new form UAM_EditGroup */ ! public UAM_EditGroup(String m, String n, String s) { ! setTitle("Edit Group"); ! setModal(true); ! editmode=m; ! groupscope=s; ! groupname=n; ! initComponents (editmode, groupname, groupscope); ! pack (); ! } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the FormEditor. - */ - private void initComponents (String mode, String gname, String gscope) { - jPanel1 = new javax.swing.JPanel (); - grpnameLabel = new javax.swing.JLabel (); - grpnameTF = new javax.swing.JTextField (); - gidLabel = new javax.swing.JLabel (); - gidTF = new javax.swing.JTextField (); - scopeLabel = new javax.swing.JLabel (); - scopeCB = new javax.swing.JComboBox (); - jPanel2 = new javax.swing.JPanel (); - applyButton = new javax.swing.JButton (); - deleteButton = new javax.swing.JButton (); - editButton = new javax.swing.JButton (); - quitButton = new javax.swing.JButton (); - helpApplyButton = new javax.swing.JButton (); - helpEditButton = new javax.swing.JButton (); - helpDeleteButton = new javax.swing.JButton (); ! jPanel1.setLayout (new java.awt.GridLayout (3, 2)); ! jPanel1.setBorder (new javax.swing.border.EmptyBorder(new java.awt.Insets(10, 10, 10, 10))); ! grpnameLabel.setText ("Group Name"); ! jPanel1.add (grpnameLabel); ! jPanel1.add (grpnameTF); ! gidLabel.setText ("GID"); ! jPanel1.add (gidLabel); ! jPanel1.add (gidTF); ! scopeLabel.setText ("Scope"); ! jPanel1.add (scopeLabel); ! scopeCB.setMaximumRowCount(2); ! jPanel1.add (scopeCB); ! scopeCB.addItem ("local"); ! scopeCB.addItem ("global"); ! scopeCB.setSelectedItem(gscope); ! ! getContentPane ().add (jPanel1, java.awt.BorderLayout.CENTER); ! if (editmode.equals("--edit")) { ! setTitle("Edit Group"); ! editButton.setText ("Apply"); ! jPanel2.add (editButton); ! editButton.addActionListener(this); ! ! quitButton.setText ("Quit"); ! jPanel2.add (quitButton); ! quitButton.addActionListener(this); ! ! helpEditButton.setText ("Help"); ! jPanel2.add (helpEditButton); ! helpEditButton.addActionListener(this); ! ! grpnameTF.setText(gname); ! gidTF.setText(getGID(gname)); ! } else if (editmode.equals("--delete")) { ! setTitle("Delete Group"); ! deleteButton.setText ("Delete"); ! jPanel2.add (deleteButton); ! deleteButton.addActionListener(this); ! ! quitButton.setText ("Quit"); ! jPanel2.add (quitButton); ! quitButton.addActionListener(this); ! ! helpDeleteButton.setText ("Help"); ! jPanel2.add (helpDeleteButton); ! helpDeleteButton.addActionListener(this); ! grpnameTF.setText(gname); ! System.out.println(gname); ! gidTF.setText(getGID(gname)); ! } else { ! setTitle("New Group"); ! applyButton.setText ("Create"); ! jPanel2.add (applyButton); ! applyButton.addActionListener(this); ! ! quitButton.setText ("Quit"); ! jPanel2.add (quitButton); ! quitButton.addActionListener(this); ! ! helpApplyButton.setText ("Help"); ! jPanel2.add (helpApplyButton); ! helpApplyButton.addActionListener(this); - grpnameTF.setText(""); - gidTF.setText(getNextGID()); } - - getContentPane ().add (jPanel2, java.awt.BorderLayout.SOUTH); ! } ! public void actionPerformed (java.awt.event.ActionEvent evt) { ! Object source = evt.getSource(); ! java.util.StringTokenizer stok; ! if (source == applyButton) { ! System.out.println("Add group"); ! addGroup(grpnameTF.getText(), gidTF.getText()); ! WindowEvent e = ! new WindowEvent (this, WindowEvent.WINDOW_CLOSING); ! dispatchEvent(e); ! } else if (source == deleteButton) { ! System.out.println("Delete group"); ! deleteGroup(grpnameTF.getText()); ! WindowEvent e = ! new WindowEvent (this, WindowEvent.WINDOW_CLOSING); ! dispatchEvent(e); ! } else if (source == editButton) { ! System.out.println("Edit group"); ! deleteGroup(groupname); ! groupname=grpnameTF.getText(); ! addGroup(grpnameTF.getText(), gidTF.getText()); ! } else if (source == quitButton) { ! System.out.println("Quit"); ! WindowEvent e = ! new WindowEvent (this, WindowEvent.WINDOW_CLOSING); ! dispatchEvent(e); ! ! } else if (source == helpApplyButton) { ! System.out.println("Help! Apply"); ! } else if (source == helpDeleteButton) { ! System.out.println("Help! Delete"); ! } else if (source == helpEditButton) { ! System.out.println("Help! Edit"); } - } - private void addGroup(String name, String id) { - /* add the group */ - java.util.StringTokenizer stok; - String[] cmdstr = new String[5]; - cmdstr[0]="COE_COMP/OS/bin/OS_add_group"; - cmdstr[1]="-g"; - cmdstr[2]=id; - cmdstr[3]="-n"; - cmdstr[4]=name; ! System.out.println("UAM_EditGroups::addGroup: "+ ! cmdstr[0]+" "+ ! cmdstr[1]+" "+ ! cmdstr[2]+" "+ ! cmdstr[3]+" "+ ! cmdstr[4]+" "); ! _OpenCOECmdExec OS_add_group = ! new _OpenCOECmdExec(cmdstr); ! } ! private void deleteGroup(String name) { ! /* delete the group */ ! java.util.StringTokenizer stok; ! String[] cmdstr = new String[2]; ! cmdstr[0]="COE_COMP/OS/bin/OS_delete_group"; ! cmdstr[1]=name; - System.out.println("UAM_EditGroups::deleteGroup: "+ - cmdstr[0]+" "+ - cmdstr[1]+" "); ! _OpenCOECmdExec OS_delete_group = ! new _OpenCOECmdExec(cmdstr); ! } ! private String getGID(String name) { ! /* get the gid matching this groupname */ ! java.util.StringTokenizer stok; ! String[] cmdstr = new String[3]; ! cmdstr[0]="COE_COMP/OS/bin/OS_get_group_data"; ! cmdstr[1]="-n"; ! cmdstr[2]=name; ! System.out.println("UAM_EditGroups::getGID: "+ ! cmdstr[0]+" "+ ! cmdstr[1]+" "+ ! cmdstr[2]+" "); - _OpenCOECmdExec OS_get_group_data = - new _OpenCOECmdExec(cmdstr); - tmp=OS_get_group_data.getOutput(); ! str=(String)tmp.get(0); ! stok = new java.util.StringTokenizer(str, ":"); ! stok.nextToken(); //gname ! stok.nextToken(); //null ! str=stok.nextToken(); //gid ! return str; ! } ! private String getNextGID() { ! /* get the next gid */ ! java.util.StringTokenizer stok; ! String[] cmdstr = new String[1]; ! cmdstr[0]="COE_COMP/OS/bin/OS_get_next_gid"; ! System.out.println("UAM_EditGroups::getNextGID: "+ ! cmdstr[0]+" "); ! _OpenCOECmdExec OS_get_group_data = ! new _OpenCOECmdExec(cmdstr); ! tmp=OS_get_group_data.getOutput(); ! return (String)tmp.get(0); ! } - /** Exit the Application */ - private void exitForm(java.awt.event.WindowEvent evt) { - System.exit (0); - } ! /** ! * @param args the command line arguments ! */ ! public static void main (String args[]) { ! String m, n, s; ! //validate arguments ! if (args.length == 3 ) { ! m = args[0]; ! n = args[1]; ! s = args[2]; ! if (m.compareTo("--edit")!= 0 && m.compareTo("--delete")!= 0 ) { ! m="--new"; ! n="dummy"; ! s="local"; ! } ! } else { ! m="--new"; ! n="dummy"; ! s="local"; ! } ! javax.swing.JDialog frame = new UAM_EditGroup(m,n,s); ! frame.addWindowListener(new WindowAdapter() { ! public void windowClosing(WindowEvent e) {System.exit(0);} ! }); ! frame.setSize(325, 200); ! frame.pack(); ! frame.setVisible(true); - } - // Variables declaration - do not modify - private javax.swing.JPanel jPanel1; - private javax.swing.JLabel grpnameLabel; - private javax.swing.JTextField grpnameTF; - private javax.swing.JLabel gidLabel; - private javax.swing.JTextField gidTF; - private javax.swing.JLabel scopeLabel; - private javax.swing.JComboBox scopeCB; - private javax.swing.JPanel jPanel2; - private javax.swing.JButton applyButton; - private javax.swing.JButton deleteButton; - private javax.swing.JButton editButton; - private javax.swing.JButton quitButton; - private javax.swing.JButton helpApplyButton; - private javax.swing.JButton helpDeleteButton; - private javax.swing.JButton helpEditButton; - // End of variables declaration ! /* command exec variables */ ! private String cmd; ! private String str; ! private String groupname; ! private String groupscope; ! private String groupgid; ! private String editmode; ! private java.util.ArrayList tmp; } --- 19,388 ---- /** + * UAM_EditGroup.java * ! *@author rbroberg ! *@created March 25, 2001, 6:03 PM ! *@history 20031022:rb:828634 - Change title for UAManager */ public class UAM_EditGroup extends javax.swing.JDialog implements java.awt.event.ActionListener { ! /** ! * Creates new form UAM_EditGroup ! * ! *@param m Description of the Parameter ! *@param n Description of the Parameter ! *@param s Description of the Parameter ! */ ! public UAM_EditGroup(String m, String n, String s) { ! setTitle("Edit Group"); ! setModal(true); ! editmode = m; ! groupscope = s; ! groupname = n; ! initComponents(editmode, groupname, groupscope); ! pack(); ! } ! /** ! * This method is called from within the constructor to initialize the form. ! * WARNING: Do NOT modify this code. The content of this method is always ! * regenerated by the FormEditor. ! * ! *@param mode Description of the Parameter ! *@param gname Description of the Parameter ! *@param gscope Description of the Parameter ! */ ! private void initComponents(String mode, String gname, String gscope) { ! jPanel1 = new javax.swing.JPanel(); ! grpnameLabel = new javax.swing.JLabel(); ! grpnameTF = new javax.swing.JTextField(); ! gidLabel = new javax.swing.JLabel(); ! gidTF = new javax.swing.JTextField(); ! scopeLabel = new javax.swing.JLabel(); ! scopeCB = new javax.swing.JComboBox(); ! jPanel2 = new javax.swing.JPanel(); ! applyButton = new javax.swing.JButton(); ! deleteButton = new javax.swing.JButton(); ! editButton = new javax.swing.JButton(); ! quitButton = new javax.swing.JButton(); ! helpApplyButton = new javax.swing.JButton(); ! helpEditButton = new javax.swing.JButton(); ! helpDeleteButton = new javax.swing.JButton(); ! jPanel1.setLayout(new java.awt.GridLayout(3, 2)); ! jPanel1.setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(10, 10, 10, 10))); ! grpnameLabel.setText("Group Name"); ! jPanel1.add(grpnameLabel); ! jPanel1.add(grpnameTF); ! gidLabel.setText("GID"); ! jPanel1.add(gidLabel); ! jPanel1.add(gidTF); ! scopeLabel.setText("Scope"); ! jPanel1.add(scopeLabel); ! scopeCB.setMaximumRowCount(2); ! jPanel1.add(scopeCB); ! scopeCB.addItem("local"); ! scopeCB.addItem("global"); ! scopeCB.setSelectedItem(gscope); ! getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER); ! if (editmode.equals("--edit")) { ! setTitle("Edit Group"); ! editButton.setText("Apply"); ! jPanel2.add(editButton); ! editButton.addActionListener(this); ! quitButton.setText("Quit"); ! jPanel2.add(quitButton); ! quitButton.addActionListener(this); ! helpEditButton.setText("Help"); ! jPanel2.add(helpEditButton); ! helpEditButton.addActionListener(this); ! grpnameTF.setText(gname); ! gidTF.setText(getGID(gname)); ! } else if (editmode.equals("--delete")) { ! setTitle("Delete Group"); ! ! deleteButton.setText("Delete"); ! jPanel2.add(deleteButton); ! deleteButton.addActionListener(this); ! ! quitButton.setText("Quit"); ! jPanel2.add(quitButton); ! quitButton.addActionListener(this); ! ! helpDeleteButton.setText("Help"); ! jPanel2.add(helpDeleteButton); ! helpDeleteButton.addActionListener(this); ! ! grpnameTF.setText(gname); ! System.out.println(gname); ! gidTF.setText(getGID(gname)); ! ! } else { ! setTitle("New Group"); ! ! applyButton.setText("Create"); ! jPanel2.add(applyButton); ! applyButton.addActionListener(this); ! ! quitButton.setText("Quit"); ! jPanel2.add(quitButton); ! quitButton.addActionListener(this); ! ! helpApplyButton.setText("Help"); ! jPanel2.add(helpApplyButton); ! helpApplyButton.addActionListener(this); ! ! grpnameTF.setText(""); ! gidTF.setText(getNextGID()); ! } ! ! getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH); } ! /** ! * Description of the Method ! * ! *@param evt Description of the Parameter ! */ ! public void actionPerformed(java.awt.event.ActionEvent evt) { ! Object source = evt.getSource(); ! java.util.StringTokenizer stok; ! if (source == applyButton) { ! System.out.println("Add group"); ! addGroup(grpnameTF.getText(), gidTF.getText()); ! WindowEvent e = ! new WindowEvent(this, WindowEvent.WINDOW_CLOSING); ! dispatchEvent(e); ! } else if (source == deleteButton) { ! System.out.println("Delete group"); ! deleteGroup(grpnameTF.getText()); ! WindowEvent e = ! new WindowEvent(this, WindowEvent.WINDOW_CLOSING); ! dispatchEvent(e); ! } else if (source == editButton) { ! System.out.println("Edit group"); ! deleteGroup(groupname); ! groupname = grpnameTF.getText(); ! addGroup(grpnameTF.getText(), gidTF.getText()); ! } else if (source == quitButton) { ! System.out.println("Quit"); ! WindowEvent e = ! new WindowEvent(this, WindowEvent.WINDOW_CLOSING); ! dispatchEvent(e); ! } else if (source == helpApplyButton) { ! System.out.println("Help! Apply"); ! } else if (source == helpDeleteButton) { ! System.out.println("Help! Delete"); ! } else if (source == helpEditButton) { ! System.out.println("Help! Edit"); ! } } ! /** ! * Adds a feature to the Group attribute of the UAM_EditGroup object ! * ! *@param name The feature to be added to the Group attribute ! *@param id The feature to be added to the Group attribute ! */ ! private void addGroup(String name, String id) { ! /* ! * add the group ! */ ! java.util.StringTokenizer stok; ! String[] cmdstr = new String[5]; ! cmdstr[0] = "COE_COMP/OS/bin/OS_add_group"; ! cmdstr[1] = "-g"; ! cmdstr[2] = id; ! cmdstr[3] = "-n"; ! cmdstr[4] = name; ! System.out.println("UAM_EditGroups::addGroup: " + ! cmdstr[0] + " " + ! cmdstr[1] + " " + ! cmdstr[2] + " " + ! cmdstr[3] + " " + ! cmdstr[4] + " "); ! _OpenCOECmdExec OS_add_group = ! new _OpenCOECmdExec(cmdstr); ! } ! /** ! * Description of the Method ! * ! *@param name Description of the Parameter ! */ ! private void deleteGroup(String name) { ! /* ! * delete the group ! */ ! java.util.StringTokenizer stok; ! String[] cmdstr = new String[2]; ! cmdstr[0] = "COE_COMP/OS/bin/OS_delete_group"; ! cmdstr[1] = name; ! System.out.println("UAM_EditGroups::deleteGroup: " + ! cmdstr[0] + " " + ! cmdstr[1] + " "); ! _OpenCOECmdExec OS_delete_group = ! new _OpenCOECmdExec(cmdstr); ! } ! /** ! * Gets the gID attribute of the UAM_EditGroup object ! * ! *@param name Description of the Parameter ! *@return The gID value ! */ ! private String getGID(String name) { ! /* ! * get the gid matching this groupname ! */ ! java.util.StringTokenizer stok; ! String[] cmdstr = new String[3]; ! cmdstr[0] = "COE_COMP/OS/bin/OS_get_group_data"; ! cmdstr[1] = "-n"; ! cmdstr[2] = name; ! System.out.println("UAM_EditGroups::getGID: " + ! cmdstr[0] + " " + ! cmdstr[1] + " " + ! cmdstr[2] + " "); ! _OpenCOECmdExec OS_get_group_data = ! new _OpenCOECmdExec(cmdstr); ! tmp = OS_get_group_data.getOutput(); ! str = (String) tmp.get(0); ! stok = new java.util.StringTokenizer(str, ":"); ! stok.nextToken(); ! //gname ! stok.nextToken(); ! //null ! str = stok.nextToken(); ! //gid ! return str; ! } ! /** ! * Gets the nextGID attribute of the UAM_EditGroup object ! * ! *@return The nextGID value ! */ ! private String getNextGID() { ! /* ! * get the next gid ! */ ! java.util.StringTokenizer stok; ! String[] cmdstr = new String[1]; ! cmdstr[0] = "COE_COMP/OS/bin/OS_get_next_gid"; ! System.out.println("UAM_EditGroups::getNextGID: " + ! cmdstr[0] + " "); ! _OpenCOECmdExec OS_get_group_data = ! new _OpenCOECmdExec(cmdstr); ! tmp = OS_get_group_data.getOutput(); ! return (String) tmp.get(0); ! } + /** + * Exit the Application + * + *@param evt Description of the Parameter + */ + private void exitForm(java.awt.event.WindowEvent evt) { + System.exit(0); + } ! /** ! *@param args the command line arguments ! */ ! public static void main(String args[]) { ! String m; ! String n; ! String s; ! //validate arguments ! if (args.length == 3) { ! m = args[0]; ! n = args[1]; ! s = args[2]; ! if (m.compareTo("--edit") != 0 && m.compareTo("--delete") != 0) { ! m = "--new"; ! n = "dummy"; ! s = "local"; ! } ! } else { ! m = "--new"; ! n = "dummy"; ! s = "local"; ! } ! javax.swing.JDialog frame = new UAM_EditGroup(m, n, s); ! ! frame.addWindowListener( ! new WindowAdapter() { ! public void windowClosing(WindowEvent e) { ! System.exit(0); ! } ! }); ! ! frame.setSize(325, 200); ! frame.pack(); ! frame.setVisible(true); ! ! } ! ! ! // Variables declaration - do not modify ! private javax.swing.JPanel jPanel1; ! private javax.swing.JLabel grpnameLabel; ! private javax.swing.JTextField grpnameTF; ! private javax.swing.JLabel gidLabel; ! private javax.swing.JTextField gidTF; ! private javax.swing.JLabel scopeLabel; ! private javax.swing.JComboBox scopeCB; ! private javax.swing.JPanel jPanel2; ! private javax.swing.JButton applyButton; ! private javax.swing.JButton deleteButton; ! private javax.swing.JButton editButton; ! private javax.swing.JButton quitButton; ! private javax.swing.JButton helpApplyButton; ! private javax.swing.JButton helpDeleteButton; ! private javax.swing.JButton helpEditButton; ! // End of variables declaration + /* + * command exec variables + */ + private String cmd; + private String str; + private String groupname; + private String groupscope; + private String groupgid; + private String editmode; + private java.util.ArrayList tmp; } + Index: UAM_EditProfile.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/UAM/src/UAM/java/org/opencoe/coe/uam/UAM_EditProfile.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** UAM_EditProfile.java 21 Jun 2002 22:43:57 -0000 1.4 --- UAM_EditProfile.java 23 Oct 2003 02:32:05 -0000 1.5 *************** *** 1,36 **** /** ! * Copyright (C) 2002, Federal Linux Systems ! * ! * The project home for this software is http://www.opencoe.org ! * ! * This segment is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * [...1152 lines suppressed...] ! private javax.swing.JButton helpDeleteButton; ! private javax.swing.JButton helpEditButton; ! // End of variables declaration ! /* ! * command exec variables ! */ ! private String cmd; private String str; private java.util.ArrayList tmp; ! /* ! * user info for text entry ! */ ! private String profname = new String(); ! private String acctgrp = new String(); ! private String profscope = new String(); ! private String proflock = new String(); } Index: UAM_EditUser.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/UAM/src/UAM/java/org/opencoe/coe/uam/UAM_EditUser.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** UAM_EditUser.java 18 Oct 2003 03:53:12 -0000 1.5 --- UAM_EditUser.java 23 Oct 2003 02:32:05 -0000 1.6 *************** *** 13,23 **** */ - /** - * UAM_EditUser.java - * - * Created on March 25, 2001, 5:05 PM - * 20031017:rb:821278 Parent/Default Profile assigned to user - */ - package org.opencoe.coe.uam; import org.opencoe.coe.kernel.util.*; --- 13,16 ---- *************** *** 27,33 **** /** *@author rbroberg ! *@created October 17, 2003 ! *@version */ --- 20,29 ---- /** + * UAM_EditUser.java Parent/Default Profile assigned to user + * *@author rbroberg ! *@created March 25, 2001, 5:05 PM ! *@history 20031022:rb:828634 - Change title for UAManager ! *@history 20031017:rb:821278 - Parent/Default Profile assigned to user */ *************** *** 125,128 **** --- 121,131 ---- */ if (mode.equals("--edit") || mode.equals("--delete")) { + //20031022:rb:828634 - Change title for UAManager + if (mode.equals("--edit")) { + setTitle("Edit User"); + } else { + setTitle("Delete User"); + } + cmd = "COE_HOME/bin/COE_get_user_data -n " + uname + " -s " + uscope; _OpenCOECmdExec COE_get_user_data = new _OpenCOECmdExec(cmd); *************** *** 147,150 **** --- 150,155 ---- } else { + //20031022:rb:828634 - Change title for UAManager + setTitle("New User"); uid = ""; useruid = ""; Index: UAM_Manager.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/UAM/src/UAM/java/org/opencoe/coe/uam/UAM_Manager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** UAM_Manager.java 21 Jun 2002 22:43:57 -0000 1.3 --- UAM_Manager.java 23 Oct 2003 02:32:05 -0000 1.4 *************** *** 1,772 **** /** ! * Copyright (C) 2002, Federal Linux Systems ! * ! * The project home for this software is http://www.opencoe.org ! * ! * This segment is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * [...1682 lines suppressed...] ! private javax.swing.JMenuItem AttributeViewMenuItem; ! private javax.swing.JMenuItem TableViewMenuItem; ! private javax.swing.JMenu helpMenu; ! private javax.swing.JMenuItem aboutHelpMenuItem; ! private javax.swing.JMenuItem helpHelpMenuItem; ! private javax.swing.JSplitPane uamSplitPanel; ! private javax.swing.JScrollPane uamTreeScrollPane; ! //private javax.swing.JTree uamTree; ! private _UAM_ManagerTree uamTree; ! private javax.swing.JPanel uamPanel; ! private javax.swing.JScrollPane uamDispScrollPane; ! private javax.swing.JTable uamTable; ! private javax.swing.table.DefaultTableModel uamTableModel; ! private org.opencoe.coe.uam.UAM_EditUser uameu; ! private org.opencoe.coe.uam.UAM_EditProfile uamep; ! private org.opencoe.coe.uam.UAM_EditGroup uameg; ! // End of variables declaration } + Index: _UAM_ManagerModel.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/UAM/src/UAM/java/org/opencoe/coe/uam/_UAM_ManagerModel.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** _UAM_ManagerModel.java 19 Apr 2002 15:18:00 -0000 1.1.1.1 --- _UAM_ManagerModel.java 23 Oct 2003 02:32:05 -0000 1.2 *************** *** 1,24 **** /** ! * Copyright (C) 2002, Federal Linux Systems ! * ! * The project home for this software is http://www.opencoe.org ! * ! * This segment is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * ! * This segment is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! **/ ! package org.opencoe.coe.uam; import org.opencoe.coe.kernel.util.*; import javax.swing.event.*; --- 1,17 ---- /** ! * Copyright (C) 2002, Federal Linux Systems The project home for this software ! * is http://www.opencoe.org This segment is free software; you can ! * redistribute it and/or modify it under the terms of the GNU Lesser General ! * Public License as published by the Free Software Foundation; either version ! * 2.1 of the License, or (at your option) any later version. This segment is ! * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ! * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more ! * details. You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! package org.opencoe.coe.uam; import org.opencoe.coe.kernel.util.*; import javax.swing.event.*; *************** *** 26,111 **** import java.util.Vector; public class _UAM_ManagerModel implements TreeModel { ! private boolean showAncestors; ! private Vector treeModelListeners = new Vector(); ! private _OpenCOETable rootTable; - public _UAM_ManagerModel(_OpenCOETable root) { - showAncestors = false; - rootTable = root; - } //////////////// TreeModel interface implementation /////////////////////// ! /** ! * Adds a listener for the TreeModelEvent posted after the tree changes. ! */ ! public void addTreeModelListener(TreeModelListener l) { ! treeModelListeners.addElement(l); ! } - /** - * Returns the child of parent at index in the parent's child array. - */ - public Object getChild(Object parent, int index) { - _OpenCOETable p = (_OpenCOETable)parent; - //return p.getCombined(index); - return p.getTables(index); - } ! /** ! * Returns the number of children of parent. ! */ ! public int getChildCount(Object parent) { ! _OpenCOETable p = (_OpenCOETable)parent; ! //return p.getCombinedCount(); ! //System.out.println (p.getName()+": has children #: "+p.getTableCount()); ! return p.getTableCount(); ! } - /** - * Returns the index of child in parent. - */ - public int getIndexOfChild(Object parent, Object child) { - _OpenCOETable p = (_OpenCOETable)parent; - //return p.getIndexOfCombined(child); - //System.out.println (p.getName()+": has child at index: "+p.getIndexOfTable((_OpenCOETable)child)); - return p.getIndexOfTable((_OpenCOETable)child); - } ! /** ! * Returns the root of the tree. ! */ ! public Object getRoot() { ! return rootTable; ! } ! /** ! * Returns true if node is a leaf. ! */ ! public boolean isLeaf(Object node) { ! String nodename = node.getClass().getName(); ! if (nodename.equals("org.opencoe.coe.kernel.util._OpenCOETable")){ ! return false; ! } else { ! return true; } - } ! /** ! * Removes a listener previously added with addTreeModelListener(). ! */ ! public void removeTreeModelListener(TreeModelListener l) { ! treeModelListeners.removeElement(l); ! } ! /** ! * Messaged when the user has altered the value for the item ! * identified by path to newValue. Not used by this model. ! */ ! public void valueForPathChanged(TreePath path, Object newValue) { ! //System.out.println("*** valueForPathChanged : " ! // + path + " --> " + newValue); ! } } --- 19,149 ---- import java.util.Vector; + /** + * Description of the Class + * + *@author rbroberg + *@created October 22, 2003 + *@history 20031022:rb:828634 - Change title for UAManager + */ public class _UAM_ManagerModel implements TreeModel { ! private boolean showAncestors; ! private Vector treeModelListeners = new Vector(); ! private _OpenCOETable rootTable; ! ! ! /** ! * Constructor for the _UAM_ManagerModel object ! * ! *@param root Description of the Parameter ! */ ! public _UAM_ManagerModel(_OpenCOETable root) { ! showAncestors = false; ! rootTable = root; ! } //////////////// TreeModel interface implementation /////////////////////// ! /** ! * Adds a listener for the TreeModelEvent posted after the tree changes. ! * ! *@param l The feature to be added to the TreeModelListener attribute ! */ ! public void addTreeModelListener(TreeModelListener l) { ! treeModelListeners.addElement(l); ! } ! /** ! * Returns the child of parent at index in the parent's child array. ! * ! *@param parent Description of the Parameter ! *@param index Description of the Parameter ! *@return The child value ! */ ! public Object getChild(Object parent, int index) { ! _OpenCOETable p = (_OpenCOETable) parent; ! //return p.getCombined(index); ! return p.getTables(index); ! } ! /** ! * Returns the number of children of parent. ! * ! *@param parent Description of the Parameter ! *@return The childCount value ! */ ! public int getChildCount(Object parent) { ! _OpenCOETable p = (_OpenCOETable) parent; ! //return p.getCombinedCount(); ! //System.out.println (p.getName()+": has children #: "+p.getTableCount()); ! return p.getTableCount(); ! } ! ! /** ! * Returns the index of child in parent. ! * ! *@param parent Description of the Parameter ! *@param child Description of the Parameter ! *@return The indexOfChild value ! */ ! public int getIndexOfChild(Object parent, Object child) { ! _OpenCOETable p = (_OpenCOETable) parent; ! //return p.getIndexOfCombined(child); ! //System.out.println (p.getName()+": has child at index: "+p.getIndexOfTable((_OpenCOETable)child)); ! return p.getIndexOfTable((_OpenCOETable) child); } ! /** ! * Returns the root of the tree. ! * ! *@return The root value ! */ ! public Object getRoot() { ! return rootTable; ! } ! ! /** ! * Returns true if node is a leaf. ! * ! *@param node Description of the Parameter ! *@return The leaf value ! */ ! public boolean isLeaf(Object node) { ! String nodename = node.getClass().getName(); ! if (nodename.equals("org.opencoe.coe.kernel.util._OpenCOETable")) { ! return false; ! } else { ! return true; ! } ! ! } ! ! ! /** ! * Removes a listener previously added with addTreeModelListener(). ! * ! *@param l Description of the Parameter ! */ ! public void removeTreeModelListener(TreeModelListener l) { ! treeModelListeners.removeElement(l); ! } ! ! ! /** ! * Messaged when the user has altered the value for the item identified by ! * path to newValue. Not used by this model. ! * ! *@param path Description of the Parameter ! *@param newValue Description of the Parameter ! */ ! public void valueForPathChanged(TreePath path, Object newValue) { ! //System.out.println("*** valueForPathChanged : " ! // + path + " --> " + newValue); ! } } + Index: _UAM_ManagerTree.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/UAM/src/UAM/java/org/opencoe/coe/uam/_UAM_ManagerTree.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** _UAM_ManagerTree.java 21 Jun 2002 22:43:57 -0000 1.2 --- _UAM_ManagerTree.java 23 Oct 2003 02:32:05 -0000 1.3 *************** *** 1,24 **** /** ! * Copyright (C) 2002, Federal Linux Systems ! * ! * The project home for this software is http://www.opencoe.org ! * ! * This segment is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * ! * This segment is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! **/ ! package org.opencoe.coe.uam; import org.opencoe.coe.kernel.util.*; import javax.swing.*; --- 1,17 ---- /** ! * Copyright (C) 2002, Federal Linux Systems The project home for this software ! * is http://www.opencoe.org This segment is free software; you can ! * redistribute it and/or modify it under the terms of the GNU Lesser General ! * Public License as published by the Free Software Foundation; either version ! * 2.1 of the License, or (at your option) any later version. This segment is ! * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ! * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more ! * details. You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! package org.opencoe.coe.uam; import org.opencoe.coe.kernel.util.*; import javax.swing.*; *************** *** 26,68 **** import javax.swing.event.*; public class _UAM_ManagerTree extends JTree { ! _UAM_ManagerModel model; - public _UAM_ManagerTree(_OpenCOETable graphNode) { - super(new _UAM_ManagerModel(graphNode)); - getSelectionModel().setSelectionMode( - TreeSelectionModel.SINGLE_TREE_SELECTION); - //DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer(); - //Icon appIcon = new ImageIcon("COE_HOME/data/Icons/gnome-run.png"); - //Icon profIcon = new ImageIcon("COE_HOME/data/Icons/gnome-folder.png"); - //renderer.setLeafIcon(appIcon); - //renderer.setClosedIcon(profIcon); - //renderer.setOpenIcon(profIcon); - //setCellRenderer(renderer); ! //Listen for when the selection changes. ! addTreeSelectionListener(new TreeSelectionListener() { ! public void valueChanged(TreeSelectionEvent e) { ! //DefaultMutableTreeNode node = (DefaultMutableTreeNode) ! //getLastSelectedPathComponent(); ! Object node = (Object) ! getLastSelectedPathComponent(); ! ! if (node == null) return; ! ! // Object nodeInfo = node.getUserObject(); ! //if (_UAM_ManagerModel.isLeaf(node)) { ! String nodename = node.getClass().getName(); ! if (nodename.equals("org.opencoe.coe.kernel.util._OpenCOEAttr")){ ! _OpenCOEAttr n = (_OpenCOEAttr)node; ! //String c = n.getExecPath(); ! //System.out.println("Attr node: "+n.getAttr()+" : "+n.getValue()); ! //_OpenCOECmdExec launch_app = new _OpenCOECmdExec(c, true); ! } else { ! //System.out.println("Table node:"); ! } ! } ! }); ! } } --- 19,78 ---- import javax.swing.event.*; + /** + * Description of the Class + * + *@author rbroberg + *@created October 22, 2003 + *@history 20031022:rb:828634 - Change title for UAManager + */ public class _UAM_ManagerTree extends JTree { ! _UAM_ManagerModel model; ! /** ! * Constructor for the _UAM_ManagerTree object ! * ! *@param graphNode Description of the Parameter ! */ ! public _UAM_ManagerTree(_OpenCOETable graphNode) { ! super(new _UAM_ManagerModel(graphNode)); ! getSelectionModel().setSelectionMode( ! TreeSelectionModel.SINGLE_TREE_SELECTION); ! //DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer(); ! //Icon appIcon = new ImageIcon("COE_HOME/data/Icons/gnome-run.png"); ! //Icon profIcon = new ImageIcon("COE_HOME/data/Icons/gnome-folder.png"); ! //renderer.setLeafIcon(appIcon); ! //renderer.setClosedIcon(profIcon); ! //renderer.setOpenIcon(profIcon); ! //setCellRenderer(renderer); ! //Listen for when the selection changes. ! addTreeSelectionListener( ! new TreeSelectionListener() { ! ! public void valueChanged(TreeSelectionEvent e) { ! //DefaultMutableTreeNode node = (DefaultMutableTreeNode) ! //getLastSelectedPathComponent(); ! Object node = (Object) ! getLastSelectedPathComponent(); ! ! if (node == null) { ! return; ! } ! ! // Object nodeInfo = node.getUserObject(); ! //if (_UAM_ManagerModel.isLeaf(node)) { ! String nodename = node.getClass().getName(); ! if (nodename.equals("org.opencoe.coe.kernel.util._OpenCOEAttr")) { ! _OpenCOEAttr n = (_OpenCOEAttr) node; ! //String c = n.getExecPath(); ! //System.out.println("Attr node: "+n.getAttr()+" : "+n.getValue()); ! //_OpenCOECmdExec launch_app = new _OpenCOECmdExec(c, true); ! } else { ! //System.out.println("Table node:"); ! } ! } ! }); ! } } + |
From: <rbr...@us...> - 2003-10-19 17:23:20
|
Update of /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps In directory sc8-pr-cvs1:/tmp/cvs-serv15293/java/org/opencoe/coe/kernel/apps Modified Files: COEInstaller.java COEInstallerSourceDialog.java Log Message: 20031019:rb:821280 - COEInstaller handles URI poorly Index: COEInstaller.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/COEInstaller.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** COEInstaller.java 18 Oct 2003 18:00:38 -0000 1.9 --- COEInstaller.java 19 Oct 2003 17:04:24 -0000 1.10 *************** *** 19,34 **** * JFrame.java * ! * Created on January 29, 2001, 1:02 PM * 20031018:rb:825985 - COEInstaller S/W row cells should not be editable * 20031018:rb:825973 - COEInstaller Available Disks not used */ - /** - *@author rbroberg - *@created October 6, 2003 - *@version - */ - - public class COEInstaller extends javax.swing.JFrame { --- 19,30 ---- * JFrame.java * ! * @author rbroberg ! * @created January 29, 2001, 1:01 PM ! * @version ! * 20031019:rb:821280 - COEInstaller handles URI poorly * 20031018:rb:825985 - COEInstaller S/W row cells should not be editable * 20031018:rb:825973 - COEInstaller Available Disks not used */ public class COEInstaller extends javax.swing.JFrame { *************** *** 111,114 **** --- 107,115 ---- buttonInstallButton = new javax.swing.JButton(); buttonExitButton = new javax.swing.JButton(); + + // 20031019:rb:821280 - COEInstaller handles URI poorly + srcDialog = new COEInstallerSourceDialog(this, true); + srcDialog.setResizable(true); + srcDialog.setSize(450, 250); //20031006:rb - Use Coe Env Variables to set install path *************** *** 497,501 **** instArray = getInstalled(); swInstalledTableModel.setData(instArray); ! swInstalledTable= new javax.swing.JTable(swInstalledTableModel); swInstalledTable.tableChanged(new javax.swing.event.TableModelEvent(swInstalledTableModel)); swInstalledScrollPanel.setViewportView(swInstalledTable); --- 498,502 ---- instArray = getInstalled(); swInstalledTableModel.setData(instArray); ! swInstalledTable = new javax.swing.JTable(swInstalledTableModel); swInstalledTable.tableChanged(new javax.swing.event.TableModelEvent(swInstalledTableModel)); swInstalledScrollPanel.setViewportView(swInstalledTable); *************** *** 532,538 **** //20031018:rb:825985 - COEInstaller S/W row cells should not be editable ! swAvailableTableModel = new javax.swing.table.DefaultTableModel( ! new String[]{"Type", "Name", "Version", "Class", "Size", "Dir"}, 0) ! { public boolean isCellEditable(int row, int column) { return false;} }; swAvailableTable = new javax.swing.JTable(swAvailableTableModel); --- 533,543 ---- //20031018:rb:825985 - COEInstaller S/W row cells should not be editable ! swAvailableTableModel = ! new javax.swing.table.DefaultTableModel( ! new String[]{"Type", "Name", "Version", "Class", "Size", "Dir"}, 0) { ! public boolean isCellEditable(int row, int column) { ! return false; ! } ! }; swAvailableTable = new javax.swing.JTable(swAvailableTableModel); *************** *** 687,690 **** --- 692,696 ---- } + //# +----|----+----|----+----|----+----|----+----|----+----|----+----|----+----| //# End the graphical init for COE Installer *************** *** 827,831 **** if (cfgSourceLabel2.getText().equals("ftp")) { // make dir for seginfo ! String segdesc = coeEnv.getCoeData()+"/local/SysAdm/NET_SERVER/" + segstr + "/SegDescrip"; String mkdirstr = "/bin/mkdir -p " + segdesc; _OpenCOECmdExec mkdir = new _OpenCOECmdExec(mkdirstr); --- 833,837 ---- if (cfgSourceLabel2.getText().equals("ftp")) { // make dir for seginfo ! String segdesc = coeEnv.getCoeData() + "/local/SysAdm/NET_SERVER/" + segstr + "/SegDescrip"; String mkdirstr = "/bin/mkdir -p " + segdesc; _OpenCOECmdExec mkdir = new _OpenCOECmdExec(mkdirstr); *************** *** 834,839 **** ftpsrc = new FtpDownload("rhinohide.cx", cfgSourceLabel6.getText() + "/" + segstr + "/SegDescrip/SegName", segdesc); System.out.println("FTP seg download start"); ! repstr = coeEnv.getCoeData()+"/local/SysAdm/NET_SERVER"; ! //20031006:rb - set path based on Coe Env variables. //pathstr = pathstr + getTypePath(repstr, segstr); --- 840,845 ---- ftpsrc = new FtpDownload("rhinohide.cx", cfgSourceLabel6.getText() + "/" + segstr + "/SegDescrip/SegName", segdesc); System.out.println("FTP seg download start"); ! repstr = coeEnv.getCoeData() + "/local/SysAdm/NET_SERVER"; ! //20031006:rb - set path based on Coe Env variables. //pathstr = pathstr + getTypePath(repstr, segstr); *************** *** 916,922 **** */ private void showCOEInstallerSourceDialog() { - COEInstallerSourceDialog srcDialog = new COEInstallerSourceDialog(this, true); - srcDialog.setResizable(true); - srcDialog.setSize(450, 250); srcDialog.show(); //System.out.println(srcDialog.getSource()); --- 922,925 ---- *************** *** 1007,1012 **** if (cfgSourceLabel2.getText().equals("ftp")) { System.out.println("FTP download start"); ! FtpDownload ftpsrc = new FtpDownload("rhinohide.cx", path + "/toc", coeEnv.getCoeData()+"/local/SysAdm/NET_SERVER"); ! path = coeEnv.getCoeData()+"/local/SysAdm/NET_SERVER"; System.out.println("FTP download end"); } --- 1010,1015 ---- if (cfgSourceLabel2.getText().equals("ftp")) { System.out.println("FTP download start"); ! FtpDownload ftpsrc = new FtpDownload("rhinohide.cx", path + "/toc", coeEnv.getCoeData() + "/local/SysAdm/NET_SERVER"); ! path = coeEnv.getCoeData() + "/local/SysAdm/NET_SERVER"; System.out.println("FTP download end"); } *************** *** 1120,1125 **** /* * set type install path based on type (subtype) ! */ ! //20031006:rb - Use Coe Env Variables to set install path based on type if (type.equals("COTS")) { --- 1123,1128 ---- /* * set type install path based on type (subtype) ! */ ! //20031006:rb - Use Coe Env Variables to set install path based on type if (type.equals("COTS")) { *************** *** 1282,1286 **** private javax.swing.JScrollPane cfgDiskTableScrollPane; private javax.swing.JTable cfgDiskTable; ! private javax.swing.table.TableModel cfgDiskTableModel; private javax.swing.ListSelectionModel cfgDiskTableLSM; private javax.swing.JPanel cfgDiskButtonPanel; --- 1285,1289 ---- private javax.swing.JScrollPane cfgDiskTableScrollPane; private javax.swing.JTable cfgDiskTable; ! private javax.swing.table.TableModel cfgDiskTableModel; private javax.swing.ListSelectionModel cfgDiskTableLSM; private javax.swing.JPanel cfgDiskButtonPanel; *************** *** 1313,1428 **** //20031006:rb - Use Coe Env Variables to set install path private org.opencoe.coe.kernel.util._OpenCOEEnv coeEnv; ! ! // 20031018:rb:825985 - COEInstaller S/W row cells should not be editable ! class COEInstallerTableModel extends javax.swing.table.AbstractTableModel { ! final String[] columnNames = {"Type", "Name", "Version", "Class", "Size", "Dir"}; ! private Object[][] data = {{"", "", "", "", "", ""}}; ! ! private boolean DEBUG = true; ! ! public void setData (Object[][] tmp) { ! data = tmp; ! } ! public int getColumnCount() { ! return columnNames.length; ! } ! ! public int getRowCount() { ! //return data.length/columnNames.length; ! return data.length; ! } ! public String getColumnName(int col) { ! return columnNames[col]; ! } ! public Object getValueAt(int row, int col) { ! System.out.println("row: "+row); ! System.out.println("col: "+col); ! System.out.println("rowcnt: "+getRowCount()); ! System.out.println("colcnt: "+getColumnCount()); ! if (row < getRowCount() && col <getColumnCount()) { ! return data[row][col]; ! } else { ! return null; } - } - /* - * JTable uses this method to determine the default renderer/ - * editor for each cell. If we didn't implement this method, - * then the last column would contain text ("true"/"false"), - * rather than a check box. - */ - public Class getColumnClass(int c) { - return getValueAt(0, c).getClass(); - } ! /* ! * Don't need to implement this method unless your table's ! * editable. ! */ ! public boolean isCellEditable(int row, int col) { ! return false; ! } - /* - * Don't need to implement this method unless your table's - * data can change. - */ - public void setValueAt(Object value, int row, int col) { - if (DEBUG) { - System.out.println("Setting value at " + row + "," + col - + " to " + value - + " (an instance of " - + value.getClass() + ")"); - } ! if (data[0][col] instanceof Integer ! && !(value instanceof Integer)) { ! //With JFC/Swing 1.1 and JDK 1.2, we need to create ! //an Integer from the value; otherwise, the column ! //switches to contain Strings. Starting with v 1.3, ! //the table automatically converts value to an Integer, ! //so you only need the code in the 'else' part of this ! //'if' block. ! //XXX: See TableEditDemo.java for a better solution!!! ! try { ! data[row][col] = new Integer(value.toString()); ! fireTableCellUpdated(row, col); ! } catch (NumberFormatException e) { ! System.err.println("The \"" + getColumnName(col) + "\" column accepts only integer values."); ! } ! } else { ! data[row][col] = value; ! fireTableCellUpdated(row, col); ! } - if (DEBUG) { - System.out.println("New value of data:"); - printDebugData(); - } - } ! private void printDebugData() { ! int numRows = getRowCount(); ! int numCols = getColumnCount(); - for (int i=0; i < numRows; i++) { - System.out.print(" row " + i + ":"); - for (int j=0; j < numCols; j++) { - System.out.print(" " + data[i][j]); - } - System.out.println(); - } - System.out.println("--------------------------"); - } - } - } --- 1316,1492 ---- //20031006:rb - Use Coe Env Variables to set install path private org.opencoe.coe.kernel.util._OpenCOEEnv coeEnv; ! // 20031019:rb:821280 - COEInstaller handles URI poorly ! private org.opencoe.coe.kernel.apps.COEInstallerSourceDialog srcDialog; ! // 20031018:rb:825985 - COEInstaller S/W row cells should not be editable ! /** ! * Description of the Class ! * ! *@author rbroberg ! *@created October 18, 2003 ! */ ! class COEInstallerTableModel extends javax.swing.table.AbstractTableModel { ! final String[] columnNames = {"Type", "Name", "Version", "Class", "Size", "Dir"}; ! private Object[][] data = {{"", "", "", "", "", ""}}; ! private boolean DEBUG = false; ! /** ! * Sets the data attribute of the COEInstallerTableModel object ! * ! *@param tmp The new data value ! */ ! public void setData(Object[][] tmp) { ! data = tmp; } ! /** ! * Gets the columnCount attribute of the COEInstallerTableModel object ! * ! *@return The columnCount value ! */ ! public int getColumnCount() { ! return columnNames.length; ! } ! /** ! * Gets the rowCount attribute of the COEInstallerTableModel object ! * ! *@return The rowCount value ! */ ! public int getRowCount() { ! //return data.length/columnNames.length; ! return data.length; ! } ! /** ! * Gets the columnName attribute of the COEInstallerTableModel object ! * ! *@param col Description of the Parameter ! *@return The columnName value ! */ ! public String getColumnName(int col) { ! return columnNames[col]; ! } + /** + * Gets the valueAt attribute of the COEInstallerTableModel object + * + *@param row Description of the Parameter + *@param col Description of the Parameter + *@return The valueAt value + */ + public Object getValueAt(int row, int col) { + if (row < getRowCount() && col < getColumnCount()) { + return data[row][col]; + } else { + return null; + } + } + + + /* + * JTable uses this method to determine the default renderer/ + * editor for each cell. If we didn't implement this method, + * then the last column would contain text ("true"/"false"), + * rather than a check box. + */ + /** + * Gets the columnClass attribute of the COEInstallerTableModel object + * + *@param c Description of the Parameter + *@return The columnClass value + */ + public Class getColumnClass(int c) { + return getValueAt(0, c).getClass(); + } + + + /* + * Don't need to implement this method unless your table's + * editable. + */ + /** + * Gets the cellEditable attribute of the COEInstallerTableModel object + * + *@param row Description of the Parameter + *@param col Description of the Parameter + *@return The cellEditable value + */ + public boolean isCellEditable(int row, int col) { + return false; + } + + + /* + * Don't need to implement this method unless your table's + * data can change. + */ + /** + * Sets the valueAt attribute of the COEInstallerTableModel object + * + *@param value The new valueAt value + *@param row The new valueAt value + *@param col The new valueAt value + */ + public void setValueAt(Object value, int row, int col) { + if (DEBUG) { + System.out.println("Setting value at " + row + "," + col + + " to " + value + + " (an instance of " + + value.getClass() + ")"); + } + + if (data[0][col] instanceof Integer + && !(value instanceof Integer)) { + //With JFC/Swing 1.1 and JDK 1.2, we need to create + //an Integer from the value; otherwise, the column + //switches to contain Strings. Starting with v 1.3, + //the table automatically converts value to an Integer, + //so you only need the code in the 'else' part of this + //'if' block. + //XXX: See TableEditDemo.java for a better solution!!! + try { + data[row][col] = new Integer(value.toString()); + fireTableCellUpdated(row, col); + } catch (NumberFormatException e) { + System.err.println("The \"" + getColumnName(col) + "\" column accepts only integer values."); + } + } else { + data[row][col] = value; + fireTableCellUpdated(row, col); + } + + if (DEBUG) { + System.out.println("New value of data:"); + printDebugData(); + } + } + /** + * Description of the Method + */ + private void printDebugData() { + int numRows = getRowCount(); + int numCols = getColumnCount(); + + for (int i = 0; i < numRows; i++) { + System.out.print(" row " + i + ":"); + for (int j = 0; j < numCols; j++) { + System.out.print(" " + data[i][j]); + } + System.out.println(); + } + System.out.println("--------------------------"); + } + } + + } Index: COEInstallerSourceDialog.java =================================================================== RCS file: /cvsroot/opencoe/coekernel/src/COE/src/COE/java/org/opencoe/coe/kernel/apps/COEInstallerSourceDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** COEInstallerSourceDialog.java 20 May 2002 22:41:20 -0000 1.2 --- COEInstallerSourceDialog.java 19 Oct 2003 17:04:24 -0000 1.3 *************** *** 1,326 **** /** ! * Copyright (C) 2002, Federal Linux Systems ! * ! * The project home for this software is http://www.opencoe.org ! * ! * This segment is free software; you can redistribute it and/or ! * modify it under the terms of the GNU Lesser General Public ! * License as published by the Free Software Foundation; either ! * version 2.1 of the License, or (at your option) any later version. ! * ! * This segment is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! * Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! * ! **/ ! package org.opencoe.coe.kernel.apps; import org.opencoe.coe.kernel.util.*; /* ! * COEInstallerSourceDialog.java * ! * Created on March 24, 2001, 12:24 PM */ - - /** ! * ! * @author root ! * @version */ ! public class COEInstallerSourceDialog ! extends java.awt.Dialog implements java.awt.event.ActionListener{ ! /** Creates new form COEInstallerSourceDialog */ ! public COEInstallerSourceDialog(java.awt.Frame parent,boolean modal) { ! super (parent, modal); ! initComponents (); ! pack (); ! } - /** This method is called from within the init() method to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the FormEditor. - */ - private void initComponents () {//GEN-BEGIN:initComponents - sdMainPanel = new javax.swing.JPanel (); - //sdCheckBoxGroup = new javax.swing.CheckBoxGroup(); - cdromPanel = new javax.swing.JPanel (); - cdromCheckBox = new javax.swing.JCheckBox (); - cdromTextField = new javax.swing.JTextField (); - diskPanel = new javax.swing.JPanel (); - diskCheckBox = new javax.swing.JCheckBox (); - diskTextField = new javax.swing.JTextField (); - ftpPanel = new javax.swing.JPanel (); - ftpCheckBox = new javax.swing.JCheckBox (); - ftpTextField = new javax.swing.JTextField (); - scpPanel = new javax.swing.JPanel (); - scpCheckBox = new javax.swing.JCheckBox (); - scpTextField = new javax.swing.JTextField (); - sdButtonPanel = new javax.swing.JPanel (); - sdOkButton = new javax.swing.JButton (); - sdCancelButton = new javax.swing.JButton (); - setLayout (new javax.swing.BoxLayout (this, 1)); - addWindowListener (new java.awt.event.WindowAdapter () { - public void windowClosing (java.awt.event.WindowEvent evt) { - closeDialog (evt); - } - } - ); ! sdMainPanel.setLayout (new javax.swing.BoxLayout (sdMainPanel, 1)); ! cdromPanel.setLayout (new javax.swing.BoxLayout (cdromPanel, 0)); ! ! cdromCheckBox.setText ("CDROM"); ! cdromCheckBox.setEnabled (false); ! cdromCheckBox.setActionCommand ("CDROM"); ! //cdromCheckBox.addActionListener (this); ! ! cdromPanel.add (cdromCheckBox); ! ! cdromTextField.setEditable (false); ! cdromTextField.setColumns (16); ! cdromTextField.setText ("/cdrom"); ! ! cdromPanel.add (cdromTextField); ! ! sdMainPanel.add (cdromPanel); ! ! diskPanel.setLayout (new javax.swing.BoxLayout (diskPanel, 0)); ! ! diskCheckBox.setText ("DISK"); ! diskCheckBox.setSelected(true); ! diskCheckBox.addActionListener (this); ! ! diskPanel.add (diskCheckBox); ! ! diskTextField.setPreferredSize (new java.awt.Dimension(176, 20)); ! diskTextField.setColumns (16); ! diskTextField.setText ("file://localhost/h/NET_SERVER"); ! ! diskPanel.add (diskTextField); ! ! sdMainPanel.add (diskPanel); ! ! ftpPanel.setLayout (new javax.swing.BoxLayout (ftpPanel, 0)); ! ! ftpCheckBox.setText ("FTP"); ! ftpCheckBox.addActionListener (this); ! ! ftpPanel.add (ftpCheckBox); ! ! ftpTextField.setEditable (false); ! ftpTextField.setColumns (16); ! ftpTextField.setText ("ftp://rhinohide.cx/usr/rhinohide/NET_SERVER"); ! ! ftpPanel.add (ftpTextField); ! ! sdMainPanel.add (ftpPanel); ! ! scpPanel.setLayout (new javax.swing.BoxLayout (scpPanel, 0)); ! ! scpCheckBox.setLabel ("SCP"); ! scpCheckBox.setText ("SCP"); ! scpCheckBox.setEnabled (false); ! //scpCheckBox.addActionListener (this); ! ! scpPanel.add (scpCheckBox); ! ! scpTextField.setEditable (false); ! scpTextField.setColumns (16); ! scpTextField.setText ("scp://<hostname>/<directory>"); ! ! scpPanel.add (scpTextField); ! ! sdMainPanel.add (scpPanel); ! ! add (sdMainPanel); ! sdOkButton.setText ("OK"); ! sdOkButton.addActionListener (this); ! sdButtonPanel.add (sdOkButton); ! ! sdCancelButton.setText ("Cancel"); ! sdCancelButton.addActionListener (this); ! sdButtonPanel.add (sdCancelButton); ! ! add (sdButtonPanel); ! }//GEN-END:initComponents ! /** Closes the dialog */ ! private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog ! setVisible (false); ! dispose (); ! }//GEN-LAST:event_closeDialog ! public String getHost () { ! java.util.StringTokenizer st=new java.util.StringTokenizer(currSource, "/"); ! st.nextToken(); ! return (st.nextToken()); ! } ! ! public String getType () { ! java.util.StringTokenizer st=new java.util.StringTokenizer(currSource, "/"); ! java.util.StringTokenizer stt=new java.util.StringTokenizer(st.nextToken(), ":"); ! return (stt.nextToken()); ! } ! ! public String getDir () { ! java.util.StringTokenizer st=new java.util.StringTokenizer(currSource, "/", true); ! st.nextToken(); //type ! st.nextToken(); // first slash ! st.nextToken(); // second slash ! st.nextToken(); // hostname ! String s = new String(""); ! while (st.hasMoreTokens()) { ! s=s+st.nextToken(); ! } ! return (s); ! } ! ! private void setDevice (String dev) { ! currDevice = dev; ! } ! ! public String getDevice () { ! return (currDevice); ! } ! ! private void setSource (String src) { ! currSource = src; ! } ! ! public String getSource () { ! return (currSource); ! } ! ! private void setURI (String src) { ! currSource = src; ! } ! public String getURI () { ! return (currSource); ! } ! ! public void actionPerformed (java.awt.event.ActionEvent evt) { ! Object source = evt.getSource(); ! if (source == sdCancelButton) { ! setVisible (false); ! dispose (); ! } else if (source == sdOkButton) { ! if (cdromCheckBox.isSelected()) { ! setDevice("CDROM"); ! setSource(cdromTextField.getText()); ! } else if (diskCheckBox.isSelected()) { ! setDevice("DISK"); ! setSource(diskTextField.getText()); ! } else if (ftpCheckBox.isSelected()) { ! setDevice("FTP"); ! setSource(ftpTextField.getText()); ! } else if (scpCheckBox.isSelected()) { ! setDevice("SCP"); ! setSource(scpTextField.getText()); ! } ! System.out.println(diskTextField.getText()); ! setVisible (false); ! dispose (); ! } else if (source == cdromCheckBox) { ! setDevice("CDROM"); ! setSource(cdromTextField.getText()); ! diskCheckBox.setSelected (false); ! ftpCheckBox.setSelected (false); ! scpCheckBox.setSelected (false); ! cdromTextField.setEditable (true); ! diskTextField.setEditable (false); ! ftpTextField.setEditable (false); ! scpTextField.setEditable (false); ! } else if (source == diskCheckBox) { ! setDevice("DISK"); ! setSource(diskTextField.getText()); ! ! cdromCheckBox.setSelected (false); ! ftpCheckBox.setSelected (false); ! scpCheckBox.setSelected (false); ! cdromTextField.setEditable (false); ! diskTextField.setEditable (true); ! ftpTextField.setEditable (false); ! scpTextField.setEditable (false); ! } else if (source == ftpCheckBox) { ! setDevice("FTP"); ! setSource(ftpTextField.getText()); ! cdromCheckBox.setSelected (false); ! diskCheckBox.setSelected (false); ! scpCheckBox.setSelected (false); ! cdromTextField.setEditable (false); ! diskTextField.setEditable (false); ! ftpTextField.setEditable (true); ! scpTextField.setEditable (false); ! } else if (source == scpCheckBox) { ! setDevice("SCP"); ! setSource(scpTextField.getText()); ! cdromCheckBox.setSelected (false); ! diskCheckBox.setSelected (false); ! ftpCheckBox.setSelected (false); ! cdromTextField.setEditable (false); ! diskTextField.setEditable (false); ! ftpTextField.setEditable (false); ! scpTextField.setEditable (true); ! } ! } ! /** ! * @param args the command line arguments ! */ ! public static void main (String args[]) { ! new COEInstallerSourceDialog (new java.awt.Frame (), true).show (); ! } ! // Variables declaration - do not modify//GEN-BEGIN:variables ! public String currSource; ! public String currDevice; ! private javax.swing.JPanel sdMainPanel; ! private javax.swing.JPanel cdromPanel; ! private javax.swing.JCheckBox cdromCheckBox; ! private javax.swing.JTextField cdromTextField; ! private javax.swing.JPanel diskPanel; ! private javax.swing.JCheckBox diskCheckBox; ! private javax.swing.JTextField diskTextField; ! private javax.swing.JPanel ftpPanel; ! private javax.swing.JCheckBox ftpCheckBox; ! private javax.swing.JTextField ftpTextField; ! private javax.swing.JPanel scpPanel; ! private javax.swing.JCheckBox scpCheckBox; ! private javax.swing.JTextField scpTextField; ! private javax.swing.JPanel sdButtonPanel; ! private javax.swing.JButton sdOkButton; ! private javax.swing.JButton sdCancelButton; ! // End of variables declaration//GEN-END:variables } --- 1,408 ---- /** ! * Copyright (C) 2002, Federal Linux Systems The project home for this software ! * is http://www.opencoe.org This segment is free software; you can ! * redistribute it and/or modify it under the terms of the GNU Lesser General ! * Public License as published by the Free Software Foundation; either version ! * 2.1 of the License, or (at your option) any later version. This segment is ! * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ! * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more ! * details. You should have received a copy of the GNU Lesser General Public * License along with this segment; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! */ ! package org.opencoe.coe.kernel.apps; import org.opencoe.coe.kernel.util.*; /* ! * COEInstallerSourceDialog.java * ! * Created on March 24, 2001, 12:24 PM ! * 20031019:rb:821280 - COEInstaller handles URI poorly */ /** ! *@author root ! *@created October 19, 2003 ! *@version */ ! public class COEInstallerSourceDialog ! extends java.awt.Dialog implements java.awt.event.ActionListener { ! /** ! * Creates new form COEInstallerSourceDialog ! * ! *@param parent Description of the Parameter ! *@param modal Description of the Parameter ! */ ! public COEInstallerSourceDialog(java.awt.Frame parent, boolean modal) { ! super(parent, "COE Installer Source Dialog", modal); ! initComponents(); ! pack(); ! } ! /** ! * This method is called from within the init() method to initialize the form. ! * WARNING: Do NOT modify this code. The content of this method is always ! * regenerated by the FormEditor. ! */ ! private void initComponents() { ! //GEN-BEGIN:initComponents ! sdMainPanel = new javax.swing.JPanel(); ! //sdCheckBoxGroup = new javax.swing.CheckBoxGroup(); ! cdromPanel = new javax.swing.JPanel(); ! cdromCheckBox = new javax.swing.JCheckBox(); ! cdromTextField = new javax.swing.JTextField(); ! diskPanel = new javax.swing.JPanel(); ! diskCheckBox = new javax.swing.JCheckBox(); ! diskTextField = new javax.swing.JTextField(); ! ftpPanel = new javax.swing.JPanel(); ! ftpCheckBox = new javax.swing.JCheckBox(); ! ftpTextField = new javax.swing.JTextField(); ! scpPanel = new javax.swing.JPanel(); ! scpCheckBox = new javax.swing.JCheckBox(); ! scpTextField = new javax.swing.JTextField(); ! sdButtonPanel = new javax.swing.JPanel(); ! sdOkButton = new javax.swing.JButton(); ! sdCancelButton = new javax.swing.JButton(); ! setLayout(new javax.swing.BoxLayout(this, 1)); ! addWindowListener( ! new java.awt.event.WindowAdapter() { ! public void windowClosing(java.awt.event.WindowEvent evt) { ! closeDialog(evt); ! } ! } ! ); ! sdMainPanel.setLayout(new javax.swing.BoxLayout(sdMainPanel, 1)); ! cdromPanel.setLayout(new javax.swing.BoxLayout(cdromPanel, 0)); + cdromCheckBox.setText("CDROM"); + cdromCheckBox.setEnabled(false); + cdromCheckBox.setActionCommand("CDROM"); + //cdromCheckBox.addActionListener (this); ! cdromPanel.add(cdromCheckBox); ! cdromTextField.setEditable(false); ! cdromTextField.setColumns(16); ! cdromTextField.setText("/cdrom"); ! cdromPanel.add(cdromTextField); ! sdMainPanel.add(cdromPanel); ! diskPanel.setLayout(new javax.swing.BoxLayout(diskPanel, 0)); ! diskCheckBox.setText("DISK"); ! diskCheckBox.setSelected(true); ! diskCheckBox.addActionListener(this); ! diskPanel.add(diskCheckBox); ! diskTextField.setPreferredSize(new java.awt.Dimension(176, 20)); ! diskTextField.setColumns(16); ! //20031019:rb:821280 - COEInstaller handles URI poorly ! //diskTextField.setText("file://localhost/h/data/NET_SERVER"); ! coeEnv = new _OpenCOEEnv(); ! diskTextField.setText("file://localhost"+coeEnv.getCoeHome()+"/data/NET_SERVER"); ! diskPanel.add(diskTextField); ! sdMainPanel.add(diskPanel); ! ftpPanel.setLayout(new javax.swing.BoxLayout(ftpPanel, 0)); ! ftpCheckBox.setText("FTP"); ! ftpCheckBox.addActionListener(this); ! ftpPanel.add(ftpCheckBox); ! ftpTextField.setEditable(false); ! ftpTextField.setColumns(16); ! ftpTextField.setText("ftp://rhinohide.cx/usr/rhinohide/NET_SERVER"); ! ftpPanel.add(ftpTextField); ! sdMainPanel.add(ftpPanel); ! scpPanel.setLayout(new javax.swing.BoxLayout(scpPanel, 0)); ! scpCheckBox.setLabel("SCP"); ! scpCheckBox.setText("SCP"); ! scpCheckBox.setEnabled(false); ! //scpCheckBox.addActionListener (this); + scpPanel.add(scpCheckBox); ! scpTextField.setEditable(false); ! scpTextField.setColumns(16); ! scpTextField.setText("scp://<hostname>/<directory>"); + scpPanel.add(scpTextField); ! sdMainPanel.add(scpPanel); ! ! add(sdMainPanel); ! ! sdOkButton.setText("OK"); ! sdOkButton.addActionListener(this); ! sdButtonPanel.add(sdOkButton); ! ! sdCancelButton.setText("Cancel"); ! sdCancelButton.addActionListener(this); ! sdButtonPanel.add(sdCancelButton); ! ! add(sdButtonPanel); ! ! } ! //GEN-END:initComponents ! ! ! /** ! * Closes the dialog ! * ! *@param evt Description of the Parameter ! */ ! private void closeDialog(java.awt.event.WindowEvent evt) { ! //GEN-FIRST:event_closeDialog ! setVisible(false); ! //20031019:rb:821280 - COEInstaller handles URI poorly ! //dispose(); ! } ! //GEN-LAST:event_closeDialog ! ! ! /** ! * Gets the host attribute of the COEInstallerSourceDialog object ! * ! *@return The host value ! */ ! public String getHost() { ! java.util.StringTokenizer st = new java.util.StringTokenizer(currSource, "/"); ! st.nextToken(); ! return (st.nextToken()); ! } ! ! ! /** ! * Gets the type attribute of the COEInstallerSourceDialog object ! * ! *@return The type value ! */ ! public String getType() { ! java.util.StringTokenizer st = new java.util.StringTokenizer(currSource, "/"); ! java.util.StringTokenizer stt = new java.util.StringTokenizer(st.nextToken(), ":"); ! return (stt.nextToken()); ! } ! ! ! /** ! * Gets the dir attribute of the COEInstallerSourceDialog object ! * ! *@return The dir value ! */ ! public String getDir() { ! java.util.StringTokenizer st = new java.util.StringTokenizer(currSource, "/", true); ! st.nextToken(); ! //type ! st.nextToken(); ! // first slash ! st.nextToken(); ! // second slash ! st.nextToken(); ! // hostname ! String s = new String(""); ! while (st.hasMoreTokens()) { ! s = s + st.nextToken(); ! } ! return (s); ! } ! ! ! /** ! * Sets the device attribute of the COEInstallerSourceDialog object ! * ! *@param dev The new device value ! */ ! private void setDevice(String dev) { ! currDevice = dev; ! } ! ! ! /** ! * Gets the device attribute of the COEInstallerSourceDialog object ! * ! *@return The device value ! */ ! public String getDevice() { ! return (currDevice); ! } ! ! ! /** ! * Sets the source attribute of the COEInstallerSourceDialog object ! * ! *@param src The new source value ! */ ! private void setSource(String src) { ! currSource = src; ! } ! ! ! /** ! * Gets the source attribute of the COEInstallerSourceDialog object ! * ! *@return The source value ! */ ! public String getSource() { ! return (currSource); ! } ! ! ! /** ! * Sets the URI attribute of the COEInstallerSourceDialog object ! * ! *@param src The new uRI value ! */ ! private void setURI(String src) { ! currSource = src; ! } ! ! ! /** ! * Gets the URI attribute of the COEInstallerSourceDialog object ! * ! *@return The uRI value ! */ ! public String getURI() { ! return (currSource); ! } ! ! ! /** ! * Description of the Method ! * ! *@param evt Description of the Parameter ! */ ! public void actionPerformed(java.awt.event.ActionEvent evt) { ! Object source = evt.getSource(); ! if (source == sdCancelButton) { ! setVisible(false); ! dispose(); ! } else if (source == sdOkButton) { ! if (cdromCheckBox.isSelected()) { ! setDevice("CDROM"); ! setSource(cdromTextField.getText()); ! } else if (diskCheckBox.isSelected()) { ! setDevice("DISK"); ! setSource(diskTextField.getText()); ! } else if (ftpCheckBox.isSelected()) { ! setDevice("FTP"); ! setSource(ftpTextField.getText()); ! } else if (scpCheckBox.isSelected()) { ! setDevice("SCP"); ! setSource(scpTextField.getText()); ! } ! ! System.out.println(diskTextField.getText()); ! setVisible(false); ! dispose(); ! } else if (source == cdromCheckBox) { ! setDevice("CDROM"); ! setSource(cdromTextField.getText()); ! ! diskCheckBox.setSelected(false); ! ftpCheckBox.setSelected(false); ! scpCheckBox.setSelected(false); ! ! cdromTextField.setEditable(true); ! diskTextField.setEditable(false); ! ftpTextField.setEditable(false); ! scpTextField.setEditable(false); ! ! } else if (source == diskCheckBox) { ! setDevice("DISK"); ! setSource(diskTextField.getText()); ! ! cdromCheckBox.setSelected(false); ! ftpCheckBox.setSelected(false); ! scpCheckBox.setSelected(false); ! ! cdromTextField.setEditable(false); ! diskTextField.setEditable(true); ! ftpTextField.setEditable(false); ! scpTextField.setEditable(false); ! ! } else if (source == ftpCheckBox) { ! setDevice("FTP"); ! setSource(ftpTextField.getText()); ! ! cdromCheckBox.setSelected(false); ! diskCheckBox.setSelected(false); ! scpCheckBox.setSelected(false); ! ! cdromTextField.setEditable(false); ! diskTextField.setEditable(false); ! ftpTextField.setEditable(true); ! scpTextField.setEditable(false); ! ! } else if (source == scpCheckBox) { ! setDevice("SCP"); ! setSource(scpTextField.getText()); ! ! cdromCheckBox.setSelected(false); ! diskCheckBox.setSelected(false); ! ftpCheckBox.setSelected(false); ! ! cdromTextField.setEditable(false); ! diskTextField.setEditable(false); ! ftpTextField.setEditable(false); ! scpTextField.setEditable(true); ! ! } ! } ! ! ! /** ! *@param args the command line arguments ! */ ! public static void main(String args[]) { ! new COEInstallerSourceDialog(new java.awt.Frame(), true).show(); ! } ! ! ! // Variables declaration - do not modify//GEN-BEGIN:variables ! /** ! * Description of the Field ! */ ! public String currSource; ! /** ! * Description of the Field ! */ ! public String currDevice; ! private javax.swing.JPanel sdMainPanel; ! private javax.swing.JPanel cdromPanel; ! private javax.swing.JCheckBox cdromCheckBox; ! private javax.swing.JTextField cdromTextField; ! private javax.swing.JPanel diskPanel; ! private javax.swing.JCheckBox diskCheckBox; ! private javax.swing.JTextField diskTextField; ! private javax.swing.JPanel ftpPanel; ! private javax.swing.JCheckBox ftpCheckBox; ! private javax.swing.JTextField ftpTextField; ! private javax.swing.JPanel scpPanel; ! private javax.swing.JCheckBox scpCheckBox; ! private javax.swing.JTextField scpTextField; ! private javax.swing.JPanel sdButtonPanel; ! private javax.swing.JButton sdOkButton; ! private javax.swing.JButton sdCancelButton; ! //20031019:rb:821280 - COEInstaller handles URI poorly ! private org.opencoe.coe.kernel.util._OpenCOEEnv coeEnv; ! // End of variables declaration//GEN-END:variables } + |