use of com.twinsoft.convertigo.engine.studio.responses.SetPropertyResponse in project convertigo by convertigo.
the class SetStepSourceDefinition method getServiceResult.
@Override
protected void getServiceResult(HttpServletRequest request, Document document) throws Exception {
HttpSession session = request.getSession();
CheStudio cheStudio = CallAction.getStudio(session);
Element root = document.getDocumentElement();
if (cheStudio != null) {
SourcePickerViewWrap spv = cheStudio.getSourcePickerView();
if (spv != null) {
// Retrieve the StepSource definition
String qname = request.getParameter("qname");
DatabaseObject dbo = Engine.theApp.databaseObjectsManager.getDatabaseObjectByQName(qname);
StepSourceWrap ssw = (StepSourceWrap) spv.getDragData();
// Update step source definition
if (com.twinsoft.convertigo.engine.admin.services.studio.sourcepicker.CanCreateSource.canCreateSource(dbo, ssw)) {
XMLVector<String> sourceDefinition = new XMLVector<>(2);
sourceDefinition.add(ssw.getPriority());
sourceDefinition.add(ssw.getXpath());
IStepSourceContainer stepSourceContainer = (IStepSourceContainer) dbo;
stepSourceContainer.setSourceDefinition(sourceDefinition);
root.appendChild(new SetPropertyResponse("sourceDefinition").toXml(document, qname));
}
}
}
}
Aggregations