Search in sources :

Example 6 with CheStudio

use of com.twinsoft.convertigo.engine.studio.CheStudio in project convertigo by convertigo.

the class GetXpathTree method getServiceResult.

@Override
protected void getServiceResult(HttpServletRequest request, Document document) throws Exception {
    HttpSession session = request.getSession();
    CheStudio cheStudio = CallAction.getStudio(session);
    if (cheStudio != null) {
        SourcePickerViewWrap spv = cheStudio.getSourcePickerView();
        if (spv != null) {
            String nodeId = request.getParameter("nodeId");
            Element root = document.getDocumentElement();
            // Tree
            Element xpahtTree = spv.getXpathTree(nodeId);
            xpahtTree = (Element) document.importNode(xpahtTree, true);
            root.appendChild(xpahtTree);
            // xPath
            String xpath = spv.getXpath(nodeId);
            root.appendChild(DOMUtils.createElementWithText(document, "xpath", xpath));
            // Anchor
            String anchor = spv.getAnchor();
            root.appendChild(DOMUtils.createElementWithText(document, "anchor", anchor));
        }
    }
}
Also used : CheStudio(com.twinsoft.convertigo.engine.studio.CheStudio) HttpSession(javax.servlet.http.HttpSession) Element(org.w3c.dom.Element) SourcePickerViewWrap(com.twinsoft.convertigo.engine.studio.views.sourcepicker.SourcePickerViewWrap)

Example 7 with CheStudio

use of com.twinsoft.convertigo.engine.studio.CheStudio in project convertigo by convertigo.

the class ModifyXPathText method getServiceResult.

@Override
protected void getServiceResult(HttpServletRequest request, Document document) throws Exception {
    HttpSession session = request.getSession();
    CheStudio cheStudio = CallAction.getStudio(session);
    if (cheStudio != null) {
        SourcePickerViewWrap spv = cheStudio.getSourcePickerView();
        if (spv != null) {
            String xpath = request.getParameter("xpath").trim();
            spv.modifyXpathText(xpath);
        }
    }
}
Also used : CheStudio(com.twinsoft.convertigo.engine.studio.CheStudio) HttpSession(javax.servlet.http.HttpSession) SourcePickerViewWrap(com.twinsoft.convertigo.engine.studio.views.sourcepicker.SourcePickerViewWrap)

Aggregations

CheStudio (com.twinsoft.convertigo.engine.studio.CheStudio)7 HttpSession (javax.servlet.http.HttpSession)7 SourcePickerViewWrap (com.twinsoft.convertigo.engine.studio.views.sourcepicker.SourcePickerViewWrap)5 Element (org.w3c.dom.Element)3 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)2 AbstractRunnableAction (com.twinsoft.convertigo.engine.studio.AbstractRunnableAction)2 StepSourceWrap (com.twinsoft.convertigo.engine.studio.dnd.StepSourceWrap)2 XMLVector (com.twinsoft.convertigo.beans.common.XMLVector)1 IStepSourceContainer (com.twinsoft.convertigo.beans.core.IStepSourceContainer)1 Sequence (com.twinsoft.convertigo.beans.core.Sequence)1 SetPropertyResponse (com.twinsoft.convertigo.engine.studio.responses.SetPropertyResponse)1 LauncEditableEditorAction (com.twinsoft.convertigo.engine.studio.views.projectexplorer.actions.LauncEditableEditorAction)1 LaunchConnectorEditorAction (com.twinsoft.convertigo.engine.studio.views.projectexplorer.actions.LaunchConnectorEditorAction)1 LaunchSequenceEditorAction (com.twinsoft.convertigo.engine.studio.views.projectexplorer.actions.LaunchSequenceEditorAction)1 IEditableTreeViewWrap (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.IEditableTreeViewWrap)1 WrapDatabaseObject (com.twinsoft.convertigo.engine.studio.views.projectexplorer.model.WrapDatabaseObject)1 HashSet (java.util.HashSet)1 Document (org.w3c.dom.Document)1