* @author Leo Dos Santos
*/
public class IntXmlPaletteFactory implements IPaletteFactory {
public PaletteDrawer createPaletteDrawer(AbstractConfigGraphDiagram diagram, String namespaceUri) {
PaletteDrawer drawer = new PaletteDrawer("", IntegrationImages.BADGE_SI_XML); //$NON-NLS-1$
List<PaletteEntry> entries = new ArrayList<PaletteEntry>();
CombinedTemplateCreationEntry entry = new CombinedTemplateCreationEntry(
IntXmlSchemaConstants.ELEM_MARSHALLING_TRANSFORMER,
Messages.IntXmlPaletteFactory_MARSHALLING_TRANSFORMER_COMPONENT_DESCRIPTION,
new ModelElementCreationFactory(MarshallingTransformerModelElement.class, diagram, namespaceUri),
IntegrationImages.TRANSFORMER_SMALL, IntegrationImages.TRANSFORMER);
entries.add(entry);
entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_UNMARSHALLING_TRANSFORMER,
Messages.IntXmlPaletteFactory_UNMARSHALLING_TRANSFORMER_COMPONENT_DESCRIPTION,
new ModelElementCreationFactory(UnmarshallingTransformerModelElement.class, diagram, namespaceUri),
IntegrationImages.TRANSFORMER_SMALL, IntegrationImages.TRANSFORMER);
entries.add(entry);
entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_VALIDATING_FILTER,
Messages.IntXmlPaletteFactory_VALIDATING_FILTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
ValidatingFilterModelElement.class, diagram, namespaceUri), IntegrationImages.FILTER_SMALL,
IntegrationImages.FILTER);
entries.add(entry);
entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XPATH_FILTER,
Messages.IntXmlPaletteFactory_XPATH_FILTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(XpathFilterModelElement.class,
diagram, namespaceUri), IntegrationImages.FILTER_SMALL, IntegrationImages.FILTER);
entries.add(entry);
entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XPATH_HEADER_ENRICHER,
Messages.IntXmlPaletteFactory_XPATH_HEADER_ENRICHER_COMPONENT_DESCRIPTION,
new ModelElementCreationFactory(XpathHeaderEnricherModelElement.class, diagram, namespaceUri),
IntegrationImages.ENRICHER_SMALL, IntegrationImages.ENRICHER);
entries.add(entry);
entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XPATH_ROUTER,
Messages.IntXmlPaletteFactory_XPATH_ROUTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
XpathRouterModelElement.class, diagram, namespaceUri), IntegrationImages.ROUTER_SMALL,
IntegrationImages.ROUTER);
entries.add(entry);
entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XPATH_SPLITTER,
Messages.IntXmlPaletteFactory_XPATH_SPLITTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
XpathSplitterModelElement.class, diagram, namespaceUri), IntegrationImages.SPLITTER_SMALL,
IntegrationImages.SPLITTER);
entries.add(entry);
entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XPATH_TRANSFORMER,
Messages.IntXmlPaletteFactory_XPATH_TRANSFORMER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
XpathTransformerModelElement.class, diagram, namespaceUri),
IntegrationImages.TRANSFORMER_SMALL, IntegrationImages.TRANSFORMER);
entries.add(entry);
entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XSLT_TRANSFORMER,
Messages.IntXmlPaletteFactory_XSLT_TRANSFORMER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
XslTransformerModelElement.class, diagram, namespaceUri), IntegrationImages.TRANSFORMER_SMALL,
IntegrationImages.TRANSFORMER);
entries.add(entry);
drawer.addAll(entries);
return drawer;
}