public class TestActionExecuter extends ActionExecuterAbstractBase
{
public static final String NAME = "tag";
private NodeService nodeService;
private ContentService contentService;
private RuleService ruleService;
public void init(){
System.out.println("Je suis lancé OUAI \\o/");
super.init();
}
public void setNodeService(NodeService nodeService)
{
System.out.println("########################## Node Service pret !!!");
this.nodeService = nodeService;
}
public void setContentService(ContentService contentService)
{
System.out.println("########################## Content Service pret !!!");
this.contentService = contentService;
}
public void setRuleService(RuleService ruleService)
{
System.out.println("########################## Rule Service pret !!!");
this.ruleService = ruleService;
}
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{
if (this.nodeService.exists(actionedUponNodeRef) == true)
{
System.out.println(nodeService.getProperty(ruleService.getOwningNodeRef(action),ContentModel.PROP_NAME));
}
}
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
{
// there are no parameters
}
<beans>
<bean id="tags.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/testModel.xml</value>
</list>
</property>
</bean>
<bean id="tag" class="org.alfresco.sample.TestActionExecuter" parent="action-executer" >
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="contentService">
<ref bean="ContentService" />
</property>
<property name="ruleService">
<ref bean="RuleService" />
</property>
</bean>
<bean id="test-action-messages" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>org.alfresco.sample.test-action-messages</value>
</list>
</property>
</bean>
</beans>
Le traitement à terme de ma custom action est de pouvoir mettre a jour une base de donnée en fonction du contenu de l'espace auxquel est appliqué la règle.
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.