Search in sources :

Example 1 with TickingClockFixture

use of org.apache.isis.applib.fixturescripts.clock.TickingClockFixture in project estatio by estatio.

the class EstatioBaseModule method getRefDataSetupFixture.

@Override
public FixtureScript getRefDataSetupFixture() {
    if (refData.get()) {
        return null;
    }
    // else
    refData.set(true);
    return new FixtureScript() {

        @Override
        protected void execute(final ExecutionContext executionContext) {
            executionContext.executeChild(this, new TickingClockFixture().setDate("2014-05-18"));
            executionContext.executeChild(this, new ApplicationTenancy_enum.PersistAll());
            // set up 3 estatio roles
            executionContext.executeChild(this, new EstatioRolesAndPermissions());
            // estatio-admin user with the estatio-admin role + superuser
            executionContext.executeChild(this, new EstatioAdmin());
            executionContext.executeChild(this, new EstatioAdmin_Has_EstatioSuperuserRole());
            // bunch of users with estatio-user role
            executionContext.executeChild(this, new EstatioUser());
            executionContext.executeChild(this, new EstatioUserInFrance());
            executionContext.executeChild(this, new EstatioUserInGreatBritain());
            executionContext.executeChild(this, new EstatioUserInItaly());
            executionContext.executeChild(this, new EstatioUserInNetherlands());
            executionContext.executeChild(this, new EstatioUserInSweden());
        }
    };
}
Also used : TickingClockFixture(org.apache.isis.applib.fixturescripts.clock.TickingClockFixture) ApplicationTenancy_enum(org.incode.module.apptenancy.fixtures.enums.ApplicationTenancy_enum) EstatioAdmin_Has_EstatioSuperuserRole(org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_EstatioSuperuserRole) EstatioAdmin(org.estatio.module.base.fixtures.security.users.personas.EstatioAdmin) EstatioUserInSweden(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInSweden) EstatioUserInGreatBritain(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInGreatBritain) EstatioRolesAndPermissions(org.estatio.module.base.fixtures.security.perms.personas.EstatioRolesAndPermissions) FixtureScript(org.apache.isis.applib.fixturescripts.FixtureScript) EstatioUserInNetherlands(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInNetherlands) EstatioUser(org.estatio.module.base.fixtures.security.users.personas.EstatioUser) EstatioUserInFrance(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInFrance) EstatioUserInItaly(org.estatio.module.base.fixtures.security.users.personas.EstatioUserInItaly)

Aggregations

FixtureScript (org.apache.isis.applib.fixturescripts.FixtureScript)1 TickingClockFixture (org.apache.isis.applib.fixturescripts.clock.TickingClockFixture)1 EstatioRolesAndPermissions (org.estatio.module.base.fixtures.security.perms.personas.EstatioRolesAndPermissions)1 EstatioAdmin_Has_EstatioSuperuserRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_EstatioSuperuserRole)1 EstatioAdmin (org.estatio.module.base.fixtures.security.users.personas.EstatioAdmin)1 EstatioUser (org.estatio.module.base.fixtures.security.users.personas.EstatioUser)1 EstatioUserInFrance (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInFrance)1 EstatioUserInGreatBritain (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInGreatBritain)1 EstatioUserInItaly (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInItaly)1 EstatioUserInNetherlands (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInNetherlands)1 EstatioUserInSweden (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInSweden)1 ApplicationTenancy_enum (org.incode.module.apptenancy.fixtures.enums.ApplicationTenancy_enum)1