Search in sources :

Example 1 with StandaloneShiroAssembler

use of org.qi4j.library.shiro.assembly.StandaloneShiroAssembler in project qi4j-sdk by Qi4j.

the class PasswordDomainTest method assemble.

// END SNIPPET: domain
// START SNIPPET: assembly
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    // END SNIPPET: assembly
    new EntityTestAssembler().assemble(module);
    new RdfMemoryStoreAssembler().assemble(module);
    ModuleAssembly configModule = module;
    // START SNIPPET: assembly
    new StandaloneShiroAssembler().withConfig(configModule, Visibility.layer).assemble(module);
    new PasswordDomainAssembler().withConfig(configModule, Visibility.layer).assemble(module);
    module.entities(User.class);
    module.services(UserFactory.class);
    // END SNIPPET: assembly
    configModule.forMixin(ShiroIniConfiguration.class).declareDefaults().iniResourcePath().set("classpath:standalone-shiro.ini");
// START SNIPPET: assembly
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ShiroIniConfiguration(org.qi4j.library.shiro.ini.ShiroIniConfiguration) RdfMemoryStoreAssembler(org.qi4j.index.rdf.assembly.RdfMemoryStoreAssembler) StandaloneShiroAssembler(org.qi4j.library.shiro.assembly.StandaloneShiroAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) PasswordDomainAssembler(org.qi4j.library.shiro.assembly.PasswordDomainAssembler)

Example 2 with StandaloneShiroAssembler

use of org.qi4j.library.shiro.assembly.StandaloneShiroAssembler in project qi4j-sdk by Qi4j.

the class StandaloneShiroTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    new EntityTestAssembler().assemble(module);
    ModuleAssembly configModule = module;
    // START SNIPPET: assembly
    new StandaloneShiroAssembler().withConfig(configModule, Visibility.layer).assemble(module);
    // END SNIPPET: assembly
    configModule.forMixin(ShiroIniConfiguration.class).declareDefaults().iniResourcePath().set("classpath:standalone-shiro.ini");
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ShiroIniConfiguration(org.qi4j.library.shiro.ini.ShiroIniConfiguration) StandaloneShiroAssembler(org.qi4j.library.shiro.assembly.StandaloneShiroAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler)

Example 3 with StandaloneShiroAssembler

use of org.qi4j.library.shiro.assembly.StandaloneShiroAssembler in project qi4j-sdk by Qi4j.

the class PermissionsDomainTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    new EntityTestAssembler().assemble(module);
    new RdfMemoryStoreAssembler().assemble(module);
    ModuleAssembly configModule = module;
    // START SNIPPET: assembly
    new StandaloneShiroAssembler().withConfig(configModule, Visibility.layer).assemble(module);
    new PasswordDomainAssembler().withConfig(configModule, Visibility.layer).assemble(module);
    new PermissionsDomainAssembler().assemble(module);
    module.entities(User.class);
    module.services(UserFactory.class);
    // END SNIPPET: assembly
    configModule.forMixin(ShiroIniConfiguration.class).declareDefaults().iniResourcePath().set("classpath:standalone-shiro.ini");
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ShiroIniConfiguration(org.qi4j.library.shiro.ini.ShiroIniConfiguration) RdfMemoryStoreAssembler(org.qi4j.index.rdf.assembly.RdfMemoryStoreAssembler) StandaloneShiroAssembler(org.qi4j.library.shiro.assembly.StandaloneShiroAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) PasswordDomainAssembler(org.qi4j.library.shiro.assembly.PasswordDomainAssembler) PermissionsDomainAssembler(org.qi4j.library.shiro.assembly.PermissionsDomainAssembler)

Example 4 with StandaloneShiroAssembler

use of org.qi4j.library.shiro.assembly.StandaloneShiroAssembler in project qi4j-sdk by Qi4j.

the class RealmServiceTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    // END SNIPPET: realm-service
    new EntityTestAssembler().assemble(module);
    ModuleAssembly configModule = module;
    // START SNIPPET: realm-service
    new StandaloneShiroAssembler().withConfig(configModule, Visibility.layer).assemble(module);
    module.services(MyRealmService.class);
    // END SNIPPET: realm-service
    configModule.forMixin(ShiroIniConfiguration.class).declareDefaults().iniResourcePath().set("classpath:standalone-shiro.ini");
// START SNIPPET: realm-service
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ShiroIniConfiguration(org.qi4j.library.shiro.ini.ShiroIniConfiguration) StandaloneShiroAssembler(org.qi4j.library.shiro.assembly.StandaloneShiroAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler)

Aggregations

ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)4 StandaloneShiroAssembler (org.qi4j.library.shiro.assembly.StandaloneShiroAssembler)4 ShiroIniConfiguration (org.qi4j.library.shiro.ini.ShiroIniConfiguration)4 EntityTestAssembler (org.qi4j.test.EntityTestAssembler)4 RdfMemoryStoreAssembler (org.qi4j.index.rdf.assembly.RdfMemoryStoreAssembler)2 PasswordDomainAssembler (org.qi4j.library.shiro.assembly.PasswordDomainAssembler)2 PermissionsDomainAssembler (org.qi4j.library.shiro.assembly.PermissionsDomainAssembler)1