001
014
015 package com.liferay.portal.googleapps;
016
017 import com.liferay.portal.kernel.googleapps.GoogleAppsException;
018 import com.liferay.portal.kernel.xml.Element;
019
020 import java.util.List;
021
022
025 public abstract class GetNextItems {
026
027 public GetNextItems(String url, Element atomFeedElement)
028 throws GoogleAppsException {
029
030 List<Element> atomLinkElements = atomFeedElement.elements(
031 GHelperUtil.getAtomQName("link"));
032
033 for (Element atomLinkElement : atomLinkElements) {
034 String rel = atomLinkElement.attributeValue("rel");
035
036 if (rel.equals("next")) {
037 String href = atomLinkElement.attributeValue("href");
038
039 if (!href.equals(url)) {
040 getNextItems(href);
041 }
042
043 break;
044 }
045 }
046 }
047
048 public abstract void getNextItems(String nextURL)
049 throws GoogleAppsException;
050
051 }