Examples of Iteration


Examples of org.nxplanner.domain.Iteration

      InputStream reportStream = null;
      JRDataSource ds = null;
      Map parameters = new HashMap();

      if (object instanceof Iteration) {
         Iteration iteration = (Iteration)object;

         try {
            ds = new IterationDataSource(iteration, session);
         } catch (HibernateException he) {
            throw new ExportException(he);
         }

         reportStream = PdfReportExporter.class.getClassLoader().getResourceAsStream("org/nxplanner/export/reports/JRIteration.jasper");
         parameters.put("IterationName", iteration.getName());
         parameters.put("IterationStartDate", iteration.getStartDate());
         parameters.put("IterationEndDate", iteration.getEndDate());
      } else if (object instanceof UserStory) {
         UserStory story = (UserStory)object;

         try {
            ds = new UserStoryDataSource(story, session);
View Full Code Here

Examples of org.nxplanner.domain.Iteration

public class DatabaseMappingsTestScript extends org.nxplanner.acceptance.AbstractDatabaseTestScript{

    public void testMappings() throws Exception {
        Project project = newProject();
        Iteration iteration = newIteration(project);
        UserStory story = newUserStory(iteration);
        Person person = newPerson();
        story.setCustomer(person);
        session.flush();
        session.connection().commit();
View Full Code Here

Examples of org.nxplanner.domain.Iteration

      IterationRepository dao = new IterationRepository(getSession(), getAuthorizer(), getLoggedInUserId());
      List iterations = dao.fetchEditableIterations();
      List options = new ArrayList();
      for (int i = 0; i < iterations.size(); i++)
      {
         Iteration it = (Iteration) iterations.get(i);
         options.add(new IterationModel(it));
      }
      return options;
   }
View Full Code Here

Examples of org.nxplanner.domain.Iteration

        project.setName(PROJECT_PREFIX + project.getId());
        return project;
    }

    public Iteration newIteration(Project project) {
        Iteration iteration = new Iteration();
        iteration.setProjectId(project.getId());
        iteration.setStartDate(new Date(System.currentTimeMillis() - DAY));
        iteration.setEndDate(new Date(System.currentTimeMillis() + DAY));
        project.getIterations().add(iteration);
        iteration.setId(nextId++);
        iteration.setName(ITERATION_PREFIX + iteration.getId());
        return iteration;
    }
View Full Code Here

Examples of org.nxplanner.domain.Iteration

    StoryModel model;

    public void testGetName() throws Exception {
        UserStory story = new UserStory();
        story.setName("story");
        Iteration iteration = new Iteration();
        iteration.setName("iteration");
        IterationModel model = new IterationModel(iteration){
            protected Project getProject() {
                Project project = new Project();
                project.setName("project");
                return project;
View Full Code Here

Examples of org.nxplanner.domain.Iteration

        super.setUp();
    }

    public void testPopulateTask() throws Exception {
        Project project = newProject();
        Iteration iteration = newIteration(project);
        UserStory story = newUserStory(iteration);
        Task task = newTask(story);
        commitCloseAndOpenSession();
        DomainContext context = new DomainContext();
        context.populate(task);
        assertEquals(project.getId(), context.getProjectId());
        assertEquals(project.getName(), context.getProjectName());
        assertEquals(iteration.getId(), context.getIterationId());
        assertEquals(iteration.getName(), context.getIterationName());
        assertEquals(story.getId(), context.getStoryId());
        assertEquals(story.getName(), context.getStoryName());
        assertSame(task, context.getTargetObject());
    }
View Full Code Here

Examples of org.nxplanner.domain.Iteration

        assertSame(task, context.getTargetObject());
    }

    public void testPopulateStory() throws Exception {
        Project project = newProject();
        Iteration iteration = newIteration(project);
        UserStory story = newUserStory(iteration);
        commitCloseAndOpenSession();
        DomainContext context = new DomainContext();
        context.populate(story);
        assertEquals(project.getId(), context.getProjectId());
        assertEquals(project.getName(), context.getProjectName());
        assertEquals(iteration.getId(), context.getIterationId());
        assertEquals(iteration.getName(), context.getIterationName());
        assertEquals(story.getId(), context.getStoryId());
        assertEquals(story.getName(), context.getStoryName());
        assertSame(story, context.getTargetObject());
    }
View Full Code Here

Examples of org.opensaml.ws.wssecurity.Iteration

*/
public class IterationUnmarshaller extends AbstractWSSecurityObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processElementContent(XMLObject xmlObject, String elementContent) {
        Iteration iteration = (Iteration) xmlObject;
        if (elementContent != null) {
            iteration.setValue(Integer.valueOf(elementContent));
        }
    }
View Full Code Here

Examples of org.opensaml.ws.wssecurity.Iteration

*/
public class IterationMarshaller extends AbstractWSSecurityObjectMarshaller {

    /** {@inheritDoc} */
    protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException {
        Iteration iteration = (Iteration) xmlObject;
       
        if (iteration.getValue() != null) {
            XMLHelper.appendTextContent(domElement, iteration.getValue().toString());
        }
    }
View Full Code Here

Examples of org.opensaml.ws.wssecurity.Iteration

*/
public class IterationUnmarshaller extends AbstractWSSecurityObjectUnmarshaller {

    /** {@inheritDoc} */
    protected void processElementContent(XMLObject xmlObject, String elementContent) {
        Iteration iteration = (Iteration) xmlObject;
        if (elementContent != null) {
            iteration.setValue(Integer.valueOf(elementContent));
        }
    }
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.