The class org.nuxeo.ecm.platform.content.template.factories.BaseContentFactory which is used to store template factory in the org.nuxeo.ecm.platform.content.template.service.ContentTemplateServiceImpl stores a CoreSession instance.
<extension target="org.nuxeo.ecm.platform.content.template.service.ContentTemplateService" point="factory"> <contentFactory name="ConnectProjectTemplateFactory" class="com.nuxeo.connect.template.ConnectProjectTemplateBasedFactory" /> <contentFactory name="ConnectServiceTemplateFactory" class="com.nuxeo.connect.template.ConnectServiceTemplateBasedFactory" /> </extension>
public abstract class BaseContentFactory implements ContentFactory { protected CoreSession session; protected boolean initSession(DocumentModel eventDoc) { session = eventDoc.getCoreSession(); return session != null; } }