• 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 5525

Show
Ignore:
Timestamp:
06/30/08 10:15:48 (3 months ago)
Author:
jburel
Message:

Cleaning code and modified group selection

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  
    180180                                                        ((HistoryItem) i.next()).setHighlight(null); 
    181181                                                } 
     182                                                item.setHighlight(Color.BLUE); 
     183                                                view.setCursor(Cursor.getPredefinedCursor( 
     184                                                                Cursor.WAIT_CURSOR)); 
    182185                                                model.resetMappingSettings(item.getRndSettings(), true); 
    183                                                 item.setHighlight(Color.BLUE); 
     186                                                view.setCursor(Cursor.getPredefinedCursor( 
     187                                                                Cursor.DEFAULT_CURSOR)); 
    184188                                                renderXYPlane(); 
    185189                                        } catch (Exception e) { 
  • trunk/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewer.java

    r5514 r5525  
    747747 
    748748        /** 
    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  
    752753         */ 
    753754        public void browseTimeInterval(TreeImageTimeSet node, Set set); 
  • trunk/SRC/org/openmicroscopy/shoola/env/data/DataServicesFactory.java

    r5513 r5525  
    253253        List<ExperimenterData> exps = new ArrayList<ExperimenterData>(); 
    254254        try { 
    255                  groups = omeroGateway.getAvailableGroups(); 
     255                 groups = omeroGateway.getAvailableGroups(exp); 
    256256                 registry.bind(LookupNames.USER_GROUP_DETAILS, groups); 
    257257                  
  • trunk/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java

    r5522 r5525  
    557557        { 
    558558                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)); 
    560561        } 
    561562 
    … …  
    18691870         
    18701871        /** 
    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. 
    18731875         * @return See above. 
    18741876         * @throws DSOutOfServiceException If the connection is broken, or logged in 
    … …  
    18761878         * retrieve data from OMERO service.  
    18771879         */ 
    1878         Map<GroupData, Set> getAvailableGroups() 
     1880        Map<GroupData, Set> getAvailableGroups(ExperimenterData loggedInUser) 
    18791881                throws DSOutOfServiceException, DSAccessException 
    18801882        { 
    … …  
    18821884                try { 
    18831885                        IAdmin service = getAdminService(); 
     1886                        //Need method server side. 
    18841887                        List<ExperimenterGroup> groups = service.lookupGroups(); 
    18851888                        Iterator i = groups.iterator(); 
    … …  
    18891892                        Map<GroupData, Set> pojos = new HashMap<GroupData, Set>(); 
    18901893                        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                         
    18911902                        while (i.hasNext()) { 
    18921903                                group = (ExperimenterGroup) i.next(); 
    1893                                 if (!isSystemGroup(group)) { 
     1904                                if (!isSystemGroup(group) && groupIds.contains(group.getId())) { 
    18941905                                        pojoGroup = PojoMapper.asDataObject(group); 
    18951906                                        experimenters = containedExperimenters(group.getId()); 
  • trunk/SRC/org/openmicroscopy/shoola/env/data/OmeroDataService.java

    r5514 r5525  
    4141import pojos.DataObject; 
    4242import pojos.ExperimenterData; 
    43 import pojos.GroupData; 
    4443import pojos.ImageData; 
    4544 
    … …  
    480479 
    481480        /** 
    482          * Returns a map whose keys are the <code>GroupData</code> objetcs 
    483          * and the values are the <code>ExperimenterData</code>s contained 
    484          * in the group. 
    485          *  
    486          * @return See above. 
    487          * @throws DSOutOfServiceException If the connection is broken, or logged in 
    488          * @throws DSAccessException If an error occured while trying to  
    489          * retrieve data from OMERO service.  
    490          */ 
    491         public Map<GroupData, Set> getAvailableGroups() 
    492                 throws DSOutOfServiceException, DSAccessException; 
    493  
    494         /** 
    495481         * Retrieves and saves the archived files. 
    496482         * Returns a map whose keys are the number of archived files retrieves 
  • trunk/SRC/org/openmicroscopy/shoola/env/data/OmeroDataServiceImpl.java

    r5519 r5525  
    6363import pojos.DatasetData; 
    6464import pojos.ExperimenterData; 
    65 import pojos.GroupData; 
    6665import pojos.ImageData; 
    6766import pojos.ProjectData; 
    … …  
    171170                if (withLeaves) po.leaves(); 
    172171                else po.noLeaves(); 
    173                 //po.countsFor(new Long(userID)); 
    174                 //If rootNodeIDs, returns the orphaned containers: 
    175172                Set parents = gateway.loadContainerHierarchy(rootNodeType, rootNodeIDs, 
    176173                                po.map());  
    … …  
    762759                } 
    763760                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, DSAccessException 
    772         { 
    773                 return gateway.getAvailableGroups(); 
    774761        } 
    775762 
  • trunk/SRC/org/openmicroscopy/shoola/env/data/views/DataHandlerView.java

    r5394 r5525  
    3939import org.openmicroscopy.shoola.env.event.AgentEventListener; 
    4040import pojos.AnnotationData; 
    41 import pojos.CategoryData; 
    4241import pojos.DataObject; 
    4342import pojos.ExperimenterData; 
    … …  
    447446                                                                                AgentEventListener observer); 
    448447         
    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          
    457448} 
  • trunk/SRC/org/openmicroscopy/shoola/env/data/views/DataHandlerViewImpl.java

    r5401 r5525  
    385385                return cmd.exec(observer); 
    386386        } 
    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         } 
    397387 
    398388        /** 
  • trunk/SRC/org/openmicroscopy/shoola/env/data/views/calls/AdminLoader.java

    r5292 r5525  
    5555{ 
    5656 
    57         /** Identifies to load the available groups. */ 
    58         public static final int GROUP = 0; 
    59          
    6057        /** Identifies to load the available and used space. */ 
    6158        public static final int SPACE = 1; 
    … …  
    6865     
    6966    /** 
    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 Exception 
    79             { 
    80                 OmeroDataService os = context.getDataService(); 
    81                 result = os.getAvailableGroups(); 
    82             } 
    83         }; 
    84     } 
    85      
    86     /** 
    8767     * Creates a {@link BatchCall} to retrieve the available and used 
    8868     * disk space. 
    … …  
    9373    private BatchCall availableSpaceCall(final long userID) 
    9474    { 
    95         return new BatchCall("Loading available and used disk space") { 
     75        return new BatchCall("Loading disk space information") { 
    9676            public void doCall() throws Exception 
    9777            { 
    … …  
    163143    { 
    164144        switch (index) { 
    165                         case GROUP: 
    166                                 loadCall = availableGroupsCall(userID); 
    167                                 break; 
    168145                        case SPACE: 
    169146                                loadCall = availableSpaceCall(userID); 

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/