Examples of Organisation


Examples of org.openmeetings.app.persistence.beans.domain.Organisation

        List<Organisation> returnList = new LinkedList<Organisation>();
        boolean notInList = true;

        for (Iterator it = allOrgs.iterator(); it.hasNext();) {
          Organisation org = (Organisation) it.next();
          notInList = true;
          for (Iterator it2 = orgUser.iterator(); it2.hasNext();) {
            Organisation orgObj = (Organisation) it2.next();
            // log.error("orgObj ID: "+orgObj.getOrganisation_id());
            // log.error("orgUser ID: "+org.getOrganisation_id());
            if (orgObj.getOrganisation_id().equals(
                org.getOrganisation_id())) {
              notInList = false;
              // log.error("found notinList: "+notInList);
              break;
            }
View Full Code Here

Examples of uk.ac.osswatch.simal.model.jena.Organisation

    com.hp.hpl.jena.rdf.model.Resource foafOrg = model.createResource(uri);
    Statement s = model.createStatement(foafOrg, RDF.type,
        Foaf.ORGANIZATION);
    model.add(s);

    IOrganisation org = new Organisation(foafOrg);
    return org;
  }
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

   
    AppSetting defaultEventSetting = new AppSetting(AppSetting.DEFAULT_EVENT, event1.getWebKey());
    CannedQueries.save(defaultEventSetting);
   
   
    Organisation orgWcf = new Organisation(TestConstants.ORG1_NAME, true);
    CannedQueries.save(orgWcf);
   
    Unit unit1 = new Unit(TestConstants.UNIT1_NAME, orgWcf, true);
    CannedQueries.save(unit1);
   
    User rootUser = new User("globaladmin@example.com", "Global Admin 1", "password", Accesslevel.GLOBAL_ADMIN);
    rootUser.setOrganisationKey(orgWcf.getKeyCheckNotNull());
    rootUser.setUnitKey(unit1.getKeyCheckNotNull());
    CannedQueries.save(rootUser);

    User orgUser = new User("orgbooking@example.com", "Org Booking Secretary 1", "password", Accesslevel.ORG_ADMIN);
    orgUser.setOrganisationKey(orgWcf.getKeyCheckNotNull());
    orgUser.setUnitKey(unit1.getKeyCheckNotNull());
    CannedQueries.save(orgUser);

    User unitUser = new User("unitbooking@example.com", "Unit Booking Secretary 1", "password", Accesslevel.UNIT_ADMIN);
    unitUser.setOrganisationKey(orgWcf.getKeyCheckNotNull());
    unitUser.setUnitKey(unit1.getKeyCheckNotNull());
    CannedQueries.save(unitUser);
   
   
    // And don't let this be repeated!
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

  // For current org only
  @SkipValidation
  public String list() {
   
    Organisation org = SessionUtils.getCurrentOrg();
   
    SecurityModel.checkAllowed(Operation.READ, org);
    setModelList(CannedQueries.unitsForOrg(org, true, false));
    return SUCCESS;
  }
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

    Key key = getWebKeyAsKey();
    if (key != null )
    {
      setModel(CannedQueries.unitByKey(key));
    } else {
      Organisation currentOrg = SessionUtils.getCurrentOrg();
      if (currentOrg != null)
        setModel(new Unit(currentOrg));
      else
      {
        Organisation userAddedOrg = (Organisation)getSessionObject(SessionConstants.SIGNUP_ADDED_ORG);
        if (userAddedOrg != null) {
          setModel(new Unit(userAddedOrg));
        } else
          setModel(new Unit());
      }
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

 
  public Collection<Organisation> getAllOrgs()
  {
    Collection<Organisation> orgs = CannedQueries.allOrgs(false, false);
    Organisation userAddedOrg = (Organisation)getSessionObject(SessionConstants.SIGNUP_ADDED_ORG);
    if (userAddedOrg != null) {
      orgs.add(userAddedOrg);
    }
   
    return orgs;
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

  public void testPriceOf() {
   
    VenturerCampPricingStrategy pricer = new VenturerCampPricingStrategy();
   
    Event vcamp = CannedQueries.eventByName(TestConstants.EVENT1_NAME);
    Organisation testOrg = CannedQueries.orgByName(TestConstants.ORG1_NAME);
    Unit testUnit = CannedQueries.unitByName(TestConstants.UNIT1_NAME, testOrg);
   
    TestClock testClock = new TestClock(BasicVCampTestDataFixture.DATE_BEFORE_DEADLINE);
   
    Booking regularBooking = Booking.create(testUnit, vcamp, testClock);
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

  @Test
  public void testCancellation(){
    VenturerCampPricingStrategy pricer = new VenturerCampPricingStrategy();
   
    Event vcamp = CannedQueries.eventByName(TestConstants.EVENT1_NAME);
    Organisation testOrg = CannedQueries.orgByName(TestConstants.ORG1_NAME);
    Unit testUnit = CannedQueries.unitByName(TestConstants.UNIT1_NAME, testOrg);
   
    TestClock testClock = new TestClock(BasicVCampTestDataFixture.DATE_BEFORE_DEADLINE);
   
    Booking regularBooking = Booking.create(testUnit, vcamp, testClock);
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

      villages.add(new Village("Village on other event", events.get(1)));
      pm.makePersistentAll(villages);
     
      // Organisations
      List<Organisation> organisations = new ArrayList<Organisation>();
      Organisation orgWcf = new Organisation(TestConstants.ORG1_NAME, true);
      organisations.add(orgWcf);
     
      Organisation otherOrg = new Organisation("Unapproved organisation", false);
      organisations.add(otherOrg);
      pm.makePersistentAll(organisations);
     
      // Units
      List<Unit> units = new ArrayList<Unit>();
      Unit unit1 = new Unit(TestConstants.UNIT1_NAME, organisations.get(0), true);
      unit1.setVillageKey(village1.getKeyCheckNotNull());
     
      // FIXME: Note, all units are in all events for now...
     
      //unit1.addEventRegistration(event1);
      //unit1.addEventRegistration(event2); 
      units.add(unit1);
     
      Unit unit2 = new Unit(TestConstants.UNIT2_NAME, organisations.get(0), true);
     
      // FIXME: Note, all units are in all events for now...
      //unit2.addEventRegistration(event1);
      units.add(unit2);
     
      Unit unapprovedWcfUnit = new Unit("Unapproved unit for wcf", organisations.get(0), false);
      units.add(unapprovedWcfUnit);
      Unit otherOrgUnit = new Unit("Unapproved unit", organisations.get(1), false);
      units.add(otherOrgUnit);
      Unit otherOrgUnit2 = new Unit("Approved unit in other org", organisations.get(1), true);
      units.add(otherOrgUnit2);
      pm.makePersistentAll(units);
     
      // Bookings
      List<Booking> bookings = getBookings(event1, event2, unit1, unit2, unapprovedWcfUnit, otherOrgUnit2);
      pm.makePersistentAll(bookings);
     
     
      // Transactions
      List<Transaction> transactions = new ArrayList<Transaction>();
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Payment, "Payment 1", "Comment 1", 23.32d));
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Payment, "Payment 2", "", 12.00d));
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Payment, "Payment 3", "", 130.00d));
     
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Adjustment, "Refund 1", "Refund test", -23.32d));
     
      transactions.add(new Transaction(unit2.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), testClock.getTime(), TransactionType.Payment, "Unit 2 payment", "", 70.00d));
     
      // after earlybird deadline
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), afterEarlyBird.getTime(), TransactionType.Payment, "Payment after earlybird", "", 10.00d));
      transactions.add(new Transaction(unit1.getKeyCheckNotNull(), event1.getKeyCheckNotNull(), afterEarlyBird.getTime(), TransactionType.Discount, "Discount for early payment", "", 5.00d));
      pm.makePersistentAll(transactions);
     
      // Users
      User user1 = new User(TestConstants.USER_ADMIN_EMAIL, "Global Admin 1", "password", Accesslevel.GLOBAL_ADMIN);
      user1.setOrganisationKey(orgWcf.getKeyCheckNotNull());
      user1.setUnitKey(unit1.getKeyCheckNotNull());
     
     
      User user2 = new User("orgadmin@example.com", "Org Admin 1", "password", Accesslevel.ORG_ADMIN);
      user2.setOrganisationKey(orgWcf.getKeyCheckNotNull());
      user2.setUnitKey(unit1.getKeyCheckNotNull());
     
      User user3 = new User("unitadmin@example.com", "Unit Admin 1", "password", Accesslevel.UNIT_ADMIN);
      user3.setOrganisationKey(orgWcf.getKeyCheckNotNull());
      user3.setUnitKey(unit1.getKeyCheckNotNull());
     
      User user4 = new User("unassigned@example.com", "Unassigned 1", "password", Accesslevel.UNIT_ADMIN);
      user4.setOrganisationKey(orgWcf.getKeyCheckNotNull());
      user4.setUnitKey(unit2.getKeyCheckNotNull());
      user4.setApproved(false);
     
      User user5 = new User("otherorg@example.com", "Other Org 1", "password", Accesslevel.ORG_ADMIN);
      user5.setOrganisationKey(otherOrg.getKeyCheckNotNull());
      user5.setUnitKey(otherOrgUnit2.getKeyCheckNotNull());
     
      pm.makePersistentAll(user1, user2, user3, user4, user5);
   
     
View Full Code Here

Examples of uk.org.woodcraft.bookings.datamodel.Organisation

    return SUCCESS;
  }
 
  @SkipValidation
  public String listForOrg() {
    Organisation org = getCurrentOrganisation();   
    SecurityModel.checkAllowed(Operation.READ, org);
    setModelList(CannedQueries.bookingsForOrg(org, getCurrentEvent()));
    showUnit = true;
    return SUCCESS;
  }
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.