chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pweschm...@apache.org
Subject svn commit: r1443376 - in /chemistry/objectivecmis/branches/mdm: ObjectiveCMIS.xcodeproj/ ObjectiveCMIS/Bindings/ ObjectiveCMIS/Bindings/AtomPub/ ObjectiveCMIS/Client/ ObjectiveCMIS/Common/ ObjectiveCMIS/Utils/ ObjectiveCMISTests/
Date Thu, 07 Feb 2013 09:52:53 GMT
Author: pweschmidt
Date: Thu Feb  7 09:52:52 2013
New Revision: 1443376

URL: http://svn.apache.org/viewvc?rev=1443376&view=rev
Log:
Changes to enable adding Custom network providers to the API.

Added:
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubVersioningService.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISNetworkProvider.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISDefaultNetworkProvider.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISDefaultNetworkProvider.m
Removed:
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpUtil.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpUtil.m
Modified:
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS.xcodeproj/project.pbxproj
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubDiscoveryService.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubNavigationService.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubObjectService.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubRepositoryService.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/CMISBindingSession.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/CMISBindingSession.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISDocument.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISDocument.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISFolder.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISFolder.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISRequest.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISRequest.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISSession.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISSessionParameters.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISSessionParameters.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpRequest.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpRequest.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpResponse.h
    chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpResponse.m
    chemistry/objectivecmis/branches/mdm/ObjectiveCMISTests/ObjectiveCMISTests.m

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS.xcodeproj/project.pbxproj
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS.xcodeproj/project.pbxproj?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS.xcodeproj/project.pbxproj (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS.xcodeproj/project.pbxproj Thu Feb  7 09:52:52 2013
@@ -21,10 +21,13 @@
 /* End PBXAggregateTarget section */
 
 /* Begin PBXBuildFile section */
+		4E10ABFF16B916B500E2287E /* CMISDefaultNetworkProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E10ABFD16B916B500E2287E /* CMISDefaultNetworkProvider.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		4E10AC0016B916B500E2287E /* CMISDefaultNetworkProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E10ABFE16B916B500E2287E /* CMISDefaultNetworkProvider.m */; };
 		4E39DF5C163A72B400F21DE6 /* CMISDateUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E39DF5A163A72B400F21DE6 /* CMISDateUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		4E39DF5D163A72B400F21DE6 /* CMISDateUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E39DF5B163A72B400F21DE6 /* CMISDateUtil.m */; };
 		4E39DF60163A767B00F21DE6 /* CMISAtomParserUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E39DF5E163A767B00F21DE6 /* CMISAtomParserUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		4E39DF61163A767B00F21DE6 /* CMISAtomParserUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E39DF5F163A767B00F21DE6 /* CMISAtomParserUtil.m */; };
+		4E3E14B316AFFB190057CE22 /* CMISNetworkProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E3E14B116AFFB190057CE22 /* CMISNetworkProvider.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		4EA61BD71564F70C00C759E4 /* CMISStringInOutParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4EA61BD31564F70C00C759E4 /* CMISStringInOutParameter.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		4EA61BD81564F70C00C759E4 /* CMISStringInOutParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EA61BD41564F70C00C759E4 /* CMISStringInOutParameter.m */; };
 		4EA61BD91564F70C00C759E4 /* CMISStringInOutParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EA61BD41564F70C00C759E4 /* CMISStringInOutParameter.m */; };
@@ -72,8 +75,6 @@
 		8276E130155E355D00344A29 /* CMISBase64Encoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 8276E12A155E355D00344A29 /* CMISBase64Encoder.m */; };
 		8276E131155E355D00344A29 /* CMISFileUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 8276E12B155E355D00344A29 /* CMISFileUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		8276E132155E355D00344A29 /* CMISFileUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 8276E12C155E355D00344A29 /* CMISFileUtil.m */; };
