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

Show
Ignore:
Timestamp:
10/03/08 15:02:50 (7 weeks ago)
Author:
jburel
Message:

Used PojoOptions?

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  
    2323        <classpathentry kind="lib" path="LIB/jakarta-oro-2.0.8.jar"/> 
    2424        <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"/> 
    2626        <classpathentry kind="output" path="bin"/> 
    2727</classpath> 
  • trunk/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java

    r5641 r5643  
    5252import org.openmicroscopy.shoola.env.data.util.SearchDataContext; 
    5353import org.openmicroscopy.shoola.env.rnd.RenderingServiceException; 
    54  
    5554import ome.system.UpgradeCheck; 
    5655import omero.InternalException; 
    … …  
    7574import omero.api.RawPixelsStorePrx; 
    7675import omero.api.RenderingEnginePrx; 
    77 import omero.api.Search; 
    7876import omero.api.SearchPrx; 
    7977import omero.api.ServiceFactoryPrx; 
    8078import omero.api.ThumbnailStorePrx; 
    81 import omero.constants.CLASSIFICATIONME; 
    82 import omero.constants.CLASSIFICATIONNME; 
    83 import omero.constants.DECLASSIFICATION; 
    8479import omero.constants.projection.ProjectionType; 
    8580import omero.model.Annotation; 
    … …  
    111106import omero.sys.EventContext; 
    112107import omero.sys.Parameters; 
    113 import omero.util.ParametersI; 
    114 import omero.util.PojoOptionsI; 
     108import omero.sys.ParametersI; 
     109import omero.sys.PojoOptions; 
    115110import pojos.ArchivedAnnotationData; 
    116111import pojos.DataObject; 
    … …  
    241236                Throwable cause = t.getCause(); 
    242237                if (cause instanceof ServerError) { 
     238                         
     239                         
    243240                        String s = "Cannot access data for security reasons \n";  
    244241                        throw new DSAccessException(s+message, t); 
    245242                } else 
    246                         throw new DSOutOfServiceException(message, t); 
     243                         
     244; 
    247245        } 
    248246         
    … …  
    736734         
    737735        /** 
    738          * Reconnects to server. This method should be invoked when the password 
    739          * 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 session 
    747                 /* 
    748                 logout(); 
    749                 login = new Login(userName, password); 
    750                 entry = new ServiceFactory(server, new Login(userName, password)); 
    751                 thumbRetrieval = 0; 
    752                 */ 
    753         } 
    754          
    755         /** 
    756736         * Formats the terms to search for. 
    757737         *  
    … …  
    20151995                        IPojosPrx service = getPojosService(); 
    20161996                        Map m = service.findAnnotations(Pixels.class.getName(), ids, null,  
    2017                                                                         (new PojoOptionsI().map())); 
     1997                                                                        (new PojoOptions().map())); 
    20181998                        Collection c = (Collection) m.get(pixelsID); 
    20191999                        if (c == null || c.size() == 0) return false; 
    … …  
    22752255         * Modifies the password of the currently logged in user. 
    22762256         *  
    2277          * @param userName      The name of the user whose password has not be changed. 
    22782257         * @param password      The new password. 
    22792258         * @throws DSOutOfServiceException If the connection is broken, or logged in 
    … …  
    22812260         * retrieve data from OMERO service.  
    22822261         */ 
    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(); 
    22882266                try { 
    22892267                        getAdminService().changePassword(new RString(password)); 
    2290                         resetFactory(userName, password); 
    22912268                } catch (Throwable t) { 
    22922269                        handleException(t, "Cannot modify password. "); 
  • trunk/SRC/org/openmicroscopy/shoola/env/data/OmeroDataServiceImpl.java

    r5641 r5643  
    3939 
    4040//Application-internal dependencies 
     41import omero.RLong; 
     42import omero.RTime; 
    4143import omero.model.Channel; 
    4244import omero.model.Dataset; 
    … …  
    4951import omero.model.Screen; 
    5052import omero.model.ScreenPlateLink; 
    51 import omero.util.PojoOptionsI; 
     53import omero.sys.PojoOptions; 
    5254import org.openmicroscopy.shoola.env.LookupNames; 
    5355import org.openmicroscopy.shoola.env.config.AgentInfo; 
    … …  
    9193 
    9294        /** 
    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         /** 
    10495         * Unlinks the collection of children from the specified parent. 
    10596         *  
    … …  
    152143                        return loadScreenPlates(rootNodeType, rootNodeIDs, userID); 
    153144                } 
    154                 PojoOptionsI 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(); 
    158149                Set parents = gateway.loadContainerHierarchy(rootNodeType, rootNodeIDs, 
    159150                                po.map());  
    … …  
    164155 
    165156                        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(); 
    170160                                //Set r = gateway.loadContainerHierarchy(klass, null, po.map()); 
    171161                                Set r = gateway.fetchContainers(klass, userID); 
    … …  
    207197                throws DSOutOfServiceException, DSAccessException  
    208198        { 
    209                 PojoOptionsI po = new PojoOptionsI(); 
    210                 //po.exp(new Long(userID)); 
     199                PojoOptions po = new PojoOptions(); 
     200                po.exp(new RLong(userID)); 
    211201                //po.noLeaves(); 
    212202                return gateway.loadContainerHierarchy(rootNodeType, null, po.map());                          
    … …  
    222212        { 
    223213                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)); 
    228217                        return gateway.findContainerHierarchy(rootNodeType, leavesIDs, 
    229218                                        po.map()); 
    … …  
    245234                //if (forUser) po.exp(new Long(getUserDetails().getId())); 
    246235                return gateway.findAnnotations(nodeType, nodeIDs, annotatorIDs,  
    247                                 new PojoOptionsI().map()); 
     236                                new PojoOptions().map()); 
    248237        } 
    249238         
    … …  
    255244                throws DSOutOfServiceException, DSAccessException 
    256245        { 
    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()); 
    267248        } 
    268249 
    … …  
    274255                throws DSOutOfServiceException, DSAccessException 
    275256        { 
    276                 PojoOptionsI po = new PojoOptionsI(); 
    277                 //po.exp(new Long(userID)); 
     257                PojoOptions po = new PojoOptions(); 
     258                po.exp(new RLong(userID)); 
    278259                return gateway.getUserImages(po.map()); 
    279260        } 
    … …  
    292273                        return gateway.getImagesTaggedCount(rootNodeIDs); 
    293274                return gateway.getCollectionCount(rootNodeType, property, rootNodeIDs,  
    294                                 new PojoOptionsI().map()); 
     275                                new PojoOptions().map()); 
    295276        } 
    296277 
    … …  
    312293                IObject object = gateway.createObject( 
    313294                                ModelMapper.createAnnotationAndLink(ho, data),  
    314                                 (new PojoOptionsI()).map()); 
     295                                (new PojoOptions()).map()); 
    315296                return PojoMapper.asDataObject(ModelMapper.getAnnotatedObject(object)); 
    316297        } 
    … …  
    332313                if (obj == null)  
    333314                        throw new NullPointerException("Cannot convert object."); 
    334                 Map options = (new PojoOptionsI()).map(); 
     315                Map options = (new PojoOptions()).map(); 
    335316 
    336317                IObject created = gateway.createObject(obj, options); 
    … …  
    399380                ModelMapper.unloadCollections(ho); 
    400381                IObject updated = gateway.updateObject(ho, 
    401                                 (new PojoOptionsI()).map()); 
     382                                (new PojoOptions()).map()); 
    402383                return PojoMapper.asDataObject(updated); 
    403384        } 
    … …  
    488469                } 
    489470                if (objects.size() != 0) { 
    490                         gateway.createObjects(objects, (new PojoOptionsI()).map()); 
     471                        gateway.createObjects(objects, (new PojoOptions()).map()); 
    491472                }  
    492473        } 
    … …  
    564545                                 
    565546                                objects[index] = gateway.createObject(toCreate[index],  
    566                                                 (new PojoOptionsI()).map()); 
     547                                                (new PojoOptions()).map()); 
    567548                                index++; 
    568549                        } 
    … …  
    588569                        throw new IllegalArgumentException("No DataObject to annotate.");  
    589570 
    590                 Map options = (new PojoOptionsI()).map(); 
     571                Map options = (new PojoOptions()).map(); 
    591572                Iterator i = nodes.keySet().iterator(); 
    592573                DataObject annotatedObject; 
    … …  
    638619                DataObject image; 
    639620                List<DataObject> results = new ArrayList<DataObject>(); 
    640                 PojoOptionsI po = new PojoOptionsI(); 
    641                 //po.allExps(); 
     621                PojoOptions po = new PojoOptions(); 
     622                po.allExps(); 
    642623                Map map = po.map(); 
    643624                while (i.hasNext()) { 
    … …  
    675656                if (!uc.getPassword().equals(oldPassword)) return Boolean.FALSE; 
    676657 
    677                 gateway.changePassword(uc.getUserName(), newPassword); 
     658                gateway.changePassword(newPassword); 
    678659                uc.resetPassword(newPassword); 
    679660                return Boolean.TRUE; 
    … …  
    760741                        throw new NullPointerException("Time not specified."); 
    761742                 
    762                 PojoOptionsI po = new PojoOptionsI(); 
    763                 /* 
     743                PojoOptions po = new PojoOptions(); 
    764744                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())); 
    769748                return gateway.getImages(po.map()); 
    770749        } 
    … …  
    838817                Map<Integer, Object> results = new HashMap<Integer, Object>(); 
    839818                Set<DataObject> nodes; 
    840                 Map pojoMap = new PojoOptionsI().map(); 
     819                Map pojoMap = new PojoOptions().map(); 
    841820                Object v; 
    842821                 
  • trunk/SRC/org/openmicroscopy/shoola/env/ui/UserNotifierImpl.java

    r5641 r5643  
    3737import omero.model.FileAnnotation; 
    3838import omero.model.OriginalFile; 
    39  
    4039import org.openmicroscopy.shoola.env.Container; 
    41 import org.openmicroscopy.shoola.env.LookupNames; 
    4240import org.openmicroscopy.shoola.util.ui.MessengerDialog; 
    4341import org.openmicroscopy.shoola.util.ui.NotificationDialog; 
    4442import org.openmicroscopy.shoola.util.ui.UIUtilities; 
    45  
    4643import pojos.FileAnnotationData; 
    4744 
  • trunk/config/about.xml

    r5602 r5643  
    66</p> 
    77<p> 
    8 Version: Beta3.1<br></br> 
     8Version: Beta4<br></br> 
    99Build: 05-09-2008<br></br> 
    1010</p> 
  • trunk/config/container.xml

    r5632 r5643  
    266266   * etc. 
    267267  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> 
    268     <entry name="Version">Beta3.1rc3</entry> 
     268    <entry name="Version">Beta4</entry> 
    269269    <entry name="SoftwareName">OMERO.insight</entry> 
    270270    <entry name="AboutFile">about.xml</entry> 

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/