resources[i].hasWriteAccess = "All".equals(data[i].getAllowedAction())
|| "Write".equals(data[i].getAllowedAction());
resources[i].isOwner = "All".equals(data[i].getAllowedAction())
|| Action.ResourceAdmin.toString().equals(data[i].getAllowedAction());
if (data[i] instanceof AppData) {
AppData appData = (AppData) data[i];
resources[i].displayName = appData.getName().getLocalPart() + "#" + appData.getHostName();
resources[i].name = appData.getName() + "#" + appData.getHostName();
} else {
resources[i].displayName = data[i].getName().getLocalPart();
resources[i].name = data[i].getName().toString();
}
resources[i].resourceID = data[i].getResourceID().toString();