Class ServerContextCache


  • public class ServerContextCache
    extends org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
    Author:
    Luca Frosini (ISTI - CNR) TODO find a distributed solution
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected List<org.gcube.informationsystem.contexts.reference.entities.Context> contextsBasicInfo  
      protected List<org.gcube.informationsystem.contexts.reference.entities.Context> contextsMetaPrivacy  
      protected boolean includeMeta  
      protected static ServerContextCache singleton  
      protected Map<UUID,​org.gcube.informationsystem.contexts.reference.entities.Context> uuidToContextBasicInfo  
      protected Map<UUID,​org.gcube.informationsystem.contexts.reference.entities.Context> uuidToContextMetaPrivacy  
      • Fields inherited from class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache

        contextCacheRenewal, contextFullNameToUUID, contexts, contextsTree, creationTime, DEFAULT_EXPIRING_TIMEOUT, expiringTime, expiringTimeout, initialized, uuidToContext, uuidToContextFullName
    • Field Detail

      • contextsMetaPrivacy

        protected List<org.gcube.informationsystem.contexts.reference.entities.Context> contextsMetaPrivacy
      • uuidToContextMetaPrivacy

        protected Map<UUID,​org.gcube.informationsystem.contexts.reference.entities.Context> uuidToContextMetaPrivacy
      • contextsBasicInfo

        protected List<org.gcube.informationsystem.contexts.reference.entities.Context> contextsBasicInfo
      • uuidToContextBasicInfo

        protected Map<UUID,​org.gcube.informationsystem.contexts.reference.entities.Context> uuidToContextBasicInfo
      • includeMeta

        protected boolean includeMeta
    • Constructor Detail

      • ServerContextCache

        public ServerContextCache()
    • Method Detail

      • cleanCache

        public void cleanCache()
        Overrides:
        cleanCache in class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
      • cleanCache

        protected void cleanCache​(Calendar now)
        Overrides:
        cleanCache in class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
      • isIncludeMeta

        public boolean isIncludeMeta()
      • setIncludeMeta

        public void setIncludeMeta​(boolean includeMeta)
      • initContextCacheRenewal

        public void initContextCacheRenewal()
      • getContexts

        public List<org.gcube.informationsystem.contexts.reference.entities.Context> getContexts()
                                                                                          throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Overrides:
        getContexts in class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getFullInfoContexts

        public List<org.gcube.informationsystem.contexts.reference.entities.Context> getFullInfoContexts()
                                                                                                  throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getFullInfoContextByUUID

        public org.gcube.informationsystem.contexts.reference.entities.Context getFullInfoContextByUUID​(UUID uuid)
                                                                                                 throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getContextByUUID

        public org.gcube.informationsystem.contexts.reference.entities.Context getContextByUUID​(UUID uuid)
                                                                                         throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        Overrides:
        getContextByUUID in class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getContextByUUIDFullInfo

        public org.gcube.informationsystem.contexts.reference.entities.Context getContextByUUIDFullInfo​(UUID uuid)
                                                                                                 throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
        USer internally to the service to get info such as state
        Parameters:
        uuid -
        Returns:
        Throws:
        org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      • getMetadataForPrivacy

        protected org.gcube.informationsystem.model.reference.properties.Metadata getMetadataForPrivacy​(org.gcube.com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                                                                                        org.gcube.informationsystem.model.reference.properties.Metadata metadata)
      • setContexts

        protected void setContexts​(Calendar calendar,
                                   List<org.gcube.informationsystem.contexts.reference.entities.Context> contexts)
        Overrides:
        setContexts in class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache