List of usage examples for com.liferay.portal.layoutconfiguration.util.xml PortletLogic CLOSE_1_TAG
String CLOSE_1_TAG
To view the source code for com.liferay.portal.layoutconfiguration.util.xml PortletLogic CLOSE_1_TAG.
Click Source Link
From source file:com.liferay.journal.content.web.internal.JournalContentPortletLayoutListener.java
License:Open Source License
protected Set<String> getRuntimePortletIds(String content) throws Exception { Set<String> portletIds = new LinkedHashSet<>(); for (int index = 0;;) { index = content.indexOf(PortletLogic.OPEN_TAG, index); if (index == -1) { break; }/*from ww w . j a va 2 s . co m*/ int close1 = content.indexOf(PortletLogic.CLOSE_1_TAG, index); int close2 = content.indexOf(PortletLogic.CLOSE_2_TAG, index); int closeIndex = -1; if ((close2 == -1) || ((close1 != -1) && (close1 < close2))) { closeIndex = close1 + PortletLogic.CLOSE_1_TAG.length(); } else { closeIndex = close2 + PortletLogic.CLOSE_2_TAG.length(); } if (closeIndex == -1) { break; } portletIds.add(getRuntimePortletId(content.substring(index, closeIndex))); index = closeIndex; } return portletIds; }