ome.logic
Class RenderingSettingsImpl

java.lang.Object
  extended by ome.logic.AbstractLevel2Service
      extended by ome.logic.RenderingSettingsImpl
All Implemented Interfaces:
Serializable, IRenderingSettings, ServiceInterface, SelfConfigurableService

@Transactional
public class RenderingSettingsImpl
extends AbstractLevel2Service
implements IRenderingSettings, Serializable

Implementation of the IRenderingSettings I/F.

Since:
OME3.0
Version:
3.0 (Internal version: $Revision: 1696 $ $Date: 2007/09/06 23:27:31 $)
Author:
Aleksandra Tarkowska a.tarkowska@dundee.ac.uk
See Also:
Serialized Form

Field Summary
protected  PixelsService pixelsData
          Reference to the service used to retrieve the pixels data.
protected  IPixels pixelsMetadata
          Reference to the service used to retrieve the pixels metadata.
 
Fields inherited from class ome.logic.AbstractLevel2Service
iQuery, iUpdate, metadata, queryFactory, sec
 
Constructor Summary
RenderingSettingsImpl()
           
 
Method Summary
 Map<Boolean,List<Long>> applySettingsToDataset(long from, long to)
          Implemented as specified by the IRenderingSettings I/F.
 boolean applySettingsToImage(long from, long to)
          Implemented as specified by the IRenderingSettings I/F
 Map<Boolean,List<Long>> applySettingsToImages(long from, List<Long> nodeIds)
          Implemented as specified by the IRenderingSettings I/F
 boolean applySettingsToPixels(long from, long to)
          Implemented as specified by the IRenderingSettings I/F
 Map<Boolean,List<Long>> applySettingsToProject(long from, long to)
          Implemented as specified by the IRenderingSettings I/F.
<T extends ome.model.IObject>
Map<Boolean,List<Long>>
applySettingsToSet(long from, Class<T> klass, Set<Long> nodeIds)
          Implemented as specified by the IRenderingSettings I/F.
 ome.model.display.RenderingDef createNewRenderingDef(ome.model.core.Pixels pixels)
          Implemented as specified by the IRenderingSettings I/F
 ome.model.display.RenderingDef getRenderingSettings(long pixelsId)
          Implemented as specified by the IRenderingSettings I/F
 Class<? extends ServiceInterface> getServiceInterface()
          Returns the interface this implementation is for.
 void resetDefaults(ome.model.display.RenderingDef def, ome.model.core.Pixels pixels)
          Implemented as specified by the IRenderingSettings I/F
<T extends ome.model.IObject>
Set<Long>
resetDefaultsByOwnerInSet(Class<T> klass, Set<Long> nodeIds)
          Implemented as specified by the IRenderingSettings I/F.
 void resetDefaultsForPixels(long to)
          Implemented as specified by the IRenderingSettings I/F.
 Set<Long> resetDefaultsInDataset(long to)
          Implemented as specified by the IRenderingSettings I/F.
 void resetDefaultsInImage(long to)
          Implemented as specified by the IRenderingSettings I/F.
<T extends ome.model.IObject>
Set<Long>
resetDefaultsInSet(Class<T> klass, Set<Long> nodeIds)
          Implemented as specified by the IRenderingSettings I/F.
 ome.model.display.RenderingDef resetDefaultsNoSave(ome.model.display.RenderingDef def, ome.model.core.Pixels pixels)
          Implemented as specified by the IRenderingSettings I/F
<T extends ome.model.IObject>
Set<Long>
resetMinMaxInSet(Class<T> klass, Set<Long> nodeIds)
          Implemented as specified by the IRenderingSettings I/F.
 boolean sanityCheckPixels(ome.model.core.Pixels pFrom, ome.model.core.Pixels pTo)
          Implemented as specified by the IRenderingSettings I/F
 void setOriginalSettingsForPixels(long to)
          Implemented as specified by the IRenderingSettings I/F.
 Set<Long> setOriginalSettingsInDataset(long to)
          Implemented as specified by the IRenderingSettings I/F.
 void setOriginalSettingsInImage(long to)
          Implemented as specified by the IRenderingSettings I/F.
<T extends ome.model.IObject>
Set<Long>
setOriginalSettingsInSet(Class<T> klass, Set<Long> nodeIds)
          Implemented as specified by the IRenderingSettings I/F.
 void setPixelsData(PixelsService dataService)
          Sets injector.
 void setPixelsMetadata(IPixels metaService)
          Sets injector.
 
Methods inherited from class ome.logic.AbstractLevel2Service
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setSecuritySystem, setUpdateService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pixelsData

protected transient PixelsService pixelsData
Reference to the service used to retrieve the pixels data.


pixelsMetadata

protected transient IPixels pixelsMetadata
Reference to the service used to retrieve the pixels metadata.

Constructor Detail

RenderingSettingsImpl

public RenderingSettingsImpl()
Method Detail

