Class SchemaServiceImpl

    • Constructor Detail

      • SchemaServiceImpl

        public SchemaServiceImpl()
    • Method Detail

      • isValid

        public boolean isValid​(String data,
                               String schemaId)
        Description copied from interface: SchemaService
        Verify if a jsonNode is valid against a schema (This method is fail safe, if unexpected errors happens it will returns false)
        Specified by:
        isValid in interface SchemaService
        Parameters:
        data - to validate
        schemaId - id of the schema used for the validation
        Returns:
        true is the object is valid, false otherwise, false also in case of unexpected errors !
      • isEventValid

        public boolean isEventValid​(String event,
                                    String eventType)
        Description copied from interface: SchemaService
        Deprecate (since 2.2.0). the eventType is now directly extracted from the event source You can directly use sibling function: isEventValid(String event)
        Specified by:
        isEventValid in interface SchemaService
      • isEventValid

        public boolean isEventValid​(String event)
        Description copied from interface: SchemaService
        Verify if the event is valid (This method is fail safe, if unexpected errors happens it will returns false)
        Specified by:
        isEventValid in interface SchemaService
        Parameters:
        event - the event to check validity
        Returns:
        true is the event is valid, false otherwise, false also in case of unexpected errors !
      • saveSchema

        public void saveSchema​(String schema)
        Description copied from interface: SchemaService
        Save a new schema or update a schema
        Specified by:
        saveSchema in interface SchemaService
        Parameters:
        schema - as a String value
      • deleteSchema

        public boolean deleteSchema​(String schemaId)
        Description copied from interface: SchemaService
        Delete a schema according to its id
        Specified by:
        deleteSchema in interface SchemaService
        Parameters:
        schemaId - id of the schema to delete
        Returns:
        true if the schema has been deleted
      • unloadPredefinedSchema

        public boolean unloadPredefinedSchema​(InputStream schemaStream)
        Description copied from interface: SchemaService
        Unload a predefined schema into memory
        Specified by:
        unloadPredefinedSchema in interface SchemaService
        Parameters:
        schemaStream - inputStream of the schema to delete
        Returns:
        true if the schema has been deleted
      • init

        public void init()
      • destroy

        public void destroy()
      • setPersistenceService

        public void setPersistenceService​(PersistenceService persistenceService)
      • setScopeService

        public void setScopeService​(ScopeService scopeService)
      • setJsonSchemaRefreshInterval

        public void setJsonSchemaRefreshInterval​(Integer jsonSchemaRefreshInterval)