chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgr...@apache.org
Subject svn commit: r1589768 [1/2] - in /chemistry/objectivecmis/branches/browser-binding: ObjectiveCMIS.xcodeproj/ ObjectiveCMIS/Bindings/ ObjectiveCMIS/Bindings/AtomPub/ ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/ ObjectiveCMIS/Bindings/Browser/ ObjectiveC...
Date Thu, 24 Apr 2014 15:26:05 GMT
Author: lgross
Date: Thu Apr 24 15:26:04 2014
New Revision: 1589768

URL: http://svn.apache.org/r1589768
Log:
CMIS-790: Browser Binding: Mergerd with trunk (repository capabilites, move object)

Added:
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISCreatablePropertyTypes.h
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISCreatablePropertyTypes.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISNewTypeSettableAttributes.h
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISNewTypeSettableAttributes.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryCapabilities.h
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryCapabilities.m
Modified:
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS.xcodeproj/project.pbxproj
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubObjectService.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserDiscoveryService.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserObjectService.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserUtil.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/CMISObjectService.h
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFileableObject.h
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFileableObject.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFolder.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISSession.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISConstants.h
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISConstants.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISEnums.h
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryInfo.h
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Utils/CMISHttpUploadRequest.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Utils/CMISObjectConverter.h
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Utils/CMISObjectConverter.m
    chemistry/objectivecmis/branches/browser-binding/ObjectiveCMISTests/ObjectiveCMISTests.m

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS.xcodeproj/project.pbxproj
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS.xcodeproj/project.pbxproj?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS.xcodeproj/project.pbxproj (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS.xcodeproj/project.pbxproj Thu Apr 24 15:26:04 2014
@@ -215,6 +215,12 @@
 		BD5C9715162C11E3002DDC6E /* CMISHttpResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = BD5C9712162C11E3002DDC6E /* CMISHttpResponse.m */; };
 		BD70F11B17F4649B00AE2B0C /* CMISDocumentTypeDefinition.h in Headers */ = {isa = PBXBuildFile; fileRef = BD70F11917F4649B00AE2B0C /* CMISDocumentTypeDefinition.h */; };
 		BD70F11C17F4649B00AE2B0C /* CMISDocumentTypeDefinition.m in Sources */ = {isa = PBXBuildFile; fileRef = BD70F11A17F4649B00AE2B0C /* CMISDocumentTypeDefinition.m */; };
+		C945D35819092183008B01D1 /* CMISRepositoryCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = C945D35619092183008B01D1 /* CMISRepositoryCapabilities.h */; };
+		C945D35919092183008B01D1 /* CMISRepositoryCapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = C945D35719092183008B01D1 /* CMISRepositoryCapabilities.m */; };
+		C945D35E1909219C008B01D1 /* CMISCreatablePropertyTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = C945D35A1909219C008B01D1 /* CMISCreatablePropertyTypes.h */; };
+		C945D35F1909219C008B01D1 /* CMISCreatablePropertyTypes.m in Sources */ = {isa = PBXBuildFile; fileRef = C945D35B1909219C008B01D1 /* CMISCreatablePropertyTypes.m */; };
+		C945D3601909219C008B01D1 /* CMISNewTypeSettableAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = C945D35C1909219C008B01D1 /* CMISNewTypeSettableAttributes.h */; };
+		C945D3611909219C008B01D1 /* CMISNewTypeSettableAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = C945D35D1909219C008B01D1 /* CMISNewTypeSettableAttributes.m */; };
 		C94AB15F19003A5A00ACC3D4 /* CMISBrowserVersioningService.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B9C8D518DE3379001D5C1B /* CMISBrowserVersioningService.m */; };
 		C94AB17119065C7500ACC3D4 /* CMISNSDictionary+CMISUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = C94AB16F19065C7500ACC3D4 /* CMISNSDictionary+CMISUtil.h */; };
 		C94AB17219065C7500ACC3D4 /* CMISNSDictionary+CMISUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = C94AB17019065C7500ACC3D4 /* CMISNSDictionary+CMISUtil.m */; };
@@ -455,6 +461,12 @@
 		BD5C9712162C11E3002DDC6E /* CMISHttpResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; name = CMISHttpResponse.m; path = Utils/CMISHttpResponse.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
 		BD70F11917F4649B00AE2B0C /* CMISDocumentTypeDefinition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISDocumentTypeDefinition.h; path = Bindings/CMISDocumentTypeDefinition.h; sourceTree = "<group>"; };
 		BD70F11A17F4649B00AE2B0C /* CMISDocumentTypeDefinition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CMISDocumentTypeDefinition.m; path = Bindings/CMISDocumentTypeDefinition.m; sourceTree = "<group>"; };
+		C945D35619092183008B01D1 /* CMISRepositoryCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISRepositoryCapabilities.h; path = Common/CMISRepositoryCapabilities.h; sourceTree = "<group>"; };
+		C945D35719092183008B01D1 /* CMISRepositoryCapabilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CMISRepositoryCapabilities.m; path = Common/CMISRepositoryCapabilities.m; sourceTree = "<group>"; };
+		C945D35A1909219C008B01D1 /* CMISCreatablePropertyTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISCreatablePropertyTypes.h; path = Common/CMISCreatablePropertyTypes.h; sourceTree = "<group>"; };
+		C945D35B1909219C008B01D1 /* CMISCreatablePropertyTypes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CMISCreatablePropertyTypes.m; path = Common/CMISCreatablePropertyTypes.m; sourceTree = "<group>"; };
+		C945D35C1909219C008B01D1 /* CMISNewTypeSettableAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISNewTypeSettableAttributes.h; path = Common/CMISNewTypeSettableAttributes.h; sourceTree = "<group>"; };
+		C945D35D1909219C008B01D1 /* CMISNewTypeSettableAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CMISNewTypeSettableAttributes.m; path = Common/CMISNewTypeSettableAttributes.m; sourceTree = "<group>"; };
 		C94AB16F19065C7500ACC3D4 /* CMISNSDictionary+CMISUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "CMISNSDictionary+CMISUtil.h"; path = "Bindings/Browser/CMISNSDictionary+CMISUtil.h"; sourceTree = "<group>"; };
 		C94AB17019065C7500ACC3D4 /* CMISNSDictionary+CMISUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "CMISNSDictionary+CMISUtil.m"; path = "Bindings/Browser/CMISNSDictionary+CMISUtil.m"; sourceTree = "<group>"; };
 		C94AB17419065D7500ACC3D4 /* CMISTypeCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CMISTypeCache.h; path = Bindings/Browser/CMISTypeCache.h; sourceTree = "<group>"; };
@@ -698,6 +710,10 @@
 				752067F8156AC0FE00231A5D /* CMISExtensionElement.h */,
 				752067F9156AC0FE00231A5D /* CMISExtensionElement.m */,
 				4E3E14B116AFFB190057CE22 /* CMISNetworkProvider.h */,
+				C945D35A1909219C008B01D1 /* CMISCreatablePropertyTypes.h */,
+				C945D35B1909219C008B01D1 /* CMISCreatablePropertyTypes.m */,
+				C945D35C1909219C008B01D1 /* CMISNewTypeSettableAttributes.h */,
+				C945D35D1909219C008B01D1 /* CMISNewTypeSettableAttributes.m */,
 				828072F61515404F00EF635C /* CMISObjectData.h */,
 				828072F71515404F00EF635C /* CMISObjectData.m */,
 				258998DF18D73D900091BA96 /* CMISPrincipal.h */,
@@ -706,6 +722,8 @@
 				828072F91515404F00EF635C /* CMISProperties.m */,
 				828072FA1515404F00EF635C /* CMISPropertyData.h */,
 				828072FB1515404F00EF635C /* CMISPropertyData.m */,
+				C945D35619092183008B01D1 /* CMISRepositoryCapabilities.h */,
+				C945D35719092183008B01D1 /* CMISRepositoryCapabilities.m */,
 				828072FC1515404F00EF635C /* CMISRepositoryInfo.h */,
 				828072FD1515404F00EF635C /* CMISRepositoryInfo.m */,
 				828072FE1515404F00EF635C /* CMISSessionParameters.h */,
@@ -920,6 +938,7 @@
 				82C1C63F15358733009B7B5C /* CMISAtomEntryWriter.h in Headers */,
 				258998E518D73E1A0091BA96 /* CMISPrincipalParser.h in Headers */,
 				75C5E2F71559172B0065550A /* CMISAllowableActionsParser.h in Headers */,
+				C945D35E1909219C008B01D1 /* CMISCreatablePropertyTypes.h in Headers */,
 				75C8D0861559B7EA00B63D2B /* CMISAllowableActions.h in Headers */,
 				FE21296415946B94005234FE /* CMISAuthenticationProvider.h in Headers */,
 				8276E123155E34ED00344A29 /* CMISObjectId.h in Headers */,
@@ -948,10 +967,12 @@
 				58B9C8DC18DE3379001D5C1B /* CMISBrowserObjectService.h in Headers */,
 				82C1C63F15358733009B7BA7 /* CMISTypeDefinitionAtomEntryParser.h in Headers */,
 				82C1C63F15358733009B7BAB /* CMISPropertyDefinitionParser.h in Headers */,
+				C945D3601909219C008B01D1 /* CMISNewTypeSettableAttributes.h in Headers */,
 				752067F5156AC06300231A5D /* CMISExtensionData.h in Headers */,
 				752067FA156AC0FE00231A5D /* CMISExtensionElement.h in Headers */,
 				75206802156AE29900231A5D /* CMISAtomPubExtensionElementParser.h in Headers */,
 				FE417D5715761A0C009056AA /* CMISOperationContext.h in Headers */,
+				C945D35819092183008B01D1 /* CMISRepositoryCapabilities.h in Headers */,
 				FE417D5915761A0C009056AA /* CMISPagedResult.h in Headers */,
 				FE417D6315761A34009056AA /* CMISLinkCache.h in Headers */,
 				FE417D6515761A34009056AA /* CMISPropertyDefinition.h in Headers */,
@@ -1107,11 +1128,13 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				C945D35F1909219C008B01D1 /* CMISCreatablePropertyTypes.m in Sources */,
 				828072E61515403800EF635C /* CMISCollection.m in Sources */,
 				828072E81515403800EF635C /* CMISDocument.m in Sources */,
 				828072EA1515403800EF635C /* CMISFileableObject.m in Sources */,
 				828072EC1515403800EF635C /* CMISFolder.m in Sources */,
 				828072EE1515403800EF635C /* CMISObject.m in Sources */,
+				C945D35919092183008B01D1 /* CMISRepositoryCapabilities.m in Sources */,
 				828072F21515403800EF635C /* CMISSession.m in Sources */,
 				828073011515404F00EF635C /* CMISConstants.m in Sources */,
 				258998D618D73D160091BA96 /* CMISAclParser.m in Sources */,
@@ -1175,6 +1198,7 @@
 				82C1C63F15358733009B7BA9 /* CMISPropertyDefinitionParser.m in Sources */,
 				752067F6156AC06300231A5D /* CMISExtensionData.m in Sources */,
 				752067FB156AC0FE00231A5D /* CMISExtensionElement.m in Sources */,
+				C945D3611909219C008B01D1 /* CMISNewTypeSettableAttributes.m in Sources */,
 				75206803156AE29900231A5D /* CMISAtomPubExtensionElementParser.m in Sources */,
 				FE417D5815761A0C009056AA /* CMISOperationContext.m in Sources */,
 				FE417D5A15761A0C009056AA /* CMISPagedResult.m in Sources */,

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.m?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.m (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.m Thu Apr 24 15:26:04 2014
@@ -21,6 +21,7 @@
 #import "CMISAtomPubConstants.h"
 #import "CMISAtomCollection.h"
 #import "CMISLog.h"
+#import "CMISRepositoryCapabilities.h"
 
 @interface CMISRepositoryInfoParser ()
 
@@ -30,8 +31,7 @@
 @property (nonatomic, strong) NSMutableString *currentString;
 @property (nonatomic, strong) CMISAtomCollection *currentCollection;
 
-// TODO Temporary object, replace with CMISRepositoryCapabilities object or similar when available
-@property (nonatomic, strong) id currentCapabilities;
+@property (nonatomic, strong) CMISRepositoryCapabilities *currentCapabilities;
 
 @property (nonatomic, assign, getter = isParsingExtensionElement) BOOL parsingExtensionElement;
 @end
@@ -71,7 +71,7 @@
     
     if ([namespaceURI isEqualToString:kCMISNamespaceCmis]) {
         if ([elementName isEqualToString:kCMISCoreCapabilities]) {
-            self.currentCapabilities = [NSMutableDictionary dictionaryWithCapacity:14];
+            self.currentCapabilities = [[CMISRepositoryCapabilities alloc] init];
         }
     } else if ( ![namespaceURI isEqualToString:kCMISNamespaceCmis] && ![namespaceURI isEqualToString:kCMISNamespaceApp] 
               && ![namespaceURI isEqualToString:kCMISNamespaceAtom] && ![namespaceURI isEqualToString:kCMISNamespaceCmisRestAtom])  {
@@ -111,7 +111,7 @@
         } else if ([elementName isEqualToString:kCMISCoreCmisVersionSupported]) {
             self.currentRepositoryInfo.cmisVersionSupported = self.currentString;
         } else if ([elementName hasPrefix:_kCMISCoreCapabilityPrefix] && self.currentCapabilities) {
-            [self.currentCapabilities setValue:self.currentString forKeyPath:elementName];
+            [self.currentCapabilities setCapability:elementName value:self.currentString];
         } else if ([elementName isEqualToString:kCMISCoreCapabilities]) {
             self.currentRepositoryInfo.repositoryCapabilities = self.currentCapabilities;
             self.currentCapabilities = nil;
@@ -168,4 +168,5 @@
     [self.currentExtensions addObject:extensionElement];
 }
 
+
 @end

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubObjectService.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubObjectService.m?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubObjectService.m (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubObjectService.m Thu Apr 24 15:26:04 2014
@@ -524,6 +524,63 @@
     return request;
 }
 
+- (CMISRequest*)moveObject:(NSString *)objectId
+                fromFolder:(NSString *)sourceFolderId
+                  toFolder:(NSString *)targetFolderId
+           completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock
+{
+    // Validate params
+    if (!objectId) {
+        CMISLogError(@"Must provide an object id when moving it");
+        completionBlock(nil, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeObjectNotFound detailedDescription:nil]);
+        return nil;
+    }
+    
+    if (!sourceFolderId) {
+        CMISLogError(@"Must provide a source folder id when moving an object");
+        completionBlock(nil, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeObjectNotFound detailedDescription:nil]);
+        return nil;
+    }
+    
+    if (!targetFolderId) {
+        CMISLogError(@"Must provide a target folder id when moving an object");
+        completionBlock(nil, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeObjectNotFound detailedDescription:nil]);
+        return nil;
+    }
+    
+    // Build property for objectId
+    CMISPropertyData *objectIdPropertyData = [CMISPropertyData createPropertyForId:kCMISPropertyObjectId idValue:objectId];
+    CMISProperties *properties = [[CMISProperties alloc] init];
+    [properties addProperty:objectIdPropertyData];
+    
+    
+    CMISRequest *request = [[CMISRequest alloc] init];
+    // Get Down link
+    [self loadLinkForObjectId:targetFolderId
+                     relation:kCMISLinkRelationDown
+                         type:kCMISMediaTypeChildren
+                  cmisRequest:request
+              completionBlock:^(NSString *downLink, NSError *error) {
+                  if (error) {
+                      CMISLogError(@"Could not retrieve down link: %@", error.description);
+                      if (completionBlock) {
+                          completionBlock(nil, [CMISErrors cmisError:error cmisErrorCode:kCMISErrorCodeObjectNotFound]);
+                      }
+                  } else {
+                      
+                      downLink = [CMISURLUtil urlStringByAppendingParameter:kCMISParameterSourceFolderId value:sourceFolderId urlString:downLink];
+                      
+                      [self sendAtomEntryXmlToLink:downLink
+                                 httpRequestMethod:HTTP_POST
+                                        properties:properties
+                                       cmisRequest:request
+                                   completionBlock:completionBlock];
+                  }
+              }];
+    return request;
+}
+
+
 - (CMISRequest*)deleteTree:(NSString *)folderObjectId
                 allVersion:(BOOL)allVersions
              unfileObjects:(CMISUnfileObject)unfileObjects

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserDiscoveryService.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserDiscoveryService.m?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserDiscoveryService.m (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserDiscoveryService.m Thu Apr 24 15:26:04 2014
@@ -18,6 +18,7 @@
  */
 
 #import "CMISBrowserDiscoveryService.h"
+#import "CMISErrors.h"
 
 @implementation CMISBrowserDiscoveryService
 

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserObjectService.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserObjectService.m?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserObjectService.m (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserObjectService.m Thu Apr 24 15:26:04 2014
@@ -306,6 +306,16 @@
     @throw exception;
 }
 
+- (CMISRequest*)moveObject:(NSString *)objectId
+                fromFolder:(NSString *)sourceFolderId
+                  toFolder:(NSString *)targetFolderId
+           completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock
+{
+    NSString * message = [NSString stringWithFormat:@"%s is not implemented yet", __PRETTY_FUNCTION__];
+    NSException *exception = [NSException exceptionWithName:NSInvalidArgumentException reason:message userInfo:nil];
+    @throw exception;
+}
+
 - (CMISRequest*)deleteTree:(NSString *)folderObjectId
                 allVersion:(BOOL)allVersions
              unfileObjects:(CMISUnfileObject)unfileObjects

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserUtil.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserUtil.m?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserUtil.m (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/Browser/CMISBrowserUtil.m Thu Apr 24 15:26:04 2014
@@ -30,6 +30,8 @@
 #import "CMISSecondaryTypeDefinition.h"
 #import "CMISErrors.h"
 #import "CMISNSDictionary+CMISUtil.h"
+#import "CMISRepositoryCapabilities.h"
+#import "CMISObjectConverter.h"
 
 @implementation CMISBrowserUtil
 
@@ -59,7 +61,7 @@
             NSString *repositoryUrl = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONRepositoryUrl];
             NSString *rootFolderUrl = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONRootFolderUrl];
             
-            repoInfo.repositoryCapabilities = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONCapabilities]; //TODO should be own type instead of dictionary
+            repoInfo.repositoryCapabilities = [CMISBrowserUtil convertRepositoryCapabilities:[repo cmis_objectForKeyNotNull:kCMISBrowserJSONCapabilities]];
             //TOOD aclCapabilities
             repoInfo.latestChangeLogToken = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONLatestChangeLogToken];
             
@@ -73,7 +75,7 @@
             repoInfo.principalIdAnyone = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONPrincipalIdAnyone];
             
             //handle extensions
-            repoInfo.extensions = [CMISBrowserUtil convertExtensions:repo cmisKeys:[CMISBrowserConstants repositoryInfoKeys]];
+            repoInfo.extensions = [CMISObjectConverter convertExtensions:repo cmisKeys:[CMISBrowserConstants repositoryInfoKeys]];
             
             // store the repo and root folder URLs in the session (when the repoId matches)
             if ([repoInfo.identifier isEqualToString:bindingSession.repositoryId]) {
@@ -173,7 +175,7 @@
         }
         
         // handle extensions
-        typeDef.extensions = [CMISBrowserUtil convertExtensions:jsonDictionary cmisKeys:[CMISBrowserConstants typeKeys]];
+        typeDef.extensions = [CMISObjectConverter convertExtensions:jsonDictionary cmisKeys:[CMISBrowserConstants typeKeys]];
     } else {
         if (outError != NULL) *outError = [CMISErrors cmisError:serialisationError cmisErrorCode:kCMISErrorCodeRuntime];
         return nil;
@@ -303,7 +305,7 @@
                     objectData.renditions = [self renditionsFromArray:renditionsJson];
                     
                     // handle extensions
-                    objectData.extensions = [CMISBrowserUtil convertExtensions:dictionary cmisKeys:[CMISBrowserConstants objectKeys]];
+                    objectData.extensions = [CMISObjectConverter convertExtensions:dictionary cmisKeys:[CMISBrowserConstants objectKeys]];
                     
                     completionBlock(objectData, nil);
                 }
@@ -385,7 +387,7 @@
                     completionBlock(nil, error);
                 } else {
                     if (extJson){
-                        properties.extensions = [CMISBrowserUtil convertExtensions:extJson cmisKeys:[NSSet set]];
+                        properties.extensions = [CMISObjectConverter convertExtensions:extJson cmisKeys:[NSSet set]];
                     }
                     
                     completionBlock(properties, nil);
@@ -609,6 +611,26 @@
     }
 }
 
++ (CMISRepositoryCapabilities *)convertRepositoryCapabilities:(NSDictionary *)jsonDictionary
+{
+    if (!jsonDictionary){
+        return nil;
+    }
+    
+    CMISRepositoryCapabilities *result = [[CMISRepositoryCapabilities alloc] init];
+    for (NSString *capabilityKey in jsonDictionary) {
+        id value = [jsonDictionary cmis_objectForKeyNotNull:capabilityKey];
+        
+        if([[CMISConstants repositoryCapabilityKeys] containsObject:capabilityKey]) {
+            [result setCapability:capabilityKey value:value];
+        }
+    }
+    
+    result.extensions = [CMISObjectConverter convertExtensions:jsonDictionary cmisKeys:[CMISConstants repositoryCapabilityKeys]];
+    
+    return result;
+}
+
 + (void)retrieveTypeDefinitions:(NSArray *)objectTypeIds position:(NSInteger)position typeCache:(CMISTypeCache *)typeCache completionBlock:(void (^)(NSMutableArray *typeDefinitions, NSError *error))completionBlock
 {
     [typeCache typeDefinition:[objectTypeIds objectAtIndex:position]
@@ -666,7 +688,7 @@
         renditionData.width = [NSNumber numberWithLongLong:[[renditionJson cmis_objectForKeyNotNull:kCMISBrowserJSONRenditionWidth] longLongValue]];
         
         // handle extensions
-        renditionData.extensions = [CMISBrowserUtil convertExtensions:renditionJson cmisKeys:[CMISBrowserConstants renditionKeys]];
+        renditionData.extensions = [CMISObjectConverter convertExtensions:renditionJson cmisKeys:[CMISBrowserConstants renditionKeys]];
         
         [renditions addObject:renditionData];
     }
@@ -737,83 +759,11 @@
     // TODO default value
     
     // handle extensions
-    propDef.extensions = [CMISBrowserUtil convertExtensions:propertyDictionary cmisKeys:[CMISBrowserConstants propertyTypeKeys]];
+    propDef.extensions = [CMISObjectConverter convertExtensions:propertyDictionary cmisKeys:[CMISBrowserConstants propertyTypeKeys]];
     
     return propDef;
 }
 
-+ (NSArray *)convertExtensions:(NSDictionary *)source cmisKeys:(NSSet *)cmisKeys
-{
-    if (!source) {
-        return nil;
-    }
-    
-    NSMutableArray *extensions = nil; // array of CMISExtensionElement's
-    
-    for (NSString *key in source.keyEnumerator) {
-        if ([cmisKeys containsObject:key]) {
-            continue;
-        }
-        
-        if (!extensions) {
-            extensions = [[NSMutableArray alloc] init];
-        }
-        
-        id value = [source cmis_objectForKeyNotNull:key];
-        if ([value isKindOfClass:NSDictionary.class]) {
-            [extensions addObject:[[CMISExtensionElement alloc] initNodeWithName:key namespaceUri:nil attributes:nil children:[CMISBrowserUtil convertExtension:value]]];
-        } else if ([value isKindOfClass:NSArray.class]) {
-            [extensions addObjectsFromArray:[CMISBrowserUtil convertExtension: key fromArray:value]];
-        } else {
-            [extensions addObject:[[CMISExtensionElement alloc] initLeafWithName:key namespaceUri:nil attributes:nil value:value]];
-        }
-    }
-    return extensions;
-}
-
-+ (NSArray *)convertExtension:(NSDictionary *)dictionary
-{
-    if (!dictionary) {
-        return nil;
-    }
-    
-    NSMutableArray *extensions = [[NSMutableArray alloc] init]; // array of CMISExtensionElement's
-    
-    for (NSString *key in dictionary.keyEnumerator) {
-        id value = [dictionary cmis_objectForKeyNotNull:key];
-        if ([value isKindOfClass:NSDictionary.class]) {
-            [extensions addObject:[[CMISExtensionElement alloc] initNodeWithName:key namespaceUri:nil attributes:nil children:[CMISBrowserUtil convertExtension:value]]];
-        } else if ([value isKindOfClass:NSArray.class]) {
-            [extensions addObjectsFromArray:[CMISBrowserUtil convertExtension: key fromArray:value]];
-        } else {
-            [extensions addObject:[[CMISExtensionElement alloc] initLeafWithName:key namespaceUri:nil attributes:nil value:value]];
-        }
-    }
-    
-    return extensions;
-}
-
-+ (NSArray *)convertExtension:(NSString *)key fromArray:(NSArray *)array
-{
-    if (!array) {
-        return nil;
-    }
-    
-    NSMutableArray *extensions = [[NSMutableArray alloc] init]; // array of CMISExtensionElement's
-    
-    for (id element in array) {
-        if ([element isKindOfClass:NSDictionary.class]) {
-            [extensions addObject:[[CMISExtensionElement alloc] initNodeWithName:key namespaceUri:nil attributes:nil children:[CMISBrowserUtil convertExtension:element]]];
-        } else if ([element isKindOfClass:NSArray.class]) {
-            [extensions addObjectsFromArray:[CMISBrowserUtil convertExtension: key fromArray:element]];
-        } else {
-            [extensions addObject:[[CMISExtensionElement alloc] initLeafWithName:key namespaceUri:nil attributes:nil value:element]];
-        }
-    }
-    
-    return extensions;
-}
-
 // TODO could be moved to category
 + (void)performBlock:(void (^)(void))block
 {

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/CMISObjectService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/CMISObjectService.h?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/CMISObjectService.h (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Bindings/CMISObjectService.h Thu Apr 24 15:26:04 2014
@@ -163,7 +163,7 @@
  * uploads the file from the given path to the given folder.
  *
  * completionBlock - returns NSError nil if successful
-*/
+ */
 - (CMISRequest*)createDocumentFromFilePath:(NSString *)filePath
                                   mimeType:(NSString *)mimeType
                                 properties:(CMISProperties *)properties
@@ -185,6 +185,16 @@
                                 progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock;
 
 /**
+ * Moves the given object from the source folder to the target folder.
+ *
+ * completionBlock - returns NSError nil if successful
+ */
+- (CMISRequest*)moveObject:(NSString *)objectId
+                fromFolder:(NSString *)sourceFolderId
+                  toFolder:(NSString *)targetFolderId
+           completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock;
+
+/**
  * Deletes the given object.
  *
  * The allVersions parameter is currently ignored.

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFileableObject.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFileableObject.h?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFileableObject.h (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFileableObject.h Thu Apr 24 15:26:04 2014
@@ -38,5 +38,15 @@
 - (CMISRequest*)retrieveParentsWithOperationContext:(CMISOperationContext *)operationContext 
                             completionBlock:(void (^)(NSArray *parentFolders, NSError *error))completionBlock;
 
+/**
+ * Returns all the parents of this object as an array of CMISFolder objects with paging options
+ * CompletionBlock will return array or nil if unsuccessful
+ * CompletionBlock will return nil for root folder and non-fileable objects.
+ */
+- (CMISRequest*)moveFromFolderWithId:(NSString *)sourceFolderId
+                      toFolderWithId:(NSString *)targetFolderId
+                     completionBlock:(void (^)(CMISObject *object, NSError *error))completionBlock;
+
+
 
 @end

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFileableObject.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFileableObject.m?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFileableObject.m (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFileableObject.m Thu Apr 24 15:26:04 2014
@@ -47,4 +47,18 @@
                                              }];
 }
 
+- (CMISRequest *)moveFromFolderWithId:(NSString *)sourceFolderId
+                       toFolderWithId:(NSString *)targetFolderId
+                      completionBlock:(void (^)(CMISObject *, NSError *))completionBlock
+{
+    return [self.binding.objectService moveObject:self.identifier
+                                       fromFolder:sourceFolderId
+                                         toFolder:targetFolderId
+                                  completionBlock:^(CMISObjectData *objectData, NSError *error) {
+                                      
+                                      [self.session.objectConverter convertObject:objectData completionBlock:completionBlock];
+                                  }];
+}
+
+
 @end

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFolder.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFolder.m?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFolder.m (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISFolder.m Thu Apr 24 15:26:04 2014
@@ -75,11 +75,11 @@
 
 - (CMISRequest*)retrieveChildrenWithOperationContext:(CMISOperationContext *)operationContext completionBlock:(void (^)(CMISPagedResult *result, NSError *error))completionBlock
 {
-    __block CMISRequest *request = [[CMISRequest alloc] init];
+    CMISRequest *request = [[CMISRequest alloc] init];
     CMISFetchNextPageBlock fetchNextPageBlock = ^(int skipCount, int maxItems, CMISFetchNextPageBlockCompletionBlock pageBlockCompletionBlock)
     {
         // Fetch results through navigationService
-        request = [self.binding.navigationService retrieveChildren:self.identifier
+        CMISRequest * childrenRequest = [self.binding.navigationService retrieveChildren:self.identifier
                                                  orderBy:operationContext.orderBy
                                                   filter:operationContext.filterString
                                            relationships:operationContext.relationships
@@ -103,6 +103,9 @@
                                                  }];
                                              }
                                          }];
+        
+        // set the underlying request object on the object returned to the original caller
+        request.httpRequest = childrenRequest.httpRequest;
     };
 
     [CMISPagedResult pagedResultUsingFetchBlock:fetchNextPageBlock
@@ -120,18 +123,21 @@
 
 - (CMISRequest*)createFolder:(NSDictionary *)properties completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
 {
-    __block CMISRequest *request = [[CMISRequest alloc] init];
+    CMISRequest *request = [[CMISRequest alloc] init];
     [self.session.objectConverter convertProperties:properties
                                     forObjectTypeId:[properties objectForKey:kCMISPropertyObjectTypeId]
                                     completionBlock:^(CMISProperties *properties, NSError *error) {
                      if (error) {
                          completionBlock(nil, [CMISErrors cmisError:error cmisErrorCode:kCMISErrorCodeRuntime]);
                      } else {
-                         request = [self.binding.objectService createFolderInParentFolder:self.identifier
+                         CMISRequest *createRequest = [self.binding.objectService createFolderInParentFolder:self.identifier
                                                                      properties:properties
                                                                 completionBlock:^(NSString *objectId, NSError *error) {
                                                                     completionBlock(objectId, error);
                                                                 }];
+                         
+                         // set the underlying request object on the object returned to the original caller
+                         request.httpRequest = createRequest.httpRequest;
                      }
                  }];
     return request;
@@ -143,7 +149,7 @@
                            completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
                              progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock
 {
-    __block CMISRequest *request = [[CMISRequest alloc] init];
+    CMISRequest *request = [[CMISRequest alloc] init];
     [self.session.objectConverter convertProperties:properties
                                     forObjectTypeId:[properties objectForKey:kCMISPropertyObjectTypeId]
                                     completionBlock:^(CMISProperties *convertedProperties, NSError *error) {
@@ -153,12 +159,15 @@
                 completionBlock(nil, [CMISErrors cmisError:error cmisErrorCode:kCMISErrorCodeRuntime]);
             }
         } else {
-            request = [self.binding.objectService createDocumentFromFilePath:filePath
+            CMISRequest *createRequest = [self.binding.objectService createDocumentFromFilePath:filePath
                                                           mimeType:mimeType
                                                         properties:convertedProperties
                                                           inFolder:self.identifier
                                                    completionBlock:completionBlock
                                                      progressBlock:progressBlock];
+            
+            // set the underlying request object on the object returned to the original caller
+            request.httpRequest = createRequest.httpRequest;
         }
     }];
     return request;
@@ -171,7 +180,7 @@
                               completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
                                 progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock
 {
-    __block CMISRequest *request = [[CMISRequest alloc] init];
+    CMISRequest *request = [[CMISRequest alloc] init];
     [self.session.objectConverter convertProperties:properties forObjectTypeId:kCMISPropertyObjectTypeIdValueDocument completionBlock:^(CMISProperties *convertedProperties, NSError *error){
         if (nil == convertedProperties){
             CMISLogError(@"Could not convert properties: %@", error.description);
@@ -179,13 +188,16 @@
                 completionBlock(nil, [CMISErrors cmisError:error cmisErrorCode:kCMISErrorCodeRuntime]);
             }
         } else {
-            request = [self.binding.objectService createDocumentFromInputStream:inputStream
+            CMISRequest *createRequest = [self.binding.objectService createDocumentFromInputStream:inputStream
                                                              mimeType:mimeType
                                                            properties:convertedProperties
                                                              inFolder:self.identifier
                                                         bytesExpected:bytesExpected
                                                       completionBlock:completionBlock
                                                         progressBlock:progressBlock];
+            
+            // set the underlying request object on the object returned to the original caller
+            request.httpRequest = createRequest.httpRequest;
         }
     }];
     return request;

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISSession.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISSession.m?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISSession.m (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Client/CMISSession.m Thu Apr 24 15:26:04 2014
@@ -283,10 +283,10 @@
                                      operationContext:(CMISOperationContext *)operationContext
                                       completionBlock:(void (^)(CMISPagedResult *pagedResult, NSError *error))completionBlock
 {
-    __block CMISRequest *request = [[CMISRequest alloc] init];
+    CMISRequest *request = [[CMISRequest alloc] init];
     CMISFetchNextPageBlock fetchNextPageBlock = ^(int skipCount, int maxItems, CMISFetchNextPageBlockCompletionBlock pageBlockCompletionBlock){
         // Fetch results through discovery service
-       request = [self.binding.discoveryService query:statement
+       CMISRequest *queryRequest = [self.binding.discoveryService query:statement
                                                   searchAllVersions:searchAllVersion
                                                   relationships:operationContext.relationships
                                                   renditionFilter:operationContext.renditionFilterString
@@ -310,6 +310,9 @@
                                                           pageBlockCompletionBlock(result, nil);
                                                       }
                                                   }];
+        
+        // set the underlying request object on the object returned to the original caller
+        request.httpRequest = queryRequest.httpRequest;
     };
 
     [CMISPagedResult pagedResultUsingFetchBlock:fetchNextPageBlock
@@ -351,13 +354,13 @@
         [statement appendFormat:@" ORDER BY %@", operationContext.orderBy];
     }
     
-    __block CMISRequest *request = [[CMISRequest alloc] init];
+    CMISRequest *request = [[CMISRequest alloc] init];
     
     // Fetch block for paged results
     CMISFetchNextPageBlock fetchNextPageBlock = ^(int skipCount, int maxItems, CMISFetchNextPageBlockCompletionBlock pageBlockCompletionBlock)
     {
         // Fetch results through discovery service
-        request = [self.binding.discoveryService query:statement
+        CMISRequest *queryRequest = [self.binding.discoveryService query:statement
                                      searchAllVersions:searchAllVersion
                                          relationships:operationContext.relationships
                                        renditionFilter:operationContext.renditionFilterString
@@ -380,6 +383,9 @@
                                                           }];
                                  }
                              }];
+        
+        // set the underlying request object on the object returned to the original caller
+        request.httpRequest = queryRequest.httpRequest;
     };
     
     [CMISPagedResult pagedResultUsingFetchBlock:fetchNextPageBlock
@@ -421,18 +427,20 @@
             inFolder:(NSString *)folderObjectId
      completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
 {
-    __block CMISRequest *request = [[CMISRequest alloc] init];
+    CMISRequest *request = [[CMISRequest alloc] init];
     [self.objectConverter convertProperties:properties
                             forObjectTypeId:[properties objectForKey:kCMISPropertyObjectTypeId]
                             completionBlock:^(CMISProperties *convertedProperties, NSError *error) {
                                if (error) {
                                    completionBlock(nil, [CMISErrors cmisError:error cmisErrorCode:kCMISErrorCodeRuntime]);
                                } else {
-                                  request = [self.binding.objectService createFolderInParentFolder:folderObjectId
+                                  CMISRequest *createRequest = [self.binding.objectService createFolderInParentFolder:folderObjectId
                                                                                properties:convertedProperties
                                                                           completionBlock:^(NSString *objectId, NSError *error) {
                                                                               completionBlock(objectId, error);
                                                                           }];
+                                   // set the underlying request object on the object returned to the original caller
+                                   request.httpRequest = createRequest.httpRequest;
                                }
                            }];
     return request;
@@ -503,7 +511,7 @@
                    completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
                      progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock
 {
-    __block CMISRequest *request = [[CMISRequest alloc] init];
+    CMISRequest *request = [[CMISRequest alloc] init];
     [self.objectConverter convertProperties:properties
                             forObjectTypeId:[properties objectForKey:kCMISPropertyObjectTypeId]
                             completionBlock:^(CMISProperties *convertedProperties, NSError *error) {
@@ -513,12 +521,14 @@
                 completionBlock(nil, [CMISErrors cmisError:error cmisErrorCode:kCMISErrorCodeRuntime]);
             }
         } else {
-            request = [self.binding.objectService createDocumentFromFilePath:filePath
+            CMISRequest *createRequest = [self.binding.objectService createDocumentFromFilePath:filePath
                                                                     mimeType:mimeType
                                                                   properties:convertedProperties
                                                                     inFolder:folderObjectId
                                                              completionBlock:completionBlock
                                                                progressBlock:progressBlock];
+            // set the underlying request object on the object returned to the original caller
+            request.httpRequest = createRequest.httpRequest;
         }
     }];
     return request;
@@ -532,7 +542,7 @@
                       completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
                         progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock
 {
-    __block CMISRequest *request = [[CMISRequest alloc] init];
+    CMISRequest *request = [[CMISRequest alloc] init];
     [self.objectConverter convertProperties:properties
                             forObjectTypeId:[properties objectForKey:kCMISPropertyObjectTypeId]
                             completionBlock:^(CMISProperties *convertedProperties, NSError *error) {
@@ -542,13 +552,15 @@
                 completionBlock(nil, [CMISErrors cmisError:error cmisErrorCode:kCMISErrorCodeRuntime]);
             }
         } else {
-            request = [self.binding.objectService createDocumentFromInputStream:inputStream
+            CMISRequest *createRequest = [self.binding.objectService createDocumentFromInputStream:inputStream
                                                              mimeType:mimeType
                                                            properties:convertedProperties
                                                              inFolder:folderObjectId
                                                         bytesExpected:bytesExpected
                                                       completionBlock:completionBlock
                                                         progressBlock:progressBlock];
+            // set the underlying request object on the object returned to the original caller
+            request.httpRequest = createRequest.httpRequest;
         }
     }];
     return request;

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISConstants.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISConstants.h?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISConstants.h (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISConstants.h Thu Apr 24 15:26:04 2014
@@ -19,6 +19,8 @@
 
 #import <Foundation/Foundation.h>
 
+@interface CMISConstants : NSObject
+
 // Properties
 extern NSString * const kCMISPropertyObjectId;
 extern NSString * const kCMISPropertyName;
@@ -42,6 +44,7 @@ extern NSString * const kCMISPropertyBas
 extern NSString * const kCMISPropertyCheckinComment;
 extern NSString * const kCMISPropertySecondaryObjectTypeIds;
 extern NSString * const kCMISPropertyDescription;
+
 // Property values
 extern NSString * const kCMISPropertyObjectTypeIdValueDocument;
 extern NSString * const kCMISPropertyObjectTypeIdValueFolder;
@@ -51,9 +54,45 @@ extern NSString * const kCMISPropertyObj
 extern NSString * const kCMISPropertyObjectTypeIdValueSecondary;
 
 // Session cache keys
-
 extern NSString * const kCMISSessionKeyWorkspaces;
 
+// Repository capability keys
+extern NSString * const kCMISRepositoryCapabilityACL;
+extern NSString * const kCMISRepositoryAllVersionsSearchable;
+extern NSString * const kCMISRepositoryCapabilityChanges;
+extern NSString * const kCMISRepositoryCapabilityContentStreamUpdatability;
+extern NSString * const kCMISRepositoryCapabilityJoin;
+extern NSString * const kCMISRepositoryCapabilityQuery;
+extern NSString * const kCMISRepositoryCapabilityRenditions;
+extern NSString * const kCMISRepositoryCapabilityPWCSearchable;
+extern NSString * const kCMISRepositoryCapabilityPWCUpdatable;
+extern NSString * const kCMISRepositoryCapabilityGetDescendants;
+extern NSString * const kCMISRepositoryCapabilityGetFolderTree;
+extern NSString * const kCMISRepositoryCapabilityOrderBy;
+extern NSString * const kCMISRepositoryCapabilityMultifiling;
+extern NSString * const kCMISRepositoryCapabilityUnfiling;
+extern NSString * const kCMISRepositoryCapabilityVersionSpecificFiling;
+extern NSString * const kCMISRepositoryCapabilityPropertyTypes;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributes;
+
+// Repository capability new type settable attributes keys
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesId;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesLocalName;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesLocalNamespace;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesDisplayName;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesQueryName;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesDescription;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesCreateable;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesFileable;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesQueryable;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesFullTextIndexed;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesIncludedInSuperTypeQuery;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesControllablePolicy;
+extern NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesControllableAcl;
+
+// Repository capability createable property types key
+extern NSString * const kCMISRepositoryCapabilityCreateablePropertyTypesCanCreate;
+
 // URL parameters
 extern NSString * const kCMISParameterChangeToken;
 extern NSString * const kCMISParameterOverwriteFlag;
@@ -76,6 +115,7 @@ extern NSString * const kCMISParameterRe
 extern NSString * const kCMISParameterMajor;
 extern NSString * const kCMISParameterCheckin;
 extern NSString * const kCMISParameterCheckinComment;
+extern NSString * const kCMISParameterSourceFolderId;
 extern NSString * const kCMISParameterReturnVersion;
 extern NSString * const kCMISParameterTypeId;
 
@@ -89,4 +129,10 @@ extern NSString * const kCMISParameterVa
 //ContentStreamAllowed enum values
 extern NSString * const kCMISContentStreamAllowedValueRequired;
 extern NSString * const kCMISContentStreamAllowedValueAllowed;
-extern NSString * const kCMISContentStreamAllowedValueNotAllowed;
\ No newline at end of file
+extern NSString * const kCMISContentStreamAllowedValueNotAllowed;
+
++ (NSSet *)repositoryCapabilityKeys;
++ (NSSet *)repositoryCapabilityNewTypeSettableAttributesKeys;
++ (NSSet *)repositoryCapabilityCreateablePropertyTypesKeys;
+
+@end
\ No newline at end of file

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISConstants.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISConstants.m?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISConstants.m (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISConstants.m Thu Apr 24 15:26:04 2014
@@ -19,6 +19,12 @@
 
 #import "CMISConstants.h"
 
+static NSSet *_repositoryCapabilityKeys;
+static NSSet *_repositoryCapabilityNewTypeSettableAttributesKeys;
+static NSSet *_repositoryCapabilityCreateablePropertyTypesKeys;
+
+@implementation CMISConstants
+
 // Properties
 
 NSString * const kCMISPropertyObjectId = @"cmis:objectId";
@@ -58,6 +64,43 @@ NSString * const kCMISPropertyObjectType
 
 NSString * const kCMISSessionKeyWorkspaces = @"cmis_session_key_workspaces";
 
+// Repository capability keys
+NSString * const kCMISRepositoryCapabilityACL = @"capabilityACL";
+NSString * const kCMISRepositoryAllVersionsSearchable = @"capabilityAllVersionsSearchable";
+NSString * const kCMISRepositoryCapabilityChanges = @"capabilityChanges";
+NSString * const kCMISRepositoryCapabilityContentStreamUpdatability = @"capabilityContentStreamUpdatability";
+NSString * const kCMISRepositoryCapabilityJoin = @"capabilityJoin";
+NSString * const kCMISRepositoryCapabilityQuery = @"capabilityQuery";
+NSString * const kCMISRepositoryCapabilityRenditions = @"capabilityRenditions";
+NSString * const kCMISRepositoryCapabilityPWCSearchable = @"capabilityPWCSearchable";
+NSString * const kCMISRepositoryCapabilityPWCUpdatable = @"capabilityPWCUpdatable";
+NSString * const kCMISRepositoryCapabilityGetDescendants = @"capabilityGetDescendants";
+NSString * const kCMISRepositoryCapabilityGetFolderTree = @"capabilityGetFolderTree";
+NSString * const kCMISRepositoryCapabilityOrderBy = @"capabilityOrderBy";
+NSString * const kCMISRepositoryCapabilityMultifiling = @"capabilityMultifiling";
+NSString * const kCMISRepositoryCapabilityUnfiling = @"capabilityUnfiling";
+NSString * const kCMISRepositoryCapabilityVersionSpecificFiling = @"capabilityVersionSpecificFiling";
+NSString * const kCMISRepositoryCapabilityPropertyTypes = @"capabilityCreatablePropertyTypes";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributes = @"capabilityNewTypeSettableAttributes";
+
+// Repository capability new type settable attributes keys
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesId = @"id";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesLocalName = @"localName";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesLocalNamespace = @"localNamespace";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesDisplayName = @"displayName";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesQueryName = @"queryName";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesDescription = @"description";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesCreateable = @"creatable";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesFileable = @"fileable";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesQueryable = @"queryable";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesFullTextIndexed = @"fulltextIndexed";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesIncludedInSuperTypeQuery = @"includedInSupertypeQuery";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesControllablePolicy = @"controllablePolicy";
+NSString * const kCMISRepositoryCapabilityNewTypeSettableAttributesControllableAcl = @"controllableACL";
+
+// Repository capability createable property types key
+NSString * const kCMISRepositoryCapabilityCreateablePropertyTypesCanCreate = @"canCreate";
+
 // Parameters
 NSString * const kCMISParameterChangeToken = @"changeToken";
 NSString * const kCMISParameterOverwriteFlag = @"overwriteFlag";
@@ -80,6 +123,7 @@ NSString * const kCMISParameterRelativeP
 NSString * const kCMISParameterMajor = @"major";
 NSString * const kCMISParameterCheckin = @"checkin";
 NSString * const kCMISParameterCheckinComment = @"checkinComment";
+NSString * const kCMISParameterSourceFolderId = @"sourceFolderId";
 NSString * const kCMISParameterReturnVersion = @"returnVersion";
 NSString * const kCMISParameterTypeId = @"typeId";
 
@@ -94,3 +138,63 @@ NSString * const kCMISParameterValueRetu
 NSString * const kCMISContentStreamAllowedValueRequired = @"required";
 NSString * const kCMISContentStreamAllowedValueAllowed = @"allowed";
 NSString * const kCMISContentStreamAllowedValueNotAllowed = @"notallowed";
+
++ (NSSet *)repositoryCapabilityKeys
+{
+    if(!_repositoryCapabilityKeys) {
+        _repositoryCapabilityKeys = [NSSet setWithObjects:
+                                     kCMISRepositoryCapabilityContentStreamUpdatability,
+                                     kCMISRepositoryCapabilityChanges,
+                                     kCMISRepositoryCapabilityRenditions,
+                                     kCMISRepositoryCapabilityGetDescendants,
+                                     kCMISRepositoryCapabilityGetFolderTree,
+                                     kCMISRepositoryCapabilityMultifiling,
+                                     kCMISRepositoryCapabilityUnfiling,
+                                     kCMISRepositoryCapabilityVersionSpecificFiling,
+                                     kCMISRepositoryCapabilityPWCSearchable,
+                                     kCMISRepositoryCapabilityPWCUpdatable,
+                                     kCMISRepositoryAllVersionsSearchable,
+                                     kCMISRepositoryCapabilityOrderBy,
+                                     kCMISRepositoryCapabilityQuery,
+                                     kCMISRepositoryCapabilityJoin,
+                                     kCMISRepositoryCapabilityACL,
+                                     kCMISRepositoryCapabilityPropertyTypes,
+                                     kCMISRepositoryCapabilityNewTypeSettableAttributes,
+                                     nil];
+    }
+    return _repositoryCapabilityKeys;
+}
+
++ (NSSet *)repositoryCapabilityNewTypeSettableAttributesKeys
+{
+    if(!_repositoryCapabilityNewTypeSettableAttributesKeys) {
+        _repositoryCapabilityNewTypeSettableAttributesKeys = [NSSet setWithObjects:
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesId,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesLocalName,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesLocalNamespace,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesDisplayName,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesQueryName,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesDescription,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesCreateable,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesFileable,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesQueryable,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesFullTextIndexed,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesIncludedInSuperTypeQuery,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesControllablePolicy,
+                                                              kCMISRepositoryCapabilityNewTypeSettableAttributesControllableAcl,
+                                                              nil];
+    }
+    return _repositoryCapabilityNewTypeSettableAttributesKeys;
+}
+
++ (NSSet *)repositoryCapabilityCreateablePropertyTypesKeys
+{
+    if(!_repositoryCapabilityCreateablePropertyTypesKeys) {
+        _repositoryCapabilityCreateablePropertyTypesKeys = [NSSet setWithObjects:
+                                                              kCMISRepositoryCapabilityCreateablePropertyTypesCanCreate,
+                                                              nil];
+    }
+    return _repositoryCapabilityCreateablePropertyTypesKeys;
+}
+
+@end

Added: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISCreatablePropertyTypes.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISCreatablePropertyTypes.h?rev=1589768&view=auto
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISCreatablePropertyTypes.h (added)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISCreatablePropertyTypes.h Thu Apr 24 15:26:04 2014
@@ -0,0 +1,41 @@
+/*
+ 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 "CMISExtensionData.h"
+
+/**
+ * Holds the set of property data types for type creation and update.
+ *
+ * @cmis 1.1
+ */
+@interface CMISCreatablePropertyTypes : CMISExtensionData
+
+/**
+ * Returns the set of property data types that can used to create or update
+ * a type definition.
+ *
+ * @return the available set of property data types.
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, strong) NSSet *canCreate;
+
+- (void)setCreateablePropertyTypeFromDictionary:(NSDictionary *)dictionary;
+
+@end

Added: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISCreatablePropertyTypes.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISCreatablePropertyTypes.m?rev=1589768&view=auto
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISCreatablePropertyTypes.m (added)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISCreatablePropertyTypes.m Thu Apr 24 15:26:04 2014
@@ -0,0 +1,55 @@
+/*
+ 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 "CMISCreatablePropertyTypes.h"
+#import "CMISLog.h"
+#import "CMISObjectConverter.h"
+#import "CMISConstants.h"
+#import "CMISNSDictionary+CMISUtil.h"
+
+@implementation CMISCreatablePropertyTypes
+
+- (void)setCreateablePropertyTypeFromDictionary:(NSDictionary *)dictionary
+{
+    if([dictionary isKindOfClass:NSDictionary.class]){
+        
+        NSArray *canCreateJson = [dictionary cmis_objectForKeyNotNull:kCMISRepositoryCapabilityCreateablePropertyTypesCanCreate];
+        if(canCreateJson){
+            if([canCreateJson isKindOfClass:NSArray.class]){
+                NSMutableSet *canCreate = [[NSMutableSet alloc] init];
+                
+                for (id o in canCreateJson) {
+                    if(o){
+                        [canCreate addObject:o];
+                    }
+                }
+                
+                self.canCreate = canCreate;
+            } else {
+                CMISLogWarning(@"expected an array but was %@", canCreateJson.class);
+            }
+        }
+
+        self.extensions = [CMISObjectConverter convertExtensions:dictionary cmisKeys:[CMISConstants repositoryCapabilityCreateablePropertyTypesKeys]];
+    } else {
+        CMISLogWarning(@"expected a dictionary but was %@", dictionary.class);
+    }
+}
+
+@end

Modified: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISEnums.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISEnums.h?rev=1589768&r1=1589767&r2=1589768&view=diff
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISEnums.h (original)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISEnums.h Thu Apr 24 15:26:04 2014
@@ -148,6 +148,64 @@ typedef NS_ENUM(NSInteger, CMISContentSt
     CMISContentStreamUnknown
 };
 
+// Repository Capability ACL
+typedef NS_ENUM(NSInteger, CMISCapabilityAcl)
+{
+    CMISCapabilityAclNone,
+    CMISCapabilityAclDiscover,
+    CMISCapabilityAclManage
+};
+
+// Repository Capability Changes
+typedef NS_ENUM(NSInteger, CMISCapabilityChanges)
+{
+    CMISCapabilityChangesNone,
+    CMISCapabilityChangesObjectIdsOnly,
+    CMISCapabilityChangesProperties,
+    CMISCapabilityChangesAll
+};
+
+// Repository Capability Content Stream Updates
+typedef NS_ENUM(NSInteger, CMISCapabilityContentStreamUpdates)
+{
+    CMISCapabilityContentStreamUpdatesNone,
+    CMISCapabilityContentStreamUpdatesPwcOnly,
+    CMISCapabilityContentStreamUpdatesAnytime
+};
+
+// Repository Capability Join
+typedef NS_ENUM(NSInteger, CMISCapabilityJoin)
+{
+    CMISCapabilityJoinNone,
+    CMISCapabilityJoinInnerOnly,
+    CMISCapabilityJoinInnerAndOuter
+};
+
+// Repository Capability Query
+typedef NS_ENUM(NSInteger, CMISCapabilityQuery)
+{
+    CMISCapabilityQueryNone,
+    CMISCapabilityQueryMetaDataOnly,
+    CMISCapabilityQueryFullTextOnly,
+    CMISCapabilityQueryBothSeparate,
+    CMISCapabilityQueryBothCombined
+};
+
+// Repository Capability Renditions
+typedef NS_ENUM(NSInteger, CMISCapabilityRenditions)
+{
+    CMISCapabilityRenditionsNone,
+    CMISCapabilityRenditionsRead
+};
+
+// Repository Capability Order By
+typedef NS_ENUM(NSInteger, CMISCapabilityOrderBy)
+{
+    CMISCapabilityOrderByNone,
+    CMISCapabilityOrderByCommon,
+    CMISCapabilityOrderByCustom
+};
+
 // ReturnVersion
 typedef NS_ENUM(NSInteger, CMISReturnVersion)
 {
@@ -165,4 +223,4 @@ typedef NS_ENUM(NSInteger, CMISReturnVer
 + (CMISBaseType)enumForBaseId:(NSString *)baseId;
 + (CMISContentStreamAllowedType)enumForContentStreamAllowed:(NSString *)contentStreamAllowed;
 
-@end
\ No newline at end of file
+@end

Added: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISNewTypeSettableAttributes.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISNewTypeSettableAttributes.h?rev=1589768&view=auto
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISNewTypeSettableAttributes.h (added)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISNewTypeSettableAttributes.h Thu Apr 24 15:26:04 2014
@@ -0,0 +1,153 @@
+/*
+ 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 "CMISExtensionData.h"
+
+@interface CMISNewTypeSettableAttributes : CMISExtensionData
+
+/**
+ * Indicates if the "id" attribute can be set.
+ *
+ * @return <code>true</code> if the "id" attribute can be set,
+ *         <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetId;
+
+/**
+ * Indicates if the "localName" attribute can be set.
+ *
+ * @return <code>true</code> if the "localName" attribute can be set,
+ *         <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetLocalName;
+
+/**
+ * Indicates if the "localNamespace" attribute can be set.
+ *
+ * @return <code>true</code> if the "localNamespace" attribute can be set,
+ *         <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetLocalNamespace;
+
+/**
+ * Indicates if the "displayName" attribute can be set.
+ *
+ * @return <code>true</code> if the "displayName" attribute can be set,
+ *         <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetDisplayName;
+
+/**
+ * Indicates if the "queryName" attribute can be set.
+ *
+ * @return <code>true</code> if the "queryName" attribute can be set,
+ *         <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetQueryName;
+
+/**
+ * Indicates if the "description" attribute can be set.
+ *
+ * @return <code>true</code> if the "description" attribute can be set,
+ *         <code>false</code> otherwise
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetDescription;
+
+/**
+ * Indicates if the "creatable" attribute can be set.
+ *
+ * @return <code>true</code> if the "creatable" attribute can be set,
+ *         <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetCreatable;
+
+/**
+ * Indicates if the "fileable" attribute can be set.
+ *
+ * @return <code>true</code> if the "fileable" attribute can be set,
+ *         <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetFileable;
+
+/**
+ * Indicates if the "queryable" attribute can be set.
+ *
+ * @return <code>true</code> if the "queryable" attribute can be set,
+ *         <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetQueryable;
+
+/**
+ * Indicates if the "fulltextIndexed" attribute can be set.
+ *
+ * @return <code>true</code> if the "fulltextIndexed" attribute can be set,
+ *         <code>false</code> otherwise
+ */
+@property(nonatomic, assign) BOOL canSetFulltextIndexed;
+
+/**
+ * Indicates if the "includedInSupertypeQuery" attribute can be set.
+ *
+ * @return <code>true</code> if the "includedInSupertypeQuery" attribute can
+ *         be set, <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetIncludedInSupertypeQuery;
+
+/**
+ * Indicates if the "controllablePolicy" attribute can be set.
+ *
+ * @return <code>true</code> if the "controllablePolicy" attribute can be
+ *         set, <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetControllablePolicy;
+
+/**
+ * Indicates if the "controllableACL" attribute can be set.
+ *
+ * @return <code>true</code> if the "controllableACL" attribute can be set,
+ *         <code>false</code> otherwise
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, assign) BOOL canSetControllableAcl;
+
+- (void)setNewTypeSettableAttributesFromDictionary:(NSDictionary *)dictionary;
+
+@end

Added: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISNewTypeSettableAttributes.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISNewTypeSettableAttributes.m?rev=1589768&view=auto
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISNewTypeSettableAttributes.m (added)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISNewTypeSettableAttributes.m Thu Apr 24 15:26:04 2014
@@ -0,0 +1,51 @@
+/*
+ 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 "CMISNewTypeSettableAttributes.h"
+#import "CMISNSDictionary+CMISUtil.h"
+#import "CMISLog.h"
+#import "CMISConstants.h"
+#import "CMISObjectConverter.h"
+
+@implementation CMISNewTypeSettableAttributes
+
+- (void)setNewTypeSettableAttributesFromDictionary:(NSDictionary *)dictionary
+{
+    if([dictionary isKindOfClass:NSDictionary.class]){
+        self.canSetId = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesId];
+        self.canSetLocalName = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesLocalName];
+        self.canSetLocalNamespace = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesLocalNamespace];
+        self.canSetDisplayName = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesDisplayName];
+        self.canSetQueryName = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesQueryName];
+        self.canSetDescription = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesDescription];
+        self.canSetCreatable = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesCreateable];
+        self.canSetFileable = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesFileable];
+        self.canSetQueryable = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesQueryable];
+        self.canSetFulltextIndexed = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesFullTextIndexed];
+        self.canSetIncludedInSupertypeQuery = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesIncludedInSuperTypeQuery];
+        self.canSetControllablePolicy = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesControllablePolicy];
+        self.canSetControllableAcl = [dictionary cmis_boolForKey:kCMISRepositoryCapabilityNewTypeSettableAttributesControllableAcl];
+        
+        self.extensions = [CMISObjectConverter convertExtensions:dictionary cmisKeys:[CMISConstants repositoryCapabilityNewTypeSettableAttributesKeys]];
+    } else {
+        CMISLogWarning(@"expected a dictionary but was %@", dictionary.class);
+    }
+}
+
+@end

Added: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryCapabilities.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryCapabilities.h?rev=1589768&view=auto
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryCapabilities.h (added)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryCapabilities.h Thu Apr 24 15:26:04 2014
@@ -0,0 +1,132 @@
+/*
+ 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 <Foundation/Foundation.h>
+#import "CMISEnums.h"
+#import "CMISExtensionData.h"
+#import "CMISCreatablePropertyTypes.h"
+#import "CMISNewTypeSettableAttributes.h"
+
+@interface CMISRepositoryCapabilities : CMISExtensionData
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) BOOL allVersionsSearchable;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) CMISCapabilityAcl capabilityAcl;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) CMISCapabilityChanges capabilityChanges;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) CMISCapabilityContentStreamUpdates capabilityContentStreamUpdates;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) CMISCapabilityJoin capabilityJoin;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) CMISCapabilityQuery capabilityQuery;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) CMISCapabilityRenditions capabilityRendition;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign, getter = isPwcSearchable) BOOL pwcSearchable;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign, getter = isPwcUpdatable) BOOL pwcUpdatable;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) BOOL supportsGetDescendants;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) BOOL supportsGetFolderTree;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) CMISCapabilityOrderBy capabilityOrderBy;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) BOOL supportsMultifiling;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) BOOL supportsUnfiling;
+
+/**
+ *
+ * @cmis 1.0
+ */
+@property(nonatomic, assign) BOOL supportsVersionSpecificFiling;
+
+/**
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, strong) CMISCreatablePropertyTypes *creatablePropertyTypes;
+
+/**
+ *
+ * @cmis 1.1
+ */
+@property(nonatomic, strong) CMISNewTypeSettableAttributes *typeSettableAttributes;
+
+-(void) setCapability:(NSString*)capabilityKey value:(id)capabilityValue;
+
+@end

Added: chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryCapabilities.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryCapabilities.m?rev=1589768&view=auto
==============================================================================
--- chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryCapabilities.m (added)
+++ chemistry/objectivecmis/branches/browser-binding/ObjectiveCMIS/Common/CMISRepositoryCapabilities.m Thu Apr 24 15:26:04 2014
@@ -0,0 +1,132 @@
+/*
+ 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 "CMISRepositoryCapabilities.h"
+#import "CMISConstants.h"
+#import "CMISLog.h"
+
+@implementation CMISRepositoryCapabilities
+
+-(void) setCapability:(NSString*)capabilityKey value:(id)capabilityValue {
+    if ([capabilityKey isEqualToString:kCMISRepositoryAllVersionsSearchable]) {
+        self.allVersionsSearchable = [capabilityValue boolValue];
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityACL]) {
+        if ([capabilityValue isEqualToString:@"none"]) {
+            self.capabilityAcl = CMISCapabilityAclNone;
+        } else if ([capabilityValue isEqualToString:@"discover"]) {
+            self.capabilityAcl = CMISCapabilityAclDiscover;
+        } else if ([capabilityValue isEqualToString:@"manage"]) {
+            self.capabilityAcl = CMISCapabilityAclManage;
+        } else {
+            CMISLogWarning(@"WARNING: Unknown Repository Capability ACL Value");
+        }
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityChanges]) {
+        if ([capabilityValue isEqualToString:@"none"]) {
+            self.capabilityChanges = CMISCapabilityChangesNone;
+        } else if ([capabilityValue isEqualToString:@"objectidsonly"]) {
+            self.capabilityChanges = CMISCapabilityChangesObjectIdsOnly;
+        } else if ([capabilityValue isEqualToString:@"properties"]) {
+            self.capabilityChanges = CMISCapabilityChangesProperties;
+        } else if ([capabilityValue isEqualToString:@"all"]) {
+            self.capabilityChanges = CMISCapabilityChangesAll;
+        } else {
+            CMISLogWarning(@"WARNING: Unknown Repository Capability Changes Value");
+        }
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityContentStreamUpdatability]) {
+        if ([capabilityValue isEqualToString:@"none"]) {
+            self.capabilityContentStreamUpdates = CMISCapabilityContentStreamUpdatesNone;
+        } else if ([capabilityValue isEqualToString:@"anytime"]) {
+            self.capabilityContentStreamUpdates = CMISCapabilityContentStreamUpdatesAnytime;
+        } else if ([capabilityValue isEqualToString:@"pwconly"]) {
+            self.capabilityContentStreamUpdates = CMISCapabilityContentStreamUpdatesPwcOnly;
+        } else {
+            CMISLogWarning(@"WARNING: Unknown Repository Capability Updatability Value");
+        }
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityGetDescendants]) {
+        self.supportsGetDescendants = [capabilityValue boolValue];
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityGetFolderTree]) {
+        self.supportsGetFolderTree = [capabilityValue boolValue];
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityJoin]) {
+        if ([capabilityValue isEqualToString:@"none"]) {
+            self.capabilityJoin = CMISCapabilityJoinNone;
+        } else if ([capabilityValue isEqualToString:@"inneronly"]) {
+            self.capabilityJoin = CMISCapabilityJoinInnerOnly;
+        } else if ([capabilityValue isEqualToString:@"innerandouter"]) {
+            self.capabilityJoin = CMISCapabilityJoinInnerAndOuter;
+        } else {
+            CMISLogWarning(@"WARNING: Unknown Repository Capability Join Value");
+        }
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityQuery]) {
+        if ([capabilityValue isEqualToString:@"none"]) {
+            self.capabilityQuery = CMISCapabilityQueryNone;
+        } else if ([capabilityValue isEqualToString:@"metadataonly"]) {
+            self.capabilityQuery = CMISCapabilityQueryMetaDataOnly;
+        } else if ([capabilityValue isEqualToString:@"fulltextonly"]) {
+            self.capabilityQuery = CMISCapabilityQueryFullTextOnly;
+        } else if ([capabilityValue isEqualToString:@"bothseparate"]) {
+            self.capabilityQuery = CMISCapabilityQueryBothSeparate;
+        } else if ([capabilityValue isEqualToString:@"bothcombined"]) {
+            self.capabilityQuery = CMISCapabilityQueryBothCombined;
+        } else {
+            CMISLogWarning(@"WARNING: Unknown Repository Capability Query Value");
+        }
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityMultifiling]) {
+        self.supportsMultifiling = [capabilityValue boolValue];
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityOrderBy]) {
+        if ([capabilityValue isEqualToString:@"none"]) {
+            self.capabilityOrderBy = CMISCapabilityOrderByNone;
+        } else if ([capabilityValue isEqualToString:@"common"]) {
+            self.capabilityOrderBy = CMISCapabilityOrderByCommon;
+        } else if ([capabilityValue isEqualToString:@"custom"]) {
+            self.capabilityOrderBy = CMISCapabilityOrderByCustom;
+        } else {
+            CMISLogWarning(@"WARNING: Unknown Repository Capability Order By Value");
+        }
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityPropertyTypes]) {
+        if(capabilityValue) {
+            self.creatablePropertyTypes = [[CMISCreatablePropertyTypes alloc] init];
+            [self.creatablePropertyTypes setCreateablePropertyTypeFromDictionary:capabilityValue];
+        }
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityPWCSearchable]) {
+        self.pwcSearchable = [capabilityValue boolValue];
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityPWCUpdatable]) {
+        self.pwcUpdatable = [capabilityValue boolValue];
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityRenditions]) {
+        if ([capabilityValue isEqualToString:@"none"]) {
+            self.capabilityRendition = CMISCapabilityOrderByNone;
+        } else if ([capabilityValue isEqualToString:@"read"]) {
+            self.capabilityRendition = CMISCapabilityOrderByCommon;
+        } else {
+            CMISLogWarning(@"WARNING: Unknown Repository Renditions Value");
+        }
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityVersionSpecificFiling]) {
+        self.supportsVersionSpecificFiling = [capabilityValue boolValue];
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityNewTypeSettableAttributes]) {
+        if(capabilityValue) {
+            self.typeSettableAttributes = [[CMISNewTypeSettableAttributes alloc] init];
+            [self.typeSettableAttributes setNewTypeSettableAttributesFromDictionary:capabilityValue];
+        }
+    } else if ([capabilityKey isEqualToString:kCMISRepositoryCapabilityUnfiling]) {
+        self.supportsUnfiling = [capabilityValue boolValue];
+    } else {
+        CMISLogWarning(@"WARNING: Unknown Repository Capability Key");
+    }
+}
+
+@end



Mime
View raw message