String[] qPaths = (String[]) qResults.getContent();
ArrayList gadgetUrlsList = new ArrayList();
for (String qPath : qPaths) {
if (registry.resourceExists(qPath)) {
Resource tempRes = registry.get(qPath);
String gadgetUrlTmp = tempRes.getProperty(
DashboardConstants.GADGET_URL);
if (isGadgetAutharized(userId, gadgetUrlTmp)) {
gadgetUrlsList.add(gadgetUrlTmp);
try {
Integer userCount = Integer.parseInt(tempRes.getProperty(
DashboardConstants.USER_CONTER));
userCount = userCount + 1;
tempRes.setProperty(DashboardConstants.USER_CONTER, userCount.toString());
registry.put(qPath, tempRes);
} catch (Exception e) {
log.error("could not increment the user count :" + e.getMessage());
}
}