FRAApplicationAssembly.m revision fb63998ce7684bddab24e10c0b593809df1b7bff
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell/*
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 * License.
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell *
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 *
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 *
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell * Copyright 2016 ForgeRock AS.
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell */
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell#import "FRAAccountsTableViewController.h"
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell#import "FRAAccountTableViewController.h"
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell#import "FRAApplicationAssembly.h"
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell#import "FRAIdentityDatabase.h"
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell#import "FRAQRScanViewController.h"
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell@implementation FRAApplicationAssembly
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell- (FRAAccountsTableViewController *)accountsTableViewController {
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell return [TyphoonDefinition withClass:[FRAAccountsTableViewController class] configuration:^(TyphoonDefinition *definition) {
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell [definition injectProperty:@selector(database) with:[self identityDatabase]];
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell }];
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell}
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell- (FRAAccountTableViewController *)accountTableViewController {
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell return [TyphoonDefinition withClass:[FRAAccountTableViewController class] configuration:^(TyphoonDefinition *definition) {
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell [definition injectProperty:@selector(database) with:[self identityDatabase]];
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell }];
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell}
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell- (FRAQRScanViewController *)qrScanViewController {
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell return [TyphoonDefinition withClass:[FRAQRScanViewController class] configuration:^(TyphoonDefinition *definition) {
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell [definition injectProperty:@selector(database) with:[self identityDatabase]];
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell }];
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell}
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell- (FRAIdentityDatabase *)identityDatabase {
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell return [TyphoonDefinition withClass:[FRAIdentityDatabase class] configuration:^(TyphoonDefinition *definition) {
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell definition.scope = TyphoonScopeSingleton;
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell }];
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell}
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell
fb63998ce7684bddab24e10c0b593809df1b7bffCraig McDonnell@end