10-21-2008 10:01 AM
<bean id="onCreateUserStore" class="org.alfresco.repo.policy.registration.ClassPolicyRegistration" parent="policyRegistration">
<property name="policyName">
<value>{http://www.alfresco.org}onCreateStore</value>
</property>
<property name="className">
<value>{http://www.alfresco.org/model/system/1.0}store_root</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/onCreateUser.js</value>
</constructor-arg>
</bean>
</property>
</bean>
</property>
</bean>
logger.log("Start onCreateUser.js…");
if (behaviour == null) {
logger.log("The behaviour object has not been set");
}
//check the name of the behaviour
if (behaviour.name == null && behaviour.name != "onCreateStore") {
logger.log("The behaviour name has not been set correctly");
}
else {
logger.log("Behaviour name: " + behaviour.name);
}
//check the arguments
if (behaviour.args == null) {
logger.log("The args have not been set");
} else {
if (behaviour.args.length == 1) {
var user = behaviour.args[0];
logger.log("init user's workspace");
logger.log("end user's workspace");
}
}
10-23-2008 02:17 PM
12-04-2008 05:47 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.