// getting next profile and so on]
// [End Loop]
int index = 0;
while (index >= 0) {
final GetUserProfileByIndexResult result = getUserProfileByIndex(index);
if ((result == null) || (result.getUserProfile() == null)) {
break;
}
final PropertyData[] data = result.getUserProfile();
if (data == null) {
break;
}
String space = null;
for (PropertyData element : data) {
try {
final String name = element.getName();
if (collator.equals(personalSpaceTag, name)) {
final ValueData[] vd = element.getValues();
if ((vd == null) || (vd.length < 1)) {
continue;
}
space = (String) vd[0].getValue();
String strMySiteBaseURL = sharepointClientContext.getMySiteBaseURL();
if (strMySiteBaseURL.endsWith(SPConstants.SLASH)) {
strMySiteBaseURL = strMySiteBaseURL.substring(0, strMySiteBaseURL.lastIndexOf(SPConstants.SLASH));
}
String strURL = strMySiteBaseURL + space;
if (strURL.endsWith(SPConstants.SLASH)) {
strURL = strURL.substring(0, strURL.lastIndexOf(SPConstants.SLASH));
}
if (sharepointClientContext.isIncludedUrl(strURL, LOGGER)) {
lstAllPersonalSites.add(strURL);
LOGGER.log(Level.CONFIG, "Personal Site: " + strURL);
}
}
} catch (final Exception e) {
LOGGER.log(Level.WARNING, e.getMessage(), e);
continue;
}
}
final String next = result.getNextValue();
index = Integer.parseInt(next);
}
if (lstAllPersonalSites.size() > 0) {
LOGGER.info("Discovered " + lstAllPersonalSites.size()