06-25-2008 08:45 AM
import org.alfresco.repo.version.NodeServiceImpl;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
public class MyNodeService extends NodeServiceImpl {
@Override
public ChildAssociationRef createNode(NodeRef parentRef,
QName assocTypeQName, QName assocQName, QName nodeTypeQName)
throws InvalidNodeRefException {
// Begin of my code
…
// End of my code
return super.createNode(parentRef, assocTypeQName, assocQName, nodeTypeQName);
}
}
06-26-2008 02:25 AM
06-26-2008 03:33 AM
public class NodeService extends DbNodeServiceImpl {
private Map<String,String> synchronizedAssocs = new HashMap<String, String>();
@Override
public AssociationRef createAssociation(NodeRef sourceRef,
NodeRef targetRef, QName assocTypeQName)
throws InvalidNodeRefException, AssociationExistsException {
…
return super.createAssociation(sourceRef, targetRef, assocTypeQName);
}
@Override
public void removeAssociation(NodeRef sourceRef, NodeRef targetRef,
QName assocTypeQName) throws InvalidNodeRefException {
…
super.removeAssociation(sourceRef, targetRef, assocTypeQName);
}
public Map<String, String> getSynchronizedAssocs() {
return synchronizedAssocs;
}
public void setSynchronizedAssocs(Map<String, String> synchronizedAssocs) {
this.synchronizedAssocs = synchronizedAssocs;
}
}
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="dbNodeServiceImpl" class="com.bluexml.alfresco.modules.associationSynchronization.NodeService" init-method="init" >
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="nodeDaoService">
<ref bean="nodeDaoService" />
</property>
<property name="policyComponent">
<ref bean="policyComponent"/>
</property>
<property name="storeArchiveMap">
<ref bean="storeArchiveMap"/>
</property>
<property name="avmNodeService">
<ref bean="avmNodeService"/>
</property>
<property name="tenantService">
<ref bean="tenantService"/>
</property>
<property name="synchronizedAssocs">
<props>
<prop key="{http://www.bluexml.com/model/content/test/1.0}test_Company_has_contact">{http://www.bluexml.com/model/content/test/1.0}test_Contact_has_contact</prop>
</props>
</property>
</bean>
</beans>
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.