Changeset 5643
- Timestamp:
- 10/03/08 15:02:50 (7 weeks ago)
- Location:
- trunk
- Files:
-
- 1 added
- 6 modified
-
.classpath (modified) (1 diff)
-
LIB/OmeroJava-Beta4.jar (added)
-
SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java (modified) (8 diffs)
-
SRC/org/openmicroscopy/shoola/env/data/OmeroDataServiceImpl.java (modified) (21 diffs)
-
SRC/org/openmicroscopy/shoola/env/ui/UserNotifierImpl.java (modified) (1 diff)
-
config/about.xml (modified) (1 diff)
-
config/container.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/.classpath
r5641 r5643 23 23 <classpathentry kind="lib" path="LIB/jakarta-oro-2.0.8.jar"/> 24 24 <classpathentry kind="lib" path="LIB/ice-3.3.0.jar"/> 25 <classpathentry kind="lib" path="LIB/OmeroJava- 3.0-Beta3.jar"/>25 <classpathentry kind="lib" path="LIB/OmeroJava-Beta4.jar"/> 26 26 <classpathentry kind="output" path="bin"/> 27 27 </classpath> -
trunk/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java
r5641 r5643 52 52 import org.openmicroscopy.shoola.env.data.util.SearchDataContext; 53 53 import org.openmicroscopy.shoola.env.rnd.RenderingServiceException; 54 55 54 import ome.system.UpgradeCheck; 56 55 import omero.InternalException; … … 75 74 import omero.api.RawPixelsStorePrx; 76 75 import omero.api.RenderingEnginePrx; 77 import omero.api.Search;78 76 import omero.api.SearchPrx; 79 77 import omero.api.ServiceFactoryPrx; 80 78 import omero.api.ThumbnailStorePrx; 81 import omero.constants.CLASSIFICATIONME;82 import omero.constants.CLASSIFICATIONNME;83 import omero.constants.DECLASSIFICATION;84 79 import omero.constants.projection.ProjectionType; 85 80 import omero.model.Annotation; … … 111 106 import omero.sys.EventContext; 112 107 import omero.sys.Parameters; 113 import omero. util.ParametersI;114 import omero. util.PojoOptionsI;108 import omero.sys.ParametersI; 109 import omero.sys.PojoOptions; 115 110 import pojos.ArchivedAnnotationData; 116 111 import pojos.DataObject; … … 241 236 Throwable cause = t.getCause(); 242 237 if (cause instanceof ServerError) { 238 239 243 240 String s = "Cannot access data for security reasons \n"; 244 241 throw new DSAccessException(s+message, t); 245 242 } else 246 throw new DSOutOfServiceException(message, t); 243 244 ; 247 245 } 248 246 … … 736 734 737 735 /** 738 * Reconnects to server. This method should be invoked when the password739 * is reset.740 *741 * @param userName The name of the user who modifies his/her password.742 * @param password The new password.743 */744 private void resetFactory(String userName, String password)745 {746 //First close the previous session747 /*748 logout();749 login = new Login(userName, password);750 entry = new ServiceFactory(server, new Login(userName, password));751 thumbRetrieval = 0;752 */753 }754 755 /**756 736 * Formats the terms to search for. 757 737 * … … 2015 1995 IPojosPrx service = getPojosService(); 2016 1996 Map m = service.findAnnotations(Pixels.class.getName(), ids, null, 2017 (new PojoOptions I().map()));1997 (new PojoOptions().map())); 2018 1998 Collection c = (Collection) m.get(pixelsID); 2019 1999 if (c == null || c.size() == 0) return false; … … 2275 2255 * Modifies the password of the currently logged in user. 2276 2256 * 2277 * @param userName The name of the user whose password has not be changed.2278 2257 * @param password The new password. 2279 2258 * @throws DSOutOfServiceException If the connection is broken, or logged in … … 2281 2260 * retrieve data from OMERO service. 2282 2261 */ 2283 void changePassword(String userName, String password) 2284 throws DSOutOfServiceException, DSAccessException 2285 { 2286 isSessionAlive(); 2287 2262 void changePassword(String password) 2263 throws DSOutOfServiceException, DSAccessException 2264 { 2265 isSessionAlive(); 2288 2266 try { 2289 2267 getAdminService().changePassword(new RString(password)); 2290 resetFactory(userName, password);2291 2268 } catch (Throwable t) { 2292 2269 handleException(t, "Cannot modify password. "); -
trunk/SRC/org/openmicroscopy/shoola/env/data/OmeroDataServiceImpl.java
r5641 r5643 39 39 40 40 //Application-internal dependencies 41 import omero.RLong; 42 import omero.RTime; 41 43 import omero.model.Channel; 42 44 import omero.model.Dataset; … … 49 51 import omero.model.Screen; 50 52 import omero.model.ScreenPlateLink; 51 import omero. util.PojoOptionsI;53 import omero.sys.PojoOptions; 52 54 import org.openmicroscopy.shoola.env.LookupNames; 53 55 import org.openmicroscopy.shoola.env.config.AgentInfo; … … 91 93 92 94 /** 93 * Helper method to return the user's details.94 *95 * @return See above.96 */97 private ExperimenterData getUserDetails()98 {99 return (ExperimenterData) context.lookup(100 LookupNames.CURRENT_USER_DETAILS);101 }102 103 /**104 95 * Unlinks the collection of children from the specified parent. 105 96 * … … 152 143 return loadScreenPlates(rootNodeType, rootNodeIDs, userID); 153 144 } 154 PojoOptions I po = new PojoOptionsI();155 //if (rootNodeIDs == null) po.exp(new RLong(userID));156 //if (withLeaves) po.leaves();157 //else po.noLeaves();145 PojoOptions po = new PojoOptions(); 146 if (rootNodeIDs == null) po.exp(new RLong(userID)); 147 if (withLeaves) po.leaves(); 148 else po.noLeaves(); 158 149 Set parents = gateway.loadContainerHierarchy(rootNodeType, rootNodeIDs, 159 150 po.map()); … … 164 155 165 156 if (klass != null) { 166 po = new PojoOptionsI(); 167 //po.exp(new Long(userID)); 168 //options.allCounts(); 169 //po.noLeaves(); 157 po = new PojoOptions(); 158 po.exp(new RLong(userID)); 159 po.noLeaves(); 170 160 //Set r = gateway.loadContainerHierarchy(klass, null, po.map()); 171 161 Set r = gateway.fetchContainers(klass, userID); … … 207 197 throws DSOutOfServiceException, DSAccessException 208 198 { 209 PojoOptions I po = new PojoOptionsI();210 //po.exp(newLong(userID));199 PojoOptions po = new PojoOptions(); 200 po.exp(new RLong(userID)); 211 201 //po.noLeaves(); 212 202 return gateway.loadContainerHierarchy(rootNodeType, null, po.map()); … … 222 212 { 223 213 try { 224 PojoOptionsI po = new PojoOptionsI(); 225 //po.leaves(); 226 //po.exp(new Long(userID)); 227 //po.countsFor(new Long(userID)); 214 PojoOptions po = new PojoOptions(); 215 po.leaves(); 216 po.exp(new RLong(userID)); 228 217 return gateway.findContainerHierarchy(rootNodeType, leavesIDs, 229 218 po.map()); … … 245 234 //if (forUser) po.exp(new Long(getUserDetails().getId())); 246 235 return gateway.findAnnotations(nodeType, nodeIDs, annotatorIDs, 247 new PojoOptions I().map());236 new PojoOptions().map()); 248 237 } 249 238 … … 255 244 throws DSOutOfServiceException, DSAccessException 256 245 { 257 PojoOptionsI po = new PojoOptionsI(); 258 //po.leaves(); 259 //PojoOptions po = new PojoOptions(); 260 //if (rootNodeIDs == null) po.exp(new Long(userID)); 261 //if (withLeaves) po.leaves(); 262 //else 263 264 //po.countsFor(new Long(userID)); 265 266 return gateway.getContainerImages(nodeType, nodeIDs, po.map()); 246 return gateway.getContainerImages(nodeType, nodeIDs, 247 new PojoOptions().map()); 267 248 } 268 249 … … 274 255 throws DSOutOfServiceException, DSAccessException 275 256 { 276 PojoOptions I po = new PojoOptionsI();277 //po.exp(newLong(userID));257 PojoOptions po = new PojoOptions(); 258 po.exp(new RLong(userID)); 278 259 return gateway.getUserImages(po.map()); 279 260 } … … 292 273 return gateway.getImagesTaggedCount(rootNodeIDs); 293 274 return gateway.getCollectionCount(rootNodeType, property, rootNodeIDs, 294 new PojoOptions I().map());275 new PojoOptions().map()); 295 276 } 296 277 … … 312 293 IObject object = gateway.createObject( 313 294 ModelMapper.createAnnotationAndLink(ho, data), 314 (new PojoOptions I()).map());295 (new PojoOptions()).map()); 315 296 return PojoMapper.asDataObject(ModelMapper.getAnnotatedObject(object)); 316 297 } … … 332 313 if (obj == null) 333 314 throw new NullPointerException("Cannot convert object."); 334 Map options = (new PojoOptions I()).map();315 Map options = (new PojoOptions()).map(); 335 316 336 317 IObject created = gateway.createObject(obj, options); … … 399 380 ModelMapper.unloadCollections(ho); 400 381 IObject updated = gateway.updateObject(ho, 401 (new PojoOptions I()).map());382 (new PojoOptions()).map()); 402 383 return PojoMapper.asDataObject(updated); 403 384 } … … 488 469 } 489 470 if (objects.size() != 0) { 490 gateway.createObjects(objects, (new PojoOptions I()).map());471 gateway.createObjects(objects, (new PojoOptions()).map()); 491 472 } 492 473 } … … 564 545 565 546 objects[index] = gateway.createObject(toCreate[index], 566 (new PojoOptions I()).map());547 (new PojoOptions()).map()); 567 548 index++; 568 549 } … … 588 569 throw new IllegalArgumentException("No DataObject to annotate."); 589 570 590 Map options = (new PojoOptions I()).map();571 Map options = (new PojoOptions()).map(); 591 572 Iterator i = nodes.keySet().iterator(); 592 573 DataObject annotatedObject; … … 638 619 DataObject image; 639 620 List<DataObject> results = new ArrayList<DataObject>(); 640 PojoOptions I po = new PojoOptionsI();641 //po.allExps();621 PojoOptions po = new PojoOptions(); 622 po.allExps(); 642 623 Map map = po.map(); 643 624 while (i.hasNext()) { … … 675 656 if (!uc.getPassword().equals(oldPassword)) return Boolean.FALSE; 676 657 677 gateway.changePassword( uc.getUserName(),newPassword);658 gateway.changePassword(newPassword); 678 659 uc.resetPassword(newPassword); 679 660 return Boolean.TRUE; … … 760 741 throw new NullPointerException("Time not specified."); 761 742 762 PojoOptionsI po = new PojoOptionsI(); 763 /* 743 PojoOptions po = new PojoOptions(); 764 744 po.leaves(); 765 po.exp(new Long(userID)); 766 po.startTime(startTime); 767 po.endTime(endTime); 768 */ 745 po.exp(new RLong(userID)); 746 po.startTime(new RTime(startTime.getTime())); 747 po.endTime(new RTime(endTime.getTime())); 769 748 return gateway.getImages(po.map()); 770 749 } … … 838 817 Map<Integer, Object> results = new HashMap<Integer, Object>(); 839 818 Set<DataObject> nodes; 840 Map pojoMap = new PojoOptions I().map();819 Map pojoMap = new PojoOptions().map(); 841 820 Object v; 842 821 -
trunk/SRC/org/openmicroscopy/shoola/env/ui/UserNotifierImpl.java
r5641 r5643 37 37 import omero.model.FileAnnotation; 38 38 import omero.model.OriginalFile; 39 40 39 import org.openmicroscopy.shoola.env.Container; 41 import org.openmicroscopy.shoola.env.LookupNames;42 40 import org.openmicroscopy.shoola.util.ui.MessengerDialog; 43 41 import org.openmicroscopy.shoola.util.ui.NotificationDialog; 44 42 import org.openmicroscopy.shoola.util.ui.UIUtilities; 45 46 43 import pojos.FileAnnotationData; 47 44 -
trunk/config/about.xml
r5602 r5643 6 6 </p> 7 7 <p> 8 Version: Beta 3.1<br></br>8 Version: Beta4<br></br> 9 9 Build: 05-09-2008<br></br> 10 10 </p> -
trunk/config/container.xml
r5632 r5643 266 266 * etc. 267 267 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> 268 <entry name="Version">Beta 3.1rc3</entry>268 <entry name="Version">Beta4</entry> 269 269 <entry name="SoftwareName">OMERO.insight</entry> 270 270 <entry name="AboutFile">about.xml</entry>
