Examples of ProfileStatusDTO


Examples of org.fusesource.ide.fabric8.core.dto.ProfileStatusDTO

  }

  protected ProfileNode getSelectedProfileNode() {
    Object first = Selections.getFirstSelection(getViewer());
    if (first instanceof ProfileStatusDTO) {
      ProfileStatusDTO status = (ProfileStatusDTO) first;
      String id = status.getProfile();
      VersionNode version = getFabric().getDefaultVersionNode();
      if (version != null) {
        return version.getProfileNode(id);
      }
    }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.ProfileStatusDTO

  }

  protected ProfileNode getSelectedProfileNode() {
    Object first = Selections.getFirstSelection(getViewer());
    if (first instanceof ProfileStatusDTO) {
      ProfileStatusDTO status = (ProfileStatusDTO) first;
      String id = status.getProfile();
      VersionNode version = getFabric().getDefaultVersionNode();
      if (version != null) {
        return version.getProfileNode(id);
      }
    }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.ProfileStatusDTO

      public void doubleClick(DoubleClickEvent event) {
        FabricNavigator nav = FabricPlugin.getFabricNavigator();
        if (nav != null) {
          Object oSel = Selections.getFirstSelection(event.getSelection());
          if (oSel != null && oSel instanceof ProfileStatusDTO) {
            ProfileStatusDTO s = asProfileStatus(oSel);
            String profileId = s.getProfile();
            ProfileNode profileNode = searchProfile(nav, profileId, getFabric().getVersionsNode());
            if (profileNode != null) nav.selectReveal(new StructuredSelection(profileNode));
          }
        }
      }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.ProfileStatusDTO

    int column = 0;

    Function1 function = new Function1() {
      @Override
      public Object apply(Object element) {
        ProfileStatusDTO status = asProfileStatus(element);
        if (status != null) {
          return status.getProfile();
        }
        return null;
      }
    };
    column = addColumnFunction(250, column, function, "Profile");

    function = new FunctionInteger() {
      @Override
      public BigInteger apply(Object element) {
        ProfileStatusDTO status = asProfileStatus(element);
        if (status != null) {
          return status.getCount();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Count");

    function = new FunctionInteger() {
      @Override
      public BigInteger apply(Object element) {
        ProfileStatusDTO status = asProfileStatus(element);
        if (status != null) {
          return status.getMinimumInstances();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Minumum");

    function = new FunctionInteger() {
      @Override
      public BigInteger apply(Object element) {
        ProfileStatusDTO status = asProfileStatus(element);
        if (status != null) {
          return status.getMaximumInstances();
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Maximum");

    function = new Function1() {
      @Override
      public Object apply(Object element) {
        ProfileStatusDTO status = asProfileStatus(element);
        if (status != null) {
          return toHealth(status);
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Status", new HealthLabelProvider(function));

    function = new Function1() {
      @Override
      public BigDecimal apply(Object element) {
        ProfileStatusDTO status = asProfileStatus(element);
        if (status != null) {
          return status.getHealth(status.getCount());
        }
        return null;
      }
    };
    column = addColumnFunction(bounds, column, function, "Health", new PercentFunctionLabelProvider(function));

    function = new Function1() {
      @Override
      public Object apply(Object element) {
        ProfileStatusDTO status = asProfileStatus(element);
        if (status != null) {
          return status.getDependentProfiles();
        }
        return null;
      }
    };
    column = addColumnFunction(250, column, function, "Dependencies");
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.ProfileStatusDTO

      Object expectedValue) {
   
    if (receiver instanceof ISelection) {
      Object selection = Selections.getFirstSelection((ISelection)receiver);
      if(selection instanceof ProfileStatusDTO){
        ProfileStatusDTO status = (ProfileStatusDTO)selection;
        if(property.equals("requirementsNotEmpty")) {
          return !status.getRequirements().checkIsEmpty();
        }
      }     
    }
         
    return false;
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.ProfileStatusDTO

            public void doubleClick(DoubleClickEvent event) {
                FabricNavigator nav = FabricPlugin.getFabricNavigator();
                if (nav != null && current != null) {
                    Object oSel = Selections.getFirstSelection(event.getSelection());
                    if (oSel != null && oSel instanceof ProfileStatusDTO) {
                        ProfileStatusDTO s = asProfileStatus(oSel);
                        String profileId = s.getProfile();
                        ProfileNode profileNode = searchProfile(nav, profileId, current.getVersionsNode());
                        if (profileNode != null)
                            nav.selectReveal(new StructuredSelection(profileNode));
                    }
                }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.ProfileStatusDTO

        int column = 0;

        Function1 function = new Function1() {
            @Override
            public Object apply(Object element) {
                ProfileStatusDTO status = asProfileStatus(element);
                if (status != null) {
                    return status.getProfile();
                }
                return null;
            }
        };
        column = addColumnFunction(250, column, function, "Profile");

        function = new FunctionInteger() {
            @Override
            public BigInteger apply(Object element) {
                ProfileStatusDTO status = asProfileStatus(element);
                if (status != null) {
                    return status.getCount();
                }
                return null;
            }
        };
        column = addColumnFunction(bounds, column, function, "Count");

        function = new FunctionInteger() {
            @Override
            public BigInteger apply(Object element) {
                ProfileStatusDTO status = asProfileStatus(element);
                if (status != null) {
                    return status.getMinimumInstances();
                }
                return null;
            }
        };
        column = addColumnFunction(bounds, column, function, "Minumum");

        function = new FunctionInteger() {
            @Override
            public BigInteger apply(Object element) {
                ProfileStatusDTO status = asProfileStatus(element);
                if (status != null) {
                    return status.getMaximumInstances();
                }
                return null;
            }
        };
        column = addColumnFunction(bounds, column, function, "Maximum");

        function = new Function1() {
            @Override
            public Object apply(Object element) {
                ProfileStatusDTO status = asProfileStatus(element);
                if (status != null) {
                    return toHealth(status);
                }
                return null;
            }
        };
        column = addColumnFunction(bounds, column, function, "Status", new HealthLabelProvider(function));

        function = new Function1() {
            @Override
            public BigDecimal apply(Object element) {
                ProfileStatusDTO status = asProfileStatus(element);
                if (status != null) {
                    return status.getHealth(status.getCount());
                }
                return null;
            }
        };
        column = addColumnFunction(bounds, column, function, "Health", new PercentFunctionLabelProvider(function));

        function = new Function1() {
            @Override
            public Object apply(Object element) {
                ProfileStatusDTO status = asProfileStatus(element);
                if (status != null) {
                    return status.getDependentProfiles();
                }
                return null;
            }
        };
        column = addColumnFunction(250, column, function, "Dependencies");
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.ProfileStatusDTO

    }

    protected ProfileNode getSelectedProfileNode() {
        Object first = Selections.getFirstSelection(getViewer());
        if (first instanceof ProfileStatusDTO) {
            ProfileStatusDTO status = (ProfileStatusDTO) first;
            String id = status.getProfile();
            VersionNode version = current == null ? null : current.getDefaultVersionNode();
            if (version != null) {
                return version.getProfileNode(id);
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.