mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merge 1.4 to HEAD (excl records management)
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4306 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4307 . rm -rf root/projects/records-mgmt git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4637 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -32,14 +32,17 @@ public class AssociationPolicyRegistration extends PolicyRegistration
|
||||
@Override
|
||||
public void register()
|
||||
{
|
||||
// Register the association behaviour
|
||||
if (this.associationType == null)
|
||||
{
|
||||
this.policyComponent.bindAssociationBehaviour(this.policyName, this.className, this.behaviour);
|
||||
}
|
||||
else
|
||||
for (QName policyName : this.policyNames)
|
||||
{
|
||||
this.policyComponent.bindAssociationBehaviour(this.policyName, this.className, this.associationType, this.behaviour);
|
||||
// Register the association behaviour
|
||||
if (this.associationType == null)
|
||||
{
|
||||
this.policyComponent.bindAssociationBehaviour(policyName, this.className, this.behaviour);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.policyComponent.bindAssociationBehaviour(policyName, this.className, this.associationType, this.behaviour);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3,6 +3,8 @@
|
||||
*/
|
||||
package org.alfresco.repo.policy.registration;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Deal with the registration of a class policy
|
||||
*
|
||||
@@ -17,8 +19,11 @@ public class ClassPolicyRegistration extends PolicyRegistration
|
||||
@Override
|
||||
public void register()
|
||||
{
|
||||
// Register the class behaviour
|
||||
this.policyComponent.bindClassBehaviour(this.policyName, this.className, this.behaviour);
|
||||
for (QName policyName : this.policyNames)
|
||||
{
|
||||
// Register the class behaviour
|
||||
this.policyComponent.bindClassBehaviour(policyName, this.className, this.behaviour);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package org.alfresco.repo.policy.registration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.repo.policy.Behaviour;
|
||||
import org.alfresco.repo.policy.PolicyComponent;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -17,8 +20,8 @@ public abstract class PolicyRegistration
|
||||
/** The policy componenet **/
|
||||
protected PolicyComponent policyComponent;
|
||||
|
||||
/** The policy name **/
|
||||
protected QName policyName;
|
||||
/** The policy names **/
|
||||
protected List<QName> policyNames;
|
||||
|
||||
/** The class name **/
|
||||
protected QName className;
|
||||
@@ -43,7 +46,22 @@ public abstract class PolicyRegistration
|
||||
*/
|
||||
public void setPolicyName(String policyName)
|
||||
{
|
||||
this.policyName = QName.createQName(policyName);
|
||||
this.policyNames = new ArrayList<QName>(1);
|
||||
this.policyNames.add(QName.createQName(policyName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the policy names. The behaviour will be added for each for the policies.
|
||||
*
|
||||
* @param policyNames the policy names
|
||||
*/
|
||||
public void setPolicyNames(List<String> policyNames)
|
||||
{
|
||||
this.policyNames = new ArrayList<QName>(policyNames.size());
|
||||
for (String policyName : policyNames)
|
||||
{
|
||||
this.policyNames.add(QName.createQName(policyName));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user