• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.clients
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Changeset
  • Next Changeset →

Changeset 4750

Show
Ignore:
Timestamp:
02/09/07 15:05:24 (22 months ago)
Author:
jburel
Message:

Fixed bug collection problem cf ticket#238

Location:
trunk
Files:
8 modified

  • SRC/org/openmicroscopy/shoola/env/LookupNames.java (modified) (1 diff)
  • SRC/org/openmicroscopy/shoola/env/ui/UserNotifierManager.java (modified) (3 diffs)
  • SRC/org/openmicroscopy/shoola/svc/proxy/CommunicatorProxy.java (modified) (2 diffs)
  • SRC/org/openmicroscopy/shoola/svc/proxy/MessengerReply.java (modified) (2 diffs)
  • SRC/org/openmicroscopy/shoola/svc/proxy/MessengerRequest.java (modified) (2 diffs)
  • SRC/org/openmicroscopy/shoola/svc/proxy/Reply.java (modified) (2 diffs)
  • SRC/org/openmicroscopy/shoola/util/ui/MessengerDialog.java (modified) (3 diffs)
  • config/container.xml (modified) (2 diffs)

Legend:

Unmodified
Added
Removed
  • trunk/SRC/org/openmicroscopy/shoola/env/LookupNames.java

    r4695 r4750  
    117117                                         "/services/LOGIN/omeds/retry-interval"; 
    118118     
     119    /** Field to access the url of the server where to post comments. */ 
     120    public static final String DEBUG_URL_COMMENT =  
     121                                                        "/services/DEBUGGER/hostnameComment"; 
     122     
    119123    /** Field to access the url of the server where to post error messages. */ 
    120     public static final String DEBUG_URL = "/services/DEBUGGER/hostname"; 
     124    public static final String DEBUG_URL_BUG = "/services/DEBUGGER/hostnameBug"; 
    121125     
    122126    /** Field to access the e-mail address used to collect comments. */ 
  • trunk/SRC/org/openmicroscopy/shoola/env/ui/UserNotifierManager.java

    r4702 r4750  
    7979        private static final String     COMMENT_MSG = "comment."; 
    8080         
    81         /** The reply to a messenger request. */ 
    82         private static final String REPLY = "Comments have been successfully " + 
    83                                                                                 "posted"; 
     81        /** Reply when sending the comments. */ 
     82        private static final String     COMMENT_REPLY = "Thanks, your comments have " + 
     83                                                                                        "been successfully posted."; 
     84         
     85        /** Reply when sending the error message. */ 
     86        private static final String     ERROR_REPLY = "Thnaks, the error message " + 
     87                                                                                "has been successfully posted."; 
    8488         
    8589    /** Reference to the container. */ 
    … …  
    96100        { 
    97101                Registry reg = container.getRegistry(); 
    98                 String url = (String) reg.lookup(LookupNames.DEBUG_URL); 
     102                String url; 
     103                boolean bug = true; 
     104                String error = details.getError(); 
     105                if (error == null || error.length() == 0) bug = false; 
     106                if (bug) url = (String) reg.lookup(LookupNames.DEBUG_URL_BUG); 
     107                else url = (String) reg.lookup(LookupNames.DEBUG_URL_COMMENT); 
     108                 
    99109                String teamAddress = (String) reg.lookup(LookupNames.DEBUG_EMAIL); 
    100110                CommunicatorDescriptor desc = new CommunicatorDescriptor 
    … …  
    102112                try { 
    103113                        Communicator c = SvcRegistry.getCommunicator(desc); 
    104                         String error = details.getError(); 
     114                         
    105115                        String reply = ""; 
    106                         if (error == null || error.length() == 0) 
     116                        if (!bug) 
    107117                                c.submitComment(details.getEmail(), details.getComment(),  
    108118                                                                details.getExtra(), reply); 
    109119                        else c.submitError(details.getEmail(), details.getComment(),  
    110120                                        details.getExtra(), error, reply); 
     121                        if (bug) reply += COMMENT_REPLY; 
     122                        else reply += ERROR_REPLY; 
    111123                         
    112                         JOptionPane.showMessageDialog(source, REPLY); 
     124                        JOptionPane.showMessageDialog(source, reply); 
    113125                } catch (Exception e) { 
    114                         e.printStackTrace(); 
    115126                        String s = MESSAGE_START; 
    116127                        if (source.getDialogType() == MessengerDialog.ERROR_TYPE) 
  • trunk/SRC/org/openmicroscopy/shoola/svc/proxy/CommunicatorProxy.java

    r4730 r4750  
    5454 
    5555        /** The tool invoking the service. */ 
    56         private static final String INVOKER_ERROR = "insight_bug"; 
     56        private static final String INVOKER_ERROR = "insight_bugs"; 
    5757         
    5858        /** The tool invoking the service. */ 
    … …  
    107107                    "Couldn't communicate with server (I/O error).", ioe); 
    108108        } 
    109                  
    110109        } 
    111110         
  • trunk/SRC/org/openmicroscopy/shoola/svc/proxy/MessengerReply.java

    r4730 r4750  
    5050        extends Reply 
    5151{ 
    52  
    53         /** The reply to a messenger request. */ 
    54         private static final String REPLY = "Comments have been successfully " + 
    55                                                                                 "posted."; 
    5652         
    5753        /** The reply to send to the user. */ 
    … …  
    7571                throws TransportException 
    7672        { 
    77                 checkStatusCode(response); 
    78                 this.reply += REPLY; 
     73                reply += checkStatusCode(response); 
    7974        } 
    8075 
  • trunk/SRC/org/openmicroscopy/shoola/svc/proxy/MessengerRequest.java

    r4730 r4750  
    113113                this.extra = extra; 
    114114                this.invoker = invoker; 
    115                  
    116115        } 
    117116         
    … …  
    127126         
    128127        //Marshal. 
    129         if (email != null) 
    130                 request.addParameter(EMAIL, email); 
    131         if (comment != null) 
    132                 request.addParameter(COMMENT, comment); 
    133         if (error != null) 
    134                 request.addParameter(ERROR, error); 
    135         if (extra != null) 
    136                 request.addParameter(EXTRA, extra); 
     128        if (email != null) request.addParameter(EMAIL, email); 
     129        if (comment != null) request.addParameter(COMMENT, comment); 
     130        if (error != null) request.addParameter(ERROR, error); 
     131                 
     132        if (extra != null) request.addParameter(EXTRA, extra); 
    137133        request.addParameter(INVOKER, invoker); 
    138134        request.addParameter(JAVA_VERSION,  
  • trunk/SRC/org/openmicroscopy/shoola/svc/proxy/Reply.java

    r4695 r4750  
    5656         *  
    5757         * @param response      The response to handle. 
     58         * @return The message from server. 
    5859         * @throws TransportException If an error occured while transferring data. 
    5960         */ 
    60     protected static void checkStatusCode(HttpMethod response) 
     61    protected static String checkStatusCode(HttpMethod response) 
    6162        throws TransportException 
    6263        { 
    … …  
    7071                    for (int n; (n = reader.read(buf)) != -1;) 
    7172                        str.append(buf, 0, n); 
    72                     throw new TransportException("Couldn't handle request: "+ 
    73                                 str.toString()); 
     73                    return str.toString(); 
    7474                        } catch (Exception e) { 
    7575                                throw new TransportException("Couldn't handle request: "+ 
    7676                                                HttpStatus.getStatusText(status)+"."); 
    7777                        } 
    78                  
    7978            } 
    80              
     79                return null;   
    8180        } 
    8281     
  • trunk/SRC/org/openmicroscopy/shoola/util/ui/MessengerDialog.java

    r4739 r4750  
    3434import java.io.StringWriter; 
    3535import java.util.ArrayList; 
     36import java.util.List; 
     37 
    3638import javax.swing.BorderFactory; 
    3739import javax.swing.Icon; 
    … …  
    266268 
    267269        // Create one of each type of tab stop 
    268         java.util.List list = new ArrayList(); 
     270        List<TabStop> list = new ArrayList<TabStop>(); 
    269271         
    270272        // Create a left-aligned tab stop at 100 pixels from the left margin 
    … …  
    297299         
    298300        // Create a tab set from the tab stops 
    299         TabStop[] tstops = (TabStop[]) list.toArray(new TabStop[0]); 
    300         TabSet tabs = new TabSet(tstops); 
     301        TabSet tabs = new TabSet(list.toArray(new TabStop[0])); 
    301302         
    302303        // Add the tab set to the logical style; 
  • trunk/config/container.xml

    r4729 r4750  
    4242    </structuredEntry> 
    4343     
    44     <!-- Login Service configuration. 
    45     --> 
    4644    <!-- The maximum number of times that the Login Service should attempt 
    4745         to restore a valid link to OMERO server in the background.  
    … …  
    106104         and e-mail address to submit comment. 
    107105    --> 
    108 <entry name="/services/DEBUGGER/hostname">http://users.openmicroscopy.org.uk/~brain/omero/commentcollector.php</entry> 
    109     <entry name="/services/DEBUGGER/email">comments@openmicroscopy.org.uk</entry> 
     106<entry name="/services/DEBUGGER/hostnameComment">http://users.openmicroscopy.org.uk/~brain/omero/commentcollector.php</entry> 
     107<entry name="/services/DEBUGGER/hostnameBug">http://users.openmicroscopy.org.uk/~brain/omero/bugcollector.php</entry> 
     108<entry name="/services/DEBUGGER/email">comments@openmicroscopy.org.uk</entry> 
    110109  </services> 
    111110   

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/