Class ShareStore

  • Direct Known Subclasses:
    BlobShareStore

    public abstract class ShareStore
    extends java.lang.Object
    Entry to the Ice code generated data/ directory. Subclasess of ShareStore know how to efficiently store and look up ShareData instances.
    Since:
    3.0-Beta4
    See Also:
    IShare
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Ice.Communicator ic  
      protected org.slf4j.Logger log  
    • Constructor Summary

      Constructors 
      Constructor Description
      ShareStore()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      <T extends ome.model.IObject>
      boolean
      contains​(long sessionId, java.lang.Class<T> kls, long objId)  
      abstract void doClose()  
      abstract <T extends ome.model.IObject>
      boolean
      doContains​(long sessionId, java.lang.Class<T> kls, long objId)  
      abstract void doInit()  
      abstract void doSet​(ome.model.meta.Share share, ShareData data, java.util.List<ShareItem> items)  
      abstract ShareData get​(long id)  
      ShareData getShareIfAccessible​(long shareId, boolean isAdmin, long userId)
      Loads share and checks its owner and member data against the current context (owner/member/admin).
      abstract java.util.List<ShareData> getShares​(long userId, boolean own, boolean active)  
      void init()
      Calls doInit() within a transaction with a session available to all HibernateTemplate callbacks.
      abstract java.util.Set<java.lang.Long> keys()  
      ShareData parse​(long id, byte[] data)  
      byte[] parse​(ShareData data)  
      <T extends ome.model.IObject>
      ShareData
      set​(ome.model.meta.Share share, long owner, java.util.List<T> objects, java.util.List<java.lang.Long> members, java.util.List<java.lang.String> guests, boolean enabled)  
      abstract java.lang.Long totalSharedItems()  
      abstract java.lang.Long totalShares()  
      void update​(ome.model.meta.Share share, ShareData data)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        protected final org.slf4j.Logger log
      • ic

        protected final Ice.Communicator ic
    • Constructor Detail

      • ShareStore

        public ShareStore()
    • Method Detail

      • getShareIfAccessible

        public ShareData getShareIfAccessible​(long shareId,
                                              boolean isAdmin,
                                              long userId)
        Loads share and checks its owner and member data against the current context (owner/member/admin). This method must be kept in sync with ShareBean.applyIfShareAccessible(QueryBuilder) which does the same check at the database rather than binary data level.
      • set

        public <T extends ome.model.IObject> ShareData set​(ome.model.meta.Share share,
                                                           long owner,
                                                           java.util.List<T> objects,
                                                           java.util.List<java.lang.Long> members,
                                                           java.util.List<java.lang.String> guests,
                                                           boolean enabled)
      • update

        public void update​(ome.model.meta.Share share,
                           ShareData data)
      • parse

        public final byte[] parse​(ShareData data)
      • parse

        public final ShareData parse​(long id,
                                     byte[] data)
      • init

        public final void init()
        Calls doInit() within a transaction with a session available to all HibernateTemplate callbacks.
      • close

        public final void close()
      • contains

        public final <T extends ome.model.IObject> boolean contains​(long sessionId,
                                                                    java.lang.Class<T> kls,
                                                                    long objId)
      • doInit

        public abstract void doInit()
      • totalShares

        public abstract java.lang.Long totalShares()
      • totalSharedItems

        public abstract java.lang.Long totalSharedItems()
      • keys

        public abstract java.util.Set<java.lang.Long> keys()
      • get

        public abstract ShareData get​(long id)
      • getShares

        public abstract java.util.List<ShareData> getShares​(long userId,
                                                            boolean own,
                                                            boolean active)
      • doContains

        public abstract <T extends ome.model.IObject> boolean doContains​(long sessionId,
                                                                         java.lang.Class<T> kls,
                                                                         long objId)
      • doSet

        public abstract void doSet​(ome.model.meta.Share share,
                                   ShareData data,
                                   java.util.List<ShareItem> items)
      • doClose

        public abstract void doClose()