Class ContextValidator.ContextRejectionCause

  • Enclosing interface:
    ContextValidator

    public static class ContextValidator.ContextRejectionCause
    extends java.lang.Object
    Context Rejection Cause inner class
    • Constructor Detail

      • ContextRejectionCause

        public ContextRejectionCause​(java.lang.String error)
        Default constructor
        Parameters:
        error - error as a string
    • Method Detail

      • rejectIdNotAllowedInCreate

        public static ContextValidator.ContextRejectionCause rejectIdNotAllowedInCreate​(java.lang.String contextIdentifier)
        Reject if id exisit and the action is creation. If id exists, it should be an update instead of create
        Parameters:
        contextIdentifier -
        Returns:
        ContextRejectionCause
      • rejectMandatoryMissing

        public static ContextValidator.ContextRejectionCause rejectMandatoryMissing​(java.lang.String fieldName)
        Reject if one of multiple mandatory parameter are null
        Parameters:
        fieldName -
        Returns:
        ContextRejectionCause
      • rejectDuplicatedInDatabase

        public static ContextValidator.ContextRejectionCause rejectDuplicatedInDatabase​(java.lang.String contextName)
        Verify for each context if already exists one in database that have the same name. The database my manage this kind of constraint (by creating an unique index on the field or column)
        Parameters:
        contextName - the context name
        Returns:
        ContextRejectionCause
      • rejectNoExistanceOfTenant

        public static ContextValidator.ContextRejectionCause rejectNoExistanceOfTenant​(java.lang.Integer tenantId)
        Reject if the tenant does not exist
        Parameters:
        tenantId - the tenant id
        Returns:
        ContextRejectionCause
      • rejectNoExistanceOfIngestContract

        public static ContextValidator.ContextRejectionCause rejectNoExistanceOfIngestContract​(java.lang.String contextName,
                                                                                               java.lang.Integer tenant)
        Parameters:
        contextName - the context name
        Returns:
        ContextRejectionCause
      • rejectNoExistanceOfAccessContract

        public static ContextValidator.ContextRejectionCause rejectNoExistanceOfAccessContract​(java.lang.String contextName,
                                                                                               java.lang.Integer tenant)
        Parameters:
        contextName - the context name
        Returns:
        ContextRejectionCause
      • invalidSecurityProfile

        public static ContextValidator.ContextRejectionCause invalidSecurityProfile​(java.lang.String securityProfileIdentifier)
        Parameters:
        securityProfileIdentifier -
        Returns:
        ContextRejectionCause
      • getReason

        public java.lang.String getReason()
        get reason
        Returns:
        reason