FRAModelsFromDatabase.h revision 7c51d54f23c5581d2cf894f9eafb9798e3febd22
79d11c2e3ad242ebb241f5d4a5e98a674c0b986fChristian Maeder/*
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens Elkner * The contents of this file are subject to the terms of the Common Development and
e47d29b522739fbf08aac80c6faa447dde113fbcChristian Maeder * Distribution License (the License). You may not use this file except in compliance with the
79d11c2e3ad242ebb241f5d4a5e98a674c0b986fChristian Maeder * License.
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu *
79d11c2e3ad242ebb241f5d4a5e98a674c0b986fChristian Maeder * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
3f69b6948966979163bdfe8331c38833d5d90ecdChristian Maeder * specific language governing permission and limitations under the License.
79d11c2e3ad242ebb241f5d4a5e98a674c0b986fChristian Maeder *
79d11c2e3ad242ebb241f5d4a5e98a674c0b986fChristian Maeder * When distributing Covered Software, include this CDDL Header Notice in each file and include
79d11c2e3ad242ebb241f5d4a5e98a674c0b986fChristian Maeder * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
f3a94a197960e548ecd6520bb768cb0d547457bbChristian Maeder * Header, with the fields enclosed by brackets [] replaced by your own identifying
79d11c2e3ad242ebb241f5d4a5e98a674c0b986fChristian Maeder * information: "Portions copyright [year] [name of copyright owner]".
79d11c2e3ad242ebb241f5d4a5e98a674c0b986fChristian Maeder *
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder * Copyright 2016 ForgeRock AS.
e8cc99b957e08cd5b4fd85e2f7c9f271f108fd92Christian Maeder */
5553cf7e344c2b385a72e1244b419e9986042b8eChristian Maeder
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder@class FRAIdentity;
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder@class FRAFMDatabaseConnectionHelper;
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder/*!
21b18016469e574bd145ad07c7b0f02839677cc3Christian Maeder * Defines all configuration needed to locate the SQLite Database.
21b18016469e574bd145ad07c7b0f02839677cc3Christian Maeder */
7a343d2fab2cf9a6eed24aefc332ceb1d758e752Christian Maeder@interface FRAModelsFromDatabase : NSObject
21b18016469e574bd145ad07c7b0f02839677cc3Christian Maeder
21b18016469e574bd145ad07c7b0f02839677cc3Christian Maeder/*!
7a343d2fab2cf9a6eed24aefc332ceb1d758e752Christian Maeder * Read all Identities, Mechanisms and Notifications from the database
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder * and generate the object tree.
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder *
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder * @param sqlDatabase The SQL Database to read the identities from.
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder * @param identityDatabase Assigned to the model objects created.
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder * @param identityModel The identity model which contains the list of identities.
658187feb755694eb5ff29561bda7109c22c743cAlexis Tsogias * @param error If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder * @return A non null, possibly empty list of FRAIdentity read from the database.
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder */
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder+ (NSArray<FRAIdentity*> *)getAllIdentitiesFrom:(FRAFMDatabaseConnectionHelper *)sqlDatabase including:(FRAIdentityDatabase *)identityDatabase identityModel:(FRAIdentityModel *)identityModel catchingErrorsWith:(NSError *__autoreleasing *)error;
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder
0219cf52bc61673e3fc70d62497b316d51c9e68aChristian Maeder@end