sanityCheckPixels

public boolean sanityCheckPixels(ome.model.core.Pixels pFrom,
                                 ome.model.core.Pixels pTo)
Implemented as specified by the IRenderingSettings I/F

Specified by:
sanityCheckPixels in interface IRenderingSettings
Parameters:
pFrom - The pixels set to copy the settings from.
pTo - The pixels set to copy the settings to.
Returns:
See above.
See Also:
IRenderingSettings.sanityCheckPixels(Pixels, Pixels)

setPixelsMetadata

public void setPixelsMetadata(IPixels metaService)
Sets injector. For use during configuration. Can only be called once.

Parameters:
metaService - The value to set.

setPixelsData

public void setPixelsData(PixelsService dataService)
Sets injector. For use during configuration. Can only be called once.

Parameters:
dataService - The value to set.

getServiceInterface

public Class<? extends ServiceInterface> getServiceInterface()
Returns the interface this implementation is for.

Specified by:
getServiceInterface in interface SelfConfigurableService
See Also:
SelfConfigurableService.getServiceInterface()

applySettingsToSet

public <T extends ome.model.IObject> Map<Boolean,List<Long>> applySettingsToSet(long from,
                                                                                Class<T> klass,
                                                                                Set<Long> nodeIds)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
applySettingsToSet in interface IRenderingSettings
Type Parameters:
T - The type of object to copy to.
Parameters:
from - The Id of the pixels set to copy the rendering settings from.
klass - The type of nodes to handle.
nodeIds - Ids of the node type.
See Also:
IRenderingSettings.applySettingsToSet(long, Class, Set)

applySettingsToProject

public Map<Boolean,List<Long>> applySettingsToProject(long from,
                                                      long to)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
applySettingsToProject in interface IRenderingSettings
Parameters:
from - The Id of the pixels set to copy the rendering settings from.
to - The Id of the project container to apply settings to.
Returns:
A map with two boolean keys. The value of the TRUE is a collection of images ID, the settings were successfully applied to. The value of the FALSE is a collection of images ID, the settings could not be applied to.
See Also:
IRenderingSettings.applySettingsToProject(long, long)

applySettingsToDataset

public Map<Boolean,List<Long>> applySettingsToDataset(long from,
                                                      long to)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
applySettingsToDataset in interface IRenderingSettings
Parameters:
from - The Id of the pixels set to copy the rendering settings from.
to - The Id of the dataset container to apply settings to.
Returns:
A map with two boolean keys. The value of the TRUE is a collection of images ID, the settings were successfully applied to. The value of the FALSE is a collection of images ID, the settings could not be applied to.
See Also:
IRenderingSettings.applySettingsToDataset(long, long)

applySettingsToImage

public boolean applySettingsToImage(long from,
                                    long to)
Implemented as specified by the IRenderingSettings I/F

Specified by:
applySettingsToImage in interface IRenderingSettings
Parameters:
from - The Id of the pixels set to copy the rendering settings from.
to - The Id of the image container to apply settings to.
Returns:
true if the settings were successfully applied, false otherwise.
See Also:
IRenderingSettings.applySettingsToImage(long, long)

applySettingsToImages

public Map<Boolean,List<Long>> applySettingsToImages(long from,
                                                     List<Long> nodeIds)
Implemented as specified by the IRenderingSettings I/F

Specified by:
applySettingsToImages in interface IRenderingSettings
Parameters:
from - The Id of the pixels set to copy the rendering settings from.
nodeIds - The Id of the image container to apply settings to.
Returns:
true if the settings were successfully applied, false otherwise.
See Also:
IRenderingSettings.applySettingsToImages(long, List)

applySettingsToPixels

public boolean applySettingsToPixels(long from,
                                     long to)
Implemented as specified by the IRenderingSettings I/F

Specified by:
applySettingsToPixels in interface IRenderingSettings
Parameters:
from - The Id of the pixels set to copy the rendering settings from.
to - The Id of the pixels container to apply settings to.
Returns:
See above.
See Also:
IRenderingSettings.applySettingsToPixels(long, long)

getRenderingSettings

public ome.model.display.RenderingDef getRenderingSettings(long pixelsId)
Implemented as specified by the IRenderingSettings I/F

Specified by:
getRenderingSettings in interface IRenderingSettings
Parameters:
pixelsId - The Id of the Pixels
Returns:
See above.
See Also:
IRenderingSettings.getRenderingSettings(long)

createNewRenderingDef

public ome.model.display.RenderingDef createNewRenderingDef(ome.model.core.Pixels pixels)
Implemented as specified by the IRenderingSettings I/F

Specified by:
createNewRenderingDef in interface IRenderingSettings
Parameters:
pixels - The Pixels set to link to the rendering definition.
Returns:
A new, blank rendering definition and sub-objects. NOTE: the linked Pixels has been unloaded.
See Also:
IRenderingSettings.createNewRenderingDef(Pixels)

