Skip to content
Snippets Groups Projects
Commit bb411553 authored by cramakri's avatar cramakri
Browse files

Initial step in converting client code to progressive retrieval of data

SVN: 27268
parent 493cbfd3
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,10 @@
[self didAccessValueForKey: @"childrenPermIds"];
if (nil == childrenPermIds) {
// This value has not yet been initialized from the server.
// Leave it as nil
if (nil == self.childrenPermIdsJson) return nil;
NSError *error;
childrenPermIds = [NSJSONSerialization JSONObjectWithData: [self.childrenPermIdsJson dataUsingEncoding: NSASCIIStringEncoding] options: 0 error: &error];
if (error) {
......@@ -85,15 +89,15 @@
- (void)initializeFromRawEntity:(CISDOBIpadRawEntity *)rawEntity
{
self.summaryHeader = rawEntity.summaryHeader;
self.summary = rawEntity.summary;
self.identifier = rawEntity.identifier;
self.permId = rawEntity.permId;
self.refcon = rawEntity.refcon;
self.category = rawEntity.category;
self.imageUrl = rawEntity.imageUrl;
self.summaryHeader = rawEntity.summaryHeader;
self.summary = rawEntity.summary;
self.childrenPermIdsJson = rawEntity.children;
self.propertiesJson = rawEntity.properties;
// self.identifier = rawEntity.identifier;
// self.imageUrl = rawEntity.imageUrl;
// self.propertiesJson = rawEntity.properties;
}
@end
......@@ -143,10 +143,11 @@ NSString *const CISDOBIpadServiceErrorDomain = @"CISDOBIpadServiceErrorDomain";
- (CISDOBAsyncCall *)listRootLevelEntities;
{
NSDictionary *parameters = [NSDictionary dictionaryWithObject: @"ROOT" forKey: @"requestKey"];
CISDOBAsyncCall *connectionCall = [_connection
createReportFromDataStore: [_ipadReadService objectForKey: @"dataStoreCode"]
aggregationService: [_ipadReadService objectForKey: @"serviceKey"]
parameters: nil];
parameters: parameters];
CISDOBIpadServiceCall *iPadCall = [self iPadCallWrappingConnectionCall: connectionCall];
connectionCall.success = ^(id result) {
......
......@@ -68,15 +68,15 @@
for (CISDOBIpadRawEntity *rawEntity in rawEntities) {
NSString *summaryHeader = rawEntity.summaryHeader;
STAssertNotNil(summaryHeader, @"The summary header should not be nil");
STAssertTrue([summaryHeader length], @"Summary header should not be empty");
STAssertNotNil(rawEntity.summary, @"Summary should not be nil");
STAssertNotNil(rawEntity.identifier, @"Identifier should not be nil");
STAssertNotNil(rawEntity.permId, @"PermId should not be nil");
STAssertNotNil(rawEntity.refcon, @"Ref con should not be nil");
STAssertNotNil(rawEntity.category, @"Group should not be nil");
STAssertNotNil(rawEntity.imageUrl, @"Image url should not be nil");
STAssertNotNil(rawEntity.children, @"Children should not be nil");
STAssertNotNil(rawEntity.properties, @"Properties type should not be nil");
STAssertTrue([summaryHeader length], @"Summary header should not be empty");
STAssertNotNil(rawEntity.summary, @"Summary should not be nil");
// STAssertNotNil(rawEntity.identifier, @"Identifier should not be nil");
// STAssertNotNil(rawEntity.imageUrl, @"Image url should not be nil");
// STAssertNotNil(rawEntity.children, @"Children should not be nil");
// STAssertNotNil(rawEntity.properties, @"Properties type should not be nil");
}
}
......
......@@ -44,8 +44,8 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
3649C8A815EBB2950019AC55 /* CISDOBConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CISDOBConnection.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
3649C8A915EBB2950019AC55 /* CISDOBConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CISDOBConnection.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
3649C8A815EBB2950019AC55 /* CISDOBConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CISDOBConnection.h; sourceTree = "<group>"; };
3649C8A915EBB2950019AC55 /* CISDOBConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CISDOBConnection.m; sourceTree = "<group>"; };
3649C8AC15EC17D80019AC55 /* CISDOBJsonRpcCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CISDOBJsonRpcCall.h; sourceTree = "<group>"; };
3649C8AD15EC17D80019AC55 /* CISDOBJsonRpcCall.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CISDOBJsonRpcCall.m; sourceTree = "<group>"; };
3649C8AF15ECA4EA0019AC55 /* CISDOBShared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CISDOBShared.h; sourceTree = "<group>"; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment