Package uk.org.woodcraft.bookings.datamodel

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


    event1.setEarlyBookingDeadline(DateUtils.getDate(2011, 0, 1));
    event1.setBookingDeadline(DateUtils.getDate(2011, 5, 2));
    event1.setBookingSystemLocked(TestConstants.EVENT1_START);
    CannedQueries.save(event1);
   
    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!
    AppSetting setupCompleteSetting = new AppSetting(AppSetting.SETUP_COMPLETE, "true");
    CannedQueries.save(setupCompleteSetting);
   
   
    addActionMessage("Successfully created initial data. You should now be able to log in.");
    return SUCCESS;
View Full Code Here


     
      pm.makePersistentAll(user1, user2, user3, user4, user5);
   
     
      // Application settings
      AppSetting defaultEventSetting = new AppSetting(AppSetting.DEFAULT_EVENT, event1.getWebKey());
      pm.makePersistent(defaultEventSetting);
     
      //tx.commit();
    } catch(Exception e) {
      //tx.rollback();
View Full Code Here

TOP

Related Classes of uk.org.woodcraft.bookings.datamodel.AppSetting

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.