mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
first stab at the multi channel thing
- renamed create-xml-content-type wizard to create-form wizard and moved it into the wcm source tree - modified the create form wizard to accept 0 to n template output methods - changed terminology from presentation template to template output method - using associations to track output methods - added file extension as property of templateoutputmethod to parameterize what the name of the output file should be - auto adding .xml to file name in create web content if none specified. - making associating an output method with a template optional git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4043 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,6 +40,7 @@ import org.alfresco.model.WCMModel;
|
||||
import org.alfresco.util.TempFileProvider;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.search.*;
|
||||
import org.alfresco.service.cmr.model.*;
|
||||
@@ -196,11 +197,15 @@ public final class TemplatingService implements Serializable
|
||||
final String schemaRootTagName = (String)
|
||||
this.nodeService.getProperty(schemaNodeRef, WCMModel.PROP_SCHEMA_ROOT_TAG_NAME);
|
||||
LOGGER.debug("root tag name is " + schemaRootTagName);
|
||||
TemplateType tt = new TemplateTypeImpl(title, schemaNodeRef, schemaRootTagName);
|
||||
final NodeRef xslNodeRef = (NodeRef)
|
||||
this.nodeService.getProperty(schemaNodeRef, WCMModel.ASSOC_TEMPLATE_OUTPUT_METHODS);
|
||||
LOGGER.debug("xsl noderef is " + xslNodeRef);
|
||||
tt.addOutputMethod(new XSLTOutputMethod(xslNodeRef));
|
||||
final TemplateType tt = new TemplateTypeImpl(title, schemaNodeRef, schemaRootTagName);
|
||||
for (AssociationRef assoc : this.nodeService.getTargetAssocs(schemaNodeRef,
|
||||
WCMModel.ASSOC_TEMPLATE_OUTPUT_METHODS))
|
||||
{
|
||||
final NodeRef xslNodeRef = assoc.getTargetRef();
|
||||
final TemplateOutputMethod tom = new XSLTOutputMethod(xslNodeRef, this.nodeService);
|
||||
LOGGER.debug("loaded template output method " + tom.getFileExtension() + ", " + xslNodeRef);
|
||||
tt.addOutputMethod(tom);
|
||||
}
|
||||
return tt;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user