Search in sources :

Example 1 with StaticMessageLookup

use of org.alfresco.repo.i18n.StaticMessageLookup in project records-management by Alfresco.

the class DeclarativeReportGenerator method getReportDisplayLabel.

/**
 * Helper method to get the report types display label
 *
 * @return  {@link String}  report type display label
 */
private String getReportDisplayLabel() {
    String result = I18NUtil.getMessage(MSG_REPORT);
    TypeDefinition typeDef = dictionaryService.getType(reportType);
    if (typeDef != null) {
        result = typeDef.getTitle(new StaticMessageLookup());
    }
    return result;
}
Also used : StaticMessageLookup(org.alfresco.repo.i18n.StaticMessageLookup) TypeDefinition(org.alfresco.service.cmr.dictionary.TypeDefinition)

Example 2 with StaticMessageLookup

use of org.alfresco.repo.i18n.StaticMessageLookup in project records-management by Alfresco.

the class RecordsManagementNodeFormFilter method addRecordMetadataPropertyFieldsToGroup.

/**
 * @param form
 * @param nodeRef
 */
protected void addRecordMetadataPropertyFieldsToGroup(Form form, NodeRef nodeRef) {
    Set<QName> aspects = recordService.getRecordMetadataAspects(nodeRef);
    for (QName aspect : aspects) {
        if (nodeService.hasAspect(nodeRef, aspect)) {
            String aspectName = aspect.getPrefixedQName(namespaceService).toPrefixString().replace(":", "-");
            String setId = RM_METADATA_PREFIX + aspectName;
            String setLabel = null;
            AspectDefinition aspectDefinition = dictionaryService.getAspect(aspect);
            if (aspectDefinition != null) {
                setLabel = aspectDefinition.getTitle(new StaticMessageLookup());
            }
            addPropertyFieldsToGroup(form, dictionaryService.getPropertyDefs(aspect), setId, setLabel);
        }
    }
}
Also used : StaticMessageLookup(org.alfresco.repo.i18n.StaticMessageLookup) QName(org.alfresco.service.namespace.QName) AspectDefinition(org.alfresco.service.cmr.dictionary.AspectDefinition)

Aggregations

StaticMessageLookup (org.alfresco.repo.i18n.StaticMessageLookup)2 AspectDefinition (org.alfresco.service.cmr.dictionary.AspectDefinition)1 TypeDefinition (org.alfresco.service.cmr.dictionary.TypeDefinition)1 QName (org.alfresco.service.namespace.QName)1