public abstract class EntityManagement<E extends org.gcube.informationsystem.model.reference.entities.Entity,ET extends org.gcube.informationsystem.types.reference.entities.EntityType> extends EntityElementManagement<E,ET> implements ERManagement
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
forceAddToContext |
protected boolean |
honourPropagationConstraintsInContextSharing
By the default the system honour the propagation constraints
so this variable is initialised as true.
|
protected Map<String,RelationManagement<?,?>> |
relationManagements
Provide a cache edge-internal-id -> RelationManagement
this avoid to recreate the relationManagement of already visited edges
|
protected boolean |
skipped |
protected SecurityContext |
sourceSecurityContext
The source context of an addToContex
|
protected SecurityContext |
targetSecurityContext
The target context of an addToContex/RemoveFromContext
|
IN_PREFIX, OUT_PREFIXaccessType, affectedInstances, AT, cachedType, complete, DELETED, dryRun, element, elementClass, entryPoint, ignoreKeys, ignoreStartWithKeys, jsonNode, logger, oClass, oDatabaseDocument, operation, reload, self, typeName, UNDERSCORE, uuid, workingContext| Modifier | Constructor and Description |
|---|---|
protected |
EntityManagement(org.gcube.informationsystem.base.reference.AccessType accessType) |
| Modifier and Type | Method and Description |
|---|---|
protected static org.gcube.com.fasterxml.jackson.databind.JsonNode |
addRelation(org.gcube.com.fasterxml.jackson.databind.JsonNode sourceResource,
org.gcube.com.fasterxml.jackson.databind.JsonNode relation,
String arrayKey) |
void |
addToContext(UUID contextUUID) |
void |
addToRelationManagements(RelationManagement<?,?> relationManagement) |
protected com.orientechnologies.orient.core.record.OVertex |
createVertex() |
com.orientechnologies.orient.core.record.OVertex |
getElement() |
protected RelationManagement<?,?> |
getRelationManagement(com.orientechnologies.orient.core.record.OEdge edge) |
SecurityContext |
getSourceSecurityContext() |
SecurityContext |
getTargetSecurityContext() |
void |
internalAddToContext() |
void |
internalRemoveFromContext() |
boolean |
isHonourPropagationConstraintsInContextSharing() |
boolean |
propertyMatchRequestedValue(com.orientechnologies.orient.core.record.OVertex v,
String key,
String requestedValue,
Object instanceValue) |
String |
query(String relationType,
String referenceType,
UUID referenceUUID,
com.orientechnologies.orient.core.record.ODirection direction,
boolean polymorphic,
Map<String,String> constraint) |
protected void |
reallyAddToContext() |
String |
reallyGetAll(boolean polymorphic) |
String |
reallyQuery(String relationType,
String referenceType,
UUID referenceUUID,
com.orientechnologies.orient.core.record.ODirection direction,
boolean polymorphic,
Map<String,String> constraint) |
String |
reallyQueryTraversal(String relationType,
String referenceType,
UUID referenceUUID,
com.orientechnologies.orient.core.record.ODirection direction,
boolean polymorphic,
Map<String,String> constraint) |
protected void |
reallyRemoveFromContext() |
void |
removeFromContext(UUID contextUUID) |
void |
setForceAddToContext(Boolean forceAddToContext) |
void |
setHonourPropagationConstraintsInContextSharing(boolean honourPropagationConstraintsInContextSharing) |
void |
setSourceSecurityContext(SecurityContext sourceSecurityContext)
Set source security context to evaluate addToContext
|
void |
setTargetSecurityContext(SecurityContext targetSecurityContext)
Set target security context of addToContext/removeFromContext
|
addToRelationManagement, getBaseRelationManagementall, checkERMatch, checkJsonNode, checkUUIDMatch, cleanCachedSerialization, create, createCompleteJsonNode, createOrUpdate, delete, exists, getAccessType, getAffectedInstances, getAllProperties, getCachedType, getClassProperty, getContexts, getContextsAsObjectNode, getContextsSet, getMandatoryErrorMessage, getNotNullErrorMessage, getObjectFromJsonNode, getOClass, getPropertyForJson, getPropertyMap, getSpecificAlreadyPresentException, getSpecificNotFoundException, getTypeName, getUUID, getWorkingContext, internalCreate, internalCreateOrUdate, internalDelete, internalUpdate, isDryRun, isReload, read, reallyCreate, reallyDelete, reallyUpdate, retrieveElement, retrieveElementFromAnyContext, sanityCheck, serializeAsAffectedInstance, serializeAsJsonNode, serializeSelfAsJsonNode, setAsEntryPoint, setDryRun, setElement, setElementType, setJson, setJsonNode, setOClass, setODatabaseDocument, setOperation, setProperty, setReload, setUUID, setWorkingContext, typeSatified, update, updatePropertiesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAffectedInstances, getSpecificAvailableInAnotherContextExceptionprotected SecurityContext sourceSecurityContext
protected SecurityContext targetSecurityContext
protected boolean honourPropagationConstraintsInContextSharing
ElementManagement.dryRun=true.
This allow to simulate a sharing operation which requires
do not honour the propagation constraints.protected Map<String,RelationManagement<?,?>> relationManagements
protected boolean forceAddToContext
protected boolean skipped
protected EntityManagement(org.gcube.informationsystem.base.reference.AccessType accessType)
public void setSourceSecurityContext(SecurityContext sourceSecurityContext)
ERManagementsetSourceSecurityContext in interface ERManagementsourceSecurityContext - the source security contextpublic SecurityContext getSourceSecurityContext()
getSourceSecurityContext in interface ERManagementpublic void setTargetSecurityContext(SecurityContext targetSecurityContext)
ERManagementsetTargetSecurityContext in interface ERManagementpublic SecurityContext getTargetSecurityContext()
getTargetSecurityContext in interface ERManagementpublic boolean isHonourPropagationConstraintsInContextSharing()
isHonourPropagationConstraintsInContextSharing in interface ERManagementpublic void setHonourPropagationConstraintsInContextSharing(boolean honourPropagationConstraintsInContextSharing)
setHonourPropagationConstraintsInContextSharing in interface ERManagementpublic com.orientechnologies.orient.core.record.OVertex getElement()
throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException,
org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
getElement in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,ET extends org.gcube.informationsystem.types.reference.entities.EntityType>org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionprotected RelationManagement<?,?> getRelationManagement(com.orientechnologies.orient.core.record.OEdge edge) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic void addToRelationManagements(RelationManagement<?,?> relationManagement) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionprotected static org.gcube.com.fasterxml.jackson.databind.JsonNode addRelation(org.gcube.com.fasterxml.jackson.databind.JsonNode sourceResource,
org.gcube.com.fasterxml.jackson.databind.JsonNode relation,
String arrayKey)
throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionprotected com.orientechnologies.orient.core.record.OVertex createVertex()
throws org.gcube.informationsystem.resourceregistry.api.exceptions.entities.EntityAlreadyPresentException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
createVertex in class EntityElementManagement<E extends org.gcube.informationsystem.model.reference.entities.Entity,ET extends org.gcube.informationsystem.types.reference.entities.EntityType>org.gcube.informationsystem.resourceregistry.api.exceptions.entities.EntityAlreadyPresentExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionprotected void reallyAddToContext()
throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic void internalAddToContext()
throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
internalAddToContext in interface ERManagementorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic void addToContext(UUID contextUUID) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
addToContext in interface ERManagementorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic void internalRemoveFromContext()
throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
internalRemoveFromContext in interface ERManagementorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionprotected void reallyRemoveFromContext()
throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic void removeFromContext(UUID contextUUID) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationException, org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
removeFromContext in interface ERManagementorg.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaViolationExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic String reallyGetAll(boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
reallyGetAll in class ElementManagement<com.orientechnologies.orient.core.record.OVertex,ET extends org.gcube.informationsystem.types.reference.entities.EntityType>org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic boolean propertyMatchRequestedValue(com.orientechnologies.orient.core.record.OVertex v,
String key,
String requestedValue,
Object instanceValue)
throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic String reallyQuery(String relationType, String referenceType, UUID referenceUUID, com.orientechnologies.orient.core.record.ODirection direction, boolean polymorphic, Map<String,String> constraint) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic String reallyQueryTraversal(String relationType, String referenceType, UUID referenceUUID, com.orientechnologies.orient.core.record.ODirection direction, boolean polymorphic, Map<String,String> constraint) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic String query(String relationType, String referenceType, UUID referenceUUID, com.orientechnologies.orient.core.record.ODirection direction, boolean polymorphic, Map<String,String> constraint) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionpublic void setForceAddToContext(Boolean forceAddToContext)
setForceAddToContext in interface ERManagementCopyright © 2022. All Rights Reserved.