//
//  SyncConfigDataController.h
//  EAMiPad
//
//  Created by Divya Sivakuma on 10/4/12.
//
//

#import "RecordDataController.h"
#import "SyncConfigParser.h"
#import "SyncCfgData.h"


@interface SyncConfigDataController : RecordDataController
{
    
}
@property (nonatomic, strong)   NSMutableArray                    *visibleGrids;
@property (nonatomic, strong)   NSMutableArray                    *groups;
@property (nonatomic, strong)   NSMutableArray                    *values;
@property (nonatomic, strong) SyncConfigParser                    *syncParser;
@property (nonatomic,strong)  NSMutableString                     *parameterName;
@property (nonatomic,strong)  NSMutableString                     *missingValues;
@property (nonatomic,strong)  NSMutableDictionary                 *missingGridDescNames;
//For Parent Group/System Values
@property (nonatomic, strong)   NSMutableArray                    *parentValues;
@property (nonatomic, strong)   NSString                          *valuesNotInChildForDisplay;
//
@property (nonatomic,       )   BOOL                              isParentSyncConfigCalled;
@property (nonatomic,       )   BOOL                              isUserSelected;

- (BOOL) saveSyncConfigForGroup:(NSString *)gCode;
- (void) upgradeSyncConfigSetting;

- (SyncCfgData *)getConfigForGrid:(NSString *)gridName;
- (void)setConfigForGrid:(NSString *)gridName withObject:(SyncCfgData *)data;

- (NSArray *)parametersForGrid:(NSString *)gridName;
- (NSString *)descriptionForParameter:(NSString *)parameter grid:(NSString *)gridName;
- (NSString *)descriptionForGrid:(NSString *)gridName;

- (BOOL)parameterCheckboxOnly:(NSString *)parameter;
- (BOOL)parameterNumericOnly:(NSString *)parameter;

- (void)getSyncConfigGroups;
- (void)getSyncConfig:(NSString *)syncCode forGroup:(NSString *)groupName;

//Call the below function at the time of login and also when user selects "UserName" instead of groupName.
/*********************************************************************************************/
- (void)getSyncConfigForUser:(NSString *)syncCode forGroup:(NSString *)groupName andUser:(NSString *)userName;
- (BOOL) saveSyncConfigForUser:(NSString *)userName andGroup:(NSString *)groupCode;
-(BOOL) validateUserParamInputValues:(SyncCfgData *) userConfig;
/*********************************************************************************************/

//For Data Sync function to use
+ (BOOL)isMultipleParameter:(NSString *)parameter;
- (LOVData *)getLOVDataSource:(NSString *) pParameterName;


@end
