Examples of Project


Examples of fr.openwide.maven.artifact.notifier.core.business.project.model.Project

    AjaxButton validate = new AjaxButton("save", form) {
      private static final long serialVersionUID = 1L;
     
      @Override
      protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
        Project project = ProjectFormPopupPanel.this.getModelObject();
       
        if (StringUtils.hasText(project.getName())) {
          try {
            Project duplicate = projectService.getByUri(StringUtils.urlize(project.getName()));

            if (isAddMode()) {
              if (duplicate == null) {
                projectService.create(project);
                getSession().success(getString("project.add.success"));
View Full Code Here

Examples of hudson.model.Project

     */
    @LocalData
    public void testOpenJUnitPublishing() throws IOException, SAXException {
        List<Project> projects = this.hudson.getProjects();
        // Make sure there's a project named TEST_PROJECT_WITH_HISTORY
        Project proj = null;
        for (Project p : projects) {
            if (p.getName().equals(TEST_PROJECT_WITH_HISTORY)) proj = p;
        }
        assertNotNull("We should have a project named " + TEST_PROJECT_WITH_HISTORY, proj);

        // Validate that there are test results where I expect them to be:
        HudsonTestCase.WebClient wc = new HudsonTestCase.WebClient();

        // On the project page:
        HtmlPage projectPage = wc.getPage(proj);
        //      we should have a link that reads "Latest Test Result"
        //      that link should go to http://localhost:8080/job/breakable/lastBuild/testReport/
        assertXPath(projectPage, "//a[@href='lastCompletedBuild/testReport/']");
        assertXPathValue(projectPage, "//a[@href='lastCompletedBuild/testReport/']", "Latest Test Result");
        assertXPathValueContains(projectPage, "//a[@href='lastCompletedBuild/testReport/']", "Latest Test Result");
        //      after "Latest Test Result" it should say "no failures"
        assertXPathResultsContainText(projectPage, "//td", "(no failures)");
        //      there should be a test result trend graph
        assertXPath(projectPage, "//img[@src='test/trend']");
        // the trend graph should be served up with a good http status
        Page trendGraphPage = wc.goTo(proj.getUrl() + "/test/trend", "image/png");
        assertGoodStatus(trendGraphPage);

        // The trend graph should be clickable and take us to a run details page
        Object imageNode = projectPage.getFirstByXPath("//img[@src='test/trend']");
        assertNotNull("couldn't find any matching nodes", imageNode);
        assertTrue("image node should be an HtmlImage object", imageNode instanceof HtmlImage);
        // TODO: Check that we can click on the graph and get to a particular run. How do I do this with HtmlUnit?

        XmlPage xmlProjectPage = wc.goToXml(proj.getUrl() + "/lastBuild/testReport/api/xml");
        assertXPath(xmlProjectPage, "/testResult");
        assertXPath(xmlProjectPage, "/testResult/suite");
        assertXPath(xmlProjectPage, "/testResult/failCount");
        assertXPathValue(xmlProjectPage, "/testResult/failCount", "0");
        assertXPathValue(xmlProjectPage, "/testResult/passCount", "4");
        assertXPathValue(xmlProjectPage, "/testResult/skipCount", "0");
        String[] packages = {"org.jvnet.hudson.examples.small.AppTest", "org.jvnet.hudson.examples.small.MiscTest", "org.jvnet.hudson.examples.small.deep.DeepTest"};
        for (String packageName : packages) {
            assertXPath(xmlProjectPage, "/testResult/suite/case/className[text()='" + packageName + "']");
        }

        // Go to a page that we know has a failure
        HtmlPage buildPage = wc.getPage(proj.getBuildByNumber(3));
        assertGoodStatus(buildPage);
        // We expect to see one failure, for com.yahoo.breakable.misc.UglyTest.becomeUglier
        // which should link to http://localhost:8080/job/wonky/3/testReport/org.jvnet.hudson.examples.small/MiscTest/testEleanor/
        assertXPathResultsContainText(buildPage, "//a", "org.jvnet.hudson.examples.small.MiscTest.testEleanor");
        HtmlAnchor failingTestLink = buildPage.getFirstAnchorByText("org.jvnet.hudson.examples.small.MiscTest.testEleanor");
        assertNotNull(failingTestLink);
        Page failingTestPage = failingTestLink.click();
        assertGoodStatus(failingTestPage);

        // Go to the xml page for a build we know has failures
        XmlPage xmlBuildPage = wc.goToXml(proj.getBuildByNumber(3).getUrl() + "/api/xml");
        assertXPathValue(xmlBuildPage, "//failCount", "2");
        assertXPathValue(xmlBuildPage, "//skipCount", "0");
        assertXPathValue(xmlBuildPage, "//totalCount", "4");
        assertXPathValue(xmlBuildPage, "//result", "FAILURE");

        // Check overall test result counts
        XmlPage xmlTestReportPage = wc.goToXml(proj.getBuildByNumber(3).getUrl() + "/testReport/api/xml");
        assertXPathValue(xmlTestReportPage, "/testResult/failCount", "2");
        assertXPathValue(xmlTestReportPage, "/testResult/passCount", "2");
        assertXPathValue(xmlTestReportPage, "/testResult/skipCount", "0");

        // Make sure the right tests passed and failed
        assertXPathValue(xmlTestReportPage, "/testResult/suite/case[className/text()='org.jvnet.hudson.examples.small.AppTest']/status", "PASSED");
        assertXPathValue(xmlTestReportPage, "/testResult/suite/case[name/text()='testEleanor']/status", "FAILED");


        // TODO: implement more of these tests
        // On the lastBuild/testReport page:
        //      Breadcrumbs should read #6 > Test Result  where Test Result is a link to this page
        //      inside of div id="main-panel" we should find the text "0 failures (-1)"
        //      we should have a blue bar which is blue all the way across: div style="width: 100%; height: 1em; background-color: rgb(114, 159, 207);
        //      we should find the words "7 tests (?0)"
        //      we should find the words "All Tests"
        //      we should find a table

        //      Inside that table, there should be the following rows:
        //           org.jvnet.hudson.examples.small   0ms   0 -1 0   3
        //          org.jvnet.hudson.examples.small.deep   4ms 0 0 0  1
        Run theRun = proj.getBuildByNumber(7);
        assertTestResultsAsExpected(wc, theRun, "/testReport",
                "org.jvnet.hudson.examples.small", "0 ms", "SUCCESS",
                /* total tests expected, diff */ 3, 0,
                /* fail count expected, diff */ 0, -1,
                /* skip count expected, diff */ 0, 0);
View Full Code Here

Examples of ini.trakem2.Project

public class TrakEM2_Add_Balls implements PlugIn {

  public void run(String arg) {

    // 1 - Obtain an open TrakEM2 project: the one selected in the ControlWindow
    final Project project = ControlWindow.getActive();

    if (null == project) {
      Utils.log("Open or create a TrakEM2 project first!");
      return;
    }
    // Else, you could create a project like:
    // Project project = Project.newFSProject("blank", null, "/path/to/storage_folder/");


    // 2 - Define two sets of x,y,z,r coordinates to import as 3D-positioned balls of radius r

          //   X    Y    Z   R

    final double[][] set1 = {{ 100, 100,   0, 25 },
                       { 130, 120,   1, 30 },
           { 110, 150,   0, 15 }};

    final double[][] set2 = {{ 200, 200,   1, 45 },
                       { 240, 190,   0, 35 },
           { 220, 250,   1, 55 }};

    // 3 - Insert each set as a Ball object, each containing 3 x,y,z,r spheres:
    Ball b1 = addBallObject(project, set1, "Set 1");
    Ball b2 = addBallObject(project, set2, "Set 2");

    // 4 - Change colors and settings:
    b1.setColor(Color.green);
    b2.setColor(Color.magenta); // yellow is default color
    // NOTICE that the color cues will paint each individual ball red in the previous layer,
    // and blue in the next one -- the color is used to paint in the actual layer where it lives.
    // (Scroll through the stack to see the effect -- the color cues help in noticing whether
    // a ball already exists at the location in the previous or next slice/Layer).
    // You can TURN OFF color cues with the 'p' keyboard shortcut on a Display,
    // or programmatically by:
    //      project.setProperty("no_color_cues", true);


    // 5 - Add nodes automatically to the Template and Project trees (REQUIRED):
    // (can be rearranged manually later, or could be added with way more precision programmatically)
    ArrayList al = new ArrayList();
    al.add(b1);
    al.add(b2);
    project.getProjectTree().insertSegmentations(project, al);

    // 6 - Automatically scroll LayerSet to the first layer of the first ball (OPTIONAL):
    Display.getFront().setLayer(b1.getFirstLayer());

    // 7 - Show the balls in 3D (OPTIONAL):
    ProjectThing p1 = project.findProjectThing(b1); // a Project tree node
    ProjectThing p2 = project.findProjectThing(b2); // a Project tree node
    Future<List<Content>> fu1 = Display3D.show(p1, true, 1); // wait, and resample 1 ( but resample only affects image volumes and AreaList meshes!)
    Future<List<Content>> fu2 = Display3D.show(p2, true, 1); //  If not waiting, then since its threaded, the saveAsWaveFront below would find nothing to save.

    // WAIT until added, so we know the Display3D has been created
    try {
      fu1.get();
      fu2.get();
    } catch (InterruptedException ie) {
      //
    } catch (ExecutionException ee) {
      ee.printStackTrace();
    }

    // 8 - Export the balls meshes to a .obj wavefront file (OPTIONAL):
    // (This will export all the current contents of the Display3D that can be exported as meshes.
    // One could refine what to export with:
    //    Content c1 = univ.getContent(Display3D.makeTitle(b1)); // by title
    //    Content c2 = ...
    // ... and then adding them to a Collection.
    //
    Image3DUniverse univ = Display3D.getDisplay(project.getRootLayerSet()).getUniverse();
    Collection all = univ.getContents();
    MeshExporter.saveAsWaveFront(all); // pops up file dialog to save
  }
View Full Code Here

Examples of io.fathom.cloud.identity.api.os.model.Project

        for (ProjectData data : authRepository.getProjects().list()) {
            if (data.getDomainId() != domain.getId()) {
                continue;
            }
            Project user = toModel(data);
            response.projects.add(user);
        }

        return response;
    }
View Full Code Here

Examples of io.fathom.cloud.server.model.Project

    @GET
    @Path("{id}")
    public Secret findSecret(@PathParam("id") long id) throws CloudException {
        Auth auth = getAuth();
        Project project = getProject();

        SecretService.Secret secret = secretsService.find(auth, project, id);
        notFoundIfNull(secret);

        return toModel(getData(secret));
View Full Code Here

Examples of jSimMacs.data.Project

    else if (es == newProjectItem) {
      newProjectDialog.setLocationRelativeTo(this);
      newProjectDialog.setVisible(true);
      String projectName = newProjectDialog.getProjectName();
      if ((projectName != null) && (projectName.length() > 0)) {
        Project project = newProjectDialog.getProject();
        if (JSimLogic.getInstance().createProject(project)) {
          pTree.insertProjectNode(newProjectDialog
              .getProjectLocation(), project);
          newFileTree.insertProjectNode(newProjectDialog
              .getProjectLocation(), project);
          JSimLogic.getInstance().saveProjectFile(project,
              newProjectDialog.getProjectLocation());
          JSimLogic.getInstance().saveRemoteProject(
              newProjectDialog.getProjectLocation());
          // pTree.setup();
          // newFileTree.setup();
        }
        newProjectDialog.setProjectName("");
      }
    } else if (es == newFileItem) {
      newFileDialog.setLocationRelativeTo(this);
      newFileDialog.setVisible(true);
      String fileName = newFileDialog.getFileName();
      if ((fileName != null) && (fileName.length() > 0)) {
        try {
          String filePath = JSimLogic.getInstance().createFile(
              fileName, newFileDialog.getSelectedNode());
          if (filePath == null) {
            JOptionPane.showMessageDialog(this,
                "Can't create file", "File error",
                JOptionPane.ERROR_MESSAGE);
          } else
            pTree.insertNode(newFileDialog.getSelectedNode(),
                filePath);
          // pTree.updateTree();
        } catch (IOException e1) {
          JOptionPane.showMessageDialog(this, "Can't create file",
              "File error", JOptionPane.ERROR_MESSAGE);
        }
      }
    } else if (es instanceof JSimMenuItem) {
      JSimMenuItem item = (JSimMenuItem) es;
      Project project = item.getProject();
      try {
        JSimLogic.getInstance().loadProjectAttributes(project);
      } catch (IOException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
View Full Code Here

Examples of lighthouse.protocol.Project

    private void updateForProject() {
        pieChart.getData().clear();
        pledgesList.getItems().clear();

        final Project p = project.get();

        projectTitle.setText(p.getTitle());
        goalAmountLabel.setText(String.format(goalAmountFormatStr, p.getGoalAmount().toPlainString()));

        description.getChildren().setAll(new Text(project.get().getMemo()));

        noPledgesLabel.visibleProperty().bind(isEmpty(pledgesList.getItems()));

        // Load and set up the cover image.
        Image img = new Image(p.getCoverImage().newInput());
        if (img.getException() != null)
            Throwables.propagate(img.getException());
        BackgroundSize cover = new BackgroundSize(BackgroundSize.AUTO, BackgroundSize.AUTO, false, false, false, true);
        BackgroundImage bimg = new BackgroundImage(img, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT,
                BackgroundPosition.DEFAULT, cover);
        coverImage.setBackground(new Background(bimg));

        // Configure the pie chart.
        emptySlice = new PieChart.Data("", 0);

        if (bindings != null)
            bindings.unbind();
        bindings = new UIBindings();

        // This must be done after the binding because otherwise it has no node in the scene graph yet.
        emptySlice.getNode().setVisible(false);

        checkForMyPledge(p);

        editButton.setVisible(Main.wallet.isProjectMine(p));

        if (p.getPaymentURL() != null) {
            Platform.runLater(() -> {
                Main.instance.scene.getAccelerators().put(KeyCombination.keyCombination("Shortcut+R"), () -> Main.backend.refreshProjectStatusFromServer(p));
            });
        }
    }
View Full Code Here

Examples of models.Project

public class RepositoryServiceTest {

    @Test
    public void testGetRepositoryWhenProjectIsNull() throws UnsupportedOperationException, IOException, ServletException {
        Project project = null;
        PlayRepository repository = RepositoryService.getRepository(project);
        assertThat(repository).isNull();
    }
View Full Code Here

Examples of name.pehl.karaka.server.project.entity.Project

    public List<Project> produceProjects()
    {
        List<Project> projects = new ArrayList<Project>();
        for (String name : names)
        {
            Project project = new Project(name, loremIpsum.randomWords(3));
            projects.add(project);
        }
        return projects;
    }
View Full Code Here

Examples of name.pehl.karaka.shared.model.Project

     *
     * @param activity The activity before it was saved
     */
    private void checkAndrefreshProjectsAndTags(Activity activity)
    {
        Project project = activity.getProject();
        if (project != null && project.isTransient())
        {
            RefreshProjectsEvent.fire(this);
        }
        List<Tag> tags = activity.getTags();
        for (Tag tag : tags)
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.