chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r928720 - in /incubator/chemistry/trunk/opencmis/opencmis-client: opencmis-client-api/src/main/java/org/apache/opencmis/client/api/ opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/ opencmis-client-impl/src/main/j...
Date Mon, 29 Mar 2010 11:21:13 GMT
Author: fmui
Date: Mon Mar 29 11:21:13 2010
New Revision: 928720

URL: http://svn.apache.org/viewvc?rev=928720&view=rev
Log:
repository info cleanup

Added:
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/AclPermissionImpl.java
Removed:
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AclPermissionImpl.java
Modified:
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Ace.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Acl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/package.html
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryAclCapabilities.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryCapabilities.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryInfo.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AceImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AclImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentSessionImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/AclPermissionMappingImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryAclCapabilitiesImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryCapabilitiesImpl.java
    incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryInfoImpl.java

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Ace.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Ace.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Ace.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Ace.java
Mon Mar 29 11:21:13 2010
@@ -50,6 +50,6 @@ public interface Ace {
    * @return {@code true} if the ACE is directly assigned to the object is has been retrieved
from,
    *         {@code false} if it was inherited somehow
    */
-  boolean isDirect();
+  Boolean isDirect();
 
 }

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Acl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Acl.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Acl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/Acl.java
Mon Mar 29 11:21:13 2010
@@ -44,6 +44,6 @@ public interface Acl {
    * @return {@code true} if the ACL describes the permissions for the object it has been
retrieved
    *         for completely, {@code false} if other security constraints might be effective
as well
    */
-  boolean isExact();
+  Boolean isExact();
 
 }

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/package.html
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/package.html?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/package.html
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/package.html
Mon Mar 29 11:21:13 2010
@@ -49,30 +49,7 @@ causing the client to be blocked during 
 
 <h2>Usage of the API</h2>
 <p>
-The following example code illustrates how the session is obtained, used and finally released.
-<pre>
-  SessionFactory factory;
-  Session session;
-  try {
-    // acquire the session factory  
-    factory = (SessionFactory) new InitialContext().lookup(JNDI_LOOKUP_KEY);
-    // provide some basic configuration
-    HashMap parameters = new HashMap();
-    parameters.put(SessionParameter.USER, "user");
-    parameters.put(SessionParamter.PASSWORD, encode("password"));
-    parameters.put(SessionParameter.URL, "http://server:port/path");
-    // get the session
-    session = factory.getSession(parameters);
-    // sample: get the root folder and create a new top-level folder
-    Folder rootFolder = session.getRootFolder();
-    Document document = session.getObjectFactory().createDocument(rootFolder, "test");
-    document.setProperty("myProperty", "stringpropertyvalue");
-    document.save(); // create document with property
-  } // end try
-  finally {
-    //cleanup
-  }    
-</pre>
+See <a href="http://cwiki.apache.org/CMIS/opencmis-client-api.html">OpenCMIS Wiki</a>.
 </p>
 <p>
 @see org.opencmis.client.api.SessionFactory

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryAclCapabilities.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryAclCapabilities.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryAclCapabilities.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryAclCapabilities.java
Mon Mar 29 11:21:13 2010
@@ -23,6 +23,7 @@ import java.util.Map;
 
 import org.apache.opencmis.client.api.AclPermission;
 import org.apache.opencmis.commons.enums.AclPropagation;
