Search in sources :

Example 21 with DfDocumentProperties

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

the class DfPropHtmlManager method loadRequest.

// ===================================================================================
// Load Request
// ============
public void loadRequest() {
    final DfDocumentProperties prop = getDocumentProperties();
    final Map<String, Map<String, Object>> propertiesHtmlMap = prop.getPropertiesHtmlMap();
    if (propertiesHtmlMap.isEmpty()) {
        return;
    }
    for (Entry<String, Map<String, Object>> entry : propertiesHtmlMap.entrySet()) {
        final String requestName = entry.getKey();
        _log.info("[" + requestName + "]");
        final Map<String, Object> requestMap = entry.getValue();
        final DfPropHtmlRequest request = prepareRequest(requestMap, requestName);
        _requestMap.put(requestName, request);
    }
    analyzePropertiesDiff();
}
Also used : DfDocumentProperties(org.dbflute.properties.DfDocumentProperties) Map(java.util.Map)

Example 22 with DfDocumentProperties

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

the class DfPropHtmlPropertyLangElement method getPropertyValueHtmlEncoded.

public String getPropertyValueHtmlEncoded() {
    final DfDocumentProperties prop = DfBuildProperties.getInstance().getDocumentProperties();
    final String resolved = prop.resolveTextForSchemaHtml(_propertyValue);
    return resolved != null ? resolved : "";
}
Also used : DfDocumentProperties(org.dbflute.properties.DfDocumentProperties)

Example 23 with DfDocumentProperties

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

the class Table method getCommentForJavaDoc.

public String getCommentForJavaDoc() {
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final String comment = prop.resolveTextForJavaDoc(getComment(), "");
    return comment != null ? comment : "";
}
Also used : DfDocumentProperties(org.dbflute.properties.DfDocumentProperties)

Example 24 with DfDocumentProperties

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

the class Table method getForeignTableNameCommaStringWithHtmlHref.

public String getForeignTableNameCommaStringWithHtmlHref() {
    // for SchemaHTML
    final StringBuilder sb = new StringBuilder();
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final DfSchemaHtmlBuilder schemaHtmlBuilder = new DfSchemaHtmlBuilder(prop);
    final String delimiter = ", ";
    final List<ForeignKey> foreignKeyList = getForeignKeyList();
    final int size = foreignKeyList.size();
    if (size == 0) {
        return "&nbsp;";
    }
    for (int i = 0; i < size; i++) {
        final ForeignKey fk = foreignKeyList.get(i);
        final Table foreignTable = fk.getForeignTable();
        sb.append(schemaHtmlBuilder.buildRelatedTableLink(fk, foreignTable, delimiter));
    }
    sb.delete(0, delimiter.length());
    return sb.toString();
}
Also used : DfColumnListToStringBuilder(org.dbflute.logic.generate.column.DfColumnListToStringBuilder) DfDocumentProperties(org.dbflute.properties.DfDocumentProperties) DfSchemaHtmlBuilder(org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder)

Example 25 with DfDocumentProperties

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

the class Table method getTitleForSchemaHtml.

public String getTitleForSchemaHtml() {
    final StringBuilder sb = new StringBuilder();
    sb.append("type=").append(_type);
    if (isAdditionalSchema()) {
        sb.append(", schema=").append(getDocumentSchema());
    }
    sb.append(", primaryKey={").append(getPrimaryKeyNameCommaString()).append("}");
    sb.append(", nameLength=").append(getTableDbName().length());
    sb.append(", columnCount=").append(getColumns().length);
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    return " title=\"" + prop.resolveAttributeForSchemaHtml(sb.toString()) + "\"";
}
Also used : DfColumnListToStringBuilder(org.dbflute.logic.generate.column.DfColumnListToStringBuilder) DfDocumentProperties(org.dbflute.properties.DfDocumentProperties)

Aggregations

DfDocumentProperties (org.dbflute.properties.DfDocumentProperties)34 DfSchemaHtmlBuilder (org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder)4 Map (java.util.Map)3 DfColumnListToStringBuilder (org.dbflute.logic.generate.column.DfColumnListToStringBuilder)3 Entry (java.util.Map.Entry)2 BufferedReader (java.io.BufferedReader)1 BufferedWriter (java.io.BufferedWriter)1 FileInputStream (java.io.FileInputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 OutputStreamWriter (java.io.OutputStreamWriter)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 BigDecimal (java.math.BigDecimal)1 DfBuildProperties (org.dbflute.DfBuildProperties)1 JavaPropertiesProperty (org.dbflute.helper.jprop.JavaPropertiesProperty)1 DfLanguageDependency (org.dbflute.logic.generate.language.DfLanguageDependency)1 DfLanguageGrammar (org.dbflute.logic.generate.language.grammar.DfLanguageGrammar)1 DfBasicProperties (org.dbflute.properties.DfBasicProperties)1