10-27-2009 12:17 PM
…
Date d = importSet.simpleDateFormat.parse(extractedDateString);
Map<QName, Serializable> props = nodeService.getProperties(actionedUponNodeRef);
props.put(ContentModel.PROP_TITLE, "someNewName");
props.put(ContentModel.PROP_CREATED, d);
nodeService.setProperties(actionedUponNodeRef, props);
…
10-28-2009 09:40 AM
03-09-2010 07:30 AM
03-10-2010 05:09 AM
public class MyAction extends ActionExecuterAbstractBase {
NodeService nodeService;
BehaviourFilter behaviourFilter;
@Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) {
Date d = Calendar.getInstance().getTime();
Map<QName, Serializable> props = nodeService.getProperties(actionedUponNodeRef);
props.put(ContentModel.PROP_CREATED, d);
behaviourFilter.disableBehaviour(ContentModel.ASPECT_AUDITABLE);
nodeService.setProperties(actionedUponNodeRef, props);
}
}
<bean name="myAction" class="de.hmedia.alfresco.actions.MyAction" parent="action-executer">
<property name="nodeService" ref="nodeService"/>
<property name="behaviourFilter">
<ref bean="policyBehaviourFilter" />
</property>
</bean>
04-06-2010 09:44 AM
04-06-2010 11:32 AM
04-06-2010 11:43 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.