mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
- terminology changes to wcmModel (needs to be propogated to java classes as well). template is now form. template output method is now form transformer.
- added an aspect to differentiate form derived from form transformer derived (allowed removing some workarounds from XSLTOutputMethod) - namespacing variables passed to the xsl processor with alfresco: git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4154 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -78,44 +78,38 @@ public class ExtensionFunctions
|
||||
AVMNodeDescriptor entryNode = entry.getValue();
|
||||
if (entryNode.isFile())
|
||||
{
|
||||
final PropertyValue pv =
|
||||
PropertyValue pv =
|
||||
this.avmRemote.getNodeProperty(-1,
|
||||
avmPath + '/' + entryName,
|
||||
WCMModel.PROP_TEMPLATE_DERIVED_FROM_NAME);
|
||||
if (pv != null &&
|
||||
pv.getStringValue() != null &&
|
||||
((String)pv.getStringValue()).equals(templateTypeName))
|
||||
WCMModel.PROP_FORM_DERIVED_FROM_NAME);
|
||||
if (pv == null ||
|
||||
pv.getStringValue() == null ||
|
||||
!((String)pv.getStringValue()).equals(templateTypeName))
|
||||
{
|
||||
|
||||
InputStream istream = null;
|
||||
try
|
||||
{
|
||||
istream = new AVMRemoteInputStream(this.avmRemote.getInputHandle(-1, avmPath + '/' + entryName),
|
||||
this.avmRemote);
|
||||
}
|
||||
catch (AVMNotFoundException avmnfe)
|
||||
{
|
||||
// this is most likely happening because this is the current file we're generating
|
||||
// and the avm is telling us that it has no content yet. we won't hit this once
|
||||
// we have a way of distinguishing templateoutputmethodgenerated
|
||||
// from templategenerated
|
||||
LOGGER.debug("skipping "+ entryName, avmnfe);
|
||||
}
|
||||
try
|
||||
{
|
||||
result.put(entryName, db.parse(istream));
|
||||
}
|
||||
catch (SAXException sax)
|
||||
{
|
||||
// this is most likely happening because we have the same property for defined
|
||||
// for tempalteoutputmethodderived and templatederived so we can't distinguish them right now
|
||||
// need to clean this up
|
||||
LOGGER.debug("error parsing " + entryName+ "... skipping", sax);
|
||||
}
|
||||
finally
|
||||
{
|
||||
istream.close();
|
||||
}
|
||||
// it's not generated by the same template type
|
||||
continue;
|
||||
}
|
||||
|
||||
pv = this.avmRemote.getNodeProperty(-1,
|
||||
avmPath + '/' + entryName,
|
||||
WCMModel.PROP_FORM_TRANSFORMER_DERIVED_FROM);
|
||||
|
||||
if (pv != null)
|
||||
{
|
||||
// it's generated by a transformer (not the xml file)
|
||||
continue;
|
||||
}
|
||||
|
||||
final InputStream istream =
|
||||
new AVMRemoteInputStream(this.avmRemote.getInputHandle(-1, avmPath + '/' + entryName),
|
||||
this.avmRemote);
|
||||
try
|
||||
{
|
||||
result.put(entryName, db.parse(istream));
|
||||
}
|
||||
finally
|
||||
{
|
||||
istream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user