Fixes ALF-10973: Failed to open 'Create Rule' page

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31808 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Brian Remmington
2011-11-07 15:45:08 +00:00
parent 1f902f3be9
commit b1b12be5eb
2 changed files with 18 additions and 16 deletions

View File

@@ -80,15 +80,5 @@
<property name="ignoreLock" value="true" />
<property name="publicAction" value="false" />
</bean>
<bean id="ac-publishing-channels" class="org.alfresco.repo.publishing.PublishingChannelParameterConstraint"
parent="action-constraint">
<property name="channelService" ref="ChannelService" />
</bean>
<bean id="ac-status-update-channels" class="org.alfresco.repo.publishing.StatusUpdateChannelParameterConstraint"
parent="action-constraint">
<property name="channelService" ref="ChannelService" />
</bean>
</beans>

View File

@@ -120,7 +120,7 @@ public class PublishContentActionExecuter extends ActionExecuterAbstractBase
* A multi-valued, optional text parameter that identifies by name the
* publishing channels to which the status update (if any) should be sent.
* If both this parameter and the "statusUpdateChannelIds" parameter are
* given values then they are combined.
* given values then they are combined.
*
* @see PublishContentActionExecuter#PARAM_STATUS_UPDATE
* @see PublishContentActionExecuter#PARAM_STATUS_UPDATE_CHANNEL_IDS
@@ -237,8 +237,8 @@ public class PublishContentActionExecuter extends ActionExecuterAbstractBase
if (nodes.size() == 1)
{
nodeToLinkTo = nodes.get(0);
}
}
}
}
if ((nodeToLinkTo != null) && nodes.contains(nodeToLinkTo))
{
details.setStatusNodeToLinkTo(nodeToLinkTo);
@@ -305,9 +305,21 @@ public class PublishContentActionExecuter extends ActionExecuterAbstractBase
List<String> result = null;
if (parameterValue != null && String.class.isAssignableFrom(parameterValue.getClass()))
{
String[] split = ((String) parameterValue).split(",");
String[] split = ((String)parameterValue).split(",");
result = Arrays.asList(split);
}
else if (parameterValue != null && Iterable.class.isAssignableFrom(parameterValue.getClass()))
{
result = new ArrayList<String>();
Iterable<?> iter = (Iterable<?>)parameterValue;
for (Object obj : iter)
{
if (obj != null && String.class.isAssignableFrom(obj.getClass()))
{
result.add((String)obj);
}
}
}
return result;
}
@@ -318,7 +330,7 @@ public class PublishContentActionExecuter extends ActionExecuterAbstractBase
getParamDisplayLabel(PARAM_PUBLISH_CHANNEL_NAME), false));
paramList.add(new ParameterDefinitionImpl(PARAM_PUBLISH_CHANNEL_ID, DataTypeDefinition.TEXT, false,
getParamDisplayLabel(PARAM_PUBLISH_CHANNEL_ID), false, "ac-publishing-channels"));
getParamDisplayLabel(PARAM_PUBLISH_CHANNEL_ID), false));
paramList.add(new ParameterDefinitionImpl(PARAM_UNPUBLISH, DataTypeDefinition.BOOLEAN, false,
getParamDisplayLabel(PARAM_UNPUBLISH), false));
@@ -333,7 +345,7 @@ public class PublishContentActionExecuter extends ActionExecuterAbstractBase
getParamDisplayLabel(PARAM_STATUS_UPDATE_CHANNEL_NAMES), true));
paramList.add(new ParameterDefinitionImpl(PARAM_STATUS_UPDATE_CHANNEL_IDS, DataTypeDefinition.TEXT, false,
getParamDisplayLabel(PARAM_STATUS_UPDATE_CHANNEL_IDS), true, "ac-status-update-channels"));
getParamDisplayLabel(PARAM_STATUS_UPDATE_CHANNEL_IDS), true));
paramList.add(new ParameterDefinitionImpl(PARAM_SCHEDULED_TIME, DataTypeDefinition.DATETIME, false,
getParamDisplayLabel(PARAM_SCHEDULED_TIME), false));