+import org.apache.opencmis.commons.enums.SupportedPermissions;
 
 /**
  * Information about a repositories ACL capabilities, as provided by RepositoryInfo.
@@ -33,6 +34,8 @@ import org.apache.opencmis.commons.enums
  */
 public interface RepositoryAclCapabilities {
 
+  SupportedPermissions getSupportedPermissions();
+  
   AclPropagation getAclPropagation();
 
   List<AclPermission> getPermissions();

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryCapabilities.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryCapabilities.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryCapabilities.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryCapabilities.java
Mon Mar 29 11:21:13 2010
@@ -44,25 +44,25 @@ public interface RepositoryCapabilities 
 
   // Navigation
 
-  boolean isGetDescendantsSupported();
+  Boolean isGetDescendantsSupported();
 
-  boolean isGetFolderTreeSupported();
+  Boolean isGetFolderTreeSupported();
 
   // Filing
 
-  boolean isMultifilingSupported();
+  Boolean isMultifilingSupported();
 
-  boolean isUnfilingSupported();
+  Boolean isUnfilingSupported();
 
-  boolean isVersionSpecificFilingSupported();
+  Boolean isVersionSpecificFilingSupported();
 
   // Versioning
 
-  boolean isPwcUpdatableSupported();
+  Boolean isPwcUpdatableSupported();
 
-  boolean isPwcSearchableSupported();
+  Boolean isPwcSearchableSupported();
 
-  boolean isAllVersionsSearchableSupported();
+  Boolean isAllVersionsSearchableSupported();
 
   // Query
 

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryInfo.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryInfo.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryInfo.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-api/src/main/java/org/apache/opencmis/client/api/repository/RepositoryInfo.java
Mon Mar 29 11:21:13 2010
@@ -47,7 +47,7 @@ public interface RepositoryInfo {
 
   String getThinClientUri();
 
-  boolean changesIncomplete();
+  Boolean changesIncomplete();
 
   List<BaseObjectTypeIds> getChangesOnType();
 

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AceImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AceImpl.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AceImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AceImpl.java
Mon Mar 29 11:21:13 2010
@@ -32,9 +32,9 @@ public class AceImpl implements Ace, Ser
 
   private String principalId;
   private List<String> permissions;
-  private boolean isDirect;
+  private Boolean isDirect;
 
-  public AceImpl(String principalId, List<String> permissions, boolean isDirect) {
+  public AceImpl(String principalId, List<String> permissions, Boolean isDirect) {
     this.principalId = principalId;
     this.permissions = permissions;
     this.isDirect = isDirect;
@@ -48,7 +48,7 @@ public class AceImpl implements Ace, Ser
     return this.permissions;
   }
 
-  public boolean isDirect() {
+  public Boolean isDirect() {
     return this.isDirect;
   }
 }

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AclImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AclImpl.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AclImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/AclImpl.java
Mon Mar 29 11:21:13 2010
@@ -29,9 +29,9 @@ import org.apache.opencmis.client.api.Ac
 public class AclImpl implements Acl {
 
   private List<Ace> aces;
-  private boolean isExact;
+  private Boolean isExact;
 
-  public AclImpl(List<Ace> aces, boolean isExact) {
+  public AclImpl(List<Ace> aces, Boolean isExact) {
     this.aces = aces;
     this.isExact = isExact;
   }
@@ -40,7 +40,7 @@ public class AclImpl implements Acl {
     return this.aces;
   }
 
-  public boolean isExact() {
+  public Boolean isExact() {
     return this.isExact;
   }
 

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentSessionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentSessionImpl.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentSessionImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/PersistentSessionImpl.java
Mon Mar 29 11:21:13 2010
@@ -73,14 +73,6 @@ import org.apache.opencmis.commons.provi
 /**
  * Persistent model session.
  */
-/**
- * @author florianm
- *
- */
-/**
- * @author florianm
- * 
- */
 public class PersistentSessionImpl implements PersistentSession, Serializable {
 
   private static final OperationContext DEFAULT_CONTEXT = new OperationContextImpl(null,
false,

Added: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/AclPermissionImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/AclPermissionImpl.java?rev=928720&view=auto
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/AclPermissionImpl.java
(added)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/AclPermissionImpl.java
Mon Mar 29 11:21:13 2010
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ */
+package org.apache.opencmis.client.runtime.repository;
+
+import java.io.Serializable;
+
+import org.apache.opencmis.client.api.AclPermission;
+
+public class AclPermissionImpl implements AclPermission, Serializable {
+
+  /**
+   * serialization
+   */
+  private static final long serialVersionUID = -3820947135577677874L;
+
+  private String name;
+  private String description;
+
+  /**
+   * Constructor.
+   */
+  public AclPermissionImpl(String name, String description) {
+    this.name = name;
+    this.description = description;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.api.AclPermission#getName()
+   */
+  public String getName() {
+    return this.name;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.api.AclPermission#getDescription()
+   */
+  public String getDescription() {
+    return this.description;
+  }
+}

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/AclPermissionMappingImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/AclPermissionMappingImpl.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/AclPermissionMappingImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/AclPermissionMappingImpl.java
Mon Mar 29 11:21:13 2010
@@ -21,48 +21,61 @@ package org.apache.opencmis.client.runti
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.opencmis.client.api.AclPermission;
 import org.apache.opencmis.client.api.repository.AclPermissionMapping;
-import org.apache.opencmis.client.runtime.AclPermissionImpl;
 import org.apache.opencmis.commons.provider.PermissionMappingData;
 
-public class AclPermissionMappingImpl implements AclPermissionMapping,
-		Serializable {
-
-	/**
-	 * serialization
-	 */
-	private static final long serialVersionUID = -8682418497088386853L;
-
-	/*
-	 * permission mapping data (serializable)
-	 */
-	private PermissionMappingData pmd = null;
-
-	/*
-	 * permission list (serializable)
-	 */
-	private List<AclPermission> permissionList = null;
-
-	public AclPermissionMappingImpl(PermissionMappingData pmd) {
-		this.pmd = pmd;
-	}
-
-	public String getKey() {
-		return this.pmd.getKey();
-	}
-
-	public List<AclPermission> getPermissions() {
-		if (this.permissionList == null) {
-			this.permissionList = new ArrayList<AclPermission>();
-
-			for (String descr : this.pmd.getPermissions()) {
-				AclPermission acl = new AclPermissionImpl(descr);
-				this.permissionList.add(acl);
-			}
-		}
-		return permissionList;
-	}
+public class AclPermissionMappingImpl implements AclPermissionMapping, Serializable {
 
+  /**
+   * serialization
+   */
+  private static final long serialVersionUID = -8682418497088386853L;
+
+  /*
+   * permission mapping key (serializable)
+   */
+  private String key;
+
+  /*
+   * permission list (serializable)
+   */
+  private List<AclPermission> permissionList;
+
+  /**
+   * Constructor.
+   */
+  public AclPermissionMappingImpl(PermissionMappingData pmd, Map<String, AclPermission>
permissions) {
+    this.key = pmd.getKey();
+    this.permissionList = new ArrayList<AclPermission>();
+
+    for (String permission : pmd.getPermissions()) {
+      AclPermission aclPermission = permissions.get(permission);
+      if (aclPermission == null) {
+        aclPermission = new AclPermissionImpl(permission, permission);
+      }
+
+      this.permissionList.add(aclPermission);
+    }
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.api.repository.AclPermissionMapping#getKey()
+   */
+  public String getKey() {
+    return this.key;
+  }
+
+  /*
+   * (non-Javadoc)
+   * 
+   * @see org.apache.opencmis.client.api.repository.AclPermissionMapping#getPermissions()
+   */
+  public List<AclPermission> getPermissions() {
+    return permissionList;
+  }
 }

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryAclCapabilitiesImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryAclCapabilitiesImpl.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryAclCapabilitiesImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryAclCapabilitiesImpl.java
Mon Mar 29 11:21:13 2010
@@ -20,7 +20,8 @@ package org.apache.opencmis.client.runti
 
 import java.io.Serializable;
 import java.util.ArrayList;
-import java.util.Hashtable;
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -28,210 +29,224 @@ import org.apache.opencmis.client.api.Ac
 import org.apache.opencmis.client.api.repository.AclPermissionMapping;
 import org.apache.opencmis.client.api.repository.RepositoryAclCapabilities;
 import org.apache.opencmis.commons.enums.AclPropagation;
-import org.apache.opencmis.commons.exceptions.CmisRuntimeException;
+import org.apache.opencmis.commons.enums.SupportedPermissions;
 import org.apache.opencmis.commons.provider.AclCapabilitiesData;
+import org.apache.opencmis.commons.provider.PermissionDefinitionData;
 import org.apache.opencmis.commons.provider.PermissionMappingData;
 
-public class RepositoryAclCapabilitiesImpl implements
-		RepositoryAclCapabilities, Serializable {
+public class RepositoryAclCapabilitiesImpl implements RepositoryAclCapabilities, Serializable
{
 
-	/*
-	 * serialization
-	 */
-	private static final long serialVersionUID = 2824818352611088504L;
-
-	/*
-	 * provider data (serializable)
-	 */
-	private AclCapabilitiesData aclCapabilities;
-
-	/*
-	 * permission mapping (serializable)
-	 */
-	private Map<String, AclPermissionMapping> aclPermissionMapping = null;
-
-	/*
-	 * permissions (serializable)
-	 */
-	List<AclPermission> aclPermissions = null;
-
-	public RepositoryAclCapabilitiesImpl(AclCapabilitiesData aclCapabilities) {
-		this.aclCapabilities = aclCapabilities;
-	}
-
-	public AclPropagation getAclPropagation() {
-		return this.aclCapabilities.getAclPropagation();
-	}
-
-	public AclPermissionMapping getAddPolicyObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getAddPolicyPolicyPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getAddToFolderFolderPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getAddToFolderObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getApplyAclObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCancelCheckoutDocumentPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCheckinDocumentPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCheckoutDocumentPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCreateDocumentFolderPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCreateDocumentTypePermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCreateFolderFolderPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCreateFolderTypePermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCreatePolicyTypePermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCreateRelationshipSourcePermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCreateRelationshipTargetPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getCreateRelationshipTypePermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getDeleteContentDocumentPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getDeleteObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getDeleteTreeFolderPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getGetAclObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getGetAllVersionsVersionSeriesPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getGetAppliedPoliciesObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getGetChildrenFolderPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getGetDescendentsFolderPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getGetFolderParentObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getGetObjectRelationshipsObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getGetParentsFolderPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getGetPropertiesObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getMoveObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getMoveSourcePermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getMoveTargetPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public Map<String, AclPermissionMapping> getPermissionMapping() {
-		if (this.aclPermissionMapping == null) {
-			this.aclPermissionMapping = new Hashtable<String, AclPermissionMapping>();
-			AclPermissionMapping apm = null;
-			for (PermissionMappingData pmd : this.aclCapabilities
-					.getPermissionMappingData()) {
-				apm = new AclPermissionMappingImpl(pmd);
-				this.aclPermissionMapping.put(pmd.getKey(), apm);
-			}
-		}
-		return this.aclPermissionMapping;
-	}
-
-	public List<AclPermission> getPermissions() {
-		if (this.aclPermissions == null) {
-			this.aclPermissions = new ArrayList<AclPermission>();
-		}
-		return this.aclPermissions;
-	}
-
-	public AclPermissionMapping getRemoveFromFolderFolderPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getRemoveFromFolderObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getRemovePolicyObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getRemovePolicyPolicyPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getSetContentDocumentPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getUpdatePropertiesObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
-
-	public AclPermissionMapping getViewContentObjectPermissions() {
-		throw new CmisRuntimeException("not implemented");
-	}
+  /*
+   * serialization
+   */
+  private static final long serialVersionUID = 2824818352611088504L;
+
+  /*
+   * provider data (serializable)
+   */
+  private AclCapabilitiesData aclCapabilities;
+
+  /*
+   * permission mapping (serializable)
+   */
+  private Map<String, AclPermissionMapping> aclPermissionMapping = null;
+
+  /*
+   * permissions (serializable)
+   */
+  private List<AclPermission> aclPermissions = null;
+
+  /**
+   * Constructor.
+   */
+  public RepositoryAclCapabilitiesImpl(AclCapabilitiesData aclCapabilities) {
+    this.aclCapabilities = aclCapabilities;
+    this.aclPermissions = new ArrayList<AclPermission>();
+    this.aclPermissionMapping = new HashMap<String, AclPermissionMapping>();
+
+    if (this.aclCapabilities != null) {
+      // copy permissions
+      Map<String, AclPermission> permissionMap = new HashMap<String, AclPermission>();
+      for (PermissionDefinitionData permission : this.aclCapabilities.getPermissionDefinitionData())
{
+        AclPermission ap = new AclPermissionImpl(permission.getPermission(), permission
+            .getDescription());
+        aclPermissions.add(ap);
+        permissionMap.put(ap.getName(), ap);
+      }
+
+      // copy mappings
+      for (PermissionMappingData pmd : this.aclCapabilities.getPermissionMappingData()) {
+        AclPermissionMapping apm = new AclPermissionMappingImpl(pmd, permissionMap);
+        this.aclPermissionMapping.put(pmd.getKey(), apm);
+      }
+    }
+  }
+
+  public SupportedPermissions getSupportedPermissions() {
+    return this.aclCapabilities.getSupportedPermissions();
+  }
+
+  public AclPropagation getAclPropagation() {
+    return this.aclCapabilities.getAclPropagation();
+  }
+
+  public Map<String, AclPermissionMapping> getPermissionMapping() {
+    return Collections.unmodifiableMap(this.aclPermissionMapping);
+  }
+
+  public List<AclPermission> getPermissions() {
+    return Collections.unmodifiableList(this.aclPermissions);
+  }
+
+  public AclPermissionMapping getAddPolicyObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_ADD_POLICY_OBJECT);
+  }
+
+  public AclPermissionMapping getAddPolicyPolicyPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_ADD_POLICY_POLICY);
+  }
+
+  public AclPermissionMapping getAddToFolderFolderPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_ADD_TO_FOLDER_FOLDER);
+  }
+
+  public AclPermissionMapping getAddToFolderObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_ADD_TO_FOLDER_OBJECT);
+  }
+
+  public AclPermissionMapping getApplyAclObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_APPLY_ACL_OBJECT);
+  }
+
+  public AclPermissionMapping getCancelCheckoutDocumentPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CANCEL_CHECKOUT_DOCUMENT);
+  }
+
+  public AclPermissionMapping getCheckinDocumentPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CHECKIN_DOCUMENT);
+  }
+
+  public AclPermissionMapping getCheckoutDocumentPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CHECKOUT_DOCUMENT);
+  }
+
+  public AclPermissionMapping getCreateDocumentFolderPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CREATE_DOCUMENT_FOLDER);
+  }
+
+  public AclPermissionMapping getCreateDocumentTypePermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CREATE_DOCUMENT_TYPE);
+  }
+
+  public AclPermissionMapping getCreateFolderFolderPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CREATE_FOLDER_FOLDER);
+  }
+
+  public AclPermissionMapping getCreateFolderTypePermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CREATE_FOLDER_TYPE);
+  }
+
+  public AclPermissionMapping getCreatePolicyTypePermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CREATE_POLICY_TYPE);
+  }
+
+  public AclPermissionMapping getCreateRelationshipSourcePermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CREATE_RELATIONSHIP_SOURCE);
+  }
+
+  public AclPermissionMapping getCreateRelationshipTargetPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CREATE_RELATIONSHIP_TARGET);
+  }
+
+  public AclPermissionMapping getCreateRelationshipTypePermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_CREATE_RELATIONSHIP_TYPE);
+  }
+
+  public AclPermissionMapping getDeleteContentDocumentPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_DELETE_CONTENT_DOCUMENT);
+  }
+
+  public AclPermissionMapping getDeleteObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_DELETE_OBJECT);
+  }
+
+  public AclPermissionMapping getDeleteTreeFolderPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_DELETE_TREE_FOLDER);
+  }
+
+  public AclPermissionMapping getGetAclObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_GET_ACL_OBJECT);
+  }
+
+  public AclPermissionMapping getGetAllVersionsVersionSeriesPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_GET_ALL_VERSIONS_VERSION_SERIES);
+  }
+
+  public AclPermissionMapping getGetAppliedPoliciesObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_GET_APPLIED_POLICIES_OBJECT);
+  }
+
+  public AclPermissionMapping getGetChildrenFolderPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_GET_CHILDREN_FOLDER);
+  }
+
+  public AclPermissionMapping getGetDescendentsFolderPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_GET_DESCENDENTS_FOLDER);
+  }
+
+  public AclPermissionMapping getGetFolderParentObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_GET_FOLDER_PARENT_OBJECT);
+  }
+
+  public AclPermissionMapping getGetObjectRelationshipsObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_GET_OBJECT_RELATIONSHIPS_OBJECT);
+  }
+
+  public AclPermissionMapping getGetParentsFolderPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_GET_PARENTS_FOLDER);
+  }
+
+  public AclPermissionMapping getGetPropertiesObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_GET_PROPERTIES_OBJECT);
+  }
+
+  public AclPermissionMapping getMoveObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_MOVE_OBJECT);
+  }
+
+  public AclPermissionMapping getMoveSourcePermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_MOVE_SOURCE);
+  }
+
+  public AclPermissionMapping getMoveTargetPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_MOVE_TARGET);
+  }
+
+  public AclPermissionMapping getRemoveFromFolderFolderPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_REMOVE_FROM_FOLDER_FOLDER);
+  }
+
+  public AclPermissionMapping getRemoveFromFolderObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_REMOVE_FROM_FOLDER_OBJECT);
+  }
+
+  public AclPermissionMapping getRemovePolicyObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_REMOVE_POLICY_OBJECT);
+  }
+
+  public AclPermissionMapping getRemovePolicyPolicyPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_REMOVE_POLICY_POLICY);
+  }
+
+  public AclPermissionMapping getSetContentDocumentPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_SET_CONTENT_DOCUMENT);
+  }
+
+  public AclPermissionMapping getUpdatePropertiesObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_UPDATE_PROPERTIES_OBJECT);
+  }
+
+  public AclPermissionMapping getViewContentObjectPermissions() {
+    return this.aclPermissionMapping.get(AclPermissionMapping.CAN_VIEW_CONTENT_OBJECT);
+  }
 }

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryCapabilitiesImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryCapabilitiesImpl.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryCapabilitiesImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryCapabilitiesImpl.java
Mon Mar 29 11:21:13 2010
@@ -35,6 +35,9 @@ public class RepositoryCapabilitiesImpl 
 
   private RepositoryCapabilitiesData capabilities = null;
 
+  /**
+   * Constructor.
+   */
   public RepositoryCapabilitiesImpl(RepositoryCapabilitiesData rcd) {
     this.capabilities = rcd;
   }
@@ -63,36 +66,35 @@ public class RepositoryCapabilitiesImpl 
     return this.capabilities.getCapabilityRenditions();
   }
 
-  public boolean isAllVersionsSearchableSupported() {
+  public Boolean isAllVersionsSearchableSupported() {
     return this.capabilities.allVersionsSearchable();
   }
 
-  public boolean isGetDescendantsSupported() {
+  public Boolean isGetDescendantsSupported() {
     return this.capabilities.supportsGetDescendants();
   }
 
-  public boolean isGetFolderTreeSupported() {
+  public Boolean isGetFolderTreeSupported() {
     return this.capabilities.supportsGetFolderTree();
   }
 
-  public boolean isMultifilingSupported() {
+  public Boolean isMultifilingSupported() {
     return this.capabilities.supportsMultifiling();
   }
 
-  public boolean isPwcSearchableSupported() {
+  public Boolean isPwcSearchableSupported() {
     return this.capabilities.isPwcSearchable();
   }
 
-  public boolean isPwcUpdatableSupported() {
+  public Boolean isPwcUpdatableSupported() {
     return this.capabilities.isPwcUpdatable();
   }
 
-  public boolean isUnfilingSupported() {
+  public Boolean isUnfilingSupported() {
     return this.capabilities.supportsUnfiling();
   }
 
-  public boolean isVersionSpecificFilingSupported() {
+  public Boolean isVersionSpecificFilingSupported() {
     return this.capabilities.supportsVersionSpecificFiling();
   }
-
 }

Modified: incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryInfoImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryInfoImpl.java?rev=928720&r1=928719&r2=928720&view=diff
==============================================================================
--- incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryInfoImpl.java
(original)
+++ incubator/chemistry/trunk/opencmis/opencmis-client/opencmis-client-impl/src/main/java/org/apache/opencmis/client/runtime/repository/RepositoryInfoImpl.java
Mon Mar 29 11:21:13 2010
@@ -60,25 +60,30 @@ public class RepositoryInfoImpl implemen
    * Sets the data object.
    */
   protected void setRepositoryInfoData(RepositoryInfoData data) {
+    if (data == null) {
+      throw new IllegalArgumentException("Repository info data must be set!");
+    }
+
     this.riData = data;
+
+    if (this.riData.getRepositoryCapabilities() != null) {
+      this.capabilites = new RepositoryCapabilitiesImpl(this.riData.getRepositoryCapabilities());
+    }
+
+    if (this.riData.getAclCapabilities() != null) {
+      this.aclCapabilites = new RepositoryAclCapabilitiesImpl(this.riData.getAclCapabilities());
+    }
   }
 
-  public boolean changesIncomplete() {
+  public Boolean changesIncomplete() {
     return this.riData.changesIncomplete();
   }
 
   public RepositoryAclCapabilities getAclCapabilities() {
-    if (this.aclCapabilites == null) {
-      this.aclCapabilites = new RepositoryAclCapabilitiesImpl(this.riData.getAclCapabilities());
-    }
     return this.aclCapabilites;
   }
 
   public RepositoryCapabilities getCapabilities() {
-    if (this.capabilites == null) {
-      capabilites = new RepositoryCapabilitiesImpl(this.riData.getRepositoryCapabilities());
-    }
-
     return this.capabilites;
   }
 



Mime
View raw message