Interface CreateResourceValidator


  • public interface CreateResourceValidator
    Callback which is called at the beginning of creating a resource
    • Method Detail

      • validate

        ConnectorResponse validate​(VariantResource resource)
        Callback which is called at the beginning of creating a resource but after simple validation (whether a resource with given id already exists and whether the resource has a valid structure). It can be used in order to add custom logic which validates whether the resource can be created. If it returns a response with code different from OK, the creation logic will not be executed and CREATE_RESOURCE procedure will return this error.
        Parameters:
        resource - resource object created from procedure's arguments
        Returns:
        a response with the code OK if the validation was successful and the resource can be created, otherwise a response with an error code and an error message