Search in sources :

Example 6 with DesignDocument

use of com.twinsoft.convertigo.beans.couchdb.DesignDocument in project convertigo by convertigo.

the class DesignDocumentFunctionTreeObject method closeAllEditors.

public void closeAllEditors(boolean save) {
    DesignDocument ddoc = getDesignDocumentTreeObject().getObject();
    IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    if (activePage != null) {
        IEditorReference[] editorRefs = activePage.getEditorReferences();
        for (int i = 0; i < editorRefs.length; i++) {
            IEditorReference editorRef = (IEditorReference) editorRefs[i];
            try {
                IEditorInput editorInput = editorRef.getEditorInput();
                if (editorInput != null && editorInput instanceof JScriptEditorInput) {
                    if (((JScriptEditorInput) editorInput).is(ddoc)) {
                        activePage.closeEditor(editorRef.getEditor(false), save);
                    }
                }
            } catch (Exception e) {
            }
        }
    }
}
Also used : JScriptEditorInput(com.twinsoft.convertigo.eclipse.editors.jscript.JScriptEditorInput) IEditorReference(org.eclipse.ui.IEditorReference) DesignDocument(com.twinsoft.convertigo.beans.couchdb.DesignDocument) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) IEditorInput(org.eclipse.ui.IEditorInput) JSONException(org.codehaus.jettison.json.JSONException) PartInitException(org.eclipse.ui.PartInitException) EngineException(com.twinsoft.convertigo.engine.EngineException)

Example 7 with DesignDocument

use of com.twinsoft.convertigo.beans.couchdb.DesignDocument in project convertigo by convertigo.

the class MobilePickerContentProvider method addFsObjects.

