mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-626: Alfresco is not started with RM module applied
- Fallout from ALF-16791 means we will have to code for API changes in 4.1.4 and introduce a new minimum Alfresco version - Fixes by Dmitry Vaserin git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0@47857 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -2,4 +2,4 @@ groupid=alfresco
|
||||
packageName=rm
|
||||
version=2.0.2
|
||||
build=dev
|
||||
alfrescoBaseVersion=4.0.2
|
||||
alfrescoBaseVersion=4.1.4
|
||||
|
@@ -8,4 +8,4 @@ module.title=Records Management
|
||||
module.description=Alfresco Record Management Extension
|
||||
module.version=2.0.2
|
||||
|
||||
module.repo.version.min=4.0.2
|
||||
module.repo.version.min=4.1.4
|
@@ -52,6 +52,7 @@
|
||||
<bean id="webscript.org.alfresco.rma.customrefdefinitions.get" class="org.alfresco.module.org_alfresco_module_rm.script.CustomReferenceDefinitionsGet" parent="webscript">
|
||||
<property name="recordsManagementAdminService" ref="RecordsManagementAdminService"/>
|
||||
<property name="namespaceService" ref="NamespaceService"/>
|
||||
<property name="dictionaryService" ref="DictionaryService"/>
|
||||
</bean>
|
||||
|
||||
<!-- REST impl for PUT Custom Reference Definitions -->
|
||||
@@ -67,6 +68,7 @@
|
||||
<!-- REST impl for GET Custom Reference Instances -->
|
||||
<bean id="webscript.org.alfresco.rma.customrefs.get" class="org.alfresco.module.org_alfresco_module_rm.script.CustomRefsGet" parent="rmBaseWebscript">
|
||||
<property name="recordsManagementAdminService" ref="RecordsManagementAdminService"/>
|
||||
<property name="dictionaryService" ref="DictionaryService"/>
|
||||
</bean>
|
||||
|
||||
<!-- REST impl for POST Custom Reference Instance -->
|
||||
@@ -115,6 +117,7 @@
|
||||
<bean id="webscript.org.alfresco.rma.dispositionproperties.get" class="org.alfresco.module.org_alfresco_module_rm.script.DispositionPropertiesGet" parent="webscript">
|
||||
<property name="dispositionService" ref="DispositionService"/>
|
||||
<property name="namespaceService" ref="NamespaceService"/>
|
||||
<property name="dictionaryService" ref="DictionaryService"/>
|
||||
</bean>
|
||||
|
||||
<!-- REST impl for GET Records MetaData aspects -->
|
||||
|
@@ -421,7 +421,7 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
||||
if (name.endsWith("Properties") == true)
|
||||
{
|
||||
QName type = null;
|
||||
String prefixString = aspectDef.getDescription();
|
||||
String prefixString = aspectDef.getDescription(dictionaryService);
|
||||
if (prefixString == null)
|
||||
{
|
||||
// Backward compatibility from previous RM V1.0 custom models
|
||||
@@ -1183,7 +1183,7 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
|
||||
{
|
||||
for (AssociationDefinition associationDefinition : getCustomReferenceDefinitions().values())
|
||||
{
|
||||
if (associationDefinition.getTitle().equalsIgnoreCase(label))
|
||||
if (associationDefinition.getTitle(dictionaryService).equalsIgnoreCase(label))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@@ -84,7 +84,7 @@ public class SplitEmailAction extends RMActionExecuterAbstractBase
|
||||
Map<QName, AssociationDefinition> map = recordsManagementAdminService.getCustomReferenceDefinitions();
|
||||
for (Map.Entry<QName, AssociationDefinition> entry : map.entrySet())
|
||||
{
|
||||
if (compoundId.equals(entry.getValue().getTitle()) == true)
|
||||
if (compoundId.equals(entry.getValue().getTitle(dictionaryService)) == true)
|
||||
{
|
||||
relationshipQName = entry.getKey();
|
||||
break;
|
||||
|
@@ -822,7 +822,7 @@ public class RecordsManagementAuditServiceImpl
|
||||
if (nodeTypeQname != null)
|
||||
{
|
||||
TypeDefinition typeDef = dictionaryService.getType(nodeTypeQname);
|
||||
nodeType = (typeDef != null) ? typeDef.getTitle() : null;
|
||||
nodeType = (typeDef != null) ? typeDef.getTitle(dictionaryService) : null;
|
||||
}
|
||||
}
|
||||
else if (values.containsKey(RecordsManagementAuditService.RM_AUDIT_DATA_LOGIN_USERNAME))
|
||||
@@ -1300,7 +1300,7 @@ public class RecordsManagementAuditServiceImpl
|
||||
PropertyDefinition propDef = this.dictionaryService.getProperty(property);
|
||||
if (propDef != null)
|
||||
{
|
||||
label = propDef.getTitle();
|
||||
label = propDef.getTitle(dictionaryService);
|
||||
}
|
||||
|
||||
if (label == null)
|
||||
|
@@ -39,7 +39,7 @@ import org.alfresco.service.namespace.QName;
|
||||
public class RFC822MetadataExtracter extends org.alfresco.repo.content.metadata.RFC822MetadataExtracter
|
||||
{
|
||||
/** Reference to default properties */
|
||||
private static final String PROPERTIES_URL = "org/alfresco/repo/content/metadata/RFC822MetadataExtracter.properties";
|
||||
private static final String PROPERTIES_URL = "alfresco/metadata/RFC822MetadataExtracter.properties";
|
||||
|
||||
/** Node service */
|
||||
private NodeService nodeService;
|
||||
|
@@ -130,7 +130,7 @@ public abstract class RecordsManagementFormFilter<ItemType> extends AbstractFilt
|
||||
Serializable value = nodeService.getProperty(nodeRef, entry.getKey());
|
||||
|
||||
FieldGroup group = new FieldGroup(setId, null, false, false, null);
|
||||
Field field = FieldUtils.makePropertyField(prop, value, group, namespaceService);
|
||||
Field field = FieldUtils.makePropertyField(prop, value, group, namespaceService, rmServiceRegistry.getDictionaryService());
|
||||
|
||||
form.addField(field);
|
||||
|
||||
|
@@ -198,7 +198,7 @@ public class RecordsManagementNodeFormFilter extends RecordsManagementFormFilter
|
||||
|
||||
if (propDef != null)
|
||||
{
|
||||
Field field = FieldUtils.makePropertyField(propDef, null, null, namespaceService);
|
||||
Field field = FieldUtils.makePropertyField(propDef, null, null, namespaceService, dictionaryService);
|
||||
form.addField(field);
|
||||
}
|
||||
else if (logger.isWarnEnabled())
|
||||
|
@@ -132,7 +132,7 @@ public class RecordsManagementTypeFormFilter extends RecordsManagementFormFilter
|
||||
// setup field definition for each custom property
|
||||
Collection<PropertyDefinition> properties = customProps.values();
|
||||
FieldGroup group = new FieldGroup(CUSTOM_RM_FIELD_GROUP_ID, null, false, false, null);
|
||||
List<Field> fields = FieldUtils.makePropertyFields(properties, group, namespaceService);
|
||||
List<Field> fields = FieldUtils.makePropertyFields(properties, group, namespaceService, rmServiceRegistry.getDictionaryService());
|
||||
form.addFields(fields);
|
||||
}
|
||||
}
|
||||
|
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementAdminService;
|
||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.ChildAssociationDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.springframework.extensions.webscripts.Cache;
|
||||
@@ -56,6 +57,7 @@ public class CustomReferenceDefinitionsGet extends DeclarativeWebScript
|
||||
|
||||
private RecordsManagementAdminService rmAdminService;
|
||||
private NamespaceService namespaceService;
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
public void setNamespaceService(NamespaceService namespaceService)
|
||||
{
|
||||
@@ -67,6 +69,11 @@ public class CustomReferenceDefinitionsGet extends DeclarativeWebScript
|
||||
this.rmAdminService = rmAdminService;
|
||||
}
|
||||
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
this.dictionaryService = dictionaryService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
||||
{
|
||||
@@ -120,7 +127,7 @@ public class CustomReferenceDefinitionsGet extends DeclarativeWebScript
|
||||
data.put(REFERENCE_TYPE, referenceType.toString());
|
||||
|
||||
// It is the title which stores either the label, or the source and target.
|
||||
String nextTitle = nextValue.getTitle();
|
||||
String nextTitle = nextValue.getTitle(dictionaryService);
|
||||
if (CustomReferenceType.PARENT_CHILD.equals(referenceType))
|
||||
{
|
||||
if (nextTitle != null)
|
||||
|
@@ -26,6 +26,7 @@ import java.util.Map;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementAdminService;
|
||||
import org.alfresco.service.cmr.dictionary.AssociationDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -59,12 +60,20 @@ public class CustomRefsGet extends AbstractRmWebScript
|
||||
|
||||
private static Log logger = LogFactory.getLog(CustomRefsGet.class);
|
||||
private RecordsManagementAdminService rmAdminService;
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
|
||||
public void setRecordsManagementAdminService(RecordsManagementAdminService rmAdminService)
|
||||
{
|
||||
this.rmAdminService = rmAdminService;
|
||||
}
|
||||
|
||||
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
this.dictionaryService = dictionaryService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> executeImpl(WebScriptRequest req, Status status, Cache cache)
|
||||
{
|
||||
@@ -132,7 +141,7 @@ public class CustomRefsGet extends AbstractRmWebScript
|
||||
|
||||
if (assDef != null)
|
||||
{
|
||||
String compoundTitle = assDef.getTitle();
|
||||
String compoundTitle = assDef.getTitle(dictionaryService);
|
||||
|
||||
data.put(REF_ID, typeQName.getLocalName());
|
||||
|
||||
@@ -166,7 +175,7 @@ public class CustomRefsGet extends AbstractRmWebScript
|
||||
|
||||
if (assDef != null)
|
||||
{
|
||||
data.put(LABEL, assDef.getTitle());
|
||||
data.put(LABEL, assDef.getTitle(dictionaryService));
|
||||
data.put(REF_ID, typeQName.getLocalName());
|
||||
data.put(REFERENCE_TYPE, CustomReferenceType.BIDIRECTIONAL.toString());
|
||||
data.put(SOURCE_REF, assRef.getSourceRef().toString());
|
||||
|
@@ -96,7 +96,7 @@ public class CustomisableGet extends DeclarativeWebScript
|
||||
if (definition != null)
|
||||
{
|
||||
String name = qname.toPrefixString(namespaceService);
|
||||
String title = definition.getTitle();
|
||||
String title = definition.getTitle(dictionaryService);
|
||||
if (title == null || title.length() == 0)
|
||||
{
|
||||
title = qname.getLocalName();
|
||||
|
@@ -26,6 +26,7 @@ import java.util.Map;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.property.DispositionProperty;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -42,6 +43,7 @@ public class DispositionPropertiesGet extends DeclarativeWebScript
|
||||
{
|
||||
protected DispositionService dispositionService;
|
||||
protected NamespaceService namespaceService;
|
||||
protected DictionaryService dictionaryService;
|
||||
|
||||
/**
|
||||
* Sets the disposition service
|
||||
@@ -63,6 +65,11 @@ public class DispositionPropertiesGet extends DeclarativeWebScript
|
||||
this.namespaceService = namespaceService;
|
||||
}
|
||||
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
this.dictionaryService = dictionaryService;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.alfresco.web.scripts.DeclarativeWebScript#executeImpl(org.alfresco.web.scripts.WebScriptRequest, org.alfresco.web.scripts.Status, org.alfresco.web.scripts.Cache)
|
||||
*/
|
||||
@@ -87,7 +94,7 @@ public class DispositionPropertiesGet extends DeclarativeWebScript
|
||||
if (propDef != null)
|
||||
{
|
||||
Map<String, String> item = new HashMap<String, String>(2);
|
||||
String propTitle = propDef.getTitle();
|
||||
String propTitle = propDef.getTitle(dictionaryService);
|
||||
if (propTitle == null || propTitle.length() == 0)
|
||||
{
|
||||
propTitle = StringUtils.capitalize(propName.getLocalName());
|
||||
|
@@ -259,7 +259,7 @@ public class ListOfValuesGet extends DeclarativeWebScript
|
||||
if (propDef != null)
|
||||
{
|
||||
Map<String, String> item = new HashMap<String, String>(2);
|
||||
String propTitle = propDef.getTitle();
|
||||
String propTitle = propDef.getTitle(ddService);
|
||||
if (propTitle == null || propTitle.length() == 0)
|
||||
{
|
||||
propTitle = StringUtils.capitalize(propName.getLocalName());
|
||||
|
@@ -91,7 +91,7 @@ public class RecordMetaDataAspectsGet extends DeclarativeWebScript
|
||||
if (aspectDefinition != null)
|
||||
{
|
||||
// Fet the label from the aspect definition
|
||||
label = aspectDefinition.getTitle();
|
||||
label = aspectDefinition.getTitle(dictionaryService);
|
||||
}
|
||||
aspect.put("value", label);
|
||||
|
||||
|
@@ -95,7 +95,7 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
|
||||
}
|
||||
|
||||
AspectDefinition aspectDefinition = dictionaryService.getAspect(aspect);
|
||||
Group group = new Group(aspect.getLocalName(), aspectDefinition.getTitle(), propObjs);
|
||||
Group group = new Group(aspect.getLocalName(), aspectDefinition.getTitle(dictionaryService), propObjs);
|
||||
groups.add(group);
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ public class RMSearchPropertiesGet extends DeclarativeWebScript
|
||||
QName qName = propertyDefinition.getName().getPrefixedQName(namespaceService);
|
||||
this.prefix = QName.splitPrefixedQName(qName.toPrefixString())[0];
|
||||
this.shortName = qName.getLocalName();
|
||||
this.label = propertyDefinition.getTitle();
|
||||
this.label = propertyDefinition.getTitle(dictionaryService);
|
||||
this.type = propertyDefinition.getDataType().getName().getLocalName();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user