Search in sources :

Example 6 with ComponentReference

use of org.apache.airavata.workflow.model.component.ComponentReference in project airavata by apache.

the class JCRComponentRegistry method getComponentReferenceList.

/**
 * @see org.apache.airavata.workflow.model.component.registry.ComponentRegistry#getComponentReferenceList()
 */
@Override
public List<ComponentReference> getComponentReferenceList() {
    List<ComponentReference> tree = new ArrayList<ComponentReference>();
    try {
        if (client.isGatewayExist(gatewayId)) {
            List<ApplicationInterfaceDescription> allApplicationInterfaces = client.getAllApplicationInterfaces(gatewayId);
            for (ApplicationInterfaceDescription interfaceDescription : allApplicationInterfaces) {
                JCRComponentReference jcr = new JCRComponentReference(interfaceDescription.getApplicationName(), interfaceDescription);
                tree.add(jcr);
            }
        } else {
            log.error("Gateway {} Id is not exist", gatewayId);
        }
    } catch (Exception e) {
        log.error(e.getMessage(), e);
    }
    return tree;
}
Also used : ComponentReference(org.apache.airavata.workflow.model.component.ComponentReference) ArrayList(java.util.ArrayList) ApplicationInterfaceDescription(org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription)

Example 7 with ComponentReference

use of org.apache.airavata.workflow.model.component.ComponentReference in project airavata by apache.

the class SystemComponentRegistry method getComponentReferenceList.

/**
 * Returns a ComponentTree.
 *
 * @return The ComponentTree
 */
@Override
public List<ComponentReference> getComponentReferenceList() {
    List<ComponentReference> tree = new ArrayList<ComponentReference>();
    for (String name : this.componentMap.keySet()) {
        Component component = this.componentMap.get(name);
        SystemComponentReference componentReference = new SystemComponentReference(name, component);
        tree.add(componentReference);
    }
    return tree;
}
Also used : ComponentReference(org.apache.airavata.workflow.model.component.ComponentReference) ArrayList(java.util.ArrayList) DynamicComponent(org.apache.airavata.workflow.model.component.dynamic.DynamicComponent) Component(org.apache.airavata.workflow.model.component.Component)

Example 8 with ComponentReference

use of org.apache.airavata.workflow.model.component.ComponentReference in project airavata by apache.

the class ComponentController method addComponentReferencesToTree.

private static void addComponentReferencesToTree(ComponentTreeNode tree, List<ComponentReference> componentReferenceList) {
    for (ComponentReference componentReference : componentReferenceList) {
        ComponentTreeNode componentTreeNode = new ComponentTreeNode(componentReference);
        if (componentReference.isParentComponent()) {
            addComponentReferencesToTree(componentTreeNode, componentReference.getChildComponentReferences());
        }
        tree.add(componentTreeNode);
    }
}
Also used : ComponentReference(org.apache.airavata.workflow.model.component.ComponentReference) ComponentTreeNode(org.apache.airavata.xbaya.ui.widgets.component.ComponentTreeNode)

Aggregations

ComponentReference (org.apache.airavata.workflow.model.component.ComponentReference)8 ArrayList (java.util.ArrayList)5 Component (org.apache.airavata.workflow.model.component.Component)5 Point (java.awt.Point)2 ComponentException (org.apache.airavata.workflow.model.component.ComponentException)2 ComponentRegistryException (org.apache.airavata.workflow.model.component.ComponentRegistryException)2 WSComponent (org.apache.airavata.workflow.model.component.ws.WSComponent)2 WorkflowRuntimeException (org.apache.airavata.workflow.model.exceptions.WorkflowRuntimeException)2 XBayaComponent (org.apache.airavata.xbaya.ui.widgets.XBayaComponent)2 Transferable (java.awt.datatransfer.Transferable)1 UnsupportedFlavorException (java.awt.datatransfer.UnsupportedFlavorException)1 File (java.io.File)1 IOException (java.io.IOException)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 JComponent (javax.swing.JComponent)1 TreeNode (javax.swing.tree.TreeNode)1 TreePath (javax.swing.tree.TreePath)1 ApplicationInterfaceDescription (org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription)1