{
if ("description".equals(localName))
{
String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
this.descriptions.put(object, localized);
return localized;
}
}
// portlet-app
if (object instanceof PortletApplication10MetaData)
{
if ("portlet".equals(localName))
{
return new PortletMetaData(id);
}
else if ("custom-portlet-mode".equals(localName))
{
return new CustomPortletModeMetaData(id);
}
else if ("custom-window-state".equals(localName))
{
return new CustomWindowStateMetaData(id);
}
else if ("user-attribute".equals(localName))
{
return new UserAttributeMetaData(id);
}
else if ("security-constraint".equals(localName))
{
return new SecurityConstraintMetaData(id);
}
}
// portlet-app 2.0
if (object instanceof PortletApplication20MetaData && PORTLET_JSR_286_NS.equals(nsURI))
{
if ("public-render-parameter".equals(localName))
{
return new PublicRenderParameterMetaData(id);
}
else if ("event-definition".equals(localName))
{
return new EventDefinitionMetaData(id);
}
else if ("filter".equals(localName))
{
return new FilterMetaData();
}
else if ("filter-mapping".equals(localName))
{
return new FilterMappingMetaData();
}
else if ("listener".equals(localName))
{
return new ListenerMetaData(id);
}
else if ("container-runtime-option".equals(localName))
{
return new ContainerRuntimeMetaData();
}
}
// portlet
if (object instanceof PortletMetaData)
{
if ("init-param".equals(localName))
{
return new InitParamMetaData(id);
}
else if ("display-name".equals(localName))
{
String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
this.displayNames.put(object, localized);
return localized;
}
else if ("supports".equals(localName))
{
return new SupportsMetaData(id);
}
else if ("supported-locale".equals(localName))
{
return new SupportedLocaleMetaData();
}
else if ("portlet-info".equals(localName))
{
return new PortletInfoMetaData(id);
}
else if ("portlet-preferences".equals(localName))
{
return new PortletPreferencesMetaData(id);
}
else if ("security-role-ref".equals(localName))
{
return new SecurityRoleRefMetaData(id);
}
else if ("supported-processing-event".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
{
return new EventDefinitionReferenceMetaData(id);
}
else if ("supported-publishing-event".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
{
return new EventDefinitionReferenceMetaData(id);
}
else if ("container-runtime-option".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
{
return new ContainerRuntimeMetaData();
}
}
// security-constraint
if (object instanceof SecurityConstraintMetaData)
{
if ("portlet-collection".equals(localName))
{
return new PortletCollectionMetaData();
}
else if ("user-data-constraint".equals(localName))
{
return new UserDataConstraintMetaData(id);
}
else if ("display-name".equals(localName))
{
String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
this.displayNames.put(object, localized);
return localized;
}
}
// supports
if (object instanceof SupportsMetaData)
{
if ("portlet-mode".equals(localName))
{
return new PortletModeMetaData();
}
else if ("window-state".equals(localName) && PORTLET_JSR_286_NS.equals(nsURI))
{
return new WindowStateMetaData();
}
}
// preference (in portlet-preferences)
if (object instanceof PortletPreferencesMetaData)
{
if ("preference".equals(localName))
{
return new PortletPreferenceMetaData(id);
}
}
// filter
if (object instanceof FilterMetaData)
{
if ("init-param".equals(localName))
{
return new InitParamMetaData(id);
}
else if ("display-name".equals(localName))
{
String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
this.displayNames.put(object, localized);
return localized;
}
}
// listener
if (object instanceof ListenerMetaData)
{
if ("display-name".equals(localName))
{
String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
this.displayNames.put(object, localized);
return localized;
}
}