AnsweredAssumed Answered

Overload Alfresco service

Question asked by bch on Jun 25, 2008
Latest reply on Jun 26, 2008 by bch
Hi,

I want to overload an Alfresco service and more precisely NodeService. I want to add behavior so I must override methods like this :

    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);
       }
    }

Now, I must add Spring configuration but I don't know how and where. Have you an idea ?

Thanks

Benjamin

Outcomes