01-21-2009 01:18 PM
<bean id="onUpdateDoc" class="org.alfresco.repo.policy.registration.ClassPolicyRegistration" parent="policyRegistration">
<property name="policyName">
<value>{http://www.alfresco.org}onContentUpdate</value>
</property>
<property name="className">
<value>{http://www.alfresco.org/model/content/1.0}content</value>
</property>
<property name="behaviour">
<bean class="org.alfresco.repo.jscript.ScriptBehaviour" parent="scriptBehaviour">
<property name="location">
<bean class="org.alfresco.repo.jscript.ClasspathScriptLocation">
<constructor-arg>
<value>alfresco/extension/scripts/onUpdateNode.js</value>
</constructor-arg>
</bean>
</property>
</bean>
</property>
</bean>
01-21-2009 07:14 PM
<?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="avmNodeService" class="org.alfresco.repo.avm.AVMNodeService" init-method="init">
<property name="dictionaryService" ref="dictionaryService" />
<property name="avmService" ref="avmLockingAwareService" />
<property name="policyComponent" ref="policyComponent" />
<property name="invokePolicies" value="true" />
</bean>
</beans>
Cheers,01-22-2009 06:19 AM
<bean id="avmNodeService" class="org.alfresco.repo.avm.AVMNodeService" init-method="init">
<property name="dictionaryService" ref="dictionaryService" />
<property name="avmService" ref="avmLockingAwareService" />
<property name="policyComponent" ref="policyComponent" />
<property name="invokePolicies" value="true" />
</bean>
<bean
id="onUpdateAVMDoc"
class="org.alfresco.repo.policy.registration.ClassPolicyRegistration"
parent="policyRegistration">
<property name="policyName">
<value>{http://www.alfresco.org}onContentUpdate</value>
</property>
<property name="className">
<value>{http://www.alfresco.org/model/wcmmodel/1.0}avmcontent</value>
</property>
<property name="behaviour">
<bean class="org.alfresco.repo.jscript.ScriptBehaviour" parent="scriptBehaviour">
<property name="location">
<bean class="org.alfresco.repo.jscript.ClasspathScriptLocation">
<constructor-arg>
<value>alfresco/extension/scripts/onContentUpdate.js</value>
</constructor-arg>
</bean>
</property>
</bean>
</property>
</bean>
12-03-2009 10:32 AM
public ChildAssociationRef createNode(
NodeRef parentRef,
QName assocTypeQName,
QName assocQName,
QName nodeTypeQName,
Map<QName, Serializable> properties)
throws InvalidNodeRefException, InvalidTypeException
{
// AVM stores only allow simple child associations.
if (!assocTypeQName.equals(ContentModel.ASSOC_CONTAINS))
{
throw new InvalidTypeException(assocTypeQName);
}
String nodeName = assocQName.getLocalName();
Pair<Integer, String> avmVersionPath = AVMNodeConverter.ToAVMVersionPath(parentRef);
int version = avmVersionPath.getFirst();
if (version >= 0)
{
throw new InvalidNodeRefException("Read only store.", parentRef);
}
String avmPath = avmVersionPath.getSecond();
// Invoke policy behavior.
// invokeBeforeUpdateNode(parentRef);
// invokeBeforeCreateNode(parentRef, assocTypeQName, assocQName, nodeTypeQName);
// Look up the type definition in the dictionary.
TypeDefinition nodeTypeDef = dictionaryService.getType(nodeTypeQName);
// Do the creates for supported types, or error out.
try
{
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.