AnsweredAssumed Answered

Patch for Google Docs

Question asked by mlagneaux on Aug 10, 2012
Hello,

I developed a patch which aim to add Google Editable aspect on all the documents of my store (only if document type is supported by Google Docs of course).
The problem I encountered is that the patches (via PatchExecuter) are executed before subsystems are started.

In my case, my patch does not work because it uses Google Editable aspect that is not yet known by Alfresco and the GoogleDocsService which is not yet instantiated. Indeed, it will only be the case later, that is to say, when the googledocs subsystemis started.

To fix this problem, I've overriden the googledocs-context.xml file and have added my patch and a second bean based on the PatchExecuter. So when Alfresco is starting, there're :
- First execution of the patchs;
- Starting of googledocs subsystem;
- Second execution of the patches.

This works well but is there a better way to do?
Thank you.

Outcomes