private void addFsObjects(Map<String, Set<String>> map, TVObject tvd, Object object, boolean isReferenced) {
    if (object != null) {
        if (object instanceof Project) {
            Project project = (Project) object;
            for (Connector c : project.getConnectorsList()) {
                if (c instanceof FullSyncConnector) {
                    String label = isReferenced ? c.getQName() : c.getName();
                    TVObject tvc = tvd.add(new TVObject(label));
                    for (Document d : c.getDocumentsList()) {
                        if (d instanceof DesignDocument) {
                            TVObject tdd = tvc.add(new TVObject(d.getName()));
                            JSONObject views = CouchKey.views.JSONObject(((DesignDocument) d).getJSONObject());
                            if (views != null) {
                                for (Iterator<String> it = GenericUtils.cast(views.keys()); it.hasNext(); ) {
                                    try {
                                        Set<String> infos = null;
                                        String view = it.next();
                                        String key = c.getQName() + "." + d.getName() + "." + view;
                                        TVObject tvv = tdd.add(new TVObject(view));
                                        SourceData sd = null;
                                        try {
                                            sd = Filter.Database.toSourceData(new JSONObject().put("connector", c.getQName()).put("document", d.getQName()).put("queryview", view).put("verb", "get"));
                                        } catch (JSONException e) {
                                            e.printStackTrace();
                                        }
                                        tvv.add(new TVObject("get", d, sd));
                                        infos = map.get(key + ".get");
                                        if (infos == null) {
                                            infos = map.get(c.getQName() + ".get");
                                        }
                                        if (infos != null) {
                                            for (String info : infos) {
                                                try {
                                                    JSONObject jsonInfo = new JSONObject(info);
                                                    boolean includeDocs = false;
                                                    if (jsonInfo.has("include_docs")) {
                                                        includeDocs = Boolean.valueOf(jsonInfo.getString("include_docs")).booleanValue();
                                                    }
                                                    if (jsonInfo.has("marker")) {
                                                        String marker = jsonInfo.getString("marker");
                                                        if (!marker.isEmpty()) {
                                                            String name = "get" + "#" + marker;
                                                            sd = Filter.Database.toSourceData(new JSONObject().put("connector", c.getQName()).put("document", d.getQName()).put("queryview", view).put("verb", "get").put("marker", marker).put("includeDocs", includeDocs));
                                                            tvv.add(new TVObject(name, d, sd, jsonInfo));
                                                        }
                                                    }
                                                } catch (JSONException e) {
                                                    e.printStackTrace();
                                                }
                                            }
                                        }
                                        try {
                                            sd = Filter.Database.toSourceData(new JSONObject().put("connector", c.getQName()).put("document", d.getQName()).put("queryview", view).put("verb", "view"));
                                        } catch (JSONException e) {
                                            e.printStackTrace();
                                        }
                                        tvv.add(new TVObject("view", d, sd));
                                        infos = map.get(key + ".view");
                                        if (infos != null) {
                                            for (String info : infos) {
                                                try {
                                                    JSONObject jsonInfo = new JSONObject(info);
                                                    boolean includeDocs = false;
                                                    if (jsonInfo.has("include_docs")) {
                                                        includeDocs = Boolean.valueOf(jsonInfo.getString("include_docs")).booleanValue();
                                                    }
                                                    if (jsonInfo.has("marker")) {
                                                        String marker = jsonInfo.getString("marker");
                                                        if (!marker.isEmpty()) {
                                                            String name = "view" + "#" + marker;
                                                            sd = Filter.Database.toSourceData(new JSONObject().put("connector", c.getQName()).put("document", d.getQName()).put("queryview", view).put("verb", "view").put("marker", marker).put("includeDocs", includeDocs));
                                                            tvv.add(new TVObject(name, d, sd, jsonInfo));
                                                        }
                                                    }
                                                } catch (JSONException e) {
                                                    e.printStackTrace();
                                                }
                                            }
                                        }
                                    } catch (Exception e) {
                                        e.printStackTrace();
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
Also used : Connector(com.twinsoft.convertigo.beans.core.Connector) FullSyncConnector(com.twinsoft.convertigo.beans.connectors.FullSyncConnector) JSONException(org.codehaus.jettison.json.JSONException) FullSyncConnector(com.twinsoft.convertigo.beans.connectors.FullSyncConnector) DesignDocument(com.twinsoft.convertigo.beans.couchdb.DesignDocument) Document(com.twinsoft.convertigo.beans.core.Document) SourceData(com.twinsoft.convertigo.beans.mobile.components.MobileSmartSource.SourceData) JSONException(org.codehaus.jettison.json.JSONException) Project(com.twinsoft.convertigo.beans.core.Project) JSONObject(org.codehaus.jettison.json.JSONObject) DesignDocument(com.twinsoft.convertigo.beans.couchdb.DesignDocument)

Example 8 with DesignDocument

use of com.twinsoft.convertigo.beans.couchdb.DesignDocument in project convertigo by convertigo.

the class MobileUIComponentTreeObject method getNamedSourceSelector.

@Override
public NamedSourceSelector getNamedSourceSelector() {
    return new NamedSourceSelector() {

        @Override
        Object thisTreeObject() {
            return MobileUIComponentTreeObject.this;
        }

        @Override
        protected List<String> getPropertyNamesForSource(Class<?> c) {
            List<String> list = new ArrayList<String>();
            UIComponent object = getObject();
            if (object instanceof UIDynamicTab) {
                if (ProjectTreeObject.class.isAssignableFrom(c) || MobileApplicationTreeObject.class.isAssignableFrom(c) || MobileApplicationComponentTreeObject.class.isAssignableFrom(c) || MobilePageComponentTreeObject.class.isAssignableFrom(c)) {
                    list.add("tabpage");
                }
            } else if (object instanceof UIDynamicMenuItem) {
                if (ProjectTreeObject.class.isAssignableFrom(c) || MobileApplicationTreeObject.class.isAssignableFrom(c) || MobileApplicationComponentTreeObject.class.isAssignableFrom(c) || MobilePageComponentTreeObject.class.isAssignableFrom(c)) {
                    list.add("itempage");
                }
            } else if (object instanceof UIDynamicAnimate) {
                if (ProjectTreeObject.class.isAssignableFrom(c) || MobileApplicationTreeObject.class.isAssignableFrom(c) || MobileApplicationComponentTreeObject.class.isAssignableFrom(c) || MobilePageComponentTreeObject.class.isAssignableFrom(c) || MobileUIComponentTreeObject.class.isAssignableFrom(c)) {
                    list.add("identifiable");
                }
            } else if (object instanceof UIDynamicInvoke) {
                if (ProjectTreeObject.class.isAssignableFrom(c) || MobileApplicationTreeObject.class.isAssignableFrom(c) || MobileApplicationComponentTreeObject.class.isAssignableFrom(c) || MobileUIComponentTreeObject.class.isAssignableFrom(c)) {
                    list.add("stack");
                }
            } else if (object instanceof UIUseShared) {
                if (ProjectTreeObject.class.isAssignableFrom(c) || MobileApplicationTreeObject.class.isAssignableFrom(c) || MobileApplicationComponentTreeObject.class.isAssignableFrom(c) || MobileUIComponentTreeObject.class.isAssignableFrom(c)) {
                    list.add("sharedcomponent");
                }
            } else if (object instanceof UIDynamicInfiniteScroll) {
                if (ProjectTreeObject.class.isAssignableFrom(c) || MobileApplicationTreeObject.class.isAssignableFrom(c) || MobileApplicationComponentTreeObject.class.isAssignableFrom(c) || MobilePageComponentTreeObject.class.isAssignableFrom(c) || MobileUIComponentTreeObject.class.isAssignableFrom(c)) {
                    list.add("scrollaction");
                }
            } else if (object instanceof UIDynamicElement) {
                if (ProjectTreeObject.class.isAssignableFrom(c) || SequenceTreeObject.class.isAssignableFrom(c) || ConnectorTreeObject.class.isAssignableFrom(c)) {
                    list.add("requestable");
                }
                if (ProjectTreeObject.class.isAssignableFrom(c) || MobileApplicationTreeObject.class.isAssignableFrom(c) || MobileApplicationComponentTreeObject.class.isAssignableFrom(c) || MobilePageComponentTreeObject.class.isAssignableFrom(c)) {
                    list.add("page");
                }
                if (ProjectTreeObject.class.isAssignableFrom(c) || ConnectorTreeObject.class.isAssignableFrom(c) || DesignDocumentTreeObject.class.isAssignableFrom(c) || DesignDocumentViewTreeObject.class.isAssignableFrom(c)) {
                    list.add("fsview");
                }
            }
            return list;
        }

        @Override
        protected boolean isNamedSource(String propertyName) {
            UIComponent object = getObject();
            if (object instanceof UIDynamicTab) {
                return "tabpage".equals(propertyName);
            } else if (object instanceof UIDynamicMenuItem) {
                return "itempage".equals(propertyName);
            } else if (object instanceof UIDynamicAnimate) {
                return "identifiable".equals(propertyName);
            } else if (object instanceof UIDynamicInvoke) {
                return "stack".equals(propertyName);
            } else if (object instanceof UIUseShared) {
                return "sharedcomponent".equals(propertyName);
            } else if (object instanceof UIDynamicInfiniteScroll) {
                return "scrollaction".equals(propertyName);
            } else if (object instanceof UIDynamicElement) {
                return "requestable".equals(propertyName) || "fsview".equals(propertyName) || "page".equals(propertyName);
            }
            return false;
        }

        @Override
        public boolean isSelectable(String propertyName, Object nsObject) {
            UIComponent object = getObject();
            if (object instanceof UIDynamicTab) {
                if ("tabpage".equals(propertyName)) {
                    if (nsObject instanceof PageComponent) {
                        return (((PageComponent) nsObject).getProject().equals(object.getProject()));
                    }
                }
            } else if (object instanceof UIDynamicMenuItem) {
                if ("itempage".equals(propertyName)) {
                    if (nsObject instanceof PageComponent) {
                        return (((PageComponent) nsObject).getProject().equals(object.getProject()));
                    }
                }
            } else if (object instanceof UIDynamicAnimate) {
                if ("identifiable".equals(propertyName)) {
                    UIDynamicAnimate uda = (UIDynamicAnimate) object;
                    if (nsObject instanceof UIElement) {
                        UIElement ue = (UIElement) nsObject;
                        if (hasSameScriptComponent(uda, ue)) {
                            return !ue.getIdentifier().isEmpty();
                        }
                    }
                }
            } else if (object instanceof UIDynamicInvoke) {
                if ("stack".equals(propertyName)) {
                    return nsObject instanceof UIActionStack;
                }
            } else if (object instanceof UIUseShared) {
                if ("sharedcomponent".equals(propertyName)) {
                    return nsObject instanceof UISharedComponent;
                }
            } else if (object instanceof UIDynamicInfiniteScroll) {
                if ("scrollaction".equals(propertyName)) {
                    if (nsObject instanceof UIDynamicAction) {
                        UIDynamicAction uida = (UIDynamicAction) nsObject;
                        if (uida.getProject().equals(object.getProject())) {
                            if (uida.getIonBean().getName().equals("CallSequenceAction")) {
                                return true;
                            }
                            if (uida.getIonBean().getName().equals("FullSyncViewAction")) {
                                return true;
                            }
                        }
                    }
                }
            } else if (object instanceof UIDynamicElement) {
                if ("requestable".equals(propertyName)) {
                    UIDynamicElement cc = (UIDynamicElement) object;
                    if (cc.getIonBean().getName().equals("CallSequenceAction")) {
                        return nsObject instanceof Sequence;
                    }
                    if (cc.getIonBean().getName().equals("CallFullSyncAction")) {
                        return nsObject instanceof FullSyncConnector;
                    }
                    if (cc.getIonBean().getName().equals("FullSyncSyncAction")) {
                        return nsObject instanceof FullSyncConnector;
                    }
                    if (cc.getIonBean().getName().equals("FullSyncViewAction")) {
                        return nsObject instanceof DesignDocument;
                    }
                    if (cc.getIonBean().getName().equals("FullSyncPostAction")) {
                        return nsObject instanceof FullSyncConnector;
                    }
                    if (cc.getIonBean().getName().equals("FullSyncGetAction")) {
                        return nsObject instanceof FullSyncConnector;
                    }
                    if (cc.getIonBean().getName().equals("FullSyncDeleteAction")) {
                        return nsObject instanceof FullSyncConnector;
                    }
                    if (cc.getIonBean().getName().equals("FullSyncPutAttachmentAction")) {
                        return nsObject instanceof FullSyncConnector;
                    }
                    if (cc.getIonBean().getName().equals("FullSyncDeleteAttachmentAction")) {
                        return nsObject instanceof FullSyncConnector;
                    }
                    if (cc.getIonBean().getName().equals("FSImage")) {
                        return nsObject instanceof FullSyncConnector;
                    }
                    if (cc.getIonBean().getName().equals("AutoScrollComponent")) {
                        return nsObject instanceof Sequence;
                    }
                }
                if ("fsview".equals(propertyName)) {
                    UIDynamicElement cc = (UIDynamicElement) object;
                    if (cc.getIonBean().getName().equals("FullSyncViewAction")) {
                        return nsObject instanceof String;
                    }
                    if (cc.getIonBean().getName().equals("AutoScrollComponent")) {
                        return nsObject instanceof DesignDocument || nsObject instanceof String;
                    }
                }
                if ("page".equals(propertyName)) {
                    if (nsObject instanceof PageComponent) {
                        return (((PageComponent) nsObject).getProject().equals(object.getProject()));
                    }
                }
            }
            return false;
        }

        @Override
        protected void handleSourceCleared(String propertyName) {
        // nothing to do
        }

        @Override
        protected void handleSourceRenamed(String propertyName, String oldName, String newName) {
            if (isNamedSource(propertyName)) {
                boolean hasBeenRenamed = false;
                Object oValue = getPropertyValue(propertyName);
                String pValue;
                if (oValue instanceof MobileSmartSourceType) {
                    MobileSmartSourceType sst = (MobileSmartSourceType) oValue;
                    pValue = sst.getSmartValue();
                } else {
                    pValue = (String) oValue;
                }
                String _pValue = pValue;
                if (pValue != null && (pValue.startsWith(oldName + ".") || pValue.equals(oldName))) {
                    _pValue = newName + pValue.substring(oldName.length());
                    if (!pValue.equals(_pValue)) {
                        UIComponent object = getObject();
                        if (object instanceof UIDynamicTab) {
                            if ("tabpage".equals(propertyName)) {
                                ((UIDynamicTab) object).setTabPage(_pValue);
                                hasBeenRenamed = true;
                            }
                        } else if (object instanceof UIDynamicMenuItem) {
                            if ("itempage".equals(propertyName)) {
                                ((UIDynamicMenuItem) object).setItemPage(_pValue);
                                hasBeenRenamed = true;
                            }
                        } else if (object instanceof UIDynamicAnimate) {
                            if ("identifiable".equals(propertyName)) {
                                ((UIDynamicAnimate) object).setIdentifiable(_pValue);
                                hasBeenRenamed = true;
                            }
                        } else if (object instanceof UIDynamicInvoke) {
                            if ("stack".equals(propertyName)) {
                                ((UIDynamicInvoke) object).setSharedActionQName(_pValue);
                                hasBeenRenamed = true;
                            }
                        } else if (object instanceof UIUseShared) {
                            if ("sharedcomponent".equals(propertyName)) {
                                ((UIUseShared) object).setSharedComponentQName(_pValue);
                                hasBeenRenamed = true;
                            }
                        } else if (object instanceof UIDynamicInfiniteScroll) {
                            if ("scrollaction".equals(propertyName)) {
                                ((UIDynamicInfiniteScroll) object).setScrollAction(_pValue);
                                hasBeenRenamed = true;
                            }
                        } else if (object instanceof UIDynamicElement) {
                            if ("requestable".equals(propertyName)) {
                                ((UIDynamicElement) object).getIonBean().setPropertyValue("requestable", new MobileSmartSourceType(_pValue));
                                hasBeenRenamed = true;
                            }
                            if ("fsview".equals(propertyName)) {
                                ((UIDynamicElement) object).getIonBean().setPropertyValue("fsview", new MobileSmartSourceType(_pValue));
                                hasBeenRenamed = true;
                            }
                            if ("page".equals(propertyName)) {
                                ((UIDynamicElement) object).getIonBean().setPropertyValue("page", new MobileSmartSourceType(_pValue));
                                hasBeenRenamed = true;
                            }
                        } else if (object instanceof UIText) {
                            if ("textValue".equals(propertyName)) {
                                ((UIText) object).setTextSmartType(new MobileSmartSourceType(_pValue));
                                hasBeenRenamed = true;
                            }
                        }
                    }
                }
                if (hasBeenRenamed) {
                    hasBeenModified(true);
                    viewer.refresh();
                    ConvertigoPlugin.projectManager.getProjectExplorerView().updateTreeObject(MobileUIComponentTreeObject.this);
                    // refresh editors (e.g labels in combobox)
                    getDescriptors();
                    TreeObjectEvent treeObjectEvent = new TreeObjectEvent(MobileUIComponentTreeObject.this, propertyName, pValue, _pValue);
                    ConvertigoPlugin.projectManager.getProjectExplorerView().fireTreeObjectPropertyChanged(treeObjectEvent);
                }
            }
        }

        @Override
        protected void refactorSmartSources(Class<?> c, String oldName, String newName) {
            try {
                // A project has been renamed
                if (ProjectTreeObject.class.isAssignableFrom(c)) {
                    UIComponent object = getObject();
                    for (java.beans.PropertyDescriptor pd : CachedIntrospector.getBeanInfo(object).getPropertyDescriptors()) {
                        if (pd.getPropertyType().equals(MobileSmartSourceType.class)) {
                            String propertyName = pd.getName();
                            Object oValue = getPropertyValue(propertyName);
                            MobileSmartSourceType msst = (MobileSmartSourceType) oValue;
                            MobileSmartSource mss = msst.getSmartSource();
                            boolean hasBeenChanged = false;
                            if (mss != null) {
                                if (oldName.equals(mss.getProjectName())) {
                                    mss.setProjectName(newName);
                                    msst.setSmartValue(mss.toJsonString());
                                    hasBeenChanged = true;
                                }
                            }
                            if (hasBeenChanged) {
                                Object nValue = getPropertyValue(propertyName);
                                hasBeenModified(true);
                                viewer.refresh();
                                ConvertigoPlugin.projectManager.getProjectExplorerView().updateTreeObject(MobileUIComponentTreeObject.this);
                                // refresh editors (e.g labels in combobox)
                                getDescriptors();
                                TreeObjectEvent treeObjectEvent = new TreeObjectEvent(MobileUIComponentTreeObject.this, propertyName, oValue, nValue);
                                ConvertigoPlugin.projectManager.getProjectExplorerView().fireTreeObjectPropertyChanged(treeObjectEvent);
                            }
                        }
                    }
                }
            } catch (Exception e) {
            // TODO: handle exception
            }
        }
    };
}
Also used : UIElement(com.twinsoft.convertigo.beans.mobile.components.UIElement) MobileSmartSourceType(com.twinsoft.convertigo.beans.mobile.components.MobileSmartSourceType) UIUseShared(com.twinsoft.convertigo.beans.mobile.components.UIUseShared) ArrayList(java.util.ArrayList) UIDynamicTab(com.twinsoft.convertigo.beans.mobile.components.UIDynamicTab) FullSyncConnector(com.twinsoft.convertigo.beans.connectors.FullSyncConnector) UIDynamicInfiniteScroll(com.twinsoft.convertigo.beans.mobile.components.UIDynamicInfiniteScroll) UISharedComponent(com.twinsoft.convertigo.beans.mobile.components.UISharedComponent) PageComponent(com.twinsoft.convertigo.beans.mobile.components.PageComponent) UIText(com.twinsoft.convertigo.beans.mobile.components.UIText) TreeObjectEvent(com.twinsoft.convertigo.eclipse.views.projectexplorer.TreeObjectEvent) UIComponent(com.twinsoft.convertigo.beans.mobile.components.UIComponent) UIDynamicElement(com.twinsoft.convertigo.beans.mobile.components.UIDynamicElement) Sequence(com.twinsoft.convertigo.beans.core.Sequence) CoreException(org.eclipse.core.runtime.CoreException) EngineException(com.twinsoft.convertigo.engine.EngineException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) UIActionStack(com.twinsoft.convertigo.beans.mobile.components.UIActionStack) UIDynamicAnimate(com.twinsoft.convertigo.beans.mobile.components.UIDynamicAnimate) UIDynamicAction(com.twinsoft.convertigo.beans.mobile.components.UIDynamicAction) MobileSmartSource(com.twinsoft.convertigo.beans.mobile.components.MobileSmartSource) UIDynamicInvoke(com.twinsoft.convertigo.beans.mobile.components.UIDynamicInvoke) DesignDocument(com.twinsoft.convertigo.beans.couchdb.DesignDocument) UIDynamicMenuItem(com.twinsoft.convertigo.beans.mobile.components.UIDynamicMenuItem) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject)

Example 9 with DesignDocument

use of com.twinsoft.convertigo.beans.couchdb.DesignDocument in project convertigo by convertigo.

the class MobileUIComponentTreeObject method refactorSmartSources.

protected void refactorSmartSources(TreeObjectEvent treeObjectEvent) {
    TreeObject treeObject = (TreeObject) treeObjectEvent.getSource();
    String propertyName = (String) treeObjectEvent.propertyName;
    propertyName = ((propertyName == null) ? "" : propertyName);
    Object oldValue = treeObjectEvent.oldValue;
    Object newValue = treeObjectEvent.newValue;
    if (getProjectTreeObject() == null) {
        // System.out.println("dbo ignored because it has been deleted: "+ getObject().priority);
        return;
    }
    // Case of DatabaseObjectTreeObject
    if (treeObject instanceof DatabaseObjectTreeObject) {
        DatabaseObjectTreeObject doto = (DatabaseObjectTreeObject) treeObject;
        DatabaseObject dbo = doto.getObject();
        try {
            boolean sourcesUpdated = false;
            // A bean name has changed
            if (propertyName.equals("name")) {
                boolean fromSameProject = getProjectTreeObject().equals(doto.getProjectTreeObject());
                if ((treeObjectEvent.update == TreeObjectEvent.UPDATE_ALL) || ((treeObjectEvent.update == TreeObjectEvent.UPDATE_LOCAL) && fromSameProject)) {
                    try {
                        if (dbo instanceof Project) {
                            String oldName = (String) oldValue;
                            String newName = (String) newValue;
                            if (!newValue.equals(oldValue)) {
                                if (getObject().updateSmartSource("'" + oldName + "\\.", "'" + newName + ".")) {
                                    sourcesUpdated = true;
                                }
                                if (getObject().updateSmartSource("\\/" + oldName + "\\.", "/" + newName + ".")) {
                                    sourcesUpdated = true;
                                }
                            }
                        } else if (dbo instanceof Sequence) {
                            String oldName = (String) oldValue;
                            String newName = (String) newValue;
                            String projectName = dbo.getProject().getName();
                            if (!newValue.equals(oldValue)) {
                                if (getObject().updateSmartSource("'" + projectName + "\\." + oldName, "'" + projectName + "." + newName)) {
                                    sourcesUpdated = true;
                                }
                            }
                        } else if (dbo instanceof FullSyncConnector) {
                            String oldName = (String) oldValue;
                            String newName = (String) newValue;
                            String projectName = dbo.getProject().getName();
                            if (!newValue.equals(oldValue)) {
                                if (getObject().updateSmartSource("\\/" + projectName + "\\." + oldName + "\\.", "/" + projectName + "." + newName + ".")) {
                                    sourcesUpdated = true;
                                }
                                if (getObject().updateSmartSource("\\/" + oldName + "\\.", "/" + newName + ".")) {
                                    sourcesUpdated = true;
                                }
                            }
                        } else if (dbo instanceof DesignDocument) {
                            String oldName = (String) oldValue;
                            String newName = (String) newValue;
                            if (!newValue.equals(oldValue)) {
                                if (getObject().updateSmartSource("ddoc='" + oldName + "'", "ddoc='" + newName + "'")) {
                                    sourcesUpdated = true;
                                }
                            }
                        }
                        if (dbo instanceof UIComponent) {
                            if (!newValue.equals(oldValue)) {
                                try {
                                    String oldName = (String) oldValue;
                                    String newName = (String) newValue;
                                    // SC mode
                                    if (getObject().updateSmartSource("\\?\\." + oldName, "?." + newName)) {
                                        sourcesUpdated = true;
                                    }
                                    // TS mode
                                    if (getObject().getSharedComponent() != null) {
                                        long priority = getObject().getSharedComponent().priority;
                                        if (getObject().updateSmartSource("params" + priority + "\\." + oldName, "params" + priority + "." + newName)) {
                                            sourcesUpdated = true;
                                        }
                                    }
                                } catch (Exception e) {
                                }
                            }
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
            if (dbo instanceof UIComponent) {
                UIComponent uic = (UIComponent) dbo;
                if (hasSameScriptComponent(getObject(), uic)) {
                    // A FormControlName property has changed
                    if (propertyName.equals("FormControlName") || uic.isFormControlAttribute()) {
                        if (!newValue.equals(oldValue)) {
                            try {
                                String oldSmart = ((MobileSmartSourceType) oldValue).getSmartValue();
                                String newSmart = ((MobileSmartSourceType) newValue).getSmartValue();
                                if (uic.getUIForm() != null) {
                                    String form = uic.getUIForm().getFormGroupName();
                                    if (getObject().updateSmartSource(form + "\\?\\.controls\\['" + oldSmart + "'\\]", form + "?.controls['" + newSmart + "']")) {
                                        sourcesUpdated = true;
                                    }
                                }
                            } catch (Exception e) {
                            }
                        }
                    }
                }
            }
            // Need TS regeneration
            if (sourcesUpdated) {
                hasBeenModified(true);
                viewer.refresh();
                markMainAsDirty(getObject());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    } else // Case of DesignDocumentViewTreeObject
    if (treeObject instanceof DesignDocumentViewTreeObject) {
        DesignDocumentViewTreeObject ddvto = (DesignDocumentViewTreeObject) treeObject;
        try {
            boolean sourcesUpdated = false;
            // View name changed
            if (propertyName.equals("name")) {
                boolean fromSameProject = getProjectTreeObject().equals(ddvto.getProjectTreeObject());
                if ((treeObjectEvent.update == TreeObjectEvent.UPDATE_ALL) || ((treeObjectEvent.update == TreeObjectEvent.UPDATE_LOCAL) && fromSameProject)) {
                    try {
                        String oldName = (String) oldValue;
                        String newName = (String) newValue;
                        if (!newValue.equals(oldValue)) {
                            if (getObject().updateSmartSource("view='" + oldName + "'", "view='" + newName + "'")) {
                                sourcesUpdated = true;
                            }
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
            // Need TS regeneration
            if (sourcesUpdated) {
                hasBeenModified(true);
                viewer.refresh();
                markMainAsDirty(getObject());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
Also used : MobileSmartSourceType(com.twinsoft.convertigo.beans.mobile.components.MobileSmartSourceType) UIComponent(com.twinsoft.convertigo.beans.mobile.components.UIComponent) Sequence(com.twinsoft.convertigo.beans.core.Sequence) FullSyncConnector(com.twinsoft.convertigo.beans.connectors.FullSyncConnector) CoreException(org.eclipse.core.runtime.CoreException) EngineException(com.twinsoft.convertigo.engine.EngineException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) IProject(org.eclipse.core.resources.IProject) Project(com.twinsoft.convertigo.beans.core.Project) DesignDocument(com.twinsoft.convertigo.beans.couchdb.DesignDocument) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject)

Example 10 with DesignDocument

use of com.twinsoft.convertigo.beans.couchdb.DesignDocument in project convertigo by convertigo.

the class MobilePickerComposite method getJsonModel.

private JSONObject getJsonModel(Map<String, Object> data, DatabaseObject databaseObject) throws Exception {
    JSONObject jsonModel = new JSONObject();
    Map<String, String> params;
    DatabaseObject dbo;
    String dataPath;
    if (databaseObject == null) {
        dbo = (DatabaseObject) data.get("databaseObject");
        params = GenericUtils.cast(data.get("params"));
        dataPath = (String) data.get("searchPath");
    } else {
        dbo = databaseObject;
        params = new HashMap<String, String>();
        dataPath = "";
    }
    if (dbo != null) {
        // case of requestable
        if (dbo instanceof RequestableObject) {
            RequestableObject ro = (RequestableObject) dbo;
            Project project = ro.getProject();
            String responseEltName = ro.getXsdTypePrefix() + ro.getName() + "Response";
            boolean isDocumentNode = JsonRoot.docNode.equals(project.getJsonRoot()) && dataPath.isEmpty();
            XmlSchema schema = Engine.theApp.schemaManager.getSchemaForProject(project.getName());
            XmlSchemaObject xso = SchemaMeta.getXmlSchemaObject(schema, ro);
            if (xso != null) {
                Document document = XmlSchemaUtils.getDomInstance(xso);
                // System.out.println(XMLUtils.prettyPrintDOM(document));
                String jsonString = XMLUtils.XmlToJson(document.getDocumentElement(), true, true);
                JSONObject jsonObject = new JSONObject(jsonString);
                String searchPath = "document." + responseEltName + ".response";
                searchPath += isDocumentNode || !dataPath.startsWith(".document") ? dataPath : dataPath.replaceFirst("\\.document", "");
                JSONObject jsonOutput = findJSONObject(jsonObject, searchPath);
                jsonModel = isDocumentNode ? new JSONObject().put("document", jsonOutput) : jsonOutput;
            }
        } else if (dbo instanceof DesignDocument) {
            DesignDocument dd = (DesignDocument) dbo;
            Connector connector = dd.getConnector();
            String ddoc = params.get("ddoc");
            String view = params.get("view");
            String viewName = ddoc + "/" + view;
            String includeDocs = params.get("include_docs");
            Display.getDefault().asyncExec(new Runnable() {

                public void run() {
                    IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                    ConnectorEditor connectorEditor = ConvertigoPlugin.getDefault().getConnectorEditor(connector);
                    if (connectorEditor == null) {
                        try {
                            connectorEditor = (ConnectorEditor) activePage.openEditor(new ConnectorEditorInput(connector), "com.twinsoft.convertigo.eclipse.editors.connector.ConnectorEditor");
                        } catch (PartInitException e) {
                            ConvertigoPlugin.logException(e, "Error while loading the connector editor '" + connector.getName() + "'");
                        }
                    }
                    if (connectorEditor != null) {
                        // activate connector's editor
                        activePage.activate(connectorEditor);
                        // set transaction's parameters
                        Transaction transaction = connector.getTransactionByName(CouchDbConnector.internalView);
                        ((GetViewTransaction) transaction).setViewname(viewName);
                        ((GetViewTransaction) transaction).setQ_include_docs(includeDocs);
                        Variable view_reduce = ((GetViewTransaction) transaction).getVariable(CouchParam.prefix + "reduce");
                        view_reduce.setValueOrNull(false);
                        // execute view transaction
                        connectorEditor.getDocument(CouchDbConnector.internalView, false);
                    }
                }
            });
        } else // case of UIForm
        if (dbo instanceof UIForm) {
            // JSONObject jsonObject = new JSONObject("{\"controls\":{\"['area']\":{\"value\":\"\"}}}");
            JSONObject jsonObject = new JSONObject(((UIForm) dbo).computeJsonModel());
            String searchPath = dataPath;
            JSONObject jsonOutput = findJSONObject(jsonObject, searchPath);
            jsonModel = jsonOutput;
        } else // case of UIACtionStack
        if (dbo instanceof UIActionStack) {
            JSONObject jsonObject = new JSONObject(((UIActionStack) dbo).computeJsonModel());
            String searchPath = dataPath;
            JSONObject jsonOutput = findJSONObject(jsonObject, searchPath);
            jsonModel = jsonOutput;
        } else // case of UIDynamicAction or UICustomAction
        if (dbo instanceof IAction) {
            JSONObject jsonObject = new JSONObject();
            if (dbo instanceof UIDynamicAction) {
                UIDynamicAction uida = (UIDynamicAction) dbo;
                jsonObject = new JSONObject(uida.computeJsonModel());
                IonBean ionBean = uida.getIonBean();
                if (ionBean != null) {
                    String name = ionBean.getName();
                    if ("CallSequenceAction".equals(name)) {
                        String qname = ionBean.getProperty("requestable").getValue().toString();
                        DatabaseObject sequence = Engine.theApp.databaseObjectsManager.getDatabaseObjectByQName(qname);
                        if (sequence != null) {
                            JSONObject targetJsonModel = getJsonModel(data, sequence);
                            if (jsonObject.has("out")) {
                                jsonObject.put("out", targetJsonModel);
                            }
                        }
                    } else if ("CallFullSyncAction".equals(name)) {
                        String qname = ionBean.getProperty("requestable").getValue().toString();
                        String verb = ionBean.getProperty("verb").getValue().toString();
                        Connector connector = (Connector) Engine.theApp.databaseObjectsManager.getDatabaseObjectByQName(qname);
                        if (connector != null) {
                            XmlSchema schema = Engine.theApp.schemaManager.getSchemaForProject(connector.getProject().getName());
                            AbstractCouchDbTransaction act = null;
                            if ("all".equals(verb))
                                act = new AllDocsTransaction();
                            else if ("create".equals(verb))
                                act = new PutDatabaseTransaction();
                            else if ("destroy".equals(verb))
                                act = new DeleteDatabaseTransaction();
                            else if ("get".equals(verb))
                                act = new GetDocumentTransaction();
                            else if ("delete".equals(verb))
                                act = new DeleteDocumentTransaction();
                            else if ("delete_attachment".equals(verb))
                                act = new DeleteDocumentAttachmentTransaction();
                            else if ("post".equals(verb))
                                act = new PostDocumentTransaction();
                            else if ("put_attachment".equals(verb))
                                act = new PutDocumentAttachmentTransaction();
                            else if ("replicate_push".equals(verb))
                                act = new PostReplicateTransaction();
                            else if ("reset".equals(verb))
                                act = new ResetDatabaseTransaction();
                            else if ("view".equals(verb))
                                act = new GetViewTransaction();
                            if (act != null) {
                                QName typeQName = act.getComplexTypeAffectation();
                                XmlSchemaType xmlSchemaType = schema.getTypeByName(typeQName);
                                Document document = XmlSchemaUtils.getDomInstance(xmlSchemaType);
                                String jsonString = XMLUtils.XmlToJson(document.getDocumentElement(), true, true);
                                JSONObject jsonOutput = new JSONObject(jsonString).getJSONObject("document");
                                cleanJsonModel(jsonOutput);
                                jsonOutput.remove("_c8oMeta");
                                jsonOutput.remove("error");
                                jsonOutput.remove("reason");
                                if (jsonObject.has("out")) {
                                    jsonObject.put("out", jsonOutput);
                                }
                            }
                        }
                    } else if ("FullSyncGetAction".equals(name)) {
                        String qname = ionBean.getProperty("requestable").getValue().toString();
                        String docid = ionBean.getProperty("_id").getValue().toString();
                        Connector connector = (Connector) Engine.theApp.databaseObjectsManager.getDatabaseObjectByQName(qname);
                        if (connector != null) {
                            Display.getDefault().asyncExec(new Runnable() {

                                public void run() {
                                    IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                                    ConnectorEditor connectorEditor = ConvertigoPlugin.getDefault().getConnectorEditor(connector);
                                    if (connectorEditor == null) {
                                        try {
                                            connectorEditor = (ConnectorEditor) activePage.openEditor(new ConnectorEditorInput(connector), "com.twinsoft.convertigo.eclipse.editors.connector.ConnectorEditor");
                                        } catch (PartInitException e) {
                                            ConvertigoPlugin.logException(e, "Error while loading the connector editor '" + connector.getName() + "'");
                                        }
                                    }
                                    if (connectorEditor != null) {
                                        // activate connector's editor
                                        activePage.activate(connectorEditor);
                                        // set transaction's parameters
                                        Transaction transaction = connector.getTransactionByName(CouchDbConnector.internalDocument);
                                        Variable var_docid = ((GetDocumentTransaction) transaction).getVariable(CouchParam.docid.param());
                                        var_docid.setValueOrNull(docid);
                                        // execute view transaction
                                        connectorEditor.getDocument(CouchDbConnector.internalDocument, false);
                                    }
                                }
                            });
                        }
                    } else if ("FullSyncViewAction".equals(name)) {
                        String fsview = ionBean.getProperty("fsview").getValue().toString();
                        String includeDocs = ionBean.getProperty("include_docs").getValue().toString();
                        String reduce = ionBean.getProperty("reduce").getValue().toString();
                        String qname = fsview.substring(0, fsview.lastIndexOf('.'));
                        DesignDocument dd = (DesignDocument) Engine.theApp.databaseObjectsManager.getDatabaseObjectByQName(qname);
                        Connector connector = dd.getConnector();
                        String viewName = dd.getName() + "/" + fsview.substring(fsview.lastIndexOf('.') + 1);
                        Display.getDefault().asyncExec(new Runnable() {

                            public void run() {
                                IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                                ConnectorEditor connectorEditor = ConvertigoPlugin.getDefault().getConnectorEditor(connector);
                                if (connectorEditor == null) {
                                    try {
                                        connectorEditor = (ConnectorEditor) activePage.openEditor(new ConnectorEditorInput(connector), "com.twinsoft.convertigo.eclipse.editors.connector.ConnectorEditor");
                                    } catch (PartInitException e) {
                                        ConvertigoPlugin.logException(e, "Error while loading the connector editor '" + connector.getName() + "'");
                                    }
                                }
                                if (connectorEditor != null) {
                                    // activate connector's editor
                                    activePage.activate(connectorEditor);
                                    // set transaction's parameters
                                    Transaction transaction = connector.getTransactionByName(CouchDbConnector.internalView);
                                    ((GetViewTransaction) transaction).setViewname(viewName);
                                    ((GetViewTransaction) transaction).setQ_include_docs(includeDocs);
                                    Variable view_reduce = ((GetViewTransaction) transaction).getVariable(CouchParam.prefix + "reduce");
                                    view_reduce.setValueOrNull(reduce);
                                    // execute view transaction
                                    connectorEditor.getDocument(CouchDbConnector.internalView, false);
                                }
                            }
                        });
                    } else if (name.startsWith("FullSync")) {
                        if (ionBean.getProperty("requestable") != null) {
                            String qname = ionBean.getProperty("requestable").getValue().toString();
                            DatabaseObject connector = Engine.theApp.databaseObjectsManager.getDatabaseObjectByQName(qname);
                            if (connector != null) {
                                XmlSchema schema = Engine.theApp.schemaManager.getSchemaForProject(connector.getProject().getName());
                                AbstractCouchDbTransaction act = null;
                                if ("FullSyncDeleteAction".equals(name))
                                    act = new DeleteDocumentTransaction();
                                else if ("FullSyncDeleteAttachmentAction".equals(name))
                                    act = new DeleteDocumentAttachmentTransaction();
                                else if ("FullSyncPostAction".equals(name))
                                    act = new PostDocumentTransaction();
                                else if ("FullSyncPutAttachmentAction".equals(name))
                                    act = new PutDocumentAttachmentTransaction();
                                if (act != null) {
                                    QName typeQName = act.getComplexTypeAffectation();
                                    XmlSchemaType xmlSchemaType = schema.getTypeByName(typeQName);
                                    Document document = XmlSchemaUtils.getDomInstance(xmlSchemaType);
                                    String jsonString = XMLUtils.XmlToJson(document.getDocumentElement(), true, true);
                                    JSONObject jsonOutput = new JSONObject(jsonString).getJSONObject("document");
                                    cleanJsonModel(jsonOutput);
                                    jsonOutput.remove("_c8oMeta");
                                    jsonOutput.remove("error");
                                    jsonOutput.remove("reason");
                                    if (jsonObject.has("out")) {
                                        jsonObject.put("out", jsonOutput);
                                    }
                                }
                            }
                        }
                    }
                }
            } else if (dbo instanceof UICustomAction) {
                jsonObject = new JSONObject(((UICustomAction) dbo).computeJsonModel());
            }
            String searchPath = dataPath;
            JSONObject jsonOutput = findJSONObject(jsonObject, searchPath);
            jsonModel = jsonOutput;
        } else // case of UISharedComponent
        if (dbo instanceof UISharedComponent) {
            JSONObject jsonObject = new JSONObject(((UISharedComponent) dbo).computeJsonModel());
            String searchPath = dataPath;
            JSONObject jsonOutput = findJSONObject(jsonObject, searchPath);
            jsonModel = jsonOutput;
        } else // case of ApplicationComponent
        if (dbo instanceof ApplicationComponent) {
            String json = params.get("json");
            jsonModel = new JSONObject(json);
        } else // should not happened
        {
            throw new Exception("DatabaseObject " + dbo.getClass().getName() + " not supported!");
        }
    }
    return jsonModel;
}
Also used : CouchDbConnector(com.twinsoft.convertigo.beans.connectors.CouchDbConnector) Connector(com.twinsoft.convertigo.beans.core.Connector) Variable(com.twinsoft.convertigo.beans.core.Variable) IonBean(com.twinsoft.convertigo.beans.mobile.components.dynamic.IonBean) UIForm(com.twinsoft.convertigo.beans.mobile.components.UIForm) GetDocumentTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.GetDocumentTransaction) PostDocumentTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.PostDocumentTransaction) Document(org.w3c.dom.Document) DesignDocument(com.twinsoft.convertigo.beans.couchdb.DesignDocument) ConnectorEditor(com.twinsoft.convertigo.eclipse.editors.connector.ConnectorEditor) ConnectorEditorInput(com.twinsoft.convertigo.eclipse.editors.connector.ConnectorEditorInput) DeleteDatabaseTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.DeleteDatabaseTransaction) UISharedComponent(com.twinsoft.convertigo.beans.mobile.components.UISharedComponent) AllDocsTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.AllDocsTransaction) DeleteDocumentTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.DeleteDocumentTransaction) XmlSchemaObject(org.apache.ws.commons.schema.XmlSchemaObject) DatabaseObject(com.twinsoft.convertigo.beans.core.DatabaseObject) PartInitException(org.eclipse.ui.PartInitException) PutDocumentAttachmentTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.PutDocumentAttachmentTransaction) RequestableObject(com.twinsoft.convertigo.beans.core.RequestableObject) IAction(com.twinsoft.convertigo.beans.mobile.components.IAction) AbstractCouchDbTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.AbstractCouchDbTransaction) PutDatabaseTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.PutDatabaseTransaction) QName(javax.xml.namespace.QName) ApplicationComponent(com.twinsoft.convertigo.beans.mobile.components.ApplicationComponent) DeleteDocumentAttachmentTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.DeleteDocumentAttachmentTransaction) ResetDatabaseTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.ResetDatabaseTransaction) XmlSchemaType(org.apache.ws.commons.schema.XmlSchemaType) PartInitException(org.eclipse.ui.PartInitException) JSONException(org.codehaus.jettison.json.JSONException) Project(com.twinsoft.convertigo.beans.core.Project) UIActionStack(com.twinsoft.convertigo.beans.mobile.components.UIActionStack) GetViewTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.GetViewTransaction) UIDynamicAction(com.twinsoft.convertigo.beans.mobile.components.UIDynamicAction) JSONObject(org.codehaus.jettison.json.JSONObject) DeleteDocumentAttachmentTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.DeleteDocumentAttachmentTransaction) GetViewTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.GetViewTransaction) Transaction(com.twinsoft.convertigo.beans.core.Transaction) PutDatabaseTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.PutDatabaseTransaction) AbstractCouchDbTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.AbstractCouchDbTransaction) GetDocumentTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.GetDocumentTransaction) PostReplicateTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.PostReplicateTransaction) DeleteDocumentTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.DeleteDocumentTransaction) PutDocumentAttachmentTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.PutDocumentAttachmentTransaction) DeleteDatabaseTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.DeleteDatabaseTransaction) ResetDatabaseTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.ResetDatabaseTransaction) PostDocumentTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.PostDocumentTransaction) AllDocsTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.AllDocsTransaction) XmlSchema(org.apache.ws.commons.schema.XmlSchema) PostReplicateTransaction(com.twinsoft.convertigo.beans.transactions.couchdb.PostReplicateTransaction) DesignDocument(com.twinsoft.convertigo.beans.couchdb.DesignDocument) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) UICustomAction(com.twinsoft.convertigo.beans.mobile.components.UICustomAction)

