Changeset 5525
- Timestamp:
- 06/30/08 10:15:48 (3 months ago)
- Location:
- trunk/SRC/org/openmicroscopy/shoola
- Files:
-
- 9 modified
-
agents/imviewer/view/ImViewerComponent.java (modified) (1 diff)
-
agents/treeviewer/view/TreeViewer.java (modified) (1 diff)
-
env/data/DataServicesFactory.java (modified) (1 diff)
-
env/data/OMEROGateway.java (modified) (5 diffs)
-
env/data/OmeroDataService.java (modified) (2 diffs)
-
env/data/OmeroDataServiceImpl.java (modified) (3 diffs)
-
env/data/views/DataHandlerView.java (modified) (2 diffs)
-
env/data/views/DataHandlerViewImpl.java (modified) (1 diff)
-
env/data/views/calls/AdminLoader.java (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java
r5509 r5525 180 180 ((HistoryItem) i.next()).setHighlight(null); 181 181 } 182 item.setHighlight(Color.BLUE); 183 view.setCursor(Cursor.getPredefinedCursor( 184 Cursor.WAIT_CURSOR)); 182 185 model.resetMappingSettings(item.getRndSettings(), true); 183 item.setHighlight(Color.BLUE); 186 view.setCursor(Cursor.getPredefinedCursor( 187 Cursor.DEFAULT_CURSOR)); 184 188 renderXYPlane(); 185 189 } catch (Exception e) { -
trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewer.java
r5514 r5525 747 747 748 748 /** 749 * 750 * @param node 751 * @param set 749 * Browses the images acquired during the passed time interval. 750 * 751 * @param node The node holding the time information. 752 * @param set Tne 752 753 */ 753 754 public void browseTimeInterval(TreeImageTimeSet node, Set set); -
trunk/SRC/org/openmicroscopy/shoola/env/data/DataServicesFactory.java
r5513 r5525 253 253 List<ExperimenterData> exps = new ArrayList<ExperimenterData>(); 254 254 try { 255 groups = omeroGateway.getAvailableGroups( );255 groups = omeroGateway.getAvailableGroups(exp); 256 256 registry.bind(LookupNames.USER_GROUP_DETAILS, groups); 257 257 -
trunk/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java
r5522 r5525 557 557 { 558 558 String n = group.getName(); 559 return ("system".equals(n) || "user".equals(n) || "default".equals(n)); 559 return ("system".equals(n) || "user".equals(n) || "default".equals(n) || 560 "guest".equals(n)); 560 561 } 561 562 … … 1869 1870 1870 1871 /** 1871 * Retrieves the available experimenter groups. 1872 * 1872 * Retrieves the groups visible by the current experimenter. 1873 * 1874 * @param loggedInUser The user currently logged in. 1873 1875 * @return See above. 1874 1876 * @throws DSOutOfServiceException If the connection is broken, or logged in … … 1876 1878 * retrieve data from OMERO service. 1877 1879 */ 1878 Map<GroupData, Set> getAvailableGroups( )1880 Map<GroupData, Set> getAvailableGroups(ExperimenterData loggedInUser) 1879 1881 throws DSOutOfServiceException, DSAccessException 1880 1882 { … … 1882 1884 try { 1883 1885 IAdmin service = getAdminService(); 1886 //Need method server side. 1884 1887 List<ExperimenterGroup> groups = service.lookupGroups(); 1885 1888 Iterator i = groups.iterator(); … … 1889 1892 Map<GroupData, Set> pojos = new HashMap<GroupData, Set>(); 1890 1893 DataObject pojoGroup; 1894 // 1895 List<GroupData> l = loggedInUser.getGroups(); 1896 Iterator<GroupData> k = l.iterator(); 1897 List<Long> groupIds = new ArrayList<Long>(); 1898 while (k.hasNext()) { 1899 groupIds.add(k.next().getId()); 1900 } 1901 1891 1902 while (i.hasNext()) { 1892 1903 group = (ExperimenterGroup) i.next(); 1893 if (!isSystemGroup(group) ) {1904 if (!isSystemGroup(group) && groupIds.contains(group.getId())) { 1894 1905 pojoGroup = PojoMapper.asDataObject(group); 1895 1906 experimenters = containedExperimenters(group.getId()); -
trunk/SRC/org/openmicroscopy/shoola/env/data/OmeroDataService.java
r5514 r5525 41 41 import pojos.DataObject; 42 42 import pojos.ExperimenterData; 43 import pojos.GroupData;44 43 import pojos.ImageData; 45 44 … … 480 479 481 480 /** 482 * Returns a map whose keys are the <code>GroupData</code> objetcs483 * and the values are the <code>ExperimenterData</code>s contained484 * in the group.485 *486 * @return See above.487 * @throws DSOutOfServiceException If the connection is broken, or logged in488 * @throws DSAccessException If an error occured while trying to489 * retrieve data from OMERO service.490 */491 public Map<GroupData, Set> getAvailableGroups()492 throws DSOutOfServiceException, DSAccessException;493 494 /**495 481 * Retrieves and saves the archived files. 496 482 * Returns a map whose keys are the number of archived files retrieves -
trunk/SRC/org/openmicroscopy/shoola/env/data/OmeroDataServiceImpl.java
r5519 r5525 63 63 import pojos.DatasetData; 64 64 import pojos.ExperimenterData; 65 import pojos.GroupData;66 65 import pojos.ImageData; 67 66 import pojos.ProjectData; … … 171 170 if (withLeaves) po.leaves(); 172 171 else po.noLeaves(); 173 //po.countsFor(new Long(userID));174 //If rootNodeIDs, returns the orphaned containers:175 172 Set parents = gateway.loadContainerHierarchy(rootNodeType, rootNodeIDs, 176 173 po.map()); … … 762 759 } 763 760 return results; 764 }765 766 /**767 * Implemented as specified by {@link OmeroDataService}.768 * @see OmeroDataService#getAvailableGroups()769 */770 public Map<GroupData, Set> getAvailableGroups()771 throws DSOutOfServiceException, DSAccessException772 {773 return gateway.getAvailableGroups();774 761 } 775 762 -
trunk/SRC/org/openmicroscopy/shoola/env/data/views/DataHandlerView.java
r5394 r5525 39 39 import org.openmicroscopy.shoola.env.event.AgentEventListener; 40 40 import pojos.AnnotationData; 41 import pojos.CategoryData;42 41 import pojos.DataObject; 43 42 import pojos.ExperimenterData; … … 447 446 AgentEventListener observer); 448 447 449 /**450 * Loads the experimenter groups.451 *452 * @param observer Callback handler.453 * @return A handle that can be used to cancel the call.454 */455 public CallHandle loadAvailableGroups(AgentEventListener observer);456 457 448 } -
trunk/SRC/org/openmicroscopy/shoola/env/data/views/DataHandlerViewImpl.java
r5401 r5525 385 385 return cmd.exec(observer); 386 386 } 387 388 /**389 * Implemented as specified by the view interface.390 * @see DataHandlerView#loadAvailableGroups(AgentEventListener)391 */392 public CallHandle loadAvailableGroups(AgentEventListener observer)393 {394 BatchCallTree cmd = new AdminLoader(-1, AdminLoader.GROUP);395 return cmd.exec(observer);396 }397 387 398 388 /** -
trunk/SRC/org/openmicroscopy/shoola/env/data/views/calls/AdminLoader.java
r5292 r5525 55 55 { 56 56 57 /** Identifies to load the available groups. */58 public static final int GROUP = 0;59 60 57 /** Identifies to load the available and used space. */ 61 58 public static final int SPACE = 1; … … 68 65 69 66 /** 70 * Creates a {@link BatchCall} to retrieve the experimenter groups.71 *72 * @param userID The id of the user or <code>-1</code>.73 * @return The {@link BatchCall}.74 */75 private BatchCall availableGroupsCall(final long userID)76 {77 return new BatchCall("Loading experimenter groups") {78 public void doCall() throws Exception79 {80 OmeroDataService os = context.getDataService();81 result = os.getAvailableGroups();82 }83 };84 }85 86 /**87 67 * Creates a {@link BatchCall} to retrieve the available and used 88 68 * disk space. … … 93 73 private BatchCall availableSpaceCall(final long userID) 94 74 { 95 return new BatchCall("Loading available and used disk space") {75 return new BatchCall("Loading disk space information") { 96 76 public void doCall() throws Exception 97 77 { … … 163 143 { 164 144 switch (index) { 165 case GROUP:166 loadCall = availableGroupsCall(userID);167 break;168 145 case SPACE: 169 146 loadCall = availableSpaceCall(userID);
