use of com.opentext.ia.sdk.dto.result.Tab 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;
}
Aggregations