resetDefaults

public void resetDefaults(ome.model.display.RenderingDef def,
                          ome.model.core.Pixels pixels)
Implemented as specified by the IRenderingSettings I/F

Specified by:
resetDefaults in interface IRenderingSettings
Parameters:
def - A RenderingDef to reset. It is expected that def.pixels will be unloaded and that the actual linked Pixels set will be provided in the pixels argument.
pixels - The Pixels set for def.
See Also:
IRenderingSettings.resetDefaults(RenderingDef, Pixels)

resetDefaultsNoSave

public ome.model.display.RenderingDef resetDefaultsNoSave(ome.model.display.RenderingDef def,
                                                          ome.model.core.Pixels pixels)
Implemented as specified by the IRenderingSettings I/F

Specified by:
resetDefaultsNoSave in interface IRenderingSettings
Parameters:
def - A RenderingDef to reset. It is expected that def.pixels will be unloaded and that the actual linked Pixels set will be provided in the pixels argument.
pixels - The Pixels set for def.
Returns:
def with the rendering settings reset.
See Also:
IRenderingSettings.resetDefaultsNoSave(RenderingDef, Pixels)

resetDefaultsInImage

public void resetDefaultsInImage(long to)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
resetDefaultsInImage in interface IRenderingSettings
Parameters:
to - The Id of the Image.
See Also:
IRenderingSettings.resetDefaultsInImage(long)

resetDefaultsForPixels

public void resetDefaultsForPixels(long to)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
resetDefaultsForPixels in interface IRenderingSettings
Parameters:
to - The Id of the Pixels.
See Also:
IRenderingSettings.resetDefaultsForPixels(long)

resetDefaultsInDataset

public Set<Long> resetDefaultsInDataset(long to)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
resetDefaultsInDataset in interface IRenderingSettings
Parameters:
to - The Id of the DataSet.
Returns:
A Set of image IDs that have had their rendering settings reset.
See Also:
IRenderingSettings.resetDefaultsInDataset(long)

resetDefaultsInSet

public <T extends ome.model.IObject> Set<Long> resetDefaultsInSet(Class<T> klass,
                                                                  Set<Long> nodeIds)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
resetDefaultsInSet in interface IRenderingSettings
Parameters:
klass - The type of nodes to handle.
nodeIds - Ids of the node type.
Returns:
A Set of image IDs that have had their rendering settings reset.
See Also:
IRenderingSettings.resetDefaultsInSet(Class, Set)

resetDefaultsByOwnerInSet

public <T extends ome.model.IObject> Set<Long> resetDefaultsByOwnerInSet(Class<T> klass,
                                                                         Set<Long> nodeIds)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
resetDefaultsByOwnerInSet in interface IRenderingSettings
Parameters:
klass - The type of nodes to handle.
nodeIds - Ids of the node type.
Returns:
A Set of image IDs that have had their rendering settings reset.
See Also:
IRenderingSettings.resetDefaultsInSet(Class, Set)

resetMinMaxInSet

public <T extends ome.model.IObject> Set<Long> resetMinMaxInSet(Class<T> klass,
                                                                Set<Long> nodeIds)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
resetMinMaxInSet in interface IRenderingSettings
Parameters:
klass - The type of nodes to handle.
nodeIds - Ids of the node type.
Returns:
A Set of image IDs that have had their rendering settings reset.
See Also:
IRenderingSettings.resetMinMaxInSet(Class, Set)

setOriginalSettingsInImage

public void setOriginalSettingsInImage(long to)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
setOriginalSettingsInImage in interface IRenderingSettings
Parameters:
to - The Id of the Image.
See Also:
IRenderingSettings.setOriginalSettingsInImage(long)

setOriginalSettingsForPixels

public void setOriginalSettingsForPixels(long to)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
setOriginalSettingsForPixels in interface IRenderingSettings
Parameters:
to - The Id of the Pixels set.
See Also:
IRenderingSettings.setOriginalSettingsForPixels(long)

setOriginalSettingsInDataset

public Set<Long> setOriginalSettingsInDataset(long to)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
setOriginalSettingsInDataset in interface IRenderingSettings
Parameters:
to - The id of the dataset to handle.
Returns:
A Set of image IDs that have had their rendering settings reset.
See Also:
IRenderingSettings.setOriginalSettingsInDataset(long)

setOriginalSettingsInSet

public <T extends ome.model.IObject> Set<Long> setOriginalSettingsInSet(Class<T> klass,
                                                                        Set<Long> nodeIds)
Implemented as specified by the IRenderingSettings I/F.

Specified by:
setOriginalSettingsInSet in interface IRenderingSettings
Parameters:
klass - The type of nodes to handle.
nodeIds - Ids of the node type.
Returns:
A Set of image IDs that have had their rendering settings reset.
See Also:
IRenderingSettings.setOriginalSettingsInSet(Class, Set)


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.