}
return data;
}
private final XDirectLinkData parsePaloStudioConnectionData(String paloSuiteUser, String paloSuitePass, String paloSuiteHost, String paloSuitePort, Database configDb, String viewId, SimpleLogger log, XDirectLinkData data, String locale) {
Cube c = configDb.getCubeByName("#_connections");
if (c != null) {
Dimension conDim = c.getDimensionByName("connections");
Dimension conAttribDim = c.getDimensionByName("#_connections_");
ArrayList <Element []> coords = new ArrayList<Element[]>();
ArrayList <Element> attributes = new ArrayList<Element>();
addElement(attributes, conAttribDim, "type");
addElement(attributes, conAttribDim, "name");
addElement(attributes, conAttribDim, "host");
addElement(attributes, conAttribDim, "port");
addElement(attributes, conAttribDim, "username");
addElement(attributes, conAttribDim, "password");
addElement(attributes, conAttribDim, "active");
addElement(attributes, conAttribDim, "useLoginCred");
ArrayList <ConnectionDescriptor> connections =
new ArrayList<ConnectionDescriptor>();
for (Element e: conDim.getElements()) {
for (Element e2: attributes) {
coords.add(new Element [] {e2, e});
}
}
Object [] result = c.getDataBulk(coords.toArray(new Element[0][0]));
int counter = 0;
for (int i = 0; i < conDim.getElementCount(); i++) {
if (counter >= result.length) {
log.debug("Found connection to which this user has no rights. Skipping it (or them).");
break;