Hi,I have, in fact, two problems.I'm need to lock a document and to make a copy of it in an other space. For that, I began using the CheckOutCheckInService in my DialogBean. I configured my faces-config-custom.xml like this :
<managed-bean>
<managed-bean-name>NewEditionDialog</managed-bean-name>
<managed-bean-class>com.alcatellucent.gerard.gdoc.bean.dialog.NewEditionDialog</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>browseBean</property-name>
<value>#{BrowseBean}</value>
</managed-property>
<managed-property>
<property-name>checkOutCheckInService</property-name>
<value>#{CheckOutCheckInService}</value>
</managed-property>
<managed-property>
<property-name>nodeService</property-name>
<value>#{NodeService}</value>
</managed-property>
</managed-bean>
Then I use the CheckOutCheckInService in my NewEditionDialog like this:
this.workCopyRef = this.checkOutCheckInService.checkout(documentRef, destSpaceRef, ContentModel.ASSOC_CONTAINS, ContentModel.TYPE_CONTAINER);
But my checkOutCheckInService variable is null (I correctly declared my setter, of course). So my first question is : How to be sure that a service is instantiated? I can't figure out how can I get an instance of my service from a Factory or whatever. Maybe there is a thing in JSF that I don't understand.Secont part :Then I decide to do the "checkout" from myself. So I declare a copyService an a lockService in my faces-config-custom.xml :
<managed-bean>
<managed-bean-name>NewEditionDialog</managed-bean-name>
<managed-bean-class>com.alcatellucent.gerard.gdoc.bean.dialog.NewEditionDialog</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>browseBean</property-name>
<value>#{BrowseBean}</value>
</managed-property>
<managed-property>
<property-name>nodeService</property-name>
<value>#{NodeService}</value>
</managed-property>
<managed-property>
<managed-property>
<property-name>copyService</property-name>
<value>#{CopyService}</value>
</managed-property>
<managed-property>
<property-name>lockService</property-name>
<value>#{LockService}</value>
</managed-property>
</managed-bean>
The setters are correctly setted up too. I call both of the services :
this.lockService.lock(documentRef, LockType.READ_ONLY_LOCK);
this.workCopyRef = this.copyService.copy(documentRef, destSpaceRef, ContentModel.ASSOC_CONTAINS, ContentModel.TYPE_CONTAINER);
But each of them throw a BadCredentialsException, and I don't know why. Somebody could help ?Thanks. 