Merged V2.2 to HEAD

10982: Merged V2.1 to V2.2
      10273: Fix for ETWOONE-317: Error from regenerate renditions wizard when templates are updated
   10985: Merged V2.1 to V2.2
      10717: Fix for ETWOONE-14: System Error message appears while clicking 'Manage Task' icon in ...
      10742: Fix for ETWOONE-119: A user created with space characters at the begin and at the end can't login
      10758: Fix for ETWOONE-183: URL addressability of forum spaces and topics
      10760: Fix for ETWOONE-339: URL Addressability to discussions causes display issue
      10761: Fix for ETWOONE-196: Attempt to post to the same forum by two or more users simultaneously leads to error appearance and impossibility to post for some of them
      10772: Fix for ETWOONE-225: Validation.js does not properly handle trailing whitespace
   10986: Added Hibernate src to Eclipse project
   11004: Remove annoying exceptions on shutdown
   11005: Minor javadoc fix
   11012: Fixed ETWOTWO-423: Optionally inject the Open Office document converter instance to the transformer


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11202 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-10-06 11:22:26 +00:00
parent c9afa4a3c8
commit 09c1c23776
9 changed files with 317 additions and 14 deletions

View File

@@ -196,8 +196,24 @@ import org.xml.sax.SAXException;
// regenerate existing renditions
boolean renditionLockedBefore = false;
String path = null;
for (final Rendition r : this.getRenditions())
{
// Try to skip renditions without rendering engine template.
if (r instanceof RenditionImpl)
{
RenditionImpl rImpl = (RenditionImpl)r;
RenderingEngineTemplate ret = rImpl.getRenderingEngineTemplate();
if ((ret != null) && (ret instanceof RenderingEngineTemplateImpl))
{
RenderingEngineTemplateImpl retImpl = (RenderingEngineTemplateImpl) ret;
if (!retImpl.isExists())
{
continue;
}
}
}
final RenderingEngineTemplate ret = r.getRenderingEngineTemplate();
if (ret == null || !allRets.contains(ret))
{
@@ -237,7 +253,7 @@ import org.xml.sax.SAXException;
}
}
}
// render all renditions for newly added templates
for (final RenderingEngineTemplate ret : allRets)
{

View File

@@ -599,6 +599,12 @@ public class RenderingEngineTemplateImpl
{
return this.getClass().getName() + "{name : " + this.getName() + "}";
}
public boolean isExists()
{
final NodeService nodeService = this.getServiceRegistry().getNodeService();
return nodeService.exists(this.nodeRef);
}
}