// the possible values of the visibility are (Private/Public)
analysisBean.setAnalysisVisibility(visSO);
// get content from cms
String subobjdata64Coded = request.getParameter("subobjectdata");
BASE64Decoder bASE64Decoder = new BASE64Decoder();
byte[] subobjBytes = bASE64Decoder.decodeBuffer(subobjdata64Coded);
is = new java.io.ByteArrayInputStream(subobjBytes);
InputStreamReader isr = new InputStreamReader(is);
XStream dataBinder = new XStream();
try {
analysis = (AnalysisBean) dataBinder.fromXML(isr, new AnalysisBean());
isr.close();
query = analysis.getMdxQuery();
nameConnection = analysis.getConnectionName();
reference = analysis.getCatalogUri();
} catch (Throwable t) {
t.printStackTrace();
}
// normal execution (no subObject)
} else {
String templateBase64Coded = request.getParameter("template");
BASE64Decoder bASE64Decoder = new BASE64Decoder();
byte[] template = bASE64Decoder.decodeBuffer(templateBase64Coded);
is = new java.io.ByteArrayInputStream(template);
org.dom4j.io.SAXReader reader = new org.dom4j.io.SAXReader();
Document document = reader.read(is);
nameConnection = request.getParameter("connectionName");
query = document.selectSingleNode("//olap/MDXquery").getStringValue();