/** * If not already created, a new <code>portlet</code> element will be created and returned. * Otherwise, the first existing <code>portlet</code> element will be returned. * @return the instance defined for the element <code>portlet</code> */ public PortletType<PortletDescriptor> getOrCreatePortlet() { List<Node> nodeList = model.get("portlet"); if (nodeList != null && nodeList.size() > 0) { return new PortletTypeImpl<PortletDescriptor>(this, "portlet", model, nodeList.get(0)); } return createPortlet(); }
/** * If not already created, a new <code>portlet</code> element will be created and returned. * Otherwise, the first existing <code>portlet</code> element will be returned. * @return the instance defined for the element <code>portlet</code> */ public PortletType<PortletDescriptor> getOrCreatePortlet() { List<Node> nodeList = model.get("portlet"); if (nodeList != null && nodeList.size() > 0) { return new PortletTypeImpl<PortletDescriptor>(this, "portlet", model, nodeList.get(0)); } return createPortlet(); }