12-16-2005 09:46 AM
public void init() {
// Create behaviours
onCreateObsoDate = new JavaBehaviour(this, "onCreateObsoDate");
onAddObsoDate = new JavaBehaviour(this, "onAddObsoDate");
onUpdateObsoDate = new JavaBehaviour(this, "onUpdateObsoDate");
QName ASPECT_OBSO = QName.createQName("http://www.toto.com/ged/obso", "obsolescence");
policyComponent.bindClassBehaviour(QName.createQName("http://www.toto.com/ged/obso", "onCreateNode"),ASPECT_OBSO, onCreateObsoDate);
policyComponent.bindClassBehaviour(QName.createQName("http://www.toto.com/ged/obso", "onAddAspect"), ASPECT_OBSO, onAddObsoDate);
policyComponent.bindClassBehaviour(QName.createQName("http://www.toto.com/ged/obso", "onUpdateNode"), ASPECT_OBSO, onUpdateObsoDate);
<model name="gc:obso_model" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>custom Model for obsolescence date (GED-2)</description>
<author></author>
<version>1.0</version>
<imports>
<!– Import Alfresco Dictionary Definitions –>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!– Import Alfresco Content Domain Model Definitions –>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<namespaces>
<!– Define a Namespace for my new definitions –>
<namespace uri="http://www.toto.com/ged/obso" prefix="gc"/>
</namespaces>
<!– Type and Aspect definitions go here –>
<types/>
<aspects>
<aspect name="gc:obsolescence">
<title>Date d'obsolescence</title>
<properties>
<property name="gc:obso_date">
<type>d:date</type>
</property>
</properties>
</aspect>
</aspects>
</model>
01-12-2006 11:17 AM
policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateNode"),ASPECT_OBSO, onCreateObsoDate);
onCreateObsoDate = new JavaBehaviour(this, "onCreateObsoDate");
03-23-2006 08:49 AM
03-28-2006 02:24 PM
As I say, v1.2 will provide this support in a much simpler way!
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.