Aggregations

DesignDocument (com.twinsoft.convertigo.beans.couchdb.DesignDocument)17 JSONException (org.codehaus.jettison.json.JSONException)11 DatabaseObject (com.twinsoft.convertigo.beans.core.DatabaseObject)10 JSONObject (org.codehaus.jettison.json.JSONObject)10 FullSyncConnector (com.twinsoft.convertigo.beans.connectors.FullSyncConnector)8 Project (com.twinsoft.convertigo.beans.core.Project)8 EngineException (com.twinsoft.convertigo.engine.EngineException)7 Sequence (com.twinsoft.convertigo.beans.core.Sequence)6 PartInitException (org.eclipse.ui.PartInitException)5 Connector (com.twinsoft.convertigo.beans.core.Connector)4 RequestableObject (com.twinsoft.convertigo.beans.core.RequestableObject)4 UnsupportedEncodingException (java.io.UnsupportedEncodingException)4 XmlSchemaObject (org.apache.ws.commons.schema.XmlSchemaObject)4 CoreException (org.eclipse.core.runtime.CoreException)4 CouchDbConnector (com.twinsoft.convertigo.beans.connectors.CouchDbConnector)3 MobileSmartSourceType (com.twinsoft.convertigo.beans.mobile.components.MobileSmartSourceType)3 UIActionStack (com.twinsoft.convertigo.beans.mobile.components.UIActionStack)3 UIDynamicAction (com.twinsoft.convertigo.beans.mobile.components.UIDynamicAction)3 UISharedComponent (com.twinsoft.convertigo.beans.mobile.components.UISharedComponent)3 Document (com.twinsoft.convertigo.beans.core.Document)2