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:
Ariel Backenroth
2006-10-06 02:26:38 +00:00
parent fe50122847
commit d26fe8cbb5
16 changed files with 521 additions and 339 deletions

View File

@@ -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;
}