Class QueryTemplateEnvironment
java.lang.Object
org.gcube.informationsystem.resourceregistry.environments.Environment
org.gcube.informationsystem.resourceregistry.environments.SystemEnvironment
org.gcube.informationsystem.resourceregistry.environments.queries.templates.QueryTemplateEnvironment
- Author:
- Luca Frosini (ISTI - CNR) Contains all the query templates
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gcube.informationsystem.resourceregistry.environments.Environment
Environment.PermissionMode, Environment.SecurityType -
Field Summary
Fields inherited from class org.gcube.informationsystem.resourceregistry.environments.Environment
allOperationAllowedRoles, CONTEXT_MANAGER, contextSubtreeOperationAllowedRoles, DEFAULT_READER_ROLE, DEFAULT_WRITER_ROLE, environmentUUID, INFRASTRUCTURE_MANAGER, instanceOperationAllowedRoles, IS_INSTANCE_OPERATOR, IS_MANAGER -
Method Summary
Modifier and TypeMethodDescriptionprotected com.orientechnologies.orient.core.metadata.security.ORoleaddExtraRules(com.orientechnologies.orient.core.metadata.security.ORole role, Environment.PermissionMode permissionMode) Grants the Query Template environment's reader/writer roles theCLUSTER,SYSTEM_CLUSTERS, andCLASSpermissions needed to read/write Query Template records under OrientDB's record-level security, mirroring the same rule set applied to otherSystemEnvironmentsubclasses (Context, Type).static QueryTemplateEnvironmentReturns the singleton instance ofQueryTemplateEnvironment.Methods inherited from class org.gcube.informationsystem.resourceregistry.environments.Environment
addElement, addElement, allow, allowed, create, create, createRolesAndUsers, delete, delete, deleteRolesAndUsers, deny, drop, getAllOperationsAllowedRoles, getAllowedRoles, getDatabaseDocument, getInstanceOperationAllowedRoles, getOrCreateRole, getOrCreateUser, getPool, getRoleOrUserName, getSecurityRoleOrUserName, getSuperRole, getUUID, isElementInContext, isUserAllowed, removeElement, removeElement, toString
-
Method Details
-
getInstance
public static QueryTemplateEnvironment getInstance() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionReturns the singleton instance ofQueryTemplateEnvironment.- Returns:
- the singleton instance
- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if initialization fails
-
addExtraRules
protected com.orientechnologies.orient.core.metadata.security.ORole addExtraRules(com.orientechnologies.orient.core.metadata.security.ORole role, Environment.PermissionMode permissionMode) Grants the Query Template environment's reader/writer roles theCLUSTER,SYSTEM_CLUSTERS, andCLASSpermissions needed to read/write Query Template records under OrientDB's record-level security, mirroring the same rule set applied to otherSystemEnvironmentsubclasses (Context, Type).- Overrides:
addExtraRulesin classEnvironment- Parameters:
role- the OrientDB role to configurepermissionMode- the permission mode defining the access level (READER/WRITER)- Returns:
- the modified role with extra rules applied
-