Search in sources :

Example 56 with DfIllegalPropertySettingException

use of org.dbflute.exception.DfIllegalPropertySettingException in project dbflute-core by dbflute.

the class DfDispatchVariableResolver method throwNotFoundEnvironmentVariableException.

protected void throwNotFoundEnvironmentVariableException(String propTitle, String definedValue, String envKey, Map<String, String> envMap) {
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("Not found the environment variable for the key");
    br.addItem("Property Title");
    br.addElement(propTitle);
    br.addItem("Defined in dfprop");
    br.addElement(definedValue);
    br.addItem("NotFound Key");
    br.addElement(envKey);
    br.addItem("Existing Variable");
    br.addElement(envMap.keySet());
    final String msg = br.buildExceptionMessage();
    throw new DfIllegalPropertySettingException(msg);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) DfIllegalPropertySettingException(org.dbflute.exception.DfIllegalPropertySettingException)

Example 57 with DfIllegalPropertySettingException

use of org.dbflute.exception.DfIllegalPropertySettingException in project dbflute-core by dbflute.

the class DfLittleAdjustmentProperties method throwUnknownClassificationUndefinedHandlingTypeException.

protected void throwUnknownClassificationUndefinedHandlingTypeException(String code, String dfpropFile) {
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("Unknown handling type of classification undefined code.");
    br.addItem("Advice");
    br.addElement("You can specify following types:");
    for (ClassificationUndefinedHandlingType handlingType : ClassificationUndefinedHandlingType.values()) {
        br.addElement(" " + handlingType.code());
    }
    final String exampleCode = ClassificationUndefinedHandlingType.EXCEPTION.code();
    br.addElement("");
    br.addElement("For example: (littleAdjustmentMap.dfprop)");
    br.addElement("map:{");
    br.addElement("    ...");
    br.addElement("    ");
    br.addElement("    ; classificationUndefinedCodeHandlingType = " + exampleCode);
    br.addElement("    ...");
    br.addElement("}");
    br.addItem("Specified Unknown Type");
    br.addElement(code);
    br.addItem("dfprop File");
    br.addElement(dfpropFile);
    final String msg = br.buildExceptionMessage();
    throw new DfIllegalPropertySettingException(msg);
}
Also used : ClassificationUndefinedHandlingType(org.dbflute.jdbc.ClassificationUndefinedHandlingType) ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) DfIllegalPropertySettingException(org.dbflute.exception.DfIllegalPropertySettingException)

Example 58 with DfIllegalPropertySettingException

use of org.dbflute.exception.DfIllegalPropertySettingException in project dbflute-core by dbflute.

the class DfProcedureExtractor method throwProcedureToDBLinkTranslationFailureException.

protected void throwProcedureToDBLinkTranslationFailureException(String propertyName, String packageName, String procedureName, String dbLinkName) {
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("Failed to translate the procedure to DB link.");
    br.addItem("Advice");
    br.addElement("Make sure your procedure name is correct.");
    br.addElement("Does the DBLink name exist on the schema?");
    br.addItem("Specified Property");
    br.addElement(propertyName);
    br.addItem("Package Name");
    br.addElement(packageName);
    br.addItem("Procedure Name");
    br.addElement(procedureName);
    br.addItem("DBLink Name");
    br.addElement(dbLinkName);
    final String msg = br.buildExceptionMessage();
    throw new DfIllegalPropertySettingException(msg);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) DfIllegalPropertySettingException(org.dbflute.exception.DfIllegalPropertySettingException)

Example 59 with DfIllegalPropertySettingException

use of org.dbflute.exception.DfIllegalPropertySettingException in project dbflute-core by dbflute.

the class DfElasticsearchLoadingAgent method throwJsonTableReferenceNotFoundException.

protected void throwJsonTableReferenceNotFoundException(String currentTableName, String specifiedTableName) {
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("Not found the table by the reference at the type. (FreeGen)");
    br.addItem("Request Name");
    br.addElement(_requestName);
    br.addItem("JSON File");
    br.addElement(_resource.getResourceFile());
    br.addItem("Current Table");
    br.addElement(currentTableName);
    br.addItem("Specified Table");
    br.addElement(specifiedTableName);
    final String msg = br.buildExceptionMessage();
    throw new DfIllegalPropertySettingException(msg);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) DfIllegalPropertySettingException(org.dbflute.exception.DfIllegalPropertySettingException)

Example 60 with DfIllegalPropertySettingException

use of org.dbflute.exception.DfIllegalPropertySettingException in project dbflute-core by dbflute.

the class DfJsonSchemaLoadingAgent method throwJsonTablePathPropertyNotFoundException.

protected void throwJsonTablePathPropertyNotFoundException() {
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("Not found the table path in the tableMap property. (FreeGen)");
    br.addItem("Request Name");
    br.addElement(_requestName);
    br.addItem("JSON File");
    br.addElement(_resource.getResourceFile());
    br.addItem("tableMap");
    br.addElement(_mapProp.getOptionMap());
    final String msg = br.buildExceptionMessage();
    throw new DfIllegalPropertySettingException(msg);
}
Also used : ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) DfIllegalPropertySettingException(org.dbflute.exception.DfIllegalPropertySettingException)

Aggregations

DfIllegalPropertySettingException (org.dbflute.exception.DfIllegalPropertySettingException)76 ExceptionMessageBuilder (org.dbflute.helper.message.ExceptionMessageBuilder)58 Map (java.util.Map)9 DfClassificationTop (org.dbflute.properties.assistant.classification.DfClassificationTop)9 List (java.util.List)8 DfClassificationElement (org.dbflute.properties.assistant.classification.DfClassificationElement)8 LinkedHashMap (java.util.LinkedHashMap)6 ArrayList (java.util.ArrayList)5 StringKeyMap (org.dbflute.helper.StringKeyMap)4 DfClassificationGroup (org.dbflute.properties.assistant.classification.DfClassificationGroup)4 Collectors (java.util.stream.Collectors)3 ClassificationUndefinedHandlingType (org.dbflute.jdbc.ClassificationUndefinedHandlingType)3 DfRefClsElement (org.dbflute.properties.assistant.classification.DfRefClsElement)3 RichTextString (org.apache.poi.ss.usermodel.RichTextString)2 DfIllegalPropertyTypeException (org.dbflute.exception.DfIllegalPropertyTypeException)2 ScopeInfo (org.dbflute.util.Srl.ScopeInfo)2 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1