@Override public void addNodeAttributes(Element node) { super.addNodeAttributes(node); node.setAttribute("title", this.getTitle()); node.setAttribute("name", this.getName()); node.setAttribute("description", this.getDescription()); node.setAttribute("class", this.getClassName()); node.setAttribute("chanID", this.getChannelPublishId()); node.setAttribute("typeID", this.getChannelTypeId()); node.setAttribute("fname", this.getFunctionalName()); node.setAttribute("timeout", String.valueOf(this.getTimeout())); node.setAttribute("editable", String.valueOf(this.isEditable())); node.setAttribute("hasHelp", String.valueOf(this.hasHelp())); node.setAttribute("hasAbout", String.valueOf(this.hasAbout())); node.setAttribute("secure", String.valueOf(this.isSecure())); node.setAttribute("isPortlet", String.valueOf(this.isPortlet())); }
private boolean isPortletFavorited(IUserLayout layout, String fname) { List<IUserLayoutNodeDescription> favorites = favoritesUtils.getFavoritePortletLayoutNodes(layout); for (IUserLayoutNodeDescription favorite : favorites) { if (favorite instanceof UserLayoutChannelDescription) { String channelId = ((UserLayoutChannelDescription) favorite).getChannelPublishId(); IPortletDefinition portletDefinition = portletDefinitionRegistry.getPortletDefinition(channelId); String favFName = portletDefinition.getFName(); if (fname != null && fname.equals(favFName)) { return true; } } } return false; }