05-26-2008 10:04 AM
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>
05-26-2008 10:30 AM
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.
05-26-2008 11:01 AM
05-26-2008 11:13 AM
05-26-2008 11:17 AM
05-27-2008 06:12 AM
05-28-2008 03:56 AM
05-28-2008 04:02 AM
05-28-2008 05:58 AM
05-28-2008 06:10 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.