Package org.spw.model

Examples of org.spw.model.Contribution


        return (RequestBean1)getBean("RequestBean1");
    }

    public String buttonValidate_action() {
        VolunteerApplicationController ctrl = new VolunteerApplicationController();
        Contribution contribution = getSessionBean1().getContribution();
        VolunteerApplication application = getSessionBean1().getContributionDataProvider().getApplication();
        if (!application.getContributions().contains(contribution)) {
            application.addContribution(contribution);
        }
        ctrl.update(application);
View Full Code Here


    protected RequestBean1 getRequestBean1() {
        return (RequestBean1)getBean("RequestBean1");
    }
   
    public String buttonAdd_action() {
        getSessionBean1().setContribution(new Contribution());
       
        return "new";
    }
View Full Code Here

    }
   
    public String buttonEdit_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            Contribution contribution = (Contribution)dataProvider.getObject(rk);
            getSessionBean1().setContribution(contribution);
        }
       
        return "edit";
    }
View Full Code Here

    public String buttonDelete_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            VolunteerApplicationController ctrl = new VolunteerApplicationController();
            VolunteerApplication application = dataProvider.getApplication();
            Contribution contribution = (Contribution)dataProvider.getObject(rk);
            application.removeContribution(contribution);
           
            ctrl.removeContribution(application, contribution);
            dataProvider.refreshList();
        }
View Full Code Here

        return (RequestBean1)getBean("RequestBean1");
    }

    public String buttonValidate_action() {
        VolunteerApplicationController ctrl = new VolunteerApplicationController();
        Contribution contribution = getSessionBean1().getContribution();
        VolunteerApplication application = getSessionBean1().getContributionDataProvider().getApplication();
        if (!application.getContributions().contains(contribution)) {
            application.addContribution(contribution);
        }
        ctrl.update(application);
View Full Code Here

        application.setProgram(program);
        application.setAcceptanceFeeReceived(new Date());
        volunteer.setApplication(application);
       
        for (int i=1; i < 5; i++) {
            Contribution contrib = new Contribution();
            contrib.setApplication(application);
            contrib.setContributionAmount(new BigDecimal(i));
            contrib.setContributionValue(new BigDecimal(i*8));
            contrib.setCurrency("TST");
            contrib.setDateContribution(new Date());
            if ((i%3) == 0)
                contrib.setGiftAidable(true);
            contrib.setIdContribution(new Long(i));
            if (i == 1)
                contrib.setInitialFee(true);
            if (i < 3 )
                contrib.setMeansOfPayment("Cheque");
            else
                contrib.setMeansOfPayment("JustGiving");
            contrib.setPayer(getName());
            contrib.setReference(Integer.toString(i));
            application.addContribution(contrib);
        }
       
        VolunteerDetailsFundraisingXmlReport instance =
                new VolunteerDetailsFundraisingXmlReport(volunteer);
View Full Code Here

    private VolunteerApplication application;
   
    /** Creates a new instance of ContributionDataProvider */
    public ContributionDataProvider() {
        List<Contribution> contributions = new ArrayList<Contribution>();
        contributions.add(new Contribution());
       
        setList(contributions);
    }
View Full Code Here

       
        VolunteerApplication va = new VolunteerApplication();
        va.setIdApplication(TEST_ID + 1);
        va.setDetailInfoSent(getName());
        VolunteerApplicationController instance = new VolunteerApplicationController();
        Contribution c1 = new Contribution();
        c1.setReference(getName());
        va.addContribution(c1);
       
        instance.create(va);
       
        va = instance.read(TEST_ID + 1);
View Full Code Here

       
        VolunteerApplication va = new VolunteerApplication();
        VolunteerApplicationController instance = new VolunteerApplicationController();
       
        va = instance.read(TEST_ID);
        Contribution contribution = new Contribution();
        contribution.setReference(getName());
        va.addContribution(contribution);
       
        instance.update(va);
       
        va = instance.read(TEST_ID);
View Full Code Here

        System.out.println("delete");
       
        VolunteerApplicationController instance = new VolunteerApplicationController();
        VolunteerApplication va = instance.read(TEST_ID);
       
        Contribution contribution = new Contribution();
        contribution.setReference(getName());
        va.addContribution(contribution);
        va = instance.update(va);
        contribution = va.getContributions().get(0);
       
        instance.delete(va);
       
        assertNull(instance.read(TEST_ID));
        assertNull(checkContribution(contribution.getIdContribution()));
    }
View Full Code Here

TOP

Related Classes of org.spw.model.Contribution

Copyright © 2018 www.massapicom. 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.