}
if (customPortletMode != null)
{
for (CustomPortletModeType src : customPortletMode)
{
CustomPortletMode target = app.addCustomPortletMode(src.portletMode);
if (src.description != null)
{
for (DescriptionType d : src.description)
{
Description desc = target.addDescription(d.lang);
desc.setDescription(d.value);
}
}
}
}
if (customWindowState != null)
{
for (CustomWindowStateType src : customWindowState)
{
CustomWindowState target = app.addCustomWindowState(src.windowState);
if (src.description != null)
{
for (DescriptionType d : src.description)
{
Description desc = target.addDescription(d.lang);
desc.setDescription(d.value);
}
}
}
}
if (userAttribute != null)
{
for (UserAttributeType src : userAttribute)
{
UserAttribute target = app.addUserAttribute(src.name);
if (src.description != null)
{
for (DescriptionType d : src.description)
{
Description desc = target.addDescription(d.lang);
desc.setDescription(d.value);
}
}
}
}
if (securityConstraint != null)
{
for (SecurityConstraintType src : securityConstraint)
{
SecurityConstraint target = app.addSecurityConstraint(src.userDataConstraint.transportGuarantee);
if (src.displayName != null)
{
for (DisplayNameType d : src.displayName)
{
DisplayName dname = target.addDisplayName(d.lang);
dname.setDisplayName(d.value);
}
}
if (src.portletCollection != null && src.portletCollection.portletName != null)
{
for (String pname : src.portletCollection.portletName)
{
target.addPortletName(pname);
}
}
}
}
return app;