components/template-mgt/org.wso2.carbon.identity.template.mgt/src/main/java/org/wso2/carbon/identity/template/mgt/TemplateManagerImpl.java
/**
     * This method is used to validate the input parameters of a Template.
     *
     * @param template Template element.
     * @throws TemplateManagementException Consent Management Exception.
     */
This method is used to validate the input parameters of a Template.
@param template Template element.
@throws TemplateManagementException Consent Management Exception.
This method is used to validate the input parameters of a Template . @param template Template element . @throws TemplateManagementException Consent Management Exception .
private void validateInputParameters(Template template) throws TemplateManagementException {
        if (isBlank(template.getTemplateName())) {
            if (log.isDebugEnabled()) {
                log.debug("Template name cannot be empty.");
            }
            throw handleClientException(ERROR_CODE_TEMPLATE_NAME_REQUIRED, null);
        }
        if (isBlank(template.getTemplateScript())) {
            if (log.isDebugEnabled()) {
                log.debug("Template script cannot be empty.");
            }
            throw handleClientException(ERROR_CODE_TEMPLATE_SCRIPT_REQUIRED, null);
        }
    }
private void validateInputParameters ( Template template ) throws TemplateManagementException { if ( isBlank ( template . getTemplateName ( ) ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Template name cannot be empty." ) ; } throw handleClientException ( ERROR_CODE_TEMPLATE_NAME_REQUIRED , null ) ; } if ( isBlank ( template . getTemplateScript ( ) ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Template script cannot be empty." ) ; } throw handleClientException ( ERROR_CODE_TEMPLATE_SCRIPT_REQUIRED , null ) ; } }
This method is used to validate the input parameters of a Template.
This method is used to validate the input parameters of a Template .