Fixes ALF-11227: Content loses its properties after adding storeSelector aspect (Share)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32932 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Brian Remmington
2011-12-21 19:28:49 +00:00
parent 6bf23e2176
commit b062448da4
2 changed files with 20 additions and 7 deletions

View File

@@ -66,16 +66,20 @@
<property name="eagerOrphanCleanup" > <property name="eagerOrphanCleanup" >
<value>${system.content.eagerOrphanCleanup}</value> <value>${system.content.eagerOrphanCleanup}</value>
</property> </property>
<property name="stores" > <property name="stores" ref="contentStoresToClean" />
<list>
<ref bean="fileContentStore" />
</list>
</property>
<property name="listeners" > <property name="listeners" >
<ref bean="deletedContentBackupListeners" /> <ref bean="deletedContentBackupListeners" />
</property> </property>
</bean> </bean>
<bean id="contentStoresToClean" class="java.util.ArrayList" >
<constructor-arg>
<list>
<ref bean="fileContentStore" />
</list>
</constructor-arg>
</bean>
<!-- Abstract bean definition defining base definition for content service --> <!-- Abstract bean definition defining base definition for content service -->
<bean id="baseContentService" class="org.alfresco.repo.content.ContentServiceImpl" abstract="true" init-method="init"> <bean id="baseContentService" class="org.alfresco.repo.content.ContentServiceImpl" abstract="true" init-method="init">
<property name="retryingTransactionHelper"> <property name="retryingTransactionHelper">

View File

@@ -30,6 +30,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint; import org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint;
import org.alfresco.repo.dictionary.constraint.RegisteredConstraint;
import org.alfresco.repo.forms.Field; import org.alfresco.repo.forms.Field;
import org.alfresco.repo.forms.FieldGroup; import org.alfresco.repo.forms.FieldGroup;
import org.alfresco.repo.forms.PropertyFieldDefinition; import org.alfresco.repo.forms.PropertyFieldDefinition;
@@ -217,8 +218,16 @@ public class PropertyFieldProcessor extends QNameFieldProcessor<PropertyDefiniti
String type = constraint.getType(); String type = constraint.getType();
Map<String, Object> params = constraint.getParameters(); Map<String, Object> params = constraint.getParameters();
// ListOfValuesConstraints have special handling for localising their allowedValues.
if (ListOfValuesConstraint.CONSTRAINT_TYPE.equals(constraint.getType())) //ListOfValuesConstraints have special handling for localising their allowedValues.
//If the constraint that we are currently handling is a registered constraint then
//we need to examine the underlying constraint to see if it is a LIST constraint
if (RegisteredConstraint.class.isAssignableFrom(constraint.getClass()))
{
constraint = ((RegisteredConstraint)constraint).getRegisteredConstraint();
}
if (ListOfValuesConstraint.class.isAssignableFrom(constraint.getClass()))
{ {
ListOfValuesConstraint lovConstraint = (ListOfValuesConstraint) constraint; ListOfValuesConstraint lovConstraint = (ListOfValuesConstraint) constraint;
List<String> allowedValues = lovConstraint.getAllowedValues(); List<String> allowedValues = lovConstraint.getAllowedValues();