mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Forums overriden actions (checkin) and Discuss/Create Forum actions now externalised
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2556 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -107,30 +107,24 @@ public class ActionsElementReader implements ConfigElementReader
|
||||
Element actionRefElement = actionRefItr.next();
|
||||
|
||||
// look for an action referred to be Id - this is the common use-case
|
||||
ActionDefinition def = null;
|
||||
String idRef = actionRefElement.attributeValue(ATTRIBUTE_IDREF);
|
||||
if (idRef != null && idRef.length() != 0)
|
||||
{
|
||||
// try to find the referenced action by Id
|
||||
def = configElement.getActionDefinition(idRef);
|
||||
if (def == null)
|
||||
{
|
||||
throw new ConfigException("Action group '" + groupId +
|
||||
"' cannot find action definition referenced by '" + idRef + "'");
|
||||
}
|
||||
}
|
||||
else
|
||||
if (idRef == null || idRef.length() == 0)
|
||||
{
|
||||
// look for an action defined directly rather than referenced by Id
|
||||
String id = actionRefElement.attributeValue(ATTRIBUTE_ID);
|
||||
if (id != null && id.length() != 0)
|
||||
{
|
||||
def = parseActionDefinition(actionRefElement);
|
||||
ActionDefinition def = parseActionDefinition(actionRefElement);
|
||||
// override action definition ID based on the group name to avoid conflicts
|
||||
def.id = actionGroup.getId() + '_' + def.getId();
|
||||
configElement.addActionDefinition(def);
|
||||
actionGroup.addAction(def.getId());
|
||||
}
|
||||
}
|
||||
if (def != null)
|
||||
else
|
||||
{
|
||||
actionGroup.addAction(def);
|
||||
// add the action definition ID to the group
|
||||
actionGroup.addAction(idRef);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user