FRAApplicationAssembly.m revision b3a21de0a0e0a5dea71bece7e5c0356700136fbc
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell * The contents of this file are subject to the terms of the Common Development and
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell * Distribution License (the License). You may not use this file except in compliance with the
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell * specific language governing permission and limitations under the License.
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell * When distributing Covered Software, include this CDDL Header Notice in each file and include
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell * Header, with the fields enclosed by brackets [] replaced by your own identifying
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell * information: "Portions copyright [year] [name of copyright owner]".
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell * Copyright 2016 ForgeRock AS.
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell#import "FRAAccountsTableViewController.h"
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell#import "FRAAccountTableViewController.h"
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell#import "FRAApplicationAssembly.h"
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell#import "FRAIdentityDatabase.h"
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell#import "FRAIdentityDatabaseSQLiteOperations.h"
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell#import "FRAIdentityModel.h"
91f0e3cb60de3eba8cbb70c7e36cc0df22d71f5bRobert Wapshott#import "FRAMechanismFactory.h"
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell#import "FRANotificationGateway.h"
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell#import "FRANotificationHandler.h"
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell#import "FRAQRScanViewController.h"
b3a21de0a0e0a5dea71bece7e5c0356700136fbcDiego Colantoni#import "FRAMessageUtils.h"
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell- (FRAAccountTableViewController *)accountTableViewController {
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell return [TyphoonDefinition withClass:[FRAAccountTableViewController class] configuration:^(TyphoonDefinition *definition) {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [definition injectProperty:@selector(identityModel) with:[self identityModel]];
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell- (FRAAccountsTableViewController *)accountsTableViewController {
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell return [TyphoonDefinition withClass:[FRAAccountsTableViewController class] configuration:^(TyphoonDefinition *definition) {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [definition injectProperty:@selector(identityModel) with:[self identityModel]];
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell return [TyphoonDefinition withClass:[FRAIdentityDatabase class] configuration:^(TyphoonDefinition *definition) {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [definition useInitializer:@selector(initWithSqlOperations:) parameters:^(TyphoonMethod *initializer) {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [initializer injectParameterWith:[self identityDatabaseSQLiteOperations]];
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell- (FRAIdentityDatabase *)identityDatabaseSQLiteOperations {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell return [TyphoonDefinition withClass:[FRAIdentityDatabaseSQLiteOperations class] configuration:^(TyphoonDefinition *definition) {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell return [TyphoonDefinition withClass:[FRAIdentityModel class] configuration:^(TyphoonDefinition *definition) {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [definition useInitializer:@selector(initWithDatabase:) parameters:^(TyphoonMethod *initializer) {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [initializer injectParameterWith:[self identityDatabase]];
91f0e3cb60de3eba8cbb70c7e36cc0df22d71f5bRobert Wapshott return [TyphoonDefinition withClass:[FRAMechanismFactory class] configuration:^(TyphoonDefinition *definition) {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [definition useInitializer:@selector(initWithDatabase:identityModel:) parameters:^(TyphoonMethod *initializer) {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [initializer injectParameterWith:[self identityDatabase]];
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [initializer injectParameterWith:[self identityModel]];
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell- (FRANotificationGateway *)notificationGateway {
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell return [TyphoonDefinition withClass:[FRANotificationGateway class] configuration:^(TyphoonDefinition *definition) {
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell [definition useInitializer:@selector(initWithHandler:) parameters:^(TyphoonMethod *initializer) {
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell [initializer injectParameterWith:[self notificationHandler]];
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell- (FRANotificationHandler *)notificationHandler {
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell return [TyphoonDefinition withClass:[FRANotificationHandler class] configuration:^(TyphoonDefinition *definition) {
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [definition useInitializer:@selector(initWithDatabase:identityModel:) parameters:^(TyphoonMethod *initializer) {
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell [initializer injectParameterWith:[self identityDatabase]];
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell [initializer injectParameterWith:[self identityModel]];
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell- (FRAQRScanViewController *)qrScanViewController {
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell return [TyphoonDefinition withClass:[FRAQRScanViewController class] configuration:^(TyphoonDefinition *definition) {
6c1420dd55f69d09f39dd213ee6c97ba901b8d92Craig McDonnell [definition injectProperty:@selector(mechanismFactory) with:[self mechanismFactory]];