Changeset 1067
- Timestamp:
- 11/06/06 19:18:00 (2 years ago)
- Location:
- trunk/components
- Files:
-
- 1 added
- 1 removed
- 5 modified
- 1 moved
-
client/resources/ome/client/spring.xml (modified) (2 diffs)
-
common/src/ome/api/ThumbnailStore.java (moved) (moved from trunk/components/common/src/ome/api/IThumb.java) (13 diffs)
-
common/src/ome/system/ServiceFactory.java (modified) (3 diffs)
-
server/resources/ome/services/service-ome.api.IThumb.xml (modified) (1 diff)
-
server/src/ome/logic/AWTScaleService.java (modified) (2 diffs)
-
server/src/ome/logic/ThumbImpl.java (deleted)
-
server/src/ome/services/RawFileBean.java (modified) (1 diff)
-
server/src/ome/services/ThumbnailBean.java (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/components/client/resources/ome/client/spring.xml
r1049 r1067 146 146 <property name="proxyInterface" value="ome.api.ITypes"/> 147 147 </bean> 148 149 <bean id="managed:ome.api.IThumb" parent="statelessJndi">150 <property name="jndiName" value="omero/remote/ome.api.IThumb"/>151 <property name="proxyInterface" value="ome.api.IThumb"/>152 </bean>153 148 154 149 <bean id="managed:ome.api.IUpdate" parent="statelessJndi"> … … 175 170 <property name="proxyInterface" value="omeis.providers.re.RenderingEngine"/> 176 171 </bean> 177 172 173 <bean id="managed:ome.api.ThumbnailStore" parent="statefulJndi"> 174 <property name="jndiName" value="omero/remote/ome.api.ThumbnailStore"/> 175 <property name="proxyInterface" value="ome.api.ThumbnailStore"/> 176 </bean> 178 177 </beans> -
trunk/components/common/src/ome/api/ThumbnailStore.java
r1049 r1067 1 1 package ome.api; 2 3 import ome.model.core.Pixels;4 import ome.model.display.RenderingDef;5 2 6 3 /** … … 8 5 * retrieve thumbnails using the on-disk cache (provided by <i>ROMIO</i>) or 9 6 * on the fly. 7 * <p> 8 * NOTE: The calling order for the service is as follows: 9 * <ol> 10 * <li>setPixelsId()</li> 11 * <li>setRenderingDefId()</li> 12 * <li>any of the thumbnail accessor methods</li> 13 * </ol> 14 * </p> 10 15 * 11 16 * @author Chris Allan … … 17 22 * @since 3.0 18 23 */ 19 public interface IThumb extendsServiceInterface24 public interface ThumbnailStore extends StatefulServiceInterface 20 25 { 26 /** 27 * This method manages the state of the service; it must be invoked before 28 * using any other methods. 29 * @param pixelsId an {@link ome.model.core.Pixels} id. 30 * @throws ApiUsageException if no pixels object exists with the ID 31 * <i>pixelsId</i>. 32 */ 33 public void setPixelsId(long pixelsId); 34 35 /** 36 * This method manages the state of the service; it should be invoked 37 * directly after {@link setPixelsId}. If it is not invoked with a valid 38 * rendering definition ID before using the thumbnail accessor methods 39 * execution continues as if <i>renderingDefId</i> were set to 40 * <code>null</code>. 41 * @param renderingDefId an {@link ome.model.display.RenderingDef} id. 42 * <code>null</code> specifies the user's currently active rendering 43 * settings to be used. 44 * @throws ApiUsageException if no rendering definition exists with the ID 45 * <i>renderingDefId</i>. 46 */ 47 public void setRenderingDefId(Long renderingDefId); 48 21 49 /** 22 50 * Retrieves the a thumbnail for a pixels set using a given set of rendering … … 25 53 * #getThumbDirect()}. 26 54 * 27 * @param pixels the pixels set.28 55 * @param sizeX the X-axis width of the thumbnail. <code>null</code> 29 56 * specifies the default size of 48. 30 57 * @param sizeY the Y-axis width of the thumbnail. <code>null</code> 31 58 * specifies the default size of 48. 32 * @param def the rendering settings. <code>null</code> specifies the user's33 * currently active rendering settings to be used.34 59 * @throws ApiUsageException if: 35 60 * <ul> … … 38 63 * <li><i>sizeY</i> > pixels.sizeY</li> 39 64 * <li><i>sizeY</i> is negative</li> 65 * <li>{@link setPixelsId()} has not yet been called</li> 40 66 * </ul> 41 67 * @return a JPEG thumbnail byte buffer. 42 68 * @see getThumbnailDirect() 43 69 */ 44 public byte[] getThumbnail(Pixels pixels, RenderingDef def, 45 Integer sizeX, Integer sizeY); 70 public byte[] getThumbnail(Integer sizeX, Integer sizeY); 46 71 47 72 /** … … 53 78 * of the original image. 54 79 * 55 * @param pixels the pixels set.56 80 * @param size the size of the longest side of the thumbnail requested. 57 81 * <code>null</code> specifies the default size of 48. 58 * @param def the rendering settings. <code>null</code> specifies the user's59 * currently active rendering settings to be used.60 82 * @throws ApiUsageException if: 61 83 * <ul> 62 84 * <li><i>size</i> > pixels.sizeX and pixels.sizeY</li> 85 * <li>{@link setPixelsId()} has not yet been called</li> 63 86 * </ul> 64 87 * @return a JPEG thumbnail byte buffer. 65 88 * @see getThumbnail() 66 89 */ 67 public byte[] getThumbnailByLongestSide(Pixels pixels, RenderingDef def, 68 Integer size); 69 90 public byte[] getThumbnailByLongestSide(Integer size); 70 91 71 92 /** … … 74 95 * ignoring the on-disk cache. 75 96 * 76 * @param pixels the pixels set.77 97 * @param sizeX the X-axis width of the thumbnail. <code>null</code> 78 98 * specifies the default size of 48. 79 99 * @param sizeY the Y-axis width of the thumbnail. <code>null</code> 80 100 * specifies the default size of 48. 81 * @param def the rendering settings. <code>null</code> specifies the user's82 * currently active rendering settings to be used.83 101 * @throws ApiUsageException if: 84 102 * <ul> … … 87 105 * <li><i>sizeY</i> > pixels.sizeY</li> 88 106 * <li><i>sizeY</i> is negative</li> 107 * <li>{@link setPixelsId()} has not yet been called</li> 89 108 * </ul> 90 109 * @return a JPEG thumbnail byte buffer. 91 110 * @see getThumbnail() 92 111 */ 93 public byte[] getThumbnailDirect(Pixels pixels, RenderingDef def, 94 Integer sizeX, Integer sizeY); 112 public byte[] getThumbnailDirect(Integer sizeX, Integer sizeY); 95 113 96 114 /** … … 101 119 * of the original image. 102 120 * 103 * @param pixels the pixels set.104 121 * @param size the size of the longest side of the thumbnail requested. 105 122 * <code>null</code> specifies the default size of 48. 106 * @param def the rendering settings. <code>null</code> specifies the user's107 * currently active rendering settings to be used.108 123 * @throws ApiUsageException if: 109 124 * <ul> 110 125 * <li><i>size</i> > pixels.sizeX and pixels.sizeY</li> 126 * <li>{@link setPixelsId()} has not yet been called</li> 111 127 * </ul> 112 128 * @return a JPEG thumbnail byte buffer. 113 129 * @see getThumbnailDirect() 114 130 */ 115 public byte[] getThumbnailByLongestSideDirect(Pixels pixels, 116 RenderingDef def, 117 Integer size); 131 public byte[] getThumbnailByLongestSideDirect(Integer size); 118 132 119 133 /** … … 121 135 * settings (RenderingDef) in the on-disk cache. 122 136 * 123 * @param pixels the pixels set.124 137 * @param sizeX the X-axis width of the thumbnail. <code>null</code> 125 138 * specifies the default size of 48. 126 139 * @param sizeY the Y-axis width of the thumbnail. <code>null</code> 127 140 * specifies the default size of 48. 128 * @param def the rendering settings. <code>null</code> specifies the user's129 * currently active rendering settings to be used.130 141 * @throws ApiUsageException if: 131 142 * <ul> … … 134 145 * <li><i>sizeY</i> > pixels.sizeY</li> 135 146 * <li><i>sizeY</i> is negative</li> 147 * <li>{@link setPixelsId()} has not yet been called</li> 136 148 * </ul> 137 149 * @see getThumb() 138 150 * @see getThumbDirect() 139 151 */ 140 public void createThumbnail(Pixels pixels, RenderingDef def, 141 Integer sizeX, Integer sizeY); 152 public void createThumbnail(Integer sizeX, Integer sizeY); 142 153 143 154 /** … … 146 157 * combination already cached. 147 158 * 148 * @param pixels the pixels set.149 * @param def the rendering settings. <code>null</code> specifies the user's150 * currently active rendering settings to be used.151 159 * @see getThumb() 152 160 * @see getThumbDirect() 153 161 */ 154 public void createThumbnails( Pixels pixels, RenderingDef def);162 public void createThumbnails(); 155 163 156 164 /** 157 165 * Checks if a thumbnail of a particular size exists for a pixels set. 158 166 * 159 * @param pixels the pixels set.160 167 * @param sizeX the X-axis width of the thumbnail. <code>null</code> 161 168 * specifies use the default size of 48. … … 166 173 * <li><i>sizeX</i> is negative</li> 167 174 * <li><i>sizeY</i> is negative</li> 175 * <li>{@link setPixelsId()} has not yet been called</li> 168 176 * </ul> 169 177 * @see getThumb() 170 178 * @see getThumbDirect() 171 179 */ 172 public boolean thumbnailExists( Pixels pixels,Integer sizeX, Integer sizeY);180 public boolean thumbnailExists(Integer sizeX, Integer sizeY); 173 181 } -
trunk/components/common/src/ome/system/ServiceFactory.java
r1049 r1067 42 42 import ome.api.IPojos; 43 43 import ome.api.IQuery; 44 import ome.api. IThumb;44 import ome.api.ThumbnailStore; 45 45 import ome.api.ITypes; 46 46 import ome.api.IUpdate; … … 215 215 } 216 216 217 public IThumb getThumbnailService(){218 return getServiceByClass(IThumb.class);219 }220 221 217 // ~ Stateful services 222 218 // ========================================================================= … … 242 238 public RenderingEngine createRenderingEngine(){ 243 239 return getServiceByClass(RenderingEngine.class); 240 } 241 242 /** create a new {@link ThumbnailStore} proxy. This proxy will have to be 243 * initialized using {@link ThumbnailStore#setPixelsId(long)} 244 */ 245 public ThumbnailStore createThumbnailService(){ 246 return getServiceByClass(ThumbnailStore.class); 244 247 } 245 248 -
trunk/components/server/resources/ome/services/service-ome.api.IThumb.xml
r1024 r1067 36 36 <beans> 37 37 38 <bean parent="level2" id="internal:ome.api.IThumb" class="ome.logic.ThumbImpl"> 38 <bean singleton="false" parent="level2" 39 id="internal:ome.api.ThumbnailStore" 40 class="ome.services.ThumbnailBean"> 39 41 <property name="ioService" ref="/OME/OMEIS/Thumbs"/> 40 <property name="renderingEngine" ref="internal:omeis.providers.re.RenderingEngine"/> 42 <property name="renderingEngine" 43 ref="internal:omeis.providers.re.RenderingEngine"/> 41 44 <property name="scaleService" ref="internal:ome.api.IScale"/> 42 45 </bean> 43 46 44 <bean id="managed:ome.api. IThumb" parent="managedService">45 <property name="proxyInterfaces" value="ome.api. IThumb"/>46 <property name="target" ref="internal:ome.api. IThumb"/>47 <bean id="managed:ome.api.ThumbnailStore" parent="managedStatefulService"> 48 <property name="proxyInterfaces" value="ome.api.ThumbnailStore"/> 49 <property name="target" ref="internal:ome.api.ThumbnailStore"/> 47 50 </bean> 48 51 -
trunk/components/server/src/ome/logic/AWTScaleService.java
r966 r1067 43 43 //Application-internal dependencies 44 44 import ome.api.IScale; 45 import ome.services.ThumbnailBean; 45 46 46 47 /** … … 59 60 { 60 61 /** The logger for this class. */ 61 private static Log log = LogFactory.getLog(Thumb Impl.class);62 private static Log log = LogFactory.getLog(ThumbnailBean.class); 62 63 63 64 /* (non-Javadoc) -
trunk/components/server/src/ome/services/RawFileBean.java
r1060 r1067 81 81 @Remote(RawFileStore.class) 82 82 @RemoteBinding(jndiBinding="omero/remote/ome.api.RawFileStore") 83 @Local(R enderingEngine.class)83 @Local(RawFileStore.class) 84 84 @LocalBinding (jndiBinding="omero/local/ome.api.RawFileStore") 85 85 @SecurityDomain("OmeroSecurity")
