Class SchemaFactory

java.lang.Object
de.captaingoldfish.scim.sdk.server.schemas.SchemaFactory

public final class SchemaFactory extends Object
author Pascal Knueppel
created at: 28.09.2019 - 17:01

this class can be used to read new resource schemas into the scim context
  • Constructor Details

    • SchemaFactory

      protected SchemaFactory(ResourceTypeFactory resourceTypeFactory)
      this constructor will register the default schemas defined by RFC7643
  • Method Details

    • registerMetaSchema

      protected void registerMetaSchema(com.fasterxml.jackson.databind.JsonNode jsonSchema)
      will register a new schema
      Parameters:
      jsonSchema - the schema as json node
    • registerResourceSchema

      public Schema registerResourceSchema(com.fasterxml.jackson.databind.JsonNode jsonSchema)
      will register a new resource schema
      Parameters:
      jsonSchema - the schema as json node
    • getMetaSchema

      public Schema getMetaSchema(String id)
      extracts a meta schema that will define the base of another schema like the user resource schema or group resource schema
      Parameters:
      id - the fully qualified id of the meta schema
      Returns:
      the meta schema if it does exist or null
    • getResourceSchema

      public Schema getResourceSchema(String id)
      extracts a resource schema that will define a resource like "User" or "Group"
      Parameters:
      id - the fully qualified id of the resource schema
      Returns:
      the resource schema if it does exist or null
    • getAllResourceSchemas

      public Set<Schema> getAllResourceSchemas()
      Returns:
      all registered resource schematas
    • getMetaSchemas

      protected Map<String,Schema> getMetaSchemas()
      this map will hold the meta schemata that will define how other schemata must be build
    • getResourceSchemas

      protected Map<String,Schema> getResourceSchemas()
      this map will hold the resource schemata that will define how the resources itself must be build
    • getResourceTypeFactory

      protected ResourceTypeFactory getResourceTypeFactory()
      used for unit tests in order to prevent application context pollution