<!–
Repository Bootstrap Sequence.
This file specifies the initialisation (and order of initialisation) to perform during Repository startup.
The pattern for adding new initialisation to the bootstrap sequence is as follows:
1) Develop a bean that implements the Spring interface ApplicationListener
2) Place the initialisation logic in the method onApplicationEvent(ApplicationEvent event)…
public void onApplicationEvent(ApplicationEvent event)
{
if (event instanceof ContextRefreshedEvent)
{
// initialisation logic here
}
}
3) Add the bean definition to this file - Note: the beans are initialised in the order they are specified.
–>
package org.alfresco.community.repo;
import org.alfresco.service.cmr.model.FileFolderService;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.security.PersonService;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
//import com.ibm.wsdl.Constants;
//import com.sun.corba.se.impl.orbutil.closure.Constant;
public class DeplaceUsers implements ApplicationListener {// AbstractLifecycleBean{
public final static String NAME = "deplace-users";
private NodeService nodeService;
//private FileFolderService fileFolderService;
private PersonService personService;
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
public void setFileFolderService(FileFolderService fileFolderService)
{
this.fileFolderService = fileFolderService;
}
public PersonService getPersonService() {
return personService;
}
public void setPersonService(PersonService personService) {
this.personService = personService;
}
public NodeService getNodeService() {
return nodeService;
}
public void onApplicationEvent(ApplicationEvent event) {
System.out.println("on entre dans cette fonction");
// TODO Auto-generated method stub
}
}
package org.alfresco.community.repo;
import org.alfresco.service.cmr.model.FileFolderService;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.util.AbstractLifecycleBean;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
//import com.ibm.wsdl.Constants;
//import com.sun.corba.se.impl.orbutil.closure.Constant;
public class DeplaceUsers extends AbstractLifecycleBean{ //implements ApplicationListener {//{
public final static String NAME = "deplace-users";
private NodeService nodeService;
@SuppressWarnings("unused")
private FileFolderService fileFolderService;
private PersonService personService;
//private static String ENTERPRISE_ROOT = "LPR";
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
public void setFileFolderService(FileFolderService fileFolderService)
{
this.fileFolderService = fileFolderService;
}
public PersonService getPersonService() {
return personService;
}
public void setPersonService(PersonService personService) {
this.personService = personService;
}
public NodeService getNodeService() {
return nodeService;
}
// public void onApplicationEvent(ApplicationEvent event) {
//
// System.out.println("on entre dans cette fonction");
// // TODO Auto-generated method stub
//
//
// }
@Override
protected void onBootstrap(ApplicationEvent arg0) {
// TODO Auto-generated method stub
System.out.println("on entre dans cette fonction");
}
@Override
protected void onShutdown(ApplicationEvent arg0) {
// TODO Auto-generated method stub
}
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.