From b582b5c2963ea0a569908b9082dc2031226045de Mon Sep 17 00:00:00 2001 From: Miltiadis Vasilakis Date: Thu, 1 Dec 2011 15:39:15 +0200 Subject: [PATCH] Metadata keys allow any non-empty string. --- pithos-apple-common | 2 +- pithos-macos/MetadataKeyFormatter.m | 8 +- pithos-macos/PithosObjectNodeInfoController.xib | 1167 +++++++++++++---------- 3 files changed, 659 insertions(+), 518 deletions(-) diff --git a/pithos-apple-common b/pithos-apple-common index 25cafff..6d3af6e 160000 --- a/pithos-apple-common +++ b/pithos-apple-common @@ -1 +1 @@ -Subproject commit 25cafffeaeaa994a761f9bacd5efc80308f3f60c +Subproject commit 6d3af6ef2539e07a14f3d860c4bb1ec063f9fe8a diff --git a/pithos-macos/MetadataKeyFormatter.m b/pithos-macos/MetadataKeyFormatter.m index 933e75f..de7dd98 100644 --- a/pithos-macos/MetadataKeyFormatter.m +++ b/pithos-macos/MetadataKeyFormatter.m @@ -56,13 +56,11 @@ return NO; } - unichar aChar; + unichar aChar; + NSCharacterSet *alphanumericCharacterSet = [NSCharacterSet alphanumericCharacterSet]; for (int i = 0; i < [partialString length]; i++) { aChar = [partialString characterAtIndex:i]; - if (!((aChar == '_') || - ((aChar >= '0') && (aChar <= '9')) || - ((aChar >= 'A') && (aChar <= 'Z')) || - ((aChar >= 'a') && (aChar <= 'z')))) { + if (!((aChar == '_') || ([alphanumericCharacterSet characterIsMember:aChar]))) { *newString = nil; return NO; } diff --git a/pithos-macos/PithosObjectNodeInfoController.xib b/pithos-macos/PithosObjectNodeInfoController.xib index 9c7e60d..defe044 100755 --- a/pithos-macos/PithosObjectNodeInfoController.xib +++ b/pithos-macos/PithosObjectNodeInfoController.xib @@ -3,12 +3,12 @@ 1060 10K549 - 1306 + 1938 1038.36 461.00 com.apple.InterfaceBuilder.CocoaPlugin - 1306 + 1938 YES @@ -36,11 +36,8 @@ com.apple.InterfaceBuilder.CocoaPlugin - YES - - YES - - + PluginDependencyRecalculationVersion + YES @@ -85,6 +82,7 @@ {{10, 592}, {32, 32}} + YES @@ -106,6 +104,7 @@ 270 {{47, 609}, {148, 17}} + YES @@ -143,6 +142,7 @@ 268 {{47, 589}, {60, 17}} + YES @@ -164,6 +164,7 @@ 265 {{190, 609}, {68, 17}} + YES @@ -188,6 +189,7 @@ 268 {{107, 592}, {151, 14}} + YES @@ -205,6 +207,7 @@ 14 {{0, 578}, {265, 5}} + {0, 0} @@ -236,6 +239,7 @@ 268 {{7, 563}, {72, 14}} + YES @@ -254,6 +258,7 @@ 270 {{84, 511}, {174, 14}} + YES @@ -275,6 +280,7 @@ 270 {{84, 541}, {174, 14}} + YES @@ -292,6 +298,7 @@ 270 {{84, 526}, {174, 14}} + YES @@ -309,6 +316,7 @@ 270 {{84, 496}, {174, 14}} + YES @@ -326,6 +334,7 @@ 270 {{84, 481}, {174, 14}} + YES @@ -343,6 +352,7 @@ 270 {{84, 466}, {174, 14}} + YES @@ -360,6 +370,7 @@ 268 {{12, 511}, {72, 14}} + YES @@ -378,6 +389,7 @@ 268 {{12, 541}, {72, 14}} + YES @@ -396,6 +408,7 @@ 268 {{12, 526}, {72, 14}} + YES @@ -414,6 +427,7 @@ 268 {{12, 496}, {72, 14}} + YES @@ -432,6 +446,7 @@ 268 {{12, 481}, {72, 14}} + YES @@ -450,6 +465,7 @@ 268 {{12, 79}, {114, 14}} + YES @@ -468,6 +484,7 @@ 268 {{12, 58}, {114, 14}} + YES @@ -486,6 +503,7 @@ 268 {{12, 37}, {114, 14}} + YES @@ -504,6 +522,7 @@ 268 {{12, 466}, {72, 14}} + YES @@ -522,6 +541,7 @@ 14 {{0, 453}, {265, 5}} + {0, 0} @@ -545,6 +565,7 @@ 268 {{7, 438}, {72, 14}} + YES @@ -563,6 +584,7 @@ 268 {{7, 101}, {91, 14}} + YES @@ -591,6 +613,7 @@ 4352 {243, 78} + YES @@ -598,6 +621,7 @@ 256 {243, 17} + @@ -606,6 +630,7 @@ -2147483392 {{224, 0}, {16, 17}} + @@ -702,6 +727,7 @@ {{1, 17}, {243, 78}} + @@ -712,6 +738,7 @@ -2147483392 {{224, 17}, {15, 102}} + _doScroller: @@ -723,6 +750,7 @@ -2147483392 {{1, 119}, {223, 15}} + 1 @@ -738,6 +766,7 @@ {{1, 0}, {243, 17}} + @@ -747,6 +776,7 @@ {{10, 334}, {245, 96}} + 562 @@ -761,6 +791,7 @@ 268 {{10, 314}, {18, 18}} + YES @@ -786,6 +817,7 @@ 268 {{27, 314}, {18, 18}} + YES @@ -811,6 +843,7 @@ 14 {{0, 304}, {265, 5}} + {0, 0} @@ -834,6 +867,7 @@ 14 {{0, 116}, {265, 5}} + {0, 0} @@ -857,6 +891,7 @@ -2147483634 {{0, 23}, {265, 5}} + {0, 0} @@ -880,6 +915,7 @@ 268 {{7, 289}, {126, 14}} + YES @@ -908,6 +944,7 @@ 4352 {243, 78} + YES @@ -915,6 +952,7 @@ 256 {243, 17} + @@ -923,6 +961,7 @@ -2147483392 {{224, 0}, {16, 17}} + @@ -1067,6 +1106,7 @@ {{1, 17}, {243, 78}} + @@ -1077,6 +1117,7 @@ -2147483392 {{224, 17}, {15, 102}} + _doScroller: @@ -1087,6 +1128,7 @@ -2147483392 {{1, 80}, {243, 15}} + 1 @@ -1102,6 +1144,7 @@ {{1, 0}, {243, 17}} + @@ -1111,6 +1154,7 @@ {{10, 146}, {245, 96}} + 562 @@ -1125,6 +1169,7 @@ 268 {{10, 126}, {18, 18}} + YES @@ -1147,6 +1192,7 @@ 268 {{27, 126}, {18, 18}} + YES @@ -1169,6 +1215,7 @@ 268 {{83, 248}, {61, 18}} + YES @@ -1197,6 +1244,7 @@ 270 {{84, 267}, {174, 14}} + YES @@ -1214,6 +1262,7 @@ 268 {{12, 267}, {72, 14}} + YES @@ -1232,6 +1281,7 @@ 292 {{10, 9}, {62, 17}} + YES @@ -1253,6 +1303,7 @@ 289 {{193, 9}, {62, 17}} + YES @@ -1275,6 +1326,7 @@ 270 {{131, 77}, {124, 19}} + YES @@ -1298,6 +1350,7 @@ 270 {{131, 56}, {124, 19}} + YES @@ -1316,6 +1369,7 @@ 270 {{131, 35}, {124, 19}} + YES @@ -1330,8 +1384,9 @@ - {{7, 11}, {265, 634}} + {265, 634} + {{0, 0}, {1280, 778}} @@ -1376,16 +1431,43 @@ value - MetadataKeyFormatter + NonEmptyStringFormatter SharingNameFormatter + + AsciiStringFormatter + YES + + window + + + + 107 + + + + metadataDictionaryController + + + + 319 + + + + sharingDictionaryController + + + + 320 + + displayPatternTitle1: self.node.displayName @@ -1406,30 +1488,6 @@ 105 - - window - - - - 107 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 130 - - value: node.icon @@ -1463,6 +1521,35 @@ + value: node.pithosObject.bytes + + + + + + value: node.pithosObject.bytes + value + node.pithosObject.bytes + + YES + + YES + NSNullPlaceholder + NSValueTransformerName + + + YES + - + BytesSizeTransformer + + + 2 + + + 323 + + + value: node.pithosContainer.name @@ -1494,146 +1581,65 @@ 173 - - add: - - - - 187 - - - - selectionIndexes: selectionIndexes - - - - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - - 2 - - - 249 - - - - sortDescriptors: sortDescriptors - - - - - - sortDescriptors: sortDescriptors - sortDescriptors - sortDescriptors - - 2 - - - 251 - - - - remove: - - - - 253 - - - - contentDictionary: node.pithosObject.metadata - - - - - - contentDictionary: node.pithosObject.metadata - contentDictionary - node.pithosObject.metadata - 2 - - - 256 - - - - formatter - - - - 258 - - - - enabled: canRemove - - - - - - enabled: canRemove - enabled - canRemove - 2 - - - 262 - - - target: node - + value: node.pithosObject.contentType + - + - target: node - target - node + value: node.pithosObject.contentType + value + node.pithosObject.contentType - NSSelectorName - applyInfo + NSNullPlaceholder + - 2 - 283 + 324 - target: node - + value: node.pithosObject.bytes + - + - target: node - target - node + value: node.pithosObject.bytes + value + node.pithosObject.bytes - NSSelectorName - refreshInfo + YES + + YES + NSNullPlaceholder + NSValueTransformerName + + + YES + - + BytesExtendedSizeTransformer + 2 - 285 + 325 - value: node.pithosObject.publicURI - + value: node.pithosObject.lastModified + - + - value: node.pithosObject.publicURI + value: node.pithosObject.lastModified value - node.pithosObject.publicURI + node.pithosObject.lastModified YES @@ -1644,311 +1650,412 @@ YES - - PublicURLTransformer + LastModifiedDateTransformer 2 - 294 + 326 - contentDictionary: node.pithosObject.sharing - + value: node.pithosObject.modifiedBy + - + - contentDictionary: node.pithosObject.sharing - contentDictionary - node.pithosObject.sharing + value: node.pithosObject.modifiedBy + value + node.pithosObject.modifiedBy - NSValueTransformerName - SharingDictionaryTransformer + NSNullPlaceholder + - 2 - 298 + 327 - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects + value: node.pithosObject.version + + + + + + value: node.pithosObject.version + value + node.pithosObject.version + + NSNullPlaceholder + - + 2 - 299 + 328 + + + + content: arrangedObjects + + + + + + content: arrangedObjects + content + arrangedObjects + 2 + + + 130 selectionIndexes: selectionIndexes - - - - - + + + + + selectionIndexes: selectionIndexes selectionIndexes selectionIndexes - + 2 - 301 + 249 sortDescriptors: sortDescriptors - - + + - - + + sortDescriptors: sortDescriptors sortDescriptors sortDescriptors - + 2 - 303 - - - - add: - - - - 311 - - - - remove: - - - - 312 + 251 - enabled: canRemove - - - - - - enabled: canRemove + enabled: node.pithosObject.allowedTo + + + + + + enabled: node.pithosObject.allowedTo enabled - canRemove + node.pithosObject.allowedTo + + NSValueTransformerName + AllowedToBoolTransformer + 2 - 316 + 966 - - metadataDictionaryController - + + value: arrangedObjects.key + + + + + value: arrangedObjects.key + value + arrangedObjects.key + + YES + + YES + NSConditionallySetsEditable + NSValidatesImmediately + + + YES + + + + + 2 + - 319 - - - - sharingDictionaryController - - - - 320 - - - - formatter - - - - 322 + 908 - value: node.pithosObject.bytes - - + value: arrangedObjects.value + + - - - value: node.pithosObject.bytes + + + value: arrangedObjects.value value - node.pithosObject.bytes + arrangedObjects.value YES YES - NSNullPlaceholder - NSValueTransformerName + NSConditionallySetsEditable + NSValidatesImmediately YES - - - BytesSizeTransformer + + 2 - 323 + 332 + + + + formatter + + + + 987 - value: node.pithosObject.contentType - + enabled: node.pithosObject.allowedTo + - + - value: node.pithosObject.contentType - value - node.pithosObject.contentType + enabled: node.pithosObject.allowedTo + enabled + node.pithosObject.allowedTo - NSNullPlaceholder - - + NSValueTransformerName + AllowedToBoolTransformer 2 - 324 + 963 - value: node.pithosObject.bytes - + enabled: canRemove + + + + + + enabled: canRemove + enabled + canRemove + 2 + + + 262 + + + + enabled2: node.pithosObject.allowedTo + - + - value: node.pithosObject.bytes - value - node.pithosObject.bytes + enabled2: node.pithosObject.allowedTo + enabled2 + node.pithosObject.allowedTo YES YES + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder NSNullPlaceholder NSValueTransformerName YES - - - BytesExtendedSizeTransformer + + + + + AllowedToBoolTransformer + 2 - 325 + 959 - value: node.pithosObject.lastModified - + enabled: node.sharingAccount + + + + + + enabled: node.sharingAccount + enabled + node.sharingAccount + + NSValueTransformerName + SharingAccountBoolTransformer + + 2 + + + 974 + + + + enabled: canRemove + + + + + + enabled: canRemove + enabled + canRemove + 2 + + + 316 + + + + enabled2: node.sharingAccount + - + - value: node.pithosObject.lastModified - value - node.pithosObject.lastModified + enabled2: node.sharingAccount + enabled2 + node.sharingAccount YES YES + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder NSNullPlaceholder NSValueTransformerName YES - - - LastModifiedDateTransformer + + + + + SharingAccountBoolTransformer + 2 - 326 + 976 - value: node.pithosObject.modifiedBy - - - - - - value: node.pithosObject.modifiedBy - value - node.pithosObject.modifiedBy - - NSNullPlaceholder - - - + content: arrangedObjects + + + + + + content: arrangedObjects + content + arrangedObjects 2 - 327 + 299 - value: node.pithosObject.version - - + selectionIndexes: selectionIndexes + + + + + + selectionIndexes: selectionIndexes + selectionIndexes + selectionIndexes + + 2 + + + 301 + + + + sortDescriptors: sortDescriptors + + - - - value: node.pithosObject.version - value - node.pithosObject.version - - NSNullPlaceholder - - - + + + sortDescriptors: sortDescriptors + sortDescriptors + sortDescriptors + 2 - 328 + 303 - value: node.isPublic - + enabled: node.sharingAccount + - + - value: node.isPublic - value - node.isPublic + enabled: node.sharingAccount + enabled + node.sharingAccount + + NSValueTransformerName + SharingAccountBoolTransformer + 2 - 330 + 978 value: arrangedObjects.value - - + + - - + + value: arrangedObjects.value value arrangedObjects.value @@ -1956,7 +2063,7 @@ YES YES - NSConditionallySetsEditable + NSConditionallySetsEnabled NSValidatesImmediately @@ -1968,7 +2075,7 @@ 2 - 332 + 334 @@ -2000,203 +2107,137 @@ 333 - - value: arrangedObjects.value - - - - - - value: arrangedObjects.value - value - arrangedObjects.value - - YES - - YES - NSConditionallySetsEnabled - NSValidatesImmediately - - - YES - - - - - 2 - + + formatter + + - 334 + 322 - value: node.pithosObject.contentEncoding - + value: node.isPublic + - + - value: node.pithosObject.contentEncoding + value: node.isPublic value - node.pithosObject.contentEncoding - - YES - - YES - NSConditionallySetsEditable - NSRaisesForNotApplicableKeys - NSValidatesImmediately - - - YES - - - - - + node.isPublic 2 - 360 + 330 - value: node.pithosObject.contentDisposition - + enabled: node.pithosObject.allowedTo + - + - value: node.pithosObject.contentDisposition - value - node.pithosObject.contentDisposition + enabled: node.pithosObject.allowedTo + enabled + node.pithosObject.allowedTo - YES - - YES - NSConditionallySetsEditable - NSRaisesForNotApplicableKeys - NSValidatesImmediately - - - YES - - - - + NSValueTransformerName + AllowedToBoolTransformer 2 - 367 + 956 - value: node.pithosObject.manifest - + value: node.pithosObject.publicURI + - + - value: node.pithosObject.manifest + value: node.pithosObject.publicURI value - node.pithosObject.manifest + node.pithosObject.publicURI YES YES - NSConditionallySetsEditable - NSRaisesForNotApplicableKeys - NSValidatesImmediately + NSNullPlaceholder + NSValueTransformerName YES - - - + - + PublicURLTransformer 2 - 373 + 294 - - value: arrangedObjects.key - - - - - - value: arrangedObjects.key - value - arrangedObjects.key - - YES - - YES - NSConditionallySetsEditable - NSValidatesImmediately - - - YES - - - - - 2 - + + add: + + - 908 + 187 + + + + remove: + + + + 253 - enabled: node.pithosObject.allowedTo - + contentDictionary: node.pithosObject.metadata + - + - enabled: node.pithosObject.allowedTo - enabled - node.pithosObject.allowedTo - - NSValueTransformerName - AllowedToBoolTransformer - + contentDictionary: node.pithosObject.metadata + contentDictionary + node.pithosObject.metadata 2 - 931 + 256 - enabled: node.pithosObject.allowedTo + target: node - enabled: node.pithosObject.allowedTo - enabled - node.pithosObject.allowedTo + target: node + target + node - NSValueTransformerName - AllowedToBoolTransformer + NSSelectorName + refreshInfo 2 - 934 + 285 enabled: node.pithosObject.allowedTo - + - + enabled: node.pithosObject.allowedTo enabled @@ -2208,51 +2249,35 @@ 2 - 956 + 934 - enabled2: node.pithosObject.allowedTo - + target: node + - + - enabled2: node.pithosObject.allowedTo - enabled2 - node.pithosObject.allowedTo + target: node + target + node - YES - - YES - NSMultipleValuesPlaceholder - NSNoSelectionPlaceholder - NSNotApplicablePlaceholder - NSNullPlaceholder - NSValueTransformerName - - - YES - - - - - AllowedToBoolTransformer - + NSSelectorName + applyInfo - 2 - 959 + 283 enabled: node.pithosObject.allowedTo - + - + enabled: node.pithosObject.allowedTo enabled @@ -2264,55 +2289,82 @@ 2 - 963 + 931 - enabled: node.pithosObject.allowedTo - + contentDictionary: node.pithosObject.sharing + - + - enabled: node.pithosObject.allowedTo - enabled - node.pithosObject.allowedTo + contentDictionary: node.pithosObject.sharing + contentDictionary + node.pithosObject.sharing NSValueTransformerName - AllowedToBoolTransformer + SharingDictionaryTransformer 2 - 966 + 298 + + + + add: + + + + 311 + + + + remove: + + + + 312 - enabled: node.sharingAccount + value: node.pithosObject.contentEncoding - enabled: node.sharingAccount - enabled - node.sharingAccount + value: node.pithosObject.contentEncoding + value + node.pithosObject.contentEncoding - NSValueTransformerName - SharingAccountBoolTransformer + YES + + YES + NSConditionallySetsEditable + NSRaisesForNotApplicableKeys + NSValidatesImmediately + + + YES + + + + 2 - 968 + 360 enabled: node.sharingAccount - + - + enabled: node.sharingAccount enabled @@ -2324,35 +2376,46 @@ 2 - 970 + 968 - enabled: node.sharingAccount - + value: node.pithosObject.contentDisposition + - + - enabled: node.sharingAccount - enabled - node.sharingAccount + value: node.pithosObject.contentDisposition + value + node.pithosObject.contentDisposition - NSValueTransformerName - SharingAccountBoolTransformer + YES + + YES + NSConditionallySetsEditable + NSRaisesForNotApplicableKeys + NSValidatesImmediately + + + YES + + + + 2 - 972 + 367 enabled: node.sharingAccount - + - + enabled: node.sharingAccount enabled @@ -2364,51 +2427,46 @@ 2 - 974 + 970 - enabled2: node.sharingAccount - + value: node.pithosObject.manifest + - + - enabled2: node.sharingAccount - enabled2 - node.sharingAccount + value: node.pithosObject.manifest + value + node.pithosObject.manifest YES YES - NSMultipleValuesPlaceholder - NSNoSelectionPlaceholder - NSNotApplicablePlaceholder - NSNullPlaceholder - NSValueTransformerName + NSConditionallySetsEditable + NSRaisesForNotApplicableKeys + NSValidatesImmediately YES - - - - - SharingAccountBoolTransformer + + + - 2 - 976 + 373 enabled: node.sharingAccount - + - + enabled: node.sharingAccount enabled @@ -2420,7 +2478,7 @@ 2 - 978 + 972 @@ -2428,7 +2486,9 @@ YES 0 - + + YES + @@ -3222,6 +3282,11 @@ Horizontal Line + + 984 + + + @@ -3335,6 +3400,7 @@ 93.IBPluginDependency 94.IBPluginDependency 95.IBPluginDependency + 984.IBPluginDependency 99.IBPluginDependency @@ -3451,6 +3517,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -3465,9 +3532,85 @@ - 978 + 987 + + + + YES + + AsciiStringFormatter + NSFormatter + + IBProjectSource + ./Classes/AsciiStringFormatter.h + + + + NonEmptyStringFormatter + NSFormatter + + IBProjectSource + ./Classes/NonEmptyStringFormatter.h + + + + PithosNodeInfoController + NSWindowController + + IBProjectSource + ./Classes/PithosNodeInfoController.h + + + + PithosObjectNodeInfoController + PithosNodeInfoController + + YES + + YES + metadataDictionaryController + sharingDictionaryController + + + YES + NSDictionaryController + NSDictionaryController + + + + YES + + YES + metadataDictionaryController + sharingDictionaryController + + + YES + + metadataDictionaryController + NSDictionaryController + + + sharingDictionaryController + NSDictionaryController + + + + + IBProjectSource + ./Classes/PithosObjectNodeInfoController.h + + + + SharingNameFormatter + NSFormatter + + IBProjectSource + ./Classes/SharingNameFormatter.h + + + - 0 IBCocoaFramework -- 1.7.10.4