Examples of ItemGroup


Examples of hudson.model.ItemGroup

        Long buildsDiskUsage = 0l;
        Long locked = 0l;
        Long notLoaded = 0L;
        for(Object item: group.getItems()){
            if(item instanceof ItemGroup){
               ItemGroup subGroup = (ItemGroup) item;
               buildsDiskUsage += getBuildsDiskUsageAllSubItems(subGroup, older, yonger).get("all");
               locked += getBuildsDiskUsageAllSubItems(subGroup, older, yonger).get("locked");
               notLoaded += getBuildsDiskUsageAllSubItems(subGroup, older, yonger).get("notLoaded");
            }
            else{
View Full Code Here

Examples of hudson.model.ItemGroup

        Long buildsDiskUsage = 0l;
        Long locked = 0l;
        Long notLoaded = 0l;
        if (project != null) {
            if(project instanceof ItemGroup){
               ItemGroup group = (ItemGroup) project;
               Map<String,Long> sizes = getBuildsDiskUsageAllSubItems(group, older, yonger);
               buildsDiskUsage += sizes.get("all");
               locked += sizes.get("locked");
               notLoaded += sizes.get("notLoaded");
            }
View Full Code Here

Examples of hudson.model.ItemGroup

    private JobStateRecipe withShortUrl(String url) {
        when(job.getShortUrl()).thenReturn(url);

        // This might not necessarily belong here,
        // but I don't need to introduce the concept of a parent anywhere else yet.
        ItemGroup parent = mock(ItemGroup.class);
        when(parent.getUrl()).thenReturn("job/");
        when(job.getParent()).thenReturn(parent);

        return this;
    }
View Full Code Here

Examples of hudson.model.ItemGroup

    HealthReport healthMock = mock(HealthReport.class);
    when(healthMock.getDescription()).thenReturn("Fine");
    when(healthMock.getScore()).thenReturn(100);
   
    AbstractMavenProject job = mock(AbstractMavenProject.class);
    ItemGroup parent = mock(ItemGroup.class);
    when(parent.getFullDisplayName()).thenReturn("");
    when(job.getParent()).thenReturn(parent);
        when(job.getFullDisplayName()).thenReturn("fsProject");
        when(job.getLastBuild()).thenReturn(build);
        when(job.getBuildHealth()).thenReturn(healthMock);
   
View Full Code Here

Examples of hudson.model.ItemGroup

        HealthReport healthMock = mock(HealthReport.class);
        when(healthMock.getDescription()).thenReturn("Cloudy");
        when(healthMock.getScore()).thenReturn(0);

        AbstractMavenProject job = mock(AbstractMavenProject.class);
    ItemGroup parent = mock(ItemGroup.class);
    when(parent.getFullDisplayName()).thenReturn("");
    when(job.getParent()).thenReturn(parent);
        when(job.getFullDisplayName()).thenReturn("fsProject");
        when(job.getLastBuild()).thenReturn(build);
        when(job.getBuildHealth()).thenReturn(healthMock);
     
View Full Code Here

Examples of hudson.model.ItemGroup

    public static RelativeLocation of(Job job) {
        return new RelativeLocation(job);
    }

    public String name() {
        ItemGroup ig = null;

        StaplerRequest request = Stapler.getCurrentRequest();
        for( Ancestor a : request.getAncestors() ) {
            if(a.getObject() instanceof BuildMonitorView) {
                ig = ((View) a.getObject()).getOwnerItemGroup();
View Full Code Here

Examples of hudson.model.ItemGroup

         */
        @Extension
        public static final class RenameListener extends ItemListener {
            @Override
            public void onRenamed(Item item, String oldName, String newName) {
                ItemGroup context = item.getParent();
                String full = isEmpty(context.getFullName()) ? "" : context.getFullName() + '/';
                String fullOldName = full + oldName;
                String fullNewName = full + newName;
                for (Project<?,?> p : Jenkins.getInstance().getAllItems(Project.class)) {
                    boolean changed = false;
                    //iterate over post build triggers
View Full Code Here

Examples of hudson.model.ItemGroup

        if(path!=nullreturn path;

        Item i=p;
        String url = "";
        while(true) {
            ItemGroup ig = i.getParent();
            url = i.getShortUrl()+url;

            if(ig==Hudson.getInstance()) {
                assert i instanceof TopLevelItem;
                if(view!=null && view.contains((TopLevelItem)i)) {
View Full Code Here

Examples of org.cfeclipse.cfml.images.ItemGroup

      public void handleEvent(Event event) {
        final GalleryItem item = (GalleryItem) event.item;
        final GalleryItem parentItem = item.getParentItem();
        if (parentItem == null) {
          final int index = gallery.indexOf(item);
          final ItemGroup itemGroup = (ItemGroup) images.get(index);
          item.setText(itemGroup.getName());
          item.setData(itemGroup);
          item.setItemCount(itemGroup.getChildCount());
        } else {
          final int indexOf = parentItem.indexOf(item);
          final ItemGroup ga = (ItemGroup) parentItem.getData();
          item.setItemCount(0);
          final IImageEntry image = ga.getImage(indexOf);
          try {
            item.setImage(image.getImage());
          } catch (IOException e) {
            e.printStackTrace();
          }
View Full Code Here

Examples of org.cfeclipse.cfml.images.ItemGroup

      images.addAll(contents);
    } else {
      final StringMatcher ma = new StringMatcher("*" + this.pattern + "*", true, false);
      for (final Object o : contents) {
        if (o instanceof ItemGroup) {
          final ItemGroup ga = (ItemGroup) o;

          if (ma.match(ga.getName())) {
            images.add(o);
          } else {
            final ArrayList<IImageEntry> z = new ArrayList<IImageEntry>();
            for (int a = 0; a < ga.getChildCount(); a++) {
              final IImageEntry image = ga.getImage(a);
              if (ma.match(image.getName())) {
                z.add(image);
              }
            }
            if (!z.isEmpty()) {
              images.add(new ItemGroup(ga.getName(), z));
            }
          }
        }
      }
    }
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.