-
Task
-
Resolution: Obsolete
-
Major
-
None
-
5.2.3
-
None
-
-
Empty show more show less
Currently TemplateSelectorFieldFactory and TemplateTypeRestrictionDropConstraint have to create a tmp child node in order to check the template availability.
// creates a temporary node underneath the parent to overcome a restriction in template availability, // see MGNLSTK-1185 try { Node tempNode = associatedNode.addNode("temp", NodeTypes.Page.NAME); templates = templateAssignment.getAvailableTemplates(tempNode); associatedNode.getSession().removeItem(tempNode.getPath()); } catch (RepositoryException e) { log.error("Could not create temporary node to get available templates.", e); }
This behavior may easily changed by:
- expose in TemplateDefinitionAssignment a new method isTemplateAssignableFor(Node targetNode, TemplateDefinition template)
- Add implementation in MetaDataBasedTemplateDefinitionAssignment
- Review the implementation of TemplateAvailability in order to add utility methods
- Use this in TemplateTypeRestrictionDropConstraint and TemplateSelectorFieldFactory.
Acceptance criteria
- is related to
-
MGNLUI-2737 Drag and drop from subfolder to upper level not working
- Closed