Search in sources :

Example 1 with DfLastaFluteProperties

use of org.dbflute.properties.DfLastaFluteProperties in project dbflute-core by dbflute.

the class DfLastaDocTableLoader method prepareSchemaHtmlLink.

protected void prepareSchemaHtmlLink(final Map<String, Object> tableMap) {
    final DfLastaFluteProperties prop = getLastaFluteProperties();
    final boolean hasSchemaHtml;
    final String schemaHtmlPath;
    if (prop.isSuppressLastaDocSchemaHtmlLink()) {
        hasSchemaHtml = false;
        schemaHtmlPath = null;
    } else {
        final String outputDirectory = prop.getLastaDocOutputDirectory();
        final String schemaHtmlFileName = getDocumentProperties().getSchemaHtmlFileName(getBasicProperties().getProjectName());
        final File schemaHtmlFile = new File(outputDirectory + "/" + schemaHtmlFileName);
        hasSchemaHtml = schemaHtmlFile.exists();
        // current directory only supported
        schemaHtmlPath = "./" + schemaHtmlFileName;
    }
    tableMap.put("hasSchemaHtml", hasSchemaHtml);
    if (hasSchemaHtml) {
        tableMap.put("schemaHtmlPath", schemaHtmlPath);
    }
}
Also used : DfLastaFluteProperties(org.dbflute.properties.DfLastaFluteProperties) File(java.io.File)

Example 2 with DfLastaFluteProperties

use of org.dbflute.properties.DfLastaFluteProperties in project dbflute-core by dbflute.

the class DfLastaDocTableLoader method doSetupContentsHeader.

protected void doSetupContentsHeader(Map<String, Object> optionMap) {
    final DfLastaFluteProperties prop = getLastaFluteProperties();
    final boolean hasSchemaHtml;
    final String schemaHtmlPath;
    if (prop.isSuppressLastaDocSchemaHtmlLink()) {
        hasSchemaHtml = false;
        schemaHtmlPath = null;
    } else {
        final String outputDirectory = prop.getLastaDocOutputDirectory();
        final String schemaHtmlFileName = getDocumentProperties().getSchemaHtmlFileName(getBasicProperties().getProjectName());
        final File schemaHtmlFile = new File(outputDirectory + "/" + schemaHtmlFileName);
        hasSchemaHtml = schemaHtmlFile.exists();
        // current directory only supported
        schemaHtmlPath = "./" + schemaHtmlFileName;
    }
    optionMap.put("hasSchemaHtml", hasSchemaHtml);
    if (hasSchemaHtml) {
        optionMap.put("schemaHtmlPath", schemaHtmlPath);
    }
}
Also used : DfLastaFluteProperties(org.dbflute.properties.DfLastaFluteProperties) File(java.io.File)

Example 3 with DfLastaFluteProperties

use of org.dbflute.properties.DfLastaFluteProperties in project dbflute-core by dbflute.

the class DfLastaDocTableLoader method doSetupContentsAction.

protected void doSetupContentsAction(Map<String, Object> optionMap) {
    final DfLastaFluteProperties prop = getLastaFluteProperties();
    final DfLastaDocContentsActionMap actionMap = prop.getLastaDocContentsMap().getActionMap();
    optionMap.put("isSuppressDescriptionInList", actionMap.isSuppressDescriptionInList());
    optionMap.put("isSuppressAuthorInList", actionMap.isSuppressAuthorInList());
}
Also used : DfLastaDocContentsActionMap(org.dbflute.properties.assistant.lastaflute.DfLastaDocContentsMap.DfLastaDocContentsActionMap) DfLastaFluteProperties(org.dbflute.properties.DfLastaFluteProperties)

Aggregations

DfLastaFluteProperties (org.dbflute.properties.DfLastaFluteProperties)3 File (java.io.File)2 DfLastaDocContentsActionMap (org.dbflute.properties.assistant.lastaflute.DfLastaDocContentsMap.DfLastaDocContentsActionMap)1