Class TypeEnvironment
java.lang.Object
org.gcube.informationsystem.resourceregistry.environments.Environment
org.gcube.informationsystem.resourceregistry.environments.SystemEnvironment
org.gcube.informationsystem.resourceregistry.environments.types.TypeEnvironment
Security partition for all registered Type schema definitions: the core
information-system-model types, any classpath-discovered extension model
(e.g. gcube-model), and any type registered dynamically at runtime via REST
(tracked as unknown in RegistryMetadata until formally adopted by a
classpath model).- Author:
- Luca Frosini (ISTI - CNR)
-
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_ADMIN, IS_INSTANCE_OPERATOR, IS_MANAGER, stateOverrideAllowedRoles -
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 Type environment's reader/writer roles theCLUSTER,SYSTEM_CLUSTERS, andCLASSpermissions needed to read/write type-schema records and traverse the subtype/supertype metadata under OrientDB's record-level security, mirroring the same rule set applied to otherSystemEnvironmentsubclasses (Context, Query Template).static TypeEnvironmentReturns the singleton instance ofTypeEnvironment.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, getStateOverrideAllowedRoles, getSuperRole, getUUID, isElementInContext, isUserAllowed, removeElement, removeElement, toString
-
Method Details
-
getInstance
public static TypeEnvironment getInstance() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionReturns the singleton instance ofTypeEnvironment.- 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 Type environment's reader/writer roles theCLUSTER,SYSTEM_CLUSTERS, andCLASSpermissions needed to read/write type-schema records and traverse the subtype/supertype metadata under OrientDB's record-level security, mirroring the same rule set applied to otherSystemEnvironmentsubclasses (Context, Query Template).- 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
-