public V1PortletDescription apply(PortletDescription from)
{
if (from != null)
{
V1PortletDescription result = WSRP1TypeFactory.createPortletDescription(from.getPortletHandle(),
WSRPUtils.transform(from.getMarkupTypes(), MARKUPTYPE));
result.setDescription(LOCALIZEDSTRING.apply(from.getDescription()));
result.setDisplayName(LOCALIZEDSTRING.apply(from.getDisplayName()));
List<V1Extension> extensions = WSRPUtils.transform(from.getExtensions(), EXTENSION);
if (extensions != null)
{
result.getExtensions().addAll(extensions);
}
List<V1LocalizedString> keywords = WSRPUtils.transform(from.getKeywords(), LOCALIZEDSTRING);
if (keywords != null)
{
result.getKeywords().addAll(keywords);
}
List<String> userCategories = from.getUserCategories();
if (userCategories != null)
{
result.getUserCategories().addAll(userCategories);
}
List<String> userProfileItems = from.getUserProfileItems();
if (userProfileItems != null)
{
result.getUserProfileItems().addAll(userProfileItems);
}
result.setDefaultMarkupSecure(from.isDefaultMarkupSecure());
result.setDoesUrlTemplateProcessing(from.isDoesUrlTemplateProcessing());
result.setTemplatesStoredInSession(from.isTemplatesStoredInSession());
result.setHasUserSpecificState(from.isHasUserSpecificState());
result.setOnlySecure(from.isOnlySecure());
result.setUserContextStoredInSession(from.isUserContextStoredInSession());
result.setUsesMethodGet(from.isUsesMethodGet());
result.setShortTitle(LOCALIZEDSTRING.apply(from.getShortTitle()));
result.setTitle(LOCALIZEDSTRING.apply(from.getTitle()));
result.setGroupID(from.getGroupID());
return result;
}
else
{
return null;