more locking related ui work

- unlocking files on submit
- unlocking file on revert
- adding AVMLockingAwareService to serviceregistry
- locking renditions (using the lockingawareservice)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6040 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2007-06-20 19:07:49 +00:00
parent cdf7889c7c
commit f7dfae61e2
3 changed files with 9 additions and 18 deletions

View File

@@ -103,7 +103,7 @@ public class RenditionImpl
public FormInstanceData getPrimaryFormInstanceData()
throws FileNotFoundException
{
final AVMService avmService = this.getAVMService();
final AVMService avmService = this.getServiceRegistry().getAVMLockingAwareService();
final String fidAVMStoreRelativePath = (String)
avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
@@ -123,7 +123,7 @@ public class RenditionImpl
{
if (this.renderingEngineTemplate == null)
{
final AVMService avmService = this.getAVMService();
final AVMService avmService = this.getServiceRegistry().getAVMLockingAwareService();
PropertyValue pv =
avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
@@ -187,7 +187,7 @@ public class RenditionImpl
public OutputStream getOutputStream()
{
final AVMService avmService = this.getAVMService();
final AVMService avmService = this.getServiceRegistry().getAVMLockingAwareService();
final Pair<Integer, String> p = AVMNodeConverter.ToAVMVersionPath(this.nodeRef);
return (avmService.lookup(p.getFirst(), p.getSecond()) == null
? avmService.createFile(AVMNodeConverter.SplitBase(p.getSecond())[0],
@@ -212,11 +212,6 @@ public class RenditionImpl
this.getRenderingEngineTemplate().render(formInstanceData, this);
}
private AVMService getAVMService()
{
return this.getServiceRegistry().getAVMService();
}
private ServiceRegistry getServiceRegistry()
{
final FacesContext fc = FacesContext.getCurrentInstance();