/** * Creates a new <code>portlet</code> element * @return the new created instance of <code>PortletType<PortletDescriptor></code> */ public PortletType<PortletDescriptor> createPortlet() { return new PortletTypeImpl<PortletDescriptor>(this, "portlet", model); }
/** * Creates a new <code>portlet</code> element * @return the new created instance of <code>PortletType<PortletDescriptor></code> */ public PortletType<PortletDescriptor> createPortlet() { return new PortletTypeImpl<PortletDescriptor>(this, "portlet", model); }
/** * Returns all <code>portlet</code> elements * @return list of <code>portlet</code> */ public List<PortletType<PortletDescriptor>> getAllPortlet() { List<PortletType<PortletDescriptor>> list = new ArrayList<PortletType<PortletDescriptor>>(); List<Node> nodeList = model.get("portlet"); for(Node node: nodeList) { PortletType<PortletDescriptor> type = new PortletTypeImpl<PortletDescriptor>(this, "portlet", model, node); list.add(type); } return list; }
/** * Returns all <code>portlet</code> elements * @return list of <code>portlet</code> */ public List<PortletType<PortletDescriptor>> getAllPortlet() { List<PortletType<PortletDescriptor>> list = new ArrayList<PortletType<PortletDescriptor>>(); List<Node> nodeList = model.get("portlet"); for(Node node: nodeList) { PortletType<PortletDescriptor> type = new PortletTypeImpl<PortletDescriptor>(this, "portlet", model, node); list.add(type); } return list; }
/** * 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(); }