Hello!
It is me again with my questions:-)
So apparently as we discussed, my problem comes from a permission access to my XML file. So I am trying to give permission access to this node for the connected user… something like this:
String usernameConnected = authenticationService.getCurrentUserName();
permissionService.setPermission(recentDocument,usernameConnected, permissionService.getAllPermission(), true);
But I get into troubles for Spring reasons. To do this I wanted to implement a class called documentsBeanService that will manipulate my files documents in admin space.
- I implement documentsBeanService class on client side
- I declare this service in services-context.xml on Repository side
<bean id="documentsBeanService" class="org.alfresco.web.bean.documents.EF_DocumentsBeanService">
<property name="authenticationService">
<ref bean="authenticationService" />
</property>
<property name="permissionService">
<ref bean="permissionService" />
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="searchService">
<ref bean="searchService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="namespacePrefixResolver">
<ref bean="namespaceService" />
</property>
<property name="namespaceService">
<ref bean="namespaceService" />
</property>
<property name="storeUrl">
<value>${spaces.store}</value>
</property>
</bean>
- I have a class ef_PersonProperties declared in faces-config-beans.xml that calls this service (I am using this class to get the information the user enter in the jsp page):
<managed-bean>
<description>
The bean that backs up the PERSON PROPERTIES
</description>
<managed-bean-name>ef_PersonProperties</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.ef.ef_PersonProperties</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>documentsBeanService</property-name>
<value>#{documentsBeanService}</value>
</managed-property>
</managed-bean>
- And I have a class that manages all my jsp pages Wizard that contains a variable storeClassEPP of type ef_PersonProperties:
this.storeClassEPP = new ef_PersonProperties();
this.storeClassEPP.init();
- In this init() method I need to call documentsBeanService.myMethod().
However here documentsBeanService is null. I do not understand why? What did I forget to do in order to inject documentsBeanService?
Thanks for your help
Sophie