-		8276E133155E355D00344A29 /* CMISHttpUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 8276E12D155E355D00344A29 /* CMISHttpUtil.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8276E134155E355D00344A29 /* CMISHttpUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 8276E12E155E355D00344A29 /* CMISHttpUtil.m */; };
 		8276E159155E392A00344A29 /* CMISNavigationService.h in Headers */ = {isa = PBXBuildFile; fileRef = 8276E156155E392A00344A29 /* CMISNavigationService.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		8276E15A155E392A00344A29 /* CMISRepositoryService.h in Headers */ = {isa = PBXBuildFile; fileRef = 8276E157155E392A00344A29 /* CMISRepositoryService.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		8276E15B155E392A00344A29 /* CMISVersioningService.h in Headers */ = {isa = PBXBuildFile; fileRef = 8276E158155E392A00344A29 /* CMISVersioningService.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -211,10 +212,13 @@
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
+		4E10ABFD16B916B500E2287E /* CMISDefaultNetworkProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISDefaultNetworkProvider.h; path = Utils/CMISDefaultNetworkProvider.h; sourceTree = "<group>"; };
+		4E10ABFE16B916B500E2287E /* CMISDefaultNetworkProvider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CMISDefaultNetworkProvider.m; path = Utils/CMISDefaultNetworkProvider.m; sourceTree = "<group>"; };
 		4E39DF5A163A72B400F21DE6 /* CMISDateUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISDateUtil.h; path = Utils/CMISDateUtil.h; sourceTree = "<group>"; };
 		4E39DF5B163A72B400F21DE6 /* CMISDateUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CMISDateUtil.m; path = Utils/CMISDateUtil.m; sourceTree = "<group>"; };
 		4E39DF5E163A767B00F21DE6 /* CMISAtomParserUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMISAtomParserUtil.h; sourceTree = "<group>"; };
 		4E39DF5F163A767B00F21DE6 /* CMISAtomParserUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMISAtomParserUtil.m; sourceTree = "<group>"; };
+		4E3E14B116AFFB190057CE22 /* CMISNetworkProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISNetworkProvider.h; path = Common/CMISNetworkProvider.h; sourceTree = "<group>"; };
 		4EA61BD31564F70C00C759E4 /* CMISStringInOutParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISStringInOutParameter.h; path = Utils/CMISStringInOutParameter.h; sourceTree = "<group>"; };
 		4EA61BD41564F70C00C759E4 /* CMISStringInOutParameter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CMISStringInOutParameter.m; path = Utils/CMISStringInOutParameter.m; sourceTree = "<group>"; };
 		4EA61BD51564F70C00C759E4 /* CMISURLUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISURLUtil.h; path = Utils/CMISURLUtil.h; sourceTree = "<group>"; };
@@ -258,8 +262,6 @@
 		8276E12A155E355D00344A29 /* CMISBase64Encoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CMISBase64Encoder.m; path = Utils/CMISBase64Encoder.m; sourceTree = "<group>"; };
 		8276E12B155E355D00344A29 /* CMISFileUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = CMISFileUtil.h; path = Utils/CMISFileUtil.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
 		8276E12C155E355D00344A29 /* CMISFileUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = CMISFileUtil.m; path = Utils/CMISFileUtil.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
-		8276E12D155E355D00344A29 /* CMISHttpUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = CMISHttpUtil.h; path = Utils/CMISHttpUtil.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
-		8276E12E155E355D00344A29 /* CMISHttpUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = CMISHttpUtil.m; path = Utils/CMISHttpUtil.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
 		8276E156155E392A00344A29 /* CMISNavigationService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISNavigationService.h; path = Bindings/CMISNavigationService.h; sourceTree = "<group>"; };
 		8276E157155E392A00344A29 /* CMISRepositoryService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISRepositoryService.h; path = Bindings/CMISRepositoryService.h; sourceTree = "<group>"; };
 		8276E158155E392A00344A29 /* CMISVersioningService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISVersioningService.h; path = Bindings/CMISVersioningService.h; sourceTree = "<group>"; };
@@ -559,6 +561,7 @@
 				752067F8156AC0FE00231A5D /* CMISExtensionElement.h */,
 				752067F9156AC0FE00231A5D /* CMISExtensionElement.m */,
 				828072F61515404F00EF635C /* CMISObjectData.h */,
+				4E3E14B116AFFB190057CE22 /* CMISNetworkProvider.h */,
 				828072F71515404F00EF635C /* CMISObjectData.m */,
 				828072F81515404F00EF635C /* CMISProperties.h */,
 				828072F91515404F00EF635C /* CMISProperties.m */,
@@ -611,10 +614,12 @@
 		828072D615153F1300EF635C /* Utils */ = {
 			isa = PBXGroup;
 			children = (
-				4E39DF5A163A72B400F21DE6 /* CMISDateUtil.h */,
-				4E39DF5B163A72B400F21DE6 /* CMISDateUtil.m */,
 				8276E129155E355D00344A29 /* CMISBase64Encoder.h */,
 				8276E12A155E355D00344A29 /* CMISBase64Encoder.m */,
+				4E39DF5A163A72B400F21DE6 /* CMISDateUtil.h */,
+				4E39DF5B163A72B400F21DE6 /* CMISDateUtil.m */,
+				4E10ABFD16B916B500E2287E /* CMISDefaultNetworkProvider.h */,
+				4E10ABFE16B916B500E2287E /* CMISDefaultNetworkProvider.m */,
 				8276E12B155E355D00344A29 /* CMISFileUtil.h */,
 				8276E12C155E355D00344A29 /* CMISFileUtil.m */,
 				BD5C96FC16281A54002DDC6E /* CMISHttpRequest.h */,
@@ -625,8 +630,6 @@
 				BD5C970D16282977002DDC6E /* CMISHttpDownloadRequest.m */,
 				BD5C97071628293F002DDC6E /* CMISHttpUploadRequest.h */,
 				BD5C97081628293F002DDC6E /* CMISHttpUploadRequest.m */,
-				8276E12D155E355D00344A29 /* CMISHttpUtil.h */,
-				8276E12E155E355D00344A29 /* CMISHttpUtil.m */,
 				828073291515407000EF635C /* CMISObjectConverter.h */,
 				8280732A1515407000EF635C /* CMISObjectConverter.m */,
 				4EA61BD31564F70C00C759E4 /* CMISStringInOutParameter.h */,
@@ -750,7 +753,6 @@
 				8276E123155E34ED00344A29 /* CMISObjectId.h in Headers */,
 				8276E12F155E355D00344A29 /* CMISBase64Encoder.h in Headers */,
 				8276E131155E355D00344A29 /* CMISFileUtil.h in Headers */,
-				8276E133155E355D00344A29 /* CMISHttpUtil.h in Headers */,
 				8276E159155E392A00344A29 /* CMISNavigationService.h in Headers */,
 				8276E15A155E392A00344A29 /* CMISRepositoryService.h in Headers */,
 				8276E15B155E392A00344A29 /* CMISVersioningService.h in Headers */,
@@ -788,6 +790,8 @@
 				BD5C97091628293F002DDC6E /* CMISHttpUploadRequest.h in Headers */,
 				BD5C970E16282977002DDC6E /* CMISHttpDownloadRequest.h in Headers */,
 				BD5C9713162C11E3002DDC6E /* CMISHttpResponse.h in Headers */,
+				4E3E14B316AFFB190057CE22 /* CMISNetworkProvider.h in Headers */,
+				4E10ABFF16B916B500E2287E /* CMISDefaultNetworkProvider.h in Headers */,
 				BD30D33D162D7DD7001FFF80 /* CMISRequest.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -961,7 +965,6 @@
 				8276E124155E34ED00344A29 /* CMISObjectId.m in Sources */,
 				8276E130155E355D00344A29 /* CMISBase64Encoder.m in Sources */,
 				8276E132155E355D00344A29 /* CMISFileUtil.m in Sources */,
-				8276E134155E355D00344A29 /* CMISHttpUtil.m in Sources */,
 				75803D421560BD5300C738C1 /* CMISAtomLink.m in Sources */,
 				75803D501560CFCB00C738C1 /* CMISLinkRelations.m in Sources */,
 				82C1C63F15358733009B7B72 /* CMISQueryAtomEntryWriter.m in Sources */,
@@ -997,6 +1000,7 @@
 				BD30D33E162D7DD7001FFF80 /* CMISRequest.m in Sources */,
 				4E39DF5D163A72B400F21DE6 /* CMISDateUtil.m in Sources */,
 				4E39DF61163A767B00F21DE6 /* CMISAtomParserUtil.m in Sources */,
+				4E10AC0016B916B500E2287E /* CMISDefaultNetworkProvider.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService.h?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService.h (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService.h Thu Feb  7 09:52:52 2013
@@ -20,8 +20,10 @@
 #import <Foundation/Foundation.h>
 #import "CMISSessionParameters.h"
 #import "CMISBindingSession.h"
+#import "CMISNetworkProvider.h"
+#import "CMISRequest.h"
 
-@interface CMISAtomPubBaseService : NSObject
+@interface CMISAtomPubBaseService : NSObject 
 
 @property (nonatomic, strong, readonly) CMISBindingSession *bindingSession;
 @property (nonatomic, strong, readonly) NSURL *atomPubUrl;

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubBaseService.m Thu Feb  7 09:52:52 2013
@@ -19,7 +19,6 @@
 
 #import "CMISAtomPubBaseService.h"
 #import "CMISAtomPubBaseService+Protected.h"
-#import "CMISHttpUtil.h"
 #import "CMISHttpResponse.h"
 #import "CMISServiceDocumentParser.h"
 #import "CMISConstants.h"
@@ -48,8 +47,6 @@
     if (self)
     {
         self.bindingSession = session;
-        
-        // pull out and cache all the useful objects for this binding
         self.atomPubUrl = [session objectForKey:kCMISBindingSessionKeyAtomPubUrl];
     }
     return self;
@@ -125,7 +122,7 @@
     if ([self.bindingSession objectForKey:kCMISSessionKeyWorkspaces]) {
         completionBlock([self.bindingSession objectForKey:kCMISSessionKeyWorkspaces], nil);
     } else {
-        [HttpUtil invokeGET:self.atomPubUrl
+        [self.bindingSession.networkProvider invokeGET:self.atomPubUrl
                 withSession:self.bindingSession
             completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
                 if (httpResponse) {
@@ -183,7 +180,7 @@
         NSURL *objectIdUrl = [objectByIdUriBuilder buildUrl];
         
         // Execute actual call
-        [HttpUtil invokeGET:objectIdUrl
+        [self.bindingSession.networkProvider invokeGET:objectIdUrl
                 withSession:self.bindingSession
             completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
                 if (httpResponse) {
@@ -227,7 +224,7 @@
         objectByPathUriBuilder.renditionFilter = renditionFilter;
         
         // Execute actual call
-        [HttpUtil invokeGET:[objectByPathUriBuilder buildUrl]
+        [self.bindingSession.networkProvider invokeGET:[objectByPathUriBuilder buildUrl]
                 withSession:self.bindingSession
             completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
                 if (httpResponse) {

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubDiscoveryService.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubDiscoveryService.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubDiscoveryService.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubDiscoveryService.m Thu Feb  7 09:52:52 2013
@@ -19,7 +19,6 @@
 
 #import "CMISAtomPubDiscoveryService.h"
 #import "CMISQueryAtomEntryWriter.h"
-#import "CMISHttpUtil.h"
 #import "CMISHttpResponse.h"
 #import "CMISAtomPubConstants.h"
 #import "CMISAtomFeedParser.h"
@@ -66,7 +65,7 @@
     atomEntryWriter.skipCount = skipCount;
     
     // Execute HTTP call
-    [HttpUtil invokePOST:queryURL
+    [self.bindingSession.networkProvider invokePOST:queryURL
              withSession:self.bindingSession
                     body:[[atomEntryWriter generateAtomEntryXML] dataUsingEncoding:NSUTF8StringEncoding]
                  headers:[NSDictionary dictionaryWithObject:kCMISMediaTypeQuery forKey:@"Content-type"]

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubNavigationService.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubNavigationService.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubNavigationService.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubNavigationService.m Thu Feb  7 09:52:52 2013
@@ -20,7 +20,6 @@
 #import "CMISAtomPubNavigationService.h"
 #import "CMISAtomPubBaseService+Protected.h"
 #import "CMISAtomFeedParser.h"
-#import "CMISHttpUtil.h"
 #import "CMISHttpResponse.h"
 #import "CMISErrors.h"
 #import "CMISURLUtil.h"
@@ -57,7 +56,7 @@
                           downLink = [CMISURLUtil urlStringByAppendingParameter:kCMISParameterSkipCount withValue:[skipCount stringValue] toUrlString:downLink];
                           
                           // execute the request
-                          [HttpUtil invokeGET:[NSURL URLWithString:downLink]
+                          [self.bindingSession.networkProvider invokeGET:[NSURL URLWithString:downLink]
                                   withSession:self.bindingSession
                               completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
                                   if (httpResponse) {
@@ -123,7 +122,7 @@
         
         upLink = [CMISURLUtil urlStringByAppendingParameter:kCMISParameterRelativePathSegment withValue:(includeRelativePathSegment ? @"true" : @"false") toUrlString:upLink];
         
-        [HttpUtil invokeGET:[NSURL URLWithString:upLink]
+        [self.bindingSession.networkProvider invokeGET:[NSURL URLWithString:upLink]
                 withSession:self.bindingSession
             completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
                 if (httpResponse) {

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubObjectService.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubObjectService.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubObjectService.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubObjectService.m Thu Feb  7 09:52:52 2013
@@ -19,7 +19,6 @@
 
 #import "CMISAtomPubObjectService.h"
 #import "CMISAtomPubBaseService+Protected.h"
-#import "CMISHttpUtil.h"
 #import "CMISHttpResponse.h"
 #import "CMISAtomEntryWriter.h"
 #import "CMISAtomEntryParser.h"
@@ -115,7 +114,7 @@ andIncludeAllowableActions:(BOOL)include
             
             unsigned long long streamLength = [[[objectData.properties.propertiesDictionary objectForKey:kCMISPropertyContentStreamLength] firstValue] unsignedLongLongValue];
             
-            [HttpUtil invoke:contentUrl
+            [self.bindingSession.networkProvider invoke:contentUrl
               withHttpMethod:HTTP_GET
                  withSession:self.bindingSession
                 outputStream:outputStream
@@ -160,7 +159,7 @@ andIncludeAllowableActions:(BOOL)include
                                                              withValue:changeTokenParam.inParameter toUrlString:editMediaLink];
         }
         
-        [HttpUtil invokeDELETE:[NSURL URLWithString:editMediaLink]
+        [self.bindingSession.networkProvider invokeDELETE:[NSURL URLWithString:editMediaLink]
                    withSession:self.bindingSession
                completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
                    if (httpResponse) {
@@ -265,7 +264,7 @@ andIncludeAllowableActions:(BOOL)include
         NSDictionary *additionalHeader = [NSDictionary dictionaryWithObject:[NSString stringWithFormat:@"attachment; filename=%@",
                                                                              filename] forKey:@"Content-Disposition"];
         
-        [HttpUtil invoke:[NSURL URLWithString:editMediaLink]
+        [self.bindingSession.networkProvider invoke:[NSURL URLWithString:editMediaLink]
           withHttpMethod:HTTP_PUT
              withSession:self.bindingSession
              inputStream:inputStream
@@ -385,7 +384,7 @@ andIncludeAllowableActions:(BOOL)include
             completionBlock(NO, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeInvalidArgument withDetailedDescription:nil]);
         } else {
             NSURL *selfUrl = [NSURL URLWithString:selfLink];
-            [HttpUtil invokeDELETE:selfUrl
+            [self.bindingSession.networkProvider invokeDELETE:selfUrl
                        withSession:self.bindingSession
                    completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
                        if (httpResponse) {
@@ -458,7 +457,7 @@ andIncludeAllowableActions:(BOOL)include
             link = [CMISURLUtil urlStringByAppendingParameter:kCMISParameterUnfileObjects withValue:[CMISEnums stringForUnfileObject:unfileObjects] toUrlString:link];
             link = [CMISURLUtil urlStringByAppendingParameter:kCMISParameterContinueOnFailure withValue:(continueOnFailure ? @"true" : @"false") toUrlString:link];
             
-            [HttpUtil invokeDELETE:[NSURL URLWithString:link]
+            [self.bindingSession.networkProvider invokeDELETE:[NSURL URLWithString:link]
                        withSession:self.bindingSession
                    completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
                        if (httpResponse) {
@@ -528,7 +527,7 @@ andIncludeAllowableActions:(BOOL)include
                          xmlWriter.cmisProperties = properties;
                          xmlWriter.generateXmlInMemory = YES;
                          
-                         [HttpUtil invokePUT:[NSURL URLWithString:selfLink]
+                         [self.bindingSession.networkProvider invokePUT:[NSURL URLWithString:selfLink]
                                  withSession:self.bindingSession
                                         body:[xmlWriter.generateAtomEntryXml dataUsingEncoding:NSUTF8StringEncoding]
                                      headers:[NSDictionary dictionaryWithObject:kCMISMediaTypeEntry forKey:@"Content-type"]
@@ -596,7 +595,7 @@ andIncludeAllowableActions:(BOOL)include
                                     isXmlStoredInMemory:YES];
     
     // Execute call
-    [HttpUtil invoke:[NSURL URLWithString:link]
+    [self.bindingSession.networkProvider invoke:[NSURL URLWithString:link]
       withHttpMethod:httpRequestMethod
          withSession:self.bindingSession
                 body:[writeResult dataUsingEncoding:NSUTF8StringEncoding]
@@ -664,7 +663,7 @@ andIncludeAllowableActions:(BOOL)include
         log(@"Could not determine file size of %@ : %@", writeResult, [fileSizeError description]);
     }
     
-    [HttpUtil invoke:[NSURL URLWithString:link]
+    [self.bindingSession.networkProvider invoke:[NSURL URLWithString:link]
       withHttpMethod:HTTP_POST
          withSession:self.bindingSession
          inputStream:inputStream

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubRepositoryService.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubRepositoryService.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubRepositoryService.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubRepositoryService.m Thu Feb  7 09:52:52 2013
@@ -22,7 +22,6 @@
 #import "CMISWorkspace.h"
 #import "CMISErrors.h"
 #import "CMISTypeByIdUriBuilder.h"
-#import "CMISHttpUtil.h"
 #import "CMISHttpResponse.h"
 #import "CMISTypeDefinitionAtomEntryParser.h"
 
@@ -90,7 +89,7 @@
         CMISTypeByIdUriBuilder *typeByIdUriBuilder = object;
         typeByIdUriBuilder.id = typeId;
         
-        [HttpUtil invokeGET:[typeByIdUriBuilder buildUrl] withSession:self.bindingSession completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
+        [self.bindingSession.networkProvider invokeGET:[typeByIdUriBuilder buildUrl] withSession:self.bindingSession completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
             if (httpResponse) {
                 if (httpResponse.data != nil) {
                     CMISTypeDefinitionAtomEntryParser *parser = [[CMISTypeDefinitionAtomEntryParser alloc] initWithData:httpResponse.data];

Added: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubVersioningService.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubVersioningService.m?rev=1443376&view=auto
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubVersioningService.m (added)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubVersioningService.m Thu Feb  7 09:52:52 2013
@@ -0,0 +1,95 @@
+/*
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+ */
+
+#import "CMISAtomPubVersioningService.h"
+#import "CMISAtomPubBaseService+Protected.h"
+#import "CMISAtomPubConstants.h"
+#import "CMISHttpResponse.h"
+#import "CMISAtomFeedParser.h"
+#import "CMISErrors.h"
+#import "CMISURLUtil.h"
+
+@implementation CMISAtomPubVersioningService
+
+- (void)retrieveObjectOfLatestVersion:(NSString *)objectId
+                                major:(BOOL)major
+                               filter:(NSString *)filter
+                 includeRelationShips:(CMISIncludeRelationship)includeRelationships
+                     includePolicyIds:(BOOL)includePolicyIds
+                      renditionFilter:(NSString *)renditionFilter
+                           includeACL:(BOOL)includeACL
+              includeAllowableActions:(BOOL)includeAllowableActions
+                      completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock
+{
+    [self retrieveObjectInternal:objectId withReturnVersion:(major ? LATEST_MAJOR : LATEST)
+                      withFilter:filter andIncludeRelationShips:includeRelationships
+             andIncludePolicyIds:includePolicyIds andRenditionFilder:renditionFilter
+                   andIncludeACL:includeACL andIncludeAllowableActions:includeAllowableActions
+                 completionBlock:^(CMISObjectData *objectData, NSError *error) {
+                     completionBlock(objectData, error);
+                 }];
+}
+
+- (void)retrieveAllVersions:(NSString *)objectId
+                     filter:(NSString *)filter
+    includeAllowableActions:(BOOL)includeAllowableActions
+            completionBlock:(void (^)(NSArray *objects, NSError *error))completionBlock
+{
+    // Validate params
+    if (!objectId)
+    {
+        log(@"Must provide an objectId when retrieving all versions");
+        completionBlock(nil, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeObjectNotFound withDetailedDescription:nil]);
+        return;
+    }
+    
+    // Fetch version history link
+    [self loadLinkForObjectId:objectId andRelation:kCMISLinkVersionHistory completionBlock:^(NSString *versionHistoryLink, NSError *error) {
+        if (error) {
+            completionBlock(nil, [CMISErrors cmisError:error withCMISErrorCode:kCMISErrorCodeObjectNotFound]);
+            return;
+        }
+        
+        if (filter) {
+            versionHistoryLink = [CMISURLUtil urlStringByAppendingParameter:kCMISParameterFilter withValue:filter toUrlString:versionHistoryLink];
+        }
+        versionHistoryLink = [CMISURLUtil urlStringByAppendingParameter:kCMISParameterIncludeAllowableActions
+                                                              withValue:(includeAllowableActions ? @"true" : @"false") toUrlString:versionHistoryLink];
+        
+        // Execute call
+        [self.bindingSession.networkProvider invokeGET:[NSURL URLWithString:versionHistoryLink]
+                withSession:self.bindingSession
+            completionBlock:^(CMISHttpResponse *httpResponse, NSError *error) {
+                if (httpResponse) {
+                    NSData *data = httpResponse.data;
+                    CMISAtomFeedParser *feedParser = [[CMISAtomFeedParser alloc] initWithData:data];
+                    NSError *error;
+                    if (![feedParser parseAndReturnError:&error]) {
+                        completionBlock(nil, [CMISErrors cmisError:error withCMISErrorCode:kCMISErrorCodeVersioning]);
+                    } else {
+                        completionBlock(feedParser.entries, nil);
+                    }
+                } else {
+                    completionBlock(nil, [CMISErrors cmisError:error withCMISErrorCode:kCMISErrorCodeConnection]);
+                }
+            }];
+    }];
+}
+
+@end
\ No newline at end of file

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/CMISBindingSession.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/CMISBindingSession.h?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/CMISBindingSession.h (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/CMISBindingSession.h Thu Feb  7 09:52:52 2013
@@ -20,6 +20,7 @@
 #import <Foundation/Foundation.h>
 #import "CMISSessionParameters.h"
 #import "CMISAuthenticationProvider.h"
+#import "CMISNetworkProvider.h"
 
 extern NSString * const kCMISBindingSessionKeyAtomPubUrl;
 extern NSString * const kCMISBindingSessionKeyObjectByIdUriBuilder;
@@ -36,6 +37,7 @@ extern NSString * const kCMISBindingSess
 @property (nonatomic, strong, readonly) NSString *username;
 @property (nonatomic, strong, readonly) NSString *repositoryId;
 @property (nonatomic, strong, readonly) id<CMISAuthenticationProvider> authenticationProvider;
+@property (nonatomic, strong, readonly) id<CMISNetworkProvider> networkProvider;
 
 - (id)initWithSessionParameters:(CMISSessionParameters *)sessionParameters;
 

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/CMISBindingSession.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/CMISBindingSession.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/CMISBindingSession.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Bindings/CMISBindingSession.m Thu Feb  7 09:52:52 2013
@@ -33,6 +33,7 @@ NSString * const kCMISBindingSessionKeyL
 @property (nonatomic, strong, readwrite) NSString *username;
 @property (nonatomic, strong, readwrite) NSString *repositoryId;
 @property (nonatomic, strong, readwrite) id<CMISAuthenticationProvider> authenticationProvider;
+@property (nonatomic, strong, readwrite) id<CMISNetworkProvider> networkProvider;
 @property (nonatomic, strong, readwrite) NSMutableDictionary *sessionData;
 @end
 
@@ -42,6 +43,7 @@ NSString * const kCMISBindingSessionKeyL
 @synthesize repositoryId = _repositoryId;
 @synthesize authenticationProvider = _authenticationProvider;
 @synthesize sessionData = _sessionData;
+@synthesize networkProvider = _networkProvider;
 
 - (id)initWithSessionParameters:(CMISSessionParameters *)sessionParameters
 {
@@ -54,6 +56,7 @@ NSString * const kCMISBindingSessionKeyL
         self.username = sessionParameters.username;
         self.repositoryId = sessionParameters.repositoryId;
         self.authenticationProvider = sessionParameters.authenticationProvider;
+        self.networkProvider = sessionParameters.networkProvider;
         
         // store all other data in the dictionary
         [self.sessionData setObject:sessionParameters.atomPubUrl forKey:kCMISBindingSessionKeyAtomPubUrl];

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISDocument.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISDocument.h?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISDocument.h (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISDocument.h Thu Feb  7 09:52:52 2013
@@ -65,6 +65,14 @@
                       completionBlock:(void (^)(NSError *error))completionBlock
                         progressBlock:(void (^)(unsigned long long bytesDownloaded, unsigned long long bytesTotal))progressBlock;
 
+
+/**
+ * Downloads the content to an outputstream and returns the handle to the http request in order to allow cancellation.
+ */
+- (CMISRequest*)downloadContentToOutputStream:(NSOutputStream *)outputStream
+                              completionBlock:(void (^)(NSError *error))completionBlock
+                                progressBlock:(void (^)(unsigned long long bytesDownloaded, unsigned long long bytesTotal))progressBlock;
+
 /**
  * Changes the content of this document to the content of the given file.
  *

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISDocument.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISDocument.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISDocument.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISDocument.m Thu Feb  7 09:52:52 2013
@@ -19,7 +19,6 @@
 
 #import "CMISDocument.h"
 #import "CMISConstants.h"
-#import "CMISHttpUtil.h"
 #import "CMISObjectConverter.h"
 #import "CMISStringInOutParameter.h"
 #import "CMISOperationContext.h"
@@ -165,6 +164,19 @@
                                                  progressBlock:progressBlock];
 }
 
+
+- (CMISRequest*)downloadContentToOutputStream:(NSOutputStream *)outputStream
+                              completionBlock:(void (^)(NSError *error))completionBlock
+                                progressBlock:(void (^)(unsigned long long bytesDownloaded, unsigned long long bytesTotal))progressBlock
+{
+    return [self.binding.objectService downloadContentOfObject:self.identifier
+                                                  withStreamId:nil
+                                                toOutputStream:outputStream
+                                               completionBlock:completionBlock
+                                                 progressBlock:progressBlock];
+}
+
+
 - (void)deleteAllVersionsWithCompletionBlock:(void (^)(BOOL documentDeleted, NSError *error))completionBlock
 {
     [self.binding.objectService deleteObject:self.identifier allVersions:YES completionBlock:completionBlock];

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISFolder.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISFolder.h?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISFolder.h (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISFolder.h Thu Feb  7 09:52:52 2013
@@ -61,6 +61,14 @@
                    completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
                      progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock;
 
+- (void)createDocumentFromInputStream:(NSInputStream *)inputStream
+                         withMimeType:(NSString *)mimeType
+                       withProperties:(NSDictionary *)properties
+                        bytesExpected:(unsigned long long)bytesExpected
+                      completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
+                        progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock;
+
+
 - (void)deleteTreeWithDeleteAllVersions:(BOOL)deleteAllversions
                       withUnfileObjects:(CMISUnfileObject)unfileObjects
                   withContinueOnFailure:(BOOL)continueOnFailure

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISFolder.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISFolder.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISFolder.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISFolder.m Thu Feb  7 09:52:52 2013
@@ -155,6 +155,36 @@
     }];
 }
 
+- (void)createDocumentFromInputStream:(NSInputStream *)inputStream
+                         withMimeType:(NSString *)mimeType
+                       withProperties:(NSDictionary *)properties
+                        bytesExpected:(unsigned long long)bytesExpected
+                      completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
+                        progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock
+{
+    [self.session.objectConverter convertProperties:properties forObjectTypeId:kCMISPropertyObjectTypeIdValueDocument completionBlock:^(CMISProperties *convertedProperties, NSError *error){
+        if (nil == convertedProperties)
+        {
+            log(@"Could not convert properties: %@", error.description);
+            if (completionBlock)
+            {
+                completionBlock(nil, [CMISErrors cmisError:error withCMISErrorCode:kCMISErrorCodeRuntime]);
+            }
+        }
+        else
+        {
+            [self.binding.objectService createDocumentFromInputStream:inputStream
+                                                         withMimeType:mimeType
+                                                       withProperties:convertedProperties
+                                                             inFolder:self.identifier
+                                                        bytesExpected:bytesExpected
+                                                      completionBlock:completionBlock
+                                                        progressBlock:progressBlock];
+        }
+    }];
+}
+
+
 - (void)deleteTreeWithDeleteAllVersions:(BOOL)deleteAllversions
                            withUnfileObjects:(CMISUnfileObject)unfileObjects
                        withContinueOnFailure:(BOOL)continueOnFailure

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISRequest.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISRequest.h?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISRequest.h (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISRequest.h Thu Feb  7 09:52:52 2013
@@ -23,7 +23,7 @@
 
 @interface CMISRequest : NSObject
 
-@property (nonatomic, weak) CMISHttpRequest *httpRequest;
+@property (nonatomic, weak) id httpRequest;
 @property (nonatomic, readonly, getter = isCancelled) BOOL cancelled;
 
 - (void)cancel;

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISRequest.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISRequest.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISRequest.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISRequest.m Thu Feb  7 09:52:52 2013
@@ -18,7 +18,6 @@
  */
 
 #import "CMISRequest.h"
-#import "CMISHttpRequest.h"
 
 @interface CMISRequest ()
 
@@ -39,11 +38,12 @@
     [self.httpRequest cancel];
 }
 
-- (void)setHttpRequest:(CMISHttpRequest *)httpRequest
+- (void)setHttpRequest:(id)httpRequest
 {
     _httpRequest = httpRequest;
     
-    if (self.isCancelled) {
+    if (self.isCancelled && [httpRequest respondsToSelector:@selector(cancel)])
+    {
         [httpRequest cancel];
     }
 }

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISSession.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISSession.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISSession.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Client/CMISSession.m Thu Feb  7 09:52:52 2013
@@ -28,6 +28,8 @@
 #import "CMISOperationContext.h"
 #import "CMISPagedResult.h"
 #import "CMISTypeDefinition.h"
+#import "CMISNetworkProvider.h"
+#import "CMISDefaultNetworkProvider.h"
 
 @interface CMISSession ()
 @property (nonatomic, strong, readwrite) CMISObjectConverter *objectConverter;
@@ -106,6 +108,11 @@
                                                                                                              andPassword:password];
         }
 
+        if (self.sessionParameters.networkProvider == nil)
+        {
+            self.sessionParameters.networkProvider = [[CMISDefaultNetworkProvider alloc] init];
+        }
+        
         // create the binding the session will use
         CMISBindingFactory *bindingFactory = [[CMISBindingFactory alloc] init];
         self.binding = [bindingFactory bindingWithParameters:sessionParameters];

Added: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISNetworkProvider.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISNetworkProvider.h?rev=1443376&view=auto
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISNetworkProvider.h (added)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISNetworkProvider.h Thu Feb  7 09:52:52 2013
@@ -0,0 +1,86 @@
+/*
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ 
+ http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+typedef enum {
+    HTTP_GET,
+    HTTP_POST,
+    HTTP_PUT,
+    HTTP_DELETE
+} CMISHttpRequestMethod;
+
+@class CMISBindingSession, CMISRequest, CMISHttpResponse;
+
+
+@protocol CMISNetworkProvider <NSObject>
+
+- (void)invoke:(NSURL *)url
+withHttpMethod:(CMISHttpRequestMethod)httpRequestMethod
+   withSession:(CMISBindingSession *)session
+          body:(NSData *)body
+       headers:(NSDictionary *)additionalHeaders
+completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock;
+
+- (void)invoke:(NSURL *)url
+withHttpMethod:(CMISHttpRequestMethod)httpRequestMethod
+   withSession:(CMISBindingSession *)session
+   inputStream:(NSInputStream *)inputStream
+       headers:(NSDictionary *)additionalHeaders
+completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock;
+
+
+- (void)invoke:(NSURL *)url withHttpMethod:(CMISHttpRequestMethod)httpRequestMethod
+   withSession:(CMISBindingSession *)session
+   inputStream:(NSInputStream *)inputStream
+       headers:(NSDictionary *)additionalHeaders
+ bytesExpected:(unsigned long long)bytesExpected
+completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock
+ progressBlock:(void (^)(unsigned long long bytesDownloaded, unsigned long long bytesTotal))progressBlock
+ requestObject:(CMISRequest *)requestObject;
+
+- (void)invoke:(NSURL *)url
+withHttpMethod:(CMISHttpRequestMethod)httpRequestMethod
+   withSession:(CMISBindingSession *)session
+  outputStream:(NSOutputStream *)outputStream
+ bytesExpected:(unsigned long long)bytesExpected
+completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock
+ progressBlock:(void (^)(unsigned long long bytesDownloaded, unsigned long long bytesTotal))progressBlock
+ requestObject:(CMISRequest*)requestObject;
+
+
+
+- (void)invokeGET:(NSURL *)url
+      withSession:(CMISBindingSession *)session
+  completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock;
+
+
+- (void)invokePOST:(NSURL *)url
+       withSession:(CMISBindingSession *)session
+              body:(NSData *)body
+           headers:(NSDictionary *)additionalHeaders
+   completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock;
+
+- (void)invokePUT:(NSURL *)url
+      withSession:(CMISBindingSession *)session
+             body:(NSData *)body
+          headers:(NSDictionary *)additionalHeaders
+  completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock;
+
+- (void)invokeDELETE:(NSURL *)url
+         withSession:(CMISBindingSession *)session
+     completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock;
+
+
+
+@end

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISSessionParameters.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISSessionParameters.h?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISSessionParameters.h (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISSessionParameters.h Thu Feb  7 09:52:52 2013
@@ -21,6 +21,7 @@
 #import "CMISEnums.h"
 #import "CMISBinding.h"
 #import "CMISAuthenticationProvider.h"
+#import "CMISNetworkProvider.h"
 
 
 // Session param keys
@@ -56,6 +57,10 @@ extern NSString * const kCMISSessionPara
 
 @property (nonatomic, strong) id<CMISAuthenticationProvider> authenticationProvider;
 
+// Network I/O
+@property (nonatomic, strong) id<CMISNetworkProvider> networkProvider;
+
+
 - (id)initWithBindingType:(CMISBindingType)bindingType;
 
 // Object storage methods

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISSessionParameters.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISSessionParameters.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISSessionParameters.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Common/CMISSessionParameters.m Thu Feb  7 09:52:52 2013
@@ -39,6 +39,7 @@ NSString * const kCMISSessionParameterMo
 @synthesize atomPubUrl = _atomPubUrl;
 @synthesize authenticationProvider = _authenticationProvider;
 @synthesize sessionData = _sessionData;
+@synthesize networkProvider = _networkProvider;
 
 - (id)init
 {

Added: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISDefaultNetworkProvider.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISDefaultNetworkProvider.h?rev=1443376&view=auto
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISDefaultNetworkProvider.h (added)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISDefaultNetworkProvider.h Thu Feb  7 09:52:52 2013
@@ -0,0 +1,20 @@
+/*
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ 
+ http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CMISNetworkProvider.h"
+
+@interface CMISDefaultNetworkProvider : NSObject <CMISNetworkProvider>
+
+@end

Added: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISDefaultNetworkProvider.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISDefaultNetworkProvider.m?rev=1443376&view=auto
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISDefaultNetworkProvider.m (added)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISDefaultNetworkProvider.m Thu Feb  7 09:52:52 2013
@@ -0,0 +1,223 @@
+/*
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ 
+ http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+
+#import "CMISDefaultNetworkProvider.h"
+#import "CMISAuthenticationProvider.h"
+#import "CMISErrors.h"
+#import "CMISHttpRequest.h"
+#import "CMISHttpDownloadRequest.h"
+#import "CMISHttpUploadRequest.h"
+#import "CMISRequest.h"
+#import "CMISSessionParameters.h"
+#import "CMISNetworkProvider.h"
+
+@interface CMISDefaultNetworkProvider ()
++ (NSMutableURLRequest *)createRequestForUrl:(NSURL *)url
+                              withHttpMethod:(CMISHttpRequestMethod)httpRequestMethod
+                                usingSession:(CMISBindingSession *)session;
+@end
+
+@implementation CMISDefaultNetworkProvider
+#pragma mark block based methods
+
+
+- (void)invoke:(NSURL *)url
+withHttpMethod:(CMISHttpRequestMethod)httpRequestMethod
+   withSession:(CMISBindingSession *)session
+          body:(NSData *)body
+       headers:(NSDictionary *)additionalHeaders
+completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock
+{
+    NSMutableURLRequest *urlRequest = [CMISDefaultNetworkProvider createRequestForUrl:url
+                                                     withHttpMethod:httpRequestMethod
+                                                       usingSession:session];
+    
+    [CMISHttpRequest startRequest:urlRequest
+                   withHttpMethod:httpRequestMethod
+                      requestBody:body
+                          headers:additionalHeaders
+           authenticationProvider:session.authenticationProvider
+                  completionBlock:completionBlock];
+}
+
+- (void)invoke:(NSURL *)url
+withHttpMethod:(CMISHttpRequestMethod)httpRequestMethod
+   withSession:(CMISBindingSession *)session
+   inputStream:(NSInputStream *)inputStream
+       headers:(NSDictionary *)additionalHeaders
+completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock
+{
+    NSMutableURLRequest *urlRequest = [CMISDefaultNetworkProvider createRequestForUrl:url
+                                                     withHttpMethod:httpRequestMethod
+                                                       usingSession:session];
+    
+    [CMISHttpUploadRequest startRequest:urlRequest
+                         withHttpMethod:httpRequestMethod
+                            inputStream:inputStream
+                                headers:additionalHeaders
+                          bytesExpected:0
+                 authenticationProvider:session.authenticationProvider
+                        completionBlock:completionBlock
+                          progressBlock:nil];
+}
+
+- (void)invoke:(NSURL *)url
+withHttpMethod:(CMISHttpRequestMethod)httpRequestMethod
+   withSession:(CMISBindingSession *)session
+   inputStream:(NSInputStream *)inputStream
+       headers:(NSDictionary *)additionalHeaders
+ bytesExpected:(unsigned long long)bytesExpected
+completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock
+ progressBlock:(void (^)(unsigned long long bytesDownloaded, unsigned long long bytesTotal))progressBlock
+ requestObject:(CMISRequest *)requestObject
+{
+    if (!requestObject.isCancelled) {
+        NSMutableURLRequest *urlRequest = [CMISDefaultNetworkProvider createRequestForUrl:url
+                                                         withHttpMethod:httpRequestMethod
+                                                           usingSession:session];
+        
+        CMISHttpUploadRequest *uploadRequest = [CMISHttpUploadRequest startRequest:urlRequest
+                                                                    withHttpMethod:httpRequestMethod
+                                                                       inputStream:inputStream
+                                                                           headers:additionalHeaders
+                                                                     bytesExpected:bytesExpected
+                                                            authenticationProvider:session.authenticationProvider
+                                                                   completionBlock:completionBlock
+                                                                     progressBlock:progressBlock];
+        requestObject.httpRequest = uploadRequest;
+    } else {
+        if (completionBlock) {
+            completionBlock(nil, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeCancelled
+                                             withDetailedDescription:@"Request was cancelled"]);
+        }
+    }
+}
+
+- (void)invoke:(NSURL *)url
+withHttpMethod:(CMISHttpRequestMethod)httpRequestMethod
+   withSession:(CMISBindingSession *)session
+  outputStream:(NSOutputStream *)outputStream
+ bytesExpected:(unsigned long long)bytesExpected
+completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock
+ progressBlock:(void (^)(unsigned long long bytesDownloaded, unsigned long long bytesTotal))progressBlock
+ requestObject:(CMISRequest *)requestObject
+{
+    if (!requestObject.isCancelled) {
+        NSMutableURLRequest *urlRequest = [CMISDefaultNetworkProvider createRequestForUrl:url
+                                                         withHttpMethod:HTTP_GET
+                                                           usingSession:session];
+        
+        CMISHttpDownloadRequest *downloadRequest = [CMISHttpDownloadRequest startRequest:urlRequest
+                                                                          withHttpMethod:httpRequestMethod
+                                                                            outputStream:outputStream
+                                                                           bytesExpected:bytesExpected
+                                                                  authenticationProvider:session.authenticationProvider
+                                                                         completionBlock:completionBlock
+                                                                           progressBlock:progressBlock];
+        requestObject.httpRequest = downloadRequest;
+    } else {
+        if (completionBlock) {
+            completionBlock(nil, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeCancelled
+                                             withDetailedDescription:@"Request was cancelled"]);
+            
+        }
+    }
+}
+
+- (void)invokeGET:(NSURL *)url
+      withSession:(CMISBindingSession *)session
+  completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock
+{
+    return [self invoke:url
+         withHttpMethod:HTTP_GET
+            withSession:session
+                   body:nil
+                headers:nil
+        completionBlock:completionBlock];
+}
+
+- (void)invokePOST:(NSURL *)url
+       withSession:(CMISBindingSession *)session
+              body:(NSData *)body
+           headers:(NSDictionary *)additionalHeaders
+   completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock
+{
+    return [self invoke:url
+         withHttpMethod:HTTP_POST
+            withSession:session
+                   body:body
+                headers:additionalHeaders
+        completionBlock:completionBlock];
+}
+
+- (void)invokePUT:(NSURL *)url
+      withSession:(CMISBindingSession *)session
+             body:(NSData *)body
+          headers:(NSDictionary *)additionalHeaders
+  completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock
+{
+    return [self invoke:url
+         withHttpMethod:HTTP_PUT
+            withSession:session
+                   body:body
+                headers:additionalHeaders
+        completionBlock:completionBlock];
+}
+
+- (void)invokeDELETE:(NSURL *)url
+         withSession:(CMISBindingSession *)session
+     completionBlock:(void (^)(CMISHttpResponse *httpResponse, NSError *error))completionBlock
+{
+    return [self invoke:url
+         withHttpMethod:HTTP_DELETE
+            withSession:session
+                   body:nil
+                headers:nil
+        completionBlock:completionBlock];
+}
+
+#pragma mark Helper methods
++ (NSMutableURLRequest *)createRequestForUrl:(NSURL *)url
+                              withHttpMethod:(CMISHttpRequestMethod)httpRequestMethod
+                                usingSession:(CMISBindingSession *)session
+{
+    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url
+                                                           cachePolicy:NSURLRequestReloadIgnoringCacheData
+                                                       timeoutInterval:60];
+    NSString *httpMethod;
+    switch (httpRequestMethod) {
+        case HTTP_GET:
+            httpMethod = @"GET";
+            break;
+        case HTTP_POST:
+            httpMethod = @"POST";
+            break;
+        case HTTP_DELETE:
+            httpMethod = @"DELETE";
+            break;
+        case HTTP_PUT:
+            httpMethod = @"PUT";
+            break;
+        default:
+            log(@"Invalid http request method: %d", httpRequestMethod);
+            return nil;
+    }
+    
+    [request setHTTPMethod:httpMethod];
+    log(@"HTTP %@: %@", httpMethod, [url absoluteString]);
+    
+    return request;
+}
+
+@end

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpRequest.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpRequest.h?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpRequest.h (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpRequest.h Thu Feb  7 09:52:52 2013
@@ -18,7 +18,8 @@
  */
 
 #import <Foundation/Foundation.h>
-#import "CMISHttpUtil.h"
+#import "CMISBindingSession.h"
+#import "CMISNetworkProvider.h"
 
 @class CMISAuthenticationProvider;
 

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpRequest.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpRequest.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpRequest.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpRequest.m Thu Feb  7 09:52:52 2013
@@ -18,7 +18,6 @@
  */
 
 #import "CMISHttpRequest.h"
-#import "CMISHttpUtil.h"
 #import "CMISHttpResponse.h"
 #import "CMISErrors.h"
 #import "CMISAuthenticationProvider.h"

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpResponse.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpResponse.h?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpResponse.h (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpResponse.h Thu Feb  7 09:52:52 2013
@@ -26,6 +26,10 @@
 @property (nonatomic, strong, readonly) NSData *data;
 
 + (CMISHttpResponse *)responseUsingURLHTTPResponse:(NSHTTPURLResponse *)HTTPURLResponse andData:(NSData *)data;
++ (CMISHttpResponse *)responseWithStatusCode:(int)statusCode
+                               statusMessage:(NSString *)message
+                                     headers:(NSDictionary *)headers
+                                responseData:(NSData *)data;
 
 - (NSString*)exception;
 - (NSString*)errorMessage;

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpResponse.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpResponse.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpResponse.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMIS/Utils/CMISHttpResponse.m Thu Feb  7 09:52:52 2013
@@ -43,6 +43,18 @@
     return httpResponse;
 }
 
++ (CMISHttpResponse *)responseWithStatusCode:(int)statusCode
+                               statusMessage:(NSString *)message
+                                     headers:(NSDictionary *)headers
+                                responseData:(NSData *)data
+{
+    CMISHttpResponse *httpResponse = [[CMISHttpResponse alloc] init];
+    httpResponse.statusCode = statusCode;
+    httpResponse.statusCodeMessage = message;
+    httpResponse.data = data;
+    return httpResponse;
+}
+
 
 - (NSString*)responseString
 {

Modified: chemistry/objectivecmis/branches/mdm/ObjectiveCMISTests/ObjectiveCMISTests.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/mdm/ObjectiveCMISTests/ObjectiveCMISTests.m?rev=1443376&r1=1443375&r2=1443376&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/mdm/ObjectiveCMISTests/ObjectiveCMISTests.m (original)
+++ chemistry/objectivecmis/branches/mdm/ObjectiveCMISTests/ObjectiveCMISTests.m Thu Feb  7 09:52:52 2013
@@ -120,7 +120,7 @@
             STAssertTrue([createdBy isEqualToString:@"System"], @"root folder should be created by System");
             
             NSString *modifiedBy = rootFolder.lastModifiedBy;
-            STAssertTrue([modifiedBy isEqualToString:@"System"], @"root folder should be modified by System");
+            STAssertNotNil(modifiedBy, @"modifiedBy should not be nil");
             
             NSDate *createdDate = rootFolder.creationDate;
             STAssertNotNil(createdDate, @"created date should not be nil");



Mime
View raw message