Class BlobShareStore

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class BlobShareStore
    extends ShareStore
    implements org.springframework.context.ApplicationContextAware
    Implements ShareStore and provides functionality to work with binary Ice data from the share. Also provides methods for verification if metadata graph elements are safe to load (part of the security system's ACL vote).
    Since:
    3.0-Beta4
    See Also:
    IShare
    • Field Detail

      • __dont_use_me_factory

        protected SessionFactory __dont_use_me_factory
        Used indirectly to obtain sessions for querying and updating the store during normal operation. Due to this classes late initialization, all sessions should be obtained from session().
      • ctx

        protected ome.system.OmeroContext ctx
      • sqlAction

        protected ome.util.SqlAction sqlAction
      • pixToImageCache

        protected java.util.Map<java.lang.Long,​java.lang.Long> pixToImageCache
      • obToImageCache

        protected java.util.Map<java.lang.Long,​java.util.List<java.lang.Long>> obToImageCache
    • Constructor Detail

      • BlobShareStore

        public BlobShareStore()
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Because there is a cyclic dependency (SF -> ACLVoter -> BlobStore -> SF), we have to lazy-load the session factory via the context.
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • setSqlAction

        public void setSqlAction​(ome.util.SqlAction sqlAction)
      • getShares

        public java.util.List<ShareData> getShares​(long userId,
                                                   boolean own,
                                                   boolean activeOnly)
        Specified by:
        getShares in class ShareStore
      • doContains

        public <T extends ome.model.IObject> boolean doContains​(long sessionId,
                                                                java.lang.Class<T> kls,
                                                                long objId)
        Specified by:
        doContains in class ShareStore
      • doContains

        protected <T extends ome.model.IObject> boolean doContains​(ShareData data,
                                                                   java.lang.Class<T> kls,
                                                                   long objId)
      • keys

        public java.util.Set<java.lang.Long> keys()
        Specified by:
        keys in class ShareStore
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception