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;
}
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;
}
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);
}
}
Aggregations