You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2013/08/04 16:52:12 UTC
svn commit: r1510195 - in /chemistry/dotcmis/trunk: ./ DotCMIS/Properties/
DotCMIS/binding/ DotCMIS/binding/atompub/ DotCMIS/client/
Author: fmui
Date: Sun Aug 4 14:52:12 2013
New Revision: 1510195
URL: http://svn.apache.org/r1510195
Log:
DotCMIS: a few quick fixes
Modified:
chemistry/dotcmis/trunk/DotCMIS/Properties/AssemblyInfo.cs
chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub-linkcache.cs
chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs
chemistry/dotcmis/trunk/DotCMIS/binding/binding-impl.cs
chemistry/dotcmis/trunk/DotCMIS/binding/converter.cs
chemistry/dotcmis/trunk/DotCMIS/binding/http.cs
chemistry/dotcmis/trunk/DotCMIS/client/client-intf.cs
chemistry/dotcmis/trunk/DotCMIS/client/client-objectfactory.cs
chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs
chemistry/dotcmis/trunk/README
Modified: chemistry/dotcmis/trunk/DotCMIS/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/Properties/AssemblyInfo.cs?rev=1510195&r1=1510194&r2=1510195&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/Properties/AssemblyInfo.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/Properties/AssemblyInfo.cs Sun Aug 4 14:52:12 2013
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("0.6.0.0")]
+[assembly: AssemblyFileVersion("0.6.0.0")]
Modified: chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub-linkcache.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub-linkcache.cs?rev=1510195&r1=1510194&r2=1510195&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub-linkcache.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub-linkcache.cs Sun Aug 4 14:52:12 2013
@@ -74,40 +74,44 @@ namespace DotCMIS.Binding.AtomPub
objCount = CacheSizeLinks;
}
+ string dictionaryLevelName = typeof(DictionaryCacheLevel).FullName;
+ string lruLevelName = typeof(LruCacheLevel).FullName;
+ string contentTypeLevelName = typeof(DictionaryCacheLevel).FullName;
+
linkCache = new Cache("Link Cache");
linkCache.Initialize(new string[] {
- typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=" + repCount, // repository
- typeof(LruCacheLevel).FullName + " " + LruCacheLevel.MaxEntries + "=" + objCount, // id
- typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=16", // rel
- typeof(ContentTypeCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=3,"
+ dictionaryLevelName + " " + DictionaryCacheLevel.Capacity + "=" + repCount.ToString(), // repository
+ lruLevelName + " " + LruCacheLevel.MaxEntries + "=" + objCount.ToString(), // id
+ dictionaryLevelName + " " + DictionaryCacheLevel.Capacity + "=16", // rel
+ contentTypeLevelName + " " + DictionaryCacheLevel.Capacity + "=3,"
+ DictionaryCacheLevel.SingleValue + "=true" // type
});
typeLinkCache = new Cache("Type Link Cache");
typeLinkCache.Initialize(new string[] {
- typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=" + repCount, // repository
- typeof(LruCacheLevel).FullName + " " + LruCacheLevel.MaxEntries + "=" + typeCount, // id
- typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=16", // rel
- typeof(ContentTypeCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=3,"
+ dictionaryLevelName + " " + DictionaryCacheLevel.Capacity + "=" + repCount.ToString(), // repository
+ lruLevelName + " " + LruCacheLevel.MaxEntries + "=" + typeCount.ToString(), // id
+ dictionaryLevelName + " " + DictionaryCacheLevel.Capacity + "=16", // rel
+ contentTypeLevelName + " " + DictionaryCacheLevel.Capacity + "=3,"
+ DictionaryCacheLevel.SingleValue + "=true"// type
});
collectionLinkCache = new Cache("Collection Link Cache");
collectionLinkCache.Initialize(new string[] {
- typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=" + repCount, // repository
- typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=8" // collection
+ dictionaryLevelName + " " + DictionaryCacheLevel.Capacity + "=" + repCount.ToString(), // repository
+ dictionaryLevelName + " " + DictionaryCacheLevel.Capacity + "=8" // collection
});
templateCache = new Cache("URI Template Cache");
templateCache.Initialize(new string[] {
- typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=" + repCount, // repository
- typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=6" // type
+ dictionaryLevelName + " " + DictionaryCacheLevel.Capacity + "=" + repCount.ToString(), // repository
+ dictionaryLevelName + " " + DictionaryCacheLevel.Capacity + "=6" // type
});
repositoryLinkCache = new Cache("Repository Link Cache");
repositoryLinkCache.Initialize(new string[] {
- typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=" + repCount, // repository
- typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=6" // rel
+ dictionaryLevelName + " " + DictionaryCacheLevel.Capacity + "=" + repCount.ToString(), // repository
+ dictionaryLevelName + " " + DictionaryCacheLevel.Capacity + "=6" // rel
});
}
Modified: chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs?rev=1510195&r1=1510194&r2=1510195&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/atompub/atompub.cs Sun Aug 4 14:52:12 2013
@@ -1789,11 +1789,11 @@ namespace DotCMIS.Binding.AtomPub
// get the content
if (offset != null && offset > Int32.MaxValue)
{
- throw new CmisInvalidArgumentException("Offset >" + Int32.MaxValue);
+ throw new CmisInvalidArgumentException("Offset >" + Int32.MaxValue.ToString());
}
if (length != null && length > Int32.MaxValue)
{
- throw new CmisInvalidArgumentException("Length >" + Int32.MaxValue);
+ throw new CmisInvalidArgumentException("Length >" + Int32.MaxValue.ToString());
}
HttpUtils.Response resp = HttpUtils.InvokeGET(url, Session, (int?)offset, (int?)length);
Modified: chemistry/dotcmis/trunk/DotCMIS/binding/binding-impl.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/binding-impl.cs?rev=1510195&r1=1510194&r2=1510195&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/binding-impl.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/binding-impl.cs Sun Aug 4 14:52:12 2013
@@ -363,9 +363,9 @@ namespace DotCMIS.Binding.Impl
throw new CmisRuntimeException("SPI class is not set!");
}
}
- catch (CmisBaseException ce)
+ catch (CmisBaseException)
{
- throw ce;
+ throw;
}
catch (Exception e)
{
Modified: chemistry/dotcmis/trunk/DotCMIS/binding/converter.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/converter.cs?rev=1510195&r1=1510194&r2=1510195&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/converter.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/converter.cs Sun Aug 4 14:52:12 2013
@@ -126,7 +126,10 @@ namespace DotCMIS.Binding
}
}
- return (T)s.Deserialize(new XmlNodeReader(element));
+ using (XmlNodeReader reader = new XmlNodeReader(element))
+ {
+ return (T)s.Deserialize(reader);
+ }
}
/// <summary>
@@ -1885,7 +1888,6 @@ namespace DotCMIS.Binding
}
else if (element.Children != null)
{
- List<XmlElement> children = new List<XmlElement>();
foreach (ICmisExtensionElement child in element.Children)
{
XmlElement xml = CreateXmlElement(doc, child);
Modified: chemistry/dotcmis/trunk/DotCMIS/binding/http.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/http.cs?rev=1510195&r1=1510194&r2=1510195&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/http.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/http.cs Sun Aug 4 14:52:12 2013
@@ -136,6 +136,19 @@ namespace DotCMIS.Binding.Impl
writer(requestStream);
requestStream.Close();
}
+ else
+ {
+#if __MonoCS__
+ //around for MONO HTTP DELETE issue
+ //http://stackoverflow.com/questions/11785597/monotouch-iphone-call-to-httpwebrequest-getrequeststream-connects-to-server
+ if (method == "DELETE")
+ {
+ conn.ContentLength = 0;
+ Stream requestStream = conn.GetRequestStream();
+ requestStream.Close();
+ }
+#endif
+ }
// connect
try
@@ -191,7 +204,7 @@ namespace DotCMIS.Binding.Impl
Stream = new BufferedStream(new CryptoStream(httpResponse.GetResponseStream(), new FromBase64Transform(), CryptoStreamMode.Read), 64 * 1024);
}
else
- {
+ {
Stream = new BufferedStream(httpResponse.GetResponseStream(), 64 * 1024);
}
}
Modified: chemistry/dotcmis/trunk/DotCMIS/client/client-intf.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/client/client-intf.cs?rev=1510195&r1=1510194&r2=1510195&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/client/client-intf.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/client/client-intf.cs Sun Aug 4 14:52:12 2013
@@ -1152,7 +1152,7 @@ namespace DotCMIS.Client
/// <remarks>
/// Since repositories are not obligated to add property ids to their
/// query result properties, this method might not always work as expected with
- /// some repositories. Use <see cref="this[string]"/> instead.
+ /// some repositories. Use <see cref="P:this[string]"/> instead.
/// </remarks>
IPropertyData GetPropertyById(string propertyId);
Modified: chemistry/dotcmis/trunk/DotCMIS/client/client-objectfactory.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/client/client-objectfactory.cs?rev=1510195&r1=1510194&r2=1510195&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/client/client-objectfactory.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/client/client-objectfactory.cs Sun Aug 4 14:52:12 2013
@@ -335,7 +335,7 @@ namespace DotCMIS.Client.Impl
case BaseTypeId.CmisRelationship:
return new Relationship(session, type, objectData, context);
default:
- throw new CmisRuntimeException("Unsupported type: " + objectData.BaseTypeId);
+ throw new CmisRuntimeException("Unsupported type: " + objectData.BaseTypeId.ToString());
}
}
Modified: chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs?rev=1510195&r1=1510194&r2=1510195&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs Sun Aug 4 14:52:12 2013
@@ -690,12 +690,7 @@ namespace DotCMIS.Client.Impl
public void RemoveFromFolder(IObjectId folderId)
{
- if (folderId == null || folderId.Id == null)
- {
- throw new ArgumentException("Folder Id must be set!");
- }
-
- Binding.GetMultiFilingService().RemoveObjectFromFolder(RepositoryId, ObjectId, folderId.Id, null);
+ Binding.GetMultiFilingService().RemoveObjectFromFolder(RepositoryId, ObjectId, folderId == null ? null : folderId.Id, null);
}
}
Modified: chemistry/dotcmis/trunk/README
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/README?rev=1510195&r1=1510194&r2=1510195&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/README (original)
+++ chemistry/dotcmis/trunk/README Sun Aug 4 14:52:12 2013
@@ -16,21 +16,26 @@ If you find a problem, please let us kno
Change log
----------
+DotCMIS 0.6:
+
+- Bug fixes.
+
+
DotCMIS 0.5:
-- Interoptability improvements.
+- Interoperability improvements.
- Added NTLM authentication.
DotCMIS 0.4:
-- Several bug and interoptability fixes.
+- Several bug and interoperability fixes.
DotCMIS 0.3:
- DotCMIS only requires the .NET Client Profile.
-- Several bug and interoptability fixes.
+- Several bug and interoperability fixes.
DotCMIS 0.2:
@@ -55,7 +60,7 @@ Known stumbling blocks
- Content is buffered in main memory when the Web Services binding is used.
That can cause problems with huge documents.
- The maxium document size can be controlled with the SessionParameter.MessageSize
+ The maximum document size can be controlled with the SessionParameter.MessageSize
parameter. The default is 4 MB. The absolute maximum is 2 GB.
=> Use the AtomPub binding whenever possible!