/** * Returns the editor widget for the specified XML content type.<p> * * @param typeName the name of the XML content type to get the widget for * @return the editor widget for the specified XML content type */ public I_CmsWidget getWidgetDefault(String typeName) { I_CmsWidget result = m_defaultWidgets.get(typeName); if (result != null) { result = result.newInstance(); } return result; }
/** * Returns the editor widget for the specified XML content type.<p> * * @param typeName the name of the XML content type to get the widget for * @return the editor widget for the specified XML content type */ public I_CmsWidget getWidgetDefault(String typeName) { I_CmsWidget result = m_defaultWidgets.get(typeName); if (result != null) { result = result.newInstance(); } return result; }
/** * Returns an initialized widget class by it's class name or by it's alias.<p> * * @param name the class name or alias name to get the widget for * @return the widget instance for the class name */ public I_CmsWidget getWidget(String name) { // first look up by class name I_CmsWidget result = m_registeredWidgets.get(name); if (result == null) { // not found by class name, look up an alias String className = m_widgetAliases.get(name); if (className != null) { result = m_registeredWidgets.get(className); } } if (result != null) { result = result.newInstance(); } return result; }
/** * Returns an initialized widget class by it's class name or by it's alias.<p> * * @param name the class name or alias name to get the widget for * @return the widget instance for the class name */ public I_CmsWidget getWidget(String name) { // first look up by class name I_CmsWidget result = m_registeredWidgets.get(name); if (result == null) { // not found by class name, look up an alias String className = m_widgetAliases.get(name); if (className != null) { result = m_registeredWidgets.get(className); } } if (result != null) { result = result.newInstance(); } return result; }
/** * @see org.opencms.xml.content.I_CmsXmlContentHandler#getWidget(org.opencms.xml.types.I_CmsXmlContentValue) */ public I_CmsWidget getWidget(I_CmsXmlContentValue value) { // try the specific widget settings first I_CmsWidget result = m_elementWidgets.get(value.getName()); if (result == null) { // use default widget mappings result = OpenCms.getXmlContentTypeManager().getWidgetDefault(value.getTypeName()); } else { result = result.newInstance(); } // set the configuration value for this widget String configuration = getConfiguration(value); if (configuration == null) { // no individual configuration defined, try to get global default configuration configuration = OpenCms.getXmlContentTypeManager().getWidgetDefaultConfiguration(result); } result.setConfiguration(configuration); return result; }
/** * @see org.opencms.xml.content.I_CmsXmlContentHandler#getWidget(org.opencms.xml.types.I_CmsXmlSchemaType) */ public I_CmsWidget getWidget(I_CmsXmlSchemaType value) { // try the specific widget settings first I_CmsWidget result = m_elementWidgets.get(value.getName()); if (result == null) { // use default widget mappings result = OpenCms.getXmlContentTypeManager().getWidgetDefault(value.getTypeName()); } else { result = result.newInstance(); } if (result != null) { // set the configuration value for this widget String configuration = getConfiguration(value); if (configuration == null) { // no individual configuration defined, try to get global default configuration configuration = OpenCms.getXmlContentTypeManager().getWidgetDefaultConfiguration(result); } result.setConfiguration(configuration); } return result; }