Changeset 4750
- Timestamp:
- 02/09/07 15:05:24 (22 months ago)
- 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 117 117 "/services/LOGIN/omeds/retry-interval"; 118 118 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 119 123 /** 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"; 121 125 122 126 /** Field to access the e-mail address used to collect comments. */ -
trunk/SRC/org/openmicroscopy/shoola/env/ui/UserNotifierManager.java
r4702 r4750 79 79 private static final String COMMENT_MSG = "comment."; 80 80 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."; 84 88 85 89 /** Reference to the container. */ … … 96 100 { 97 101 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 99 109 String teamAddress = (String) reg.lookup(LookupNames.DEBUG_EMAIL); 100 110 CommunicatorDescriptor desc = new CommunicatorDescriptor … … 102 112 try { 103 113 Communicator c = SvcRegistry.getCommunicator(desc); 104 String error = details.getError();114 105 115 String reply = ""; 106 if ( error == null || error.length() == 0)116 if (!bug) 107 117 c.submitComment(details.getEmail(), details.getComment(), 108 118 details.getExtra(), reply); 109 119 else c.submitError(details.getEmail(), details.getComment(), 110 120 details.getExtra(), error, reply); 121 if (bug) reply += COMMENT_REPLY; 122 else reply += ERROR_REPLY; 111 123 112 JOptionPane.showMessageDialog(source, REPLY);124 JOptionPane.showMessageDialog(source, reply); 113 125 } catch (Exception e) { 114 e.printStackTrace();115 126 String s = MESSAGE_START; 116 127 if (source.getDialogType() == MessengerDialog.ERROR_TYPE) -
trunk/SRC/org/openmicroscopy/shoola/svc/proxy/CommunicatorProxy.java
r4730 r4750 54 54 55 55 /** The tool invoking the service. */ 56 private static final String INVOKER_ERROR = "insight_bug ";56 private static final String INVOKER_ERROR = "insight_bugs"; 57 57 58 58 /** The tool invoking the service. */ … … 107 107 "Couldn't communicate with server (I/O error).", ioe); 108 108 } 109 110 109 } 111 110 -
trunk/SRC/org/openmicroscopy/shoola/svc/proxy/MessengerReply.java
r4730 r4750 50 50 extends Reply 51 51 { 52 53 /** The reply to a messenger request. */54 private static final String REPLY = "Comments have been successfully " +55 "posted.";56 52 57 53 /** The reply to send to the user. */ … … 75 71 throws TransportException 76 72 { 77 checkStatusCode(response); 78 this.reply += REPLY; 73 reply += checkStatusCode(response); 79 74 } 80 75 -
trunk/SRC/org/openmicroscopy/shoola/svc/proxy/MessengerRequest.java
r4730 r4750 113 113 this.extra = extra; 114 114 this.invoker = invoker; 115 116 115 } 117 116 … … 127 126 128 127 //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); 137 133 request.addParameter(INVOKER, invoker); 138 134 request.addParameter(JAVA_VERSION, -
trunk/SRC/org/openmicroscopy/shoola/svc/proxy/Reply.java
r4695 r4750 56 56 * 57 57 * @param response The response to handle. 58 * @return The message from server. 58 59 * @throws TransportException If an error occured while transferring data. 59 60 */ 60 protected static voidcheckStatusCode(HttpMethod response)61 protected static String checkStatusCode(HttpMethod response) 61 62 throws TransportException 62 63 { … … 70 71 for (int n; (n = reader.read(buf)) != -1;) 71 72 str.append(buf, 0, n); 72 throw new TransportException("Couldn't handle request: "+ 73 str.toString()); 73 return str.toString(); 74 74 } catch (Exception e) { 75 75 throw new TransportException("Couldn't handle request: "+ 76 76 HttpStatus.getStatusText(status)+"."); 77 77 } 78 79 78 } 80 79 return null; 81 80 } 82 81 -
trunk/SRC/org/openmicroscopy/shoola/util/ui/MessengerDialog.java
r4739 r4750 34 34 import java.io.StringWriter; 35 35 import java.util.ArrayList; 36 import java.util.List; 37 36 38 import javax.swing.BorderFactory; 37 39 import javax.swing.Icon; … … 266 268 267 269 // Create one of each type of tab stop 268 java.util.List list = new ArrayList();270 List<TabStop> list = new ArrayList<TabStop>(); 269 271 270 272 // Create a left-aligned tab stop at 100 pixels from the left margin … … 297 299 298 300 // 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])); 301 302 302 303 // Add the tab set to the logical style; -
trunk/config/container.xml
r4729 r4750 42 42 </structuredEntry> 43 43 44 <!-- Login Service configuration.45 -->46 44 <!-- The maximum number of times that the Login Service should attempt 47 45 to restore a valid link to OMERO server in the background. … … 106 104 and e-mail address to submit comment. 107 105 --> 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> 110 109 </services> 111 110
