Aligned name

This commit is contained in:
Luca Frosini 2021-10-22 20:05:55 +02:00
parent 90a25ee7e7
commit 5676d17c58
5 changed files with 14 additions and 14 deletions

View File

@ -13,7 +13,7 @@ import com.orientechnologies.orient.core.metadata.security.ORule;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class SchemaSecurityContext extends SecurityContext {
public class TypeSecurityContext extends SecurityContext {
private static Logger logger = LoggerFactory.getLogger(SecurityContext.class);
@ -25,18 +25,18 @@ public class SchemaSecurityContext extends SecurityContext {
SCHEMA_SECURITY_CONTEXT_UUID = UUID.fromString(SCHEMA_SECURITY_CONTEXT);
}
private static SchemaSecurityContext instance;
private static TypeSecurityContext instance;
public static SchemaSecurityContext getInstance() throws ResourceRegistryException {
public static TypeSecurityContext getInstance() throws ResourceRegistryException {
if(instance==null) {
instance = new SchemaSecurityContext();
instance = new TypeSecurityContext();
ContextUtility contextUtility = ContextUtility.getInstance();
contextUtility.addSecurityContext(SCHEMA_SECURITY_CONTEXT, instance);
}
return instance;
}
private SchemaSecurityContext() throws ResourceRegistryException {
private TypeSecurityContext() throws ResourceRegistryException {
super(SCHEMA_SECURITY_CONTEXT_UUID, false);
}

View File

@ -22,7 +22,7 @@ import org.gcube.informationsystem.model.reference.properties.Property;
import org.gcube.informationsystem.resourceregistry.contexts.security.AdminSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.ContextSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.QueryTemplatesSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.SchemaSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.TypeSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext.PermissionMode;
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement;
import org.gcube.informationsystem.resourceregistry.types.properties.PropertyTypeDefinitionManagement;
@ -185,7 +185,7 @@ public class DatabaseEnvironment {
AdminSecurityContext adminSecurityContext = AdminSecurityContext.getInstance();
QueryTemplatesSecurityContext queryTemplatesSecurityContext = QueryTemplatesSecurityContext.getInstance();
SchemaSecurityContext schemaSecurityContext = SchemaSecurityContext.getInstance();
TypeSecurityContext typeSecurityContext = TypeSecurityContext.getInstance();
ContextSecurityContext contextSecurityContext = ContextSecurityContext.getInstance();
if(created) {
@ -198,7 +198,7 @@ public class DatabaseEnvironment {
pool.close();
queryTemplatesSecurityContext.create();
schemaSecurityContext.create();
typeSecurityContext.create();
contextSecurityContext.create();

View File

@ -13,7 +13,7 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.Entity
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaAlreadyPresentException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaViolationException;
import org.gcube.informationsystem.resourceregistry.contexts.security.SchemaSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.TypeSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagementUtility;
import org.gcube.informationsystem.resourceregistry.instances.base.entities.EntityElementManagement;
@ -49,7 +49,7 @@ public abstract class EntityTypeDefinitionManagement<E extends EntityType> exten
@Override
protected SecurityContext getWorkingContext() throws ResourceRegistryException {
if (workingContext == null) {
workingContext = SchemaSecurityContext.getInstance();
workingContext = TypeSecurityContext.getInstance();
}
return workingContext;
}

View File

@ -12,7 +12,7 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegis
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaAlreadyPresentException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaViolationException;
import org.gcube.informationsystem.resourceregistry.contexts.security.SchemaSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.TypeSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagement;
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagementUtility;
@ -56,7 +56,7 @@ public class PropertyTypeDefinitionManagement extends ElementManagement<OElement
@Override
protected SecurityContext getWorkingContext() throws ResourceRegistryException {
if(workingContext == null) {
workingContext = SchemaSecurityContext.getInstance();
workingContext = TypeSecurityContext.getInstance();
}
return workingContext;
}

View File

@ -15,7 +15,7 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.relation.Rela
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaAlreadyPresentException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaViolationException;
import org.gcube.informationsystem.resourceregistry.contexts.security.SchemaSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.TypeSecurityContext;
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
import org.gcube.informationsystem.resourceregistry.instances.base.ElementManagementUtility;
import org.gcube.informationsystem.resourceregistry.instances.base.relations.RelationElementManagement;
@ -60,7 +60,7 @@ public abstract class RelationTypeDefinitionManagement<T extends EntityTypeDefin
@Override
protected SecurityContext getWorkingContext() throws ResourceRegistryException {
if (workingContext == null) {
this.workingContext = SchemaSecurityContext.getInstance();
this.workingContext = TypeSecurityContext.getInstance();
}
return workingContext;
}