public class TypeEnvironment extends SystemEnvironment
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)
  • Method Details

    • getInstance

      public static TypeEnvironment getInstance() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Returns the singleton instance of TypeEnvironment.
      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 the CLUSTER, SYSTEM_CLUSTERS, and CLASS permissions 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 other SystemEnvironment subclasses (Context, Query Template).
      Overrides:
      addExtraRules in class Environment
      Parameters:
      role - the OrientDB role to configure
      permissionMode - the permission mode defining the access level (READER/WRITER)
      Returns:
      the modified role with extra rules applied