use of gov.ca.cwds.cals.inject.ApplicationModule in project cals-api by ca-cwds.
the class CalsApiApplication method applicationModule.
@Override
public Module applicationModule(Bootstrap<CalsApiConfiguration> bootstrap) {
return new ApplicationModule<CalsApiConfiguration>(bootstrap) {
@Override
protected void configure() {
super.configure();
install(new DataAccessModule(bootstrap) {
@Provides
UnitOfWorkAwareProxyFactory provideUnitOfWorkAwareProxyFactory() {
return new UnitOfWorkAwareProxyFactory(getLisHibernateBundle(), getFasHibernateBundle(), getCmsHibernateBundle(), getCalsnsHibernateBundle(), getXaCmsHibernateBundle(), getXaCalsnsHibernateBundle());
}
});
install(new SecurityModule(BaseApiApplication::getInjector).addAuthorizer(Authorize.PLACEMENT_HOME_CREATE, PlacementHomeCreateAuthorizer.class).addAuthorizer(Authorize.SUBSTITUTE_CARE_PROVIDER_CREATE, SubstituteCareProviderCreateAuthorizer.class).addAuthorizer(CLIENT_RESULT_READ, ClientResultReadAuthorizer.class).addStaticAuthorizer(FacilityReadStaticAuthorizer.class));
}
};
}
Aggregations