Merged V2.1 to HEAD

6338: Some WCM-435.
   6344: Fix for AWC-1452 (dialog close navigation issue)
   6345: Fix for AR-1611 and other related CIFS and NFS fixes
   6346: Minor javadoc fix for ReplicatingContentStore
   6347: Handle exceptions arising from UserTransaction.begin().
   6348: Many WCM fixes in one
            Conflicts resolved on faces-config-beans.xml


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6722 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-09-10 13:21:08 +00:00
parent 48fa124735
commit 0fb2ae13f9
38 changed files with 1290 additions and 895 deletions

View File

@@ -51,27 +51,41 @@ import org.xml.sax.SAXException;
*
* @author Ariel Backenroth
*/
public class RenditionImpl
/* package */ class RenditionImpl
implements Rendition
{
private static final Log LOGGER = LogFactory.getLog(RenditionImpl.class);
private final NodeRef nodeRef;
private final FormsService formsService;
private transient RenderingEngineTemplate renderingEngineTemplate;
public RenditionImpl(final NodeRef nodeRef)
/* package */ RenditionImpl(final NodeRef nodeRef, final FormsService formsService)
{
if (nodeRef == null)
{
throw new NullPointerException();
}
if (formsService == null)
{
throw new NullPointerException();
}
final NodeService nodeService = this.getServiceRegistry().getNodeService();
if (!nodeService.hasAspect(nodeRef, WCMAppModel.ASPECT_RENDITION))
{
throw new IllegalArgumentException("node " + nodeRef +
" does not have aspect " + WCMAppModel.ASPECT_RENDITION);
}
this.nodeRef = nodeRef;
this.formsService = formsService;
}
public RenditionImpl(final int version, final String avmPath)
/* package */ RenditionImpl(final int version,
final String avmPath,
final FormsService formsService)
{
this(AVMNodeConverter.ToNodeRef(version, avmPath));
this(AVMNodeConverter.ToNodeRef(version, avmPath), formsService);
}
/** the name of this rendition */
@@ -115,7 +129,7 @@ public class RenditionImpl
{
throw new FileNotFoundException("unable to find primary form instance data " + path);
}
return new FormInstanceDataImpl(-1, path);
return this.formsService.getFormInstanceData(-1, path);
}
/** the rendering engine template that generated this rendition */
@@ -159,7 +173,7 @@ public class RenditionImpl
this.getPath());
return null;
}
this.renderingEngineTemplate = new RenderingEngineTemplateImpl(retNodeRef, rpNodeRef);
this.renderingEngineTemplate = new RenderingEngineTemplateImpl(retNodeRef, rpNodeRef, this.formsService);
}
return this.renderingEngineTemplate;
}