Class ServerContextCache
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
-
- org.gcube.informationsystem.resourceregistry.contexts.ServerContextCache
-
public class ServerContextCache extends org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description protected List<org.gcube.informationsystem.contexts.reference.entities.Context>contextsMetaPrivacyprotected List<org.gcube.informationsystem.contexts.reference.entities.Context>contextsNoMetaprotected booleanincludeMetaprotected static ServerContextCachesingletonprotected Map<UUID,org.gcube.informationsystem.contexts.reference.entities.Context>uuidToContextMetaPrivacyprotected Map<UUID,org.gcube.informationsystem.contexts.reference.entities.Context>uuidToContextNoMeta
-
Constructor Summary
Constructors Constructor Description ServerContextCache()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanCache()protected voidcleanCache(Calendar now)org.gcube.informationsystem.contexts.reference.entities.ContextgetContextByUUID(UUID uuid)List<org.gcube.informationsystem.contexts.reference.entities.Context>getContexts()static ServerContextCachegetInstance()protected org.gcube.informationsystem.model.reference.properties.MetadatagetMetadataForPrivacy(org.gcube.com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.gcube.informationsystem.model.reference.properties.Metadata metadata)voidinitContextCacheRenewal()booleanisIncludeMeta()protected booleanisUserAllowedToGetPrivacyMeta()protected voidsetContexts(List<org.gcube.informationsystem.contexts.reference.entities.Context> contexts)voidsetIncludeMeta(boolean includeMeta)-
Methods inherited from class org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
getContextByFullName, getContextByUUID, getContextCacheRenewal, getContextFullName, getContextFullNameByUUID, getContextFullNameByUUID, getContextFullNameToUUIDAssociation, getUUIDByFullName, getUUIDToContextFullNameAssociation, refreshContextsIfNeeded, setContextCacheRenewal, setExpiringTimeout
-
-
-
-
Field Detail
-
contextsNoMeta
protected List<org.gcube.informationsystem.contexts.reference.entities.Context> contextsNoMeta
-
uuidToContextNoMeta
protected Map<UUID,org.gcube.informationsystem.contexts.reference.entities.Context> uuidToContextNoMeta
-
contextsMetaPrivacy
protected List<org.gcube.informationsystem.contexts.reference.entities.Context> contextsMetaPrivacy
-
uuidToContextMetaPrivacy
protected Map<UUID,org.gcube.informationsystem.contexts.reference.entities.Context> uuidToContextMetaPrivacy
-
includeMeta
protected boolean includeMeta
-
singleton
protected static ServerContextCache singleton
-
-
Method Detail
-
getInstance
public static ServerContextCache getInstance()
-
cleanCache
public void cleanCache()
- Overrides:
cleanCachein classorg.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
-
cleanCache
protected void cleanCache(Calendar now)
- Overrides:
cleanCachein classorg.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
-
isIncludeMeta
public boolean isIncludeMeta()
-
setIncludeMeta
public void setIncludeMeta(boolean includeMeta)
-
initContextCacheRenewal
public void initContextCacheRenewal()
-
isUserAllowedToGetPrivacyMeta
protected boolean isUserAllowedToGetPrivacyMeta()
-
getContexts
public List<org.gcube.informationsystem.contexts.reference.entities.Context> getContexts() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Overrides:
getContextsin classorg.gcube.informationsystem.resourceregistry.api.contexts.ContextCache- 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:
getContextByUUIDin classorg.gcube.informationsystem.resourceregistry.api.contexts.ContextCache- 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(List<org.gcube.informationsystem.contexts.reference.entities.Context> contexts)
- Overrides:
setContextsin classorg.gcube.informationsystem.resourceregistry.api.contexts.ContextCache
-
-