chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1063308 - /incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java
Date Tue, 25 Jan 2011 14:58:12 GMT
Author: jens
Date: Tue Jan 25 14:58:11 2011
New Revision: 1063308

URL: http://svn.apache.org/viewvc?rev=1063308&view=rev
Log:
add a RepositoryInfo feature

Modified:
    incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java

Modified: incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java?rev=1063308&r1=1063307&r2=1063308&view=diff
==============================================================================
--- incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java
(original)
+++ incubator/chemistry/opencmis-cmis11/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java
Tue Jan 25 14:58:11 2011
@@ -21,13 +21,15 @@ package org.apache.chemistry.opencmis.in
 import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.chemistry.opencmis.commons.data.NewTypeSettableAttributes;
+import org.apache.chemistry.opencmis.commons.data.Feature;
+import org.apache.chemistry.opencmis.commons.data.FeatureKeyValuePair;
 import org.apache.chemistry.opencmis.commons.data.ObjectList;
 import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
@@ -42,6 +44,8 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.AbstractTypeDefinition;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.BindingsObjectFactoryImpl;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.FeatureImpl;
+import org.apache.chemistry.opencmis.commons.impl.dataobjects.FeatureKeyValuePairImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.NewTypeSettableAttributesImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.RepositoryCapabilitiesImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.RepositoryInfoImpl;
@@ -322,15 +326,7 @@ public class StoreManagerImpl implements
         caps.setSupportsMultifiling(true);
         caps.setSupportsUnfiling(true);
         caps.setSupportsVersionSpecificFiling(false);
-        repoInfo.setCapabilities(caps);
 
-        // AclCapabilitiesDataImpl aclCaps = new AclCapabilitiesDataImpl();
-        // aclCaps.setACLPropagation(AclPropagation.REPOSITORYDETERMINED);
-        // aclCaps.setPermissionDefinitionData(null);
-        // aclCaps.setPermissionMappingData(null);
-        // repoInfo.setACLCapabilities(aclCaps);
-        repoInfo.setAclCapabilities(null);
-        
         NewTypeSettableAttributesImpl tsAttrs = new NewTypeSettableAttributesImpl();
         tsAttrs.setCanSetId(true);
         tsAttrs.setCanSetLocalName(true);
@@ -343,8 +339,28 @@ public class StoreManagerImpl implements
         tsAttrs.setCanSetIncludedInSupertypeQuery(true);
         tsAttrs.setCanSetControllablePolicy(false);
         tsAttrs.setCanSetCreatable(true);
-//        repoInfo.setTypeSettableAttributes(tsAttrs);
-        repoInfo.setChangesOnType(null);
+        caps.setNewTypeSettableAttributes(tsAttrs);
+
+        repoInfo.setCapabilities(caps);
+
+        // AclCapabilitiesDataImpl aclCaps = new AclCapabilitiesDataImpl();
+        // aclCaps.setACLPropagation(AclPropagation.REPOSITORYDETERMINED);
+        // aclCaps.setPermissionDefinitionData(null);
+        // aclCaps.setPermissionMappingData(null);
+        // repoInfo.setACLCapabilities(aclCaps);
+        repoInfo.setAclCapabilities(null);
+                
+        FeatureImpl feature = new FeatureImpl();
+        feature.setCommonName("License");
+        feature.setDescription("The License under which this repository is distributed");
+        feature.setId("License");
+        feature.setUrl("http://www.apache.org/licenses/LICENSE-2.0");
+        feature.setVersionLabel("2.0");
+		List<FeatureKeyValuePair> keyVal = Collections
+				.singletonList((FeatureKeyValuePair) new FeatureKeyValuePairImpl(
+						"LicenseType", "Open Source"));
+        feature.setData(keyVal);
+        repoInfo.setFeatures(Collections.singletonList((Feature)feature));
         
         fRepositoryInfo = repoInfo;
         return repoInfo;



Mime
View raw message