Search in sources :

Example 1 with Column

use of com.opentext.ia.sdk.dto.result.Column in project infoarchive-sip-sdk by Enterprise-Content-Management.

the class PropertiesBasedConfigurer method createResultMaster.

private ResultMaster createResultMaster(String searchName, String compositionName, long version) {
    ResultMaster result = new ResultMaster();
    result.setVersion(version);
    result.setNamespaces(createNamespaces(templatedString(SEARCH_QUERY, searchName)));
    List<Column> columns = result.getDefaultTab().getColumns();
    result.getDefaultTab().setExportEnabled(templatedBoolean(SEARCH_COMPOSITION_RESULT_MAIN_EXPORT_ENABLED_TEMPLATE, searchName));
    result.getDefaultTab().getExportConfigurations().addAll(uriFromNamesAndType(EXPORT_CONFIGURATION, getStrings(SEARCH_COMPOSITION_RESULT_MAIN_EXPORT_CONFIG_TEMPLATE, searchName)));
    for (Map<String, String> config : getSearchColumnConfigs(searchName, compositionName)) {
        String name = config.get(resolveTemplatedKey(SEARCH_COMPOSITION_RESULT_MAIN_COLUMN_NAME, searchName, compositionName));
        String label = config.get(resolveTemplatedKey(SEARCH_COMPOSITION_RESULT_MAIN_COLUMN_LABEL, searchName, compositionName));
        String path = config.get(resolveTemplatedKey(SEARCH_COMPOSITION_RESULT_MAIN_COLUMN_PATH, searchName, compositionName));
        DataType dataType = DataType.valueOf(config.get(resolveTemplatedKey(SEARCH_COMPOSITION_RESULT_MAIN_COLUMN_TYPE, searchName, compositionName)));
        DefaultSort sortOrder = DefaultSort.valueOf(config.get(resolveTemplatedKey(SEARCH_COMPOSITION_RESULT_MAIN_COLUMN_SORT, searchName, compositionName)));
        Column column = Column.fromSchema(name, label, path, dataType, sortOrder);
        columns.add(column);
    }
    return result;
}
Also used : DefaultSort(com.opentext.ia.sdk.dto.result.Column.DefaultSort) Column(com.opentext.ia.sdk.dto.result.Column) ResultMaster(com.opentext.ia.sdk.dto.result.ResultMaster) DataType(com.opentext.ia.sdk.dto.result.Column.DataType)

Example 2 with Column

use of com.opentext.ia.sdk.dto.result.Column in project infoarchive-sip-sdk by Enterprise-Content-Management.

the class PropertiesBasedApplicationConfigurer method createResultMaster.

private ResultMaster createResultMaster(String searchName, String compositionName, long version) {
    ResultMaster result = new ResultMaster();
    result.setVersion(version);
    result.setNamespaces(createNamespaces(templatedString(SEARCH_QUERY, searchName)));
    Tab defaultTab = result.getDefaultTab();
    List<Column> columns = defaultTab.getColumns();
    defaultTab.setExportEnabled(templatedBoolean(SEARCH_COMPOSITION_RESULT_MAIN_EXPORT_ENABLED_TEMPLATE, searchName));
    defaultTab.getExportConfigurations().addAll(uriFromNamesAndType(EXPORT_CONFIGURATION, getStrings(SEARCH_COMPOSITION_RESULT_MAIN_EXPORT_CONFIG_TEMPLATE, searchName)));
    for (Map<String, String> config : getSearchColumnConfigs(searchName, compositionName)) {
        String name = config.get(resolveTemplatedKey(SEARCH_COMPOSITION_RESULT_MAIN_COLUMN_NAME, searchName, compositionName));
        String label = config.get(resolveTemplatedKey(SEARCH_COMPOSITION_RESULT_MAIN_COLUMN_LABEL, searchName, compositionName));
        String path = config.get(resolveTemplatedKey(SEARCH_COMPOSITION_RESULT_MAIN_COLUMN_PATH, searchName, compositionName));
        DataType dataType = DataType.valueOf(config.get(resolveTemplatedKey(SEARCH_COMPOSITION_RESULT_MAIN_COLUMN_TYPE, searchName, compositionName)));
        DefaultSort sortOrder = DefaultSort.valueOf(config.get(resolveTemplatedKey(SEARCH_COMPOSITION_RESULT_MAIN_COLUMN_SORT, searchName, compositionName)));
        Column column = Column.fromSchema(name, label, path, dataType, sortOrder);
        columns.add(column);
    }
    return result;
}
Also used : DefaultSort(com.opentext.ia.sdk.dto.result.Column.DefaultSort) Tab(com.opentext.ia.sdk.dto.result.Tab) Column(com.opentext.ia.sdk.dto.result.Column) ResultMaster(com.opentext.ia.sdk.dto.result.ResultMaster) DataType(com.opentext.ia.sdk.dto.result.Column.DataType)

Aggregations

Column (com.opentext.ia.sdk.dto.result.Column)2 DataType (com.opentext.ia.sdk.dto.result.Column.DataType)2 DefaultSort (com.opentext.ia.sdk.dto.result.Column.DefaultSort)2 ResultMaster (com.opentext.ia.sdk.dto.result.ResultMaster)2 Tab (com.opentext.ia.sdk.dto.result.Tab)1