Return-Path: X-Original-To: apmail-chemistry-commits-archive@www.apache.org Delivered-To: apmail-chemistry-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 963D917909 for ; Mon, 6 Apr 2015 17:12:46 +0000 (UTC) Received: (qmail 37290 invoked by uid 500); 6 Apr 2015 17:12:46 -0000 Delivered-To: apmail-chemistry-commits-archive@chemistry.apache.org Received: (qmail 37089 invoked by uid 500); 6 Apr 2015 17:12:46 -0000 Mailing-List: contact commits-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list commits@chemistry.apache.org Received: (qmail 35484 invoked by uid 99); 6 Apr 2015 17:12:44 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2015 17:12:44 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id D004DAC0E2E for ; Mon, 6 Apr 2015 17:12:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r946530 [32/33] - in /websites/staging/chemistry/trunk/content: ./ java/0.13.0/maven/chemistry-opencmis-server/ java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-support/ java/0.13.0/maven/chemistry-opencmis-server/chemi... Date: Mon, 06 Apr 2015 17:12:42 -0000 To: commits@chemistry.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150406171244.D004DAC0E2E@hades.apache.org> Added: websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-support/xref/org/apache/chemistry/opencmis/server/support/wrapper/ConformanceCmisServiceWrapper.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-support/xref/org/apache/chemistry/opencmis/server/support/wrapper/ConformanceCmisServiceWrapper.html (added) +++ websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-support/xref/org/apache/chemistry/opencmis/server/support/wrapper/ConformanceCmisServiceWrapper.html Mon Apr 6 17:12:40 2015 @@ -0,0 +1,1287 @@ + + + + +ConformanceCmisServiceWrapper xref + + + +
+
+1   /*
+2    *
+3    * Licensed to the Apache Software Foundation (ASF) under one
+4    * or more contributor license agreements.  See the NOTICE file
+5    * distributed with this work for additional information
+6    * regarding copyright ownership.  The ASF licenses this file
+7    * to you under the Apache License, Version 2.0 (the
+8    * "License"); you may not use this file except in compliance
+9    * with the License.  You may obtain a copy of the License at
+10   *
+11   *   http://www.apache.org/licenses/LICENSE-2.0
+12   *
+13   * Unless required by applicable law or agreed to in writing,
+14   * software distributed under the License is distributed on an
+15   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+16   * KIND, either express or implied.  See the License for the
+17   * specific language governing permissions and limitations
+18   * under the License.
+19   *
+20   */
+21  package org.apache.chemistry.opencmis.server.support.wrapper;
+22  
+23  import java.math.BigInteger;
+24  import java.util.List;
+25  
+26  import org.apache.chemistry.opencmis.commons.PropertyIds;
+27  import org.apache.chemistry.opencmis.commons.data.Acl;
+28  import org.apache.chemistry.opencmis.commons.data.AllowableActions;
+29  import org.apache.chemistry.opencmis.commons.data.BulkUpdateObjectIdAndChangeToken;
+30  import org.apache.chemistry.opencmis.commons.data.ContentStream;
+31  import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
+32  import org.apache.chemistry.opencmis.commons.data.FailedToDeleteData;
+33  import org.apache.chemistry.opencmis.commons.data.ObjectData;
+34  import org.apache.chemistry.opencmis.commons.data.ObjectInFolderContainer;
+35  import org.apache.chemistry.opencmis.commons.data.ObjectInFolderList;
+36  import org.apache.chemistry.opencmis.commons.data.ObjectList;
+37  import org.apache.chemistry.opencmis.commons.data.ObjectParentData;
+38  import org.apache.chemistry.opencmis.commons.data.Properties;
+39  import org.apache.chemistry.opencmis.commons.data.PropertyData;
+40  import org.apache.chemistry.opencmis.commons.data.RenditionData;
+41  import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
+42  import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
+43  import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer;
+44  import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList;
+45  import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
+46  import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
+47  import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
+48  import org.apache.chemistry.opencmis.commons.enums.UnfileObject;
+49  import org.apache.chemistry.opencmis.commons.enums.VersioningState;
+50  import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
+51  import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
+52  import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+53  import org.apache.chemistry.opencmis.commons.server.CmisService;
+54  import org.apache.chemistry.opencmis.commons.spi.Holder;
+55  import org.slf4j.Logger;
+56  import org.slf4j.LoggerFactory;
+57  
+58  /**
+59   * Service wrapper that checks in incoming calls for specification conformance.
+60   */
+61  public class ConformanceCmisServiceWrapper extends AbstractCmisServiceWrapper {
+62  
+63      public static final BigInteger MINUS_ONE = BigInteger.valueOf(-1);
+64  
+65      private static final Logger LOG = LoggerFactory.getLogger(ConformanceCmisServiceWrapper.class);
+66  
+67      private BigInteger defaultTypesMaxItems = null;
+68      private BigInteger defaultTypesDepth = MINUS_ONE;
+69  
+70      private BigInteger defaultMaxItems = null;
+71      private BigInteger defaultDepth = MINUS_ONE;
+72  
+73      /**
+74       * Constructor used by {@link CmisServiceWrapperManager}.
+75       */
+76      public ConformanceCmisServiceWrapper(CmisService service) {
+77          super(service);
+78      }
+79  
+80      /**
+81       * Alternative constructor.
+82       */
+83      public ConformanceCmisServiceWrapper(CmisService service, BigInteger defaultTypesMaxItems,
+84              BigInteger defaultTypesDepth, BigInteger defaultMaxItems, BigInteger defaultDepth) {
+85          super(service);
+86  
+87          this.defaultTypesMaxItems = defaultTypesMaxItems;
+88          this.defaultTypesDepth = defaultTypesDepth;
+89          this.defaultMaxItems = defaultMaxItems;
+90          this.defaultDepth = defaultDepth;
+91      }
+92  
+93      public void initialize(Object[] params) {
+94          if (params == null) {
+95              return;
+96          }
+97  
+98          if (params.length > 0) {
+99              defaultTypesMaxItems = convertToBigInteger(params[0]);
+100         }
+101 
+102         if (params.length > 1) {
+103             defaultTypesDepth = convertToBigInteger(params[1]);
+104         }
+105 
+106         if (params.length > 2) {
+107             defaultMaxItems = convertToBigInteger(params[2]);
+108         }
+109 
+110         if (params.length > 3) {
+111             defaultDepth = convertToBigInteger(params[3]);
+112         }
+113     }
+114 
+115     private BigInteger convertToBigInteger(Object obj) {
+116         try {
+117             if (obj instanceof BigInteger) {
+118                 return (BigInteger) obj;
+119             } else if (obj instanceof String) {
+120                 return new BigInteger((String) obj);
+121             } else if (obj instanceof Number) {
+122                 return BigInteger.valueOf(((Number) obj).longValue());
+123             }
+124         } catch (NumberFormatException e) {
+125             throw new CmisRuntimeException("Invalid number: " + obj.toString(), e);
+126         }
+127 
+128         return null;
+129     }
+130 
+131     // --- wrapper operations ---
+132 
+133     /**
+134      * Set the default maxItems.
+135      */
+136     protected void setDefaultTypesMaxItems(BigInteger defaultTypesMaxItems) {
+137         this.defaultTypesMaxItems = defaultTypesMaxItems;
+138     }
+139 
+140     /**
+141      * Set the default depth.
+142      */
+143     protected void setDefaultTypesDepth(BigInteger defaultTypesDepth) {
+144         this.defaultTypesDepth = defaultTypesDepth;
+145     }
+146 
+147     /**
+148      * Set the default maxItems.
+149      */
+150     protected void setDefaultMaxItems(BigInteger defaultMaxItems) {
+151         this.defaultMaxItems = defaultMaxItems;
+152     }
+153 
+154     /**
+155      * Set the default depth.
+156      */
+157     protected void setDefaultDepth(BigInteger defaultDepth) {
+158         this.defaultDepth = defaultDepth;
+159     }
+160 
+161     /**
+162      * Converts the given exception into a CMIS exception.
+163      */
+164     protected CmisBaseException createCmisException(Exception e) {
+165         if (e == null) {
+166             // should never happen
+167             // if it happens its the fault of the framework...
+168 
+169             return new CmisRuntimeException("Unknown exception!");
+170         } else if (e instanceof CmisBaseException) {
+171             return (CmisBaseException) e;
+172         } else {
+173             // should not happen if the connector works correctly
+174             // it's alarming enough to log the exception
+175             LOG.warn(e.toString(), e);
+176 
+177             return new CmisRuntimeException(e.getMessage(), e);
+178         }
+179     }
+180 
+181     /**
+182      * Throws an exception if the given id is {@code null} or empty.
+183      */
+184     protected void checkId(String name, String id) {
+185         if (id == null) {
+186             throw new CmisInvalidArgumentException(name + " must be set!");
+187         }
+188 
+189         if (id.length() == 0) {
+190             throw new CmisInvalidArgumentException(name + " must not be empty!");
+191         }
+192     }
+193 
+194     /**
+195      * Throws an exception if the given ids are all {@code null} or empty.
+196      */
+197     protected void checkIds(String name, String... ids) {
+198         for (String id : ids) {
+199             if (id != null && id.length() > 0) {
+200                 return;
+201             }
+202         }
+203 
+204         throw new CmisInvalidArgumentException(name + " must be set!");
+205     }
+206 
+207     /**
+208      * Throws an exception if the given holder or id is {@code null} or empty.
+209      */
+210     protected void checkHolderId(String name, Holder<String> holder) {
+211         if (holder == null) {
+212             throw new CmisInvalidArgumentException(name + " must be set!");
+213         }
+214 
+215         checkId(name, holder.getValue());
+216     }
+217 
+218     /**
+219      * Throws an exception if the repository id is {@code null} or empty.
+220      */
+221     protected void checkRepositoryId(String repositoryId) {
+222         checkId("Repository Id", repositoryId);
+223     }
+224 
+225     /**
+226      * Throws an exception if the given path is {@code null} or invalid.
+227      */
+228     protected void checkPath(String name, String path) {
+229         if (path == null) {
+230             throw new CmisInvalidArgumentException(name + " must be set!");
+231         }
+232 
+233         if (path.length() == 0) {
+234             throw new CmisInvalidArgumentException(name + " must not be empty!");
+235         }
+236 
+237         if (path.charAt(0) != '/') {
+238             throw new CmisInvalidArgumentException(name + " must start with '/'!");
+239         }
+240     }
+241 
+242     /**
+243      * Throws an exception if the given properties set is {@code null}.
+244      */
+245     protected void checkProperties(Properties properties) {
+246         if (properties == null) {
+247             throw new CmisInvalidArgumentException("Properties must be set!");
+248         }
+249     }
+250 
+251     /**
+252      * Throws an exception if the given property isn't set or of the wrong type.
+253      */
+254     protected void checkProperty(Properties properties, String propertyId, Class<?> clazz) {
+255         if (properties.getProperties() == null) {
+256             throw new CmisInvalidArgumentException("Property " + propertyId + " must be set!");
+257         }
+258 
+259         PropertyData<?> property = properties.getProperties().get(propertyId);
+260         if (property == null) {
+261             throw new CmisInvalidArgumentException("Property " + propertyId + " must be set!");
+262         }
+263 
+264         Object value = property.getFirstValue();
+265         if (value == null) {
+266             throw new CmisInvalidArgumentException("Property " + propertyId + " must have a value!");
+267         }
+268 
+269         if (!clazz.isAssignableFrom(value.getClass())) {
+270             throw new CmisInvalidArgumentException("Property " + propertyId + " has the wrong type!");
+271         }
+272     }
+273 
+274     /**
+275      * Throws an exception if the given content object is {@code null}.
+276      */
+277     protected void checkContentStream(ContentStream content) {
+278         if (content == null) {
+279             throw new CmisInvalidArgumentException("Content must be set!");
+280         }
+281     }
+282 
+283     /**
+284      * Throws an exception if the given query statement is {@code null} or
+285      * empty.
+286      */
+287     protected void checkQueryStatement(String statement) {
+288         if (statement == null) {
+289             throw new CmisInvalidArgumentException("Statement must be set!");
+290         }
+291 
+292         if (statement.length() == 0) {
+293             throw new CmisInvalidArgumentException("Statement must not be empty!");
+294         }
+295     }
+296 
+297     /**
+298      * Throws an exception if the given type definition is {@code null}.
+299      */
+300     protected void checkTypeDefinition(TypeDefinition typeDef) {
+301         if (typeDef == null) {
+302             throw new CmisInvalidArgumentException("Type definition must be set!");
+303         }
+304     }
+305 
+306     /**
+307      * Throws an exception if the given list is {@code null} or empty.
+308      */
+309     protected void checkList(String name, List<?> list) {
+310         if (list == null) {
+311             throw new CmisInvalidArgumentException(name + " must be set!");
+312         }
+313 
+314         if (list.isEmpty()) {
+315             throw new CmisInvalidArgumentException(name + " must not be empty!");
+316         }
+317     }
+318 
+319     /**
+320      * Returns <code>true</code> if <code>value</code> is {@code null}.
+321      */
+322     protected Boolean getDefaultTrue(Boolean value) {
+323         if (value == null) {
+324             return Boolean.TRUE;
+325         }
+326 
+327         return value;
+328     }
+329 
+330     /**
+331      * Returns <code>false</code> if <code>value</code> is {@code null}.
+332      */
+333     protected Boolean getDefaultFalse(Boolean value) {
+334         if (value == null) {
+335             return Boolean.FALSE;
+336         }
+337 
+338         return value;
+339     }
+340 
+341     /**
+342      * Returns the <code>IncludeRelationships.NONE</code> if <code>value</code>
+343      * is {@code null}.
+344      */
+345     protected IncludeRelationships getDefault(IncludeRelationships value) {
+346         if (value == null) {
+347             return IncludeRelationships.NONE;
+348         }
+349 
+350         return value;
+351     }
+352 
+353     /**
+354      * Returns the <code>UnfileObjects.DELETE</code> if <code>value</code> is
+355      * {@code null}.
+356      */
+357     protected UnfileObject getDefault(UnfileObject value) {
+358         if (value == null) {
+359             return UnfileObject.DELETE;
+360         }
+361 
+362         return value;
+363     }
+364 
+365     /**
+366      * Returns the <code>AclPropagation.REPOSITORYDETERMINED</code> if
+367      * <code>value</code> is {@code null}.
+368      */
+369     protected AclPropagation getDefault(AclPropagation value) {
+370         if (value == null) {
+371             return AclPropagation.REPOSITORYDETERMINED;
+372         }
+373 
+374         return value;
+375     }
+376 
+377     /**
+378      * Returns the <code>RelationshipDirection.SOURCE</code> if
+379      * <code>value</code> is {@code null} .
+380      */
+381     protected RelationshipDirection getDefault(RelationshipDirection value) {
+382         if (value == null) {
+383             return RelationshipDirection.SOURCE;
+384         }
+385 
+386         return value;
+387     }
+388 
+389     /**
+390      * Returns the <code>"cmis:none"</code> if <code>value</code> is
+391      * {@code null}.
+392      */
+393     protected String getDefaultRenditionFilter(String value) {
+394         if ((value == null) || (value.length() == 0)) {
+395             return "cmis:none";
+396         }
+397 
+398         return value;
+399     }
+400 
+401     /**
+402      * Returns the default maxItems if <code>maxItems</code> == {@code null},
+403      * throws an exception if <code>maxItems</code> &lt; 0, returns
+404      * <code>maxItems</code> otherwise.
+405      */
+406     protected BigInteger getTypesMaxItems(BigInteger maxItems) {
+407         if (maxItems == null) {
+408             return defaultTypesMaxItems;
+409         }
+410 
+411         if (maxItems.compareTo(BigInteger.ZERO) == -1) {
+412             throw new CmisInvalidArgumentException("maxItems must not be negative!");
+413         }
+414 
+415         return maxItems;
+416     }
+417 
+418     /**
+419      * Checks the depth parameter if it complies with CMIS specification and
+420      * returns the default value if {@code depth} is {@code null}.
+421      */
+422     protected BigInteger getTypesDepth(BigInteger depth) {
+423         if (depth == null) {
+424             return defaultTypesDepth;
+425         }
+426 
+427         if (depth.compareTo(BigInteger.ZERO) == 0) {
+428             throw new CmisInvalidArgumentException("depth must not be 0!");
+429         }
+430 
+431         if (depth.compareTo(MINUS_ONE) == -1) {
+432             throw new CmisInvalidArgumentException("depth must not be <-1!");
+433         }
+434 
+435         return depth;
+436     }
+437 
+438     /**
+439      * Returns the default maxItems if <code>maxItems</code> == {@code null},
+440      * throws an exception if <code>maxItems</code> &lt; 0, returns
+441      * <code>maxItems</code> otherwise.
+442      */
+443     protected BigInteger getMaxItems(BigInteger maxItems) {
+444         if (maxItems == null) {
+445             return defaultMaxItems;
+446         }
+447 
+448         if (maxItems.compareTo(BigInteger.ZERO) == -1) {
+449             throw new CmisInvalidArgumentException("maxItems must not be negative!");
+450         }
+451 
+452         return maxItems;
+453     }
+454 
+455     /**
+456      * Returns 0 if <code>skipCount</code> == {@code null}, throws an exception
+457      * if <code>skipCount</code> &lt; 0, returns <code>skipCount</code>
+458      * otherwise.
+459      */
+460     protected BigInteger getSkipCount(BigInteger skipCount) {
+461         if (skipCount == null) {
+462             return BigInteger.ZERO;
+463         }
+464 
+465         if (skipCount.compareTo(BigInteger.ZERO) == -1) {
+466             throw new CmisInvalidArgumentException("skipCount must not be negative!");
+467         }
+468 
+469         return skipCount;
+470     }
+471 
+472     /**
+473      * Checks the depth parameter if it complies with CMIS specification and
+474      * returns the default value if {@code depth} is {@code null}.
+475      */
+476     protected BigInteger getDepth(BigInteger depth) {
+477         if (depth == null) {
+478             return defaultDepth;
+479         }
+480 
+481         if (depth.compareTo(BigInteger.ZERO) == 0) {
+482             throw new CmisInvalidArgumentException("depth must not be 0!");
+483         }
+484 
+485         if (depth.compareTo(MINUS_ONE) == -1) {
+486             throw new CmisInvalidArgumentException("depth must not be <-1!");
+487         }
+488 
+489         return depth;
+490     }
+491 
+492     /**
+493      * Throws an exception if the given value is negative.
+494      */
+495     protected void checkNullOrPositive(String name, BigInteger value) {
+496         if (value == null) {
+497             return;
+498         }
+499 
+500         if (value.compareTo(BigInteger.ZERO) == -1) {
+501             throw new CmisInvalidArgumentException(name + " must not be negative!");
+502         }
+503     }
+504 
+505     // --- repository service ---
+506 
+507     public RepositoryInfo getRepositoryInfo(String repositoryId, ExtensionsData extension) {
+508         checkRepositoryId(repositoryId);
+509 
+510         try {
+511             return getWrappedService().getRepositoryInfo(repositoryId, extension);
+512         } catch (Exception e) {
+513             throw createCmisException(e);
+514         }
+515     }
+516 
+517     public List<RepositoryInfo> getRepositoryInfos(ExtensionsData extension) {
+518         try {
+519             return getWrappedService().getRepositoryInfos(extension);
+520         } catch (Exception e) {
+521             throw createCmisException(e);
+522         }
+523     }
+524 
+525     public TypeDefinitionList getTypeChildren(String repositoryId, String typeId, Boolean includePropertyDefinitions,
+526             BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+527         checkRepositoryId(repositoryId);
+528         includePropertyDefinitions = getDefaultFalse(includePropertyDefinitions);
+529         maxItems = getTypesMaxItems(maxItems);
+530         skipCount = getSkipCount(skipCount);
+531 
+532         try {
+533             return getWrappedService().getTypeChildren(repositoryId, typeId, includePropertyDefinitions, maxItems,
+534                     skipCount, extension);
+535         } catch (Exception e) {
+536             throw createCmisException(e);
+537         }
+538     }
+539 
+540     public TypeDefinition getTypeDefinition(String repositoryId, String typeId, ExtensionsData extension) {
+541         checkRepositoryId(repositoryId);
+542         checkId("Type Id", typeId);
+543 
+544         try {
+545             return getWrappedService().getTypeDefinition(repositoryId, typeId, extension);
+546         } catch (Exception e) {
+547             throw createCmisException(e);
+548         }
+549     }
+550 
+551     public List<TypeDefinitionContainer> getTypeDescendants(String repositoryId, String typeId, BigInteger depth,
+552             Boolean includePropertyDefinitions, ExtensionsData extension) {
+553         checkRepositoryId(repositoryId);
+554         includePropertyDefinitions = getDefaultFalse(includePropertyDefinitions);
+555         depth = getTypesDepth(depth);
+556 
+557         try {
+558             return getWrappedService().getTypeDescendants(repositoryId, typeId, depth, includePropertyDefinitions,
+559                     extension);
+560         } catch (Exception e) {
+561             throw createCmisException(e);
+562         }
+563     }
+564 
+565     public TypeDefinition createType(String repositoryId, TypeDefinition type, ExtensionsData extension) {
+566         checkRepositoryId(repositoryId);
+567         checkTypeDefinition(type);
+568 
+569         try {
+570             return getWrappedService().createType(repositoryId, type, extension);
+571         } catch (Exception e) {
+572             throw createCmisException(e);
+573         }
+574     }
+575 
+576     public TypeDefinition updateType(String repositoryId, TypeDefinition type, ExtensionsData extension) {
+577         checkRepositoryId(repositoryId);
+578         checkTypeDefinition(type);
+579 
+580         try {
+581             return getWrappedService().updateType(repositoryId, type, extension);
+582         } catch (Exception e) {
+583             throw createCmisException(e);
+584         }
+585     }
+586 
+587     public void deleteType(String repositoryId, String typeId, ExtensionsData extension) {
+588         checkRepositoryId(repositoryId);
+589         checkId("Type Id", typeId);
+590 
+591         try {
+592             getWrappedService().deleteType(repositoryId, typeId, extension);
+593         } catch (Exception e) {
+594             throw createCmisException(e);
+595         }
+596     }
+597 
+598     // --- navigation service ---
+599 
+600     public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy,
+601             Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+602             BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+603         checkRepositoryId(repositoryId);
+604         includeAllowableActions = getDefaultFalse(includeAllowableActions);
+605         includeRelationships = getDefault(includeRelationships);
+606         renditionFilter = getDefaultRenditionFilter(renditionFilter);
+607         maxItems = getMaxItems(maxItems);
+608         skipCount = getSkipCount(skipCount);
+609 
+610         try {
+611             return getWrappedService().getCheckedOutDocs(repositoryId, folderId, filter, orderBy,
+612                     includeAllowableActions, includeRelationships, renditionFilter, maxItems, skipCount, extension);
+613         } catch (Exception e) {
+614             throw createCmisException(e);
+615         }
+616     }
+617 
+618     public ObjectInFolderList getChildren(String repositoryId, String folderId, String filter, String orderBy,
+619             Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+620             Boolean includePathSegment, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
+621         checkRepositoryId(repositoryId);
+622         checkId("Folder Id", folderId);
+623         includeAllowableActions = getDefaultFalse(includeAllowableActions);
+624         includeRelationships = getDefault(includeRelationships);
+625         renditionFilter = getDefaultRenditionFilter(renditionFilter);
+626         includePathSegment = getDefaultFalse(includePathSegment);
+627         maxItems = getMaxItems(maxItems);
+628         skipCount = getSkipCount(skipCount);
+629 
+630         try {
+631             return getWrappedService().getChildren(repositoryId, folderId, filter, orderBy, includeAllowableActions,
+632                     includeRelationships, renditionFilter, includePathSegment, maxItems, skipCount, extension);
+633         } catch (Exception e) {
+634             throw createCmisException(e);
+635         }
+636     }
+637 
+638     public List<ObjectInFolderContainer> getDescendants(String repositoryId, String folderId, BigInteger depth,
+639             String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+640             String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+641         checkRepositoryId(repositoryId);
+642         checkId("Folder Id", folderId);
+643         depth = getDepth(depth);
+644         includeAllowableActions = getDefaultFalse(includeAllowableActions);
+645         includeRelationships = getDefault(includeRelationships);
+646         renditionFilter = getDefaultRenditionFilter(renditionFilter);
+647         includePathSegment = getDefaultFalse(includePathSegment);
+648 
+649         try {
+650             return getWrappedService().getDescendants(repositoryId, folderId, depth, filter, includeAllowableActions,
+651                     includeRelationships, renditionFilter, includePathSegment, extension);
+652         } catch (Exception e) {
+653             throw createCmisException(e);
+654         }
+655     }
+656 
+657     public ObjectData getFolderParent(String repositoryId, String folderId, String filter, ExtensionsData extension) {
+658         checkRepositoryId(repositoryId);
+659         checkId("Folder Id", folderId);
+660 
+661         try {
+662             return getWrappedService().getFolderParent(repositoryId, folderId, filter, extension);
+663         } catch (Exception e) {
+664             throw createCmisException(e);
+665         }
+666     }
+667 
+668     public List<ObjectInFolderContainer> getFolderTree(String repositoryId, String folderId, BigInteger depth,
+669             String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
+670             String renditionFilter, Boolean includePathSegment, ExtensionsData extension) {
+671         checkRepositoryId(repositoryId);
+672         checkId("Folder Id", folderId);
+673         depth = getDepth(depth);
+674         includeAllowableActions = getDefaultFalse(includeAllowableActions);
+675         includeRelationships = getDefault(includeRelationships);
+676         renditionFilter = getDefaultRenditionFilter(renditionFilter);
+677         includePathSegment = getDefaultFalse(includePathSegment);
+678 
+679         try {
+680             return getWrappedService().getFolderTree(repositoryId, folderId, depth, filter, includeAllowableActions,
+681                     includeRelationships, renditionFilter, includePathSegment, extension);
+682         } catch (Exception e) {
+683             throw createCmisException(e);
+684         }
+685     }
+686 
+687     public List<ObjectParentData> getObjectParents(String repositoryId, String objectId, String filter,
+688             Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter,
+689             Boolean includeRelativePathSegment, ExtensionsData extension) {
+690         checkRepositoryId(repositoryId);
+691         checkId("Object Id", objectId);
+692         includeAllowableActions = getDefaultFalse(includeAllowableActions);
+693         includeRelationships = getDefault(includeRelationships);
+694         renditionFilter = getDefaultRenditionFilter(renditionFilter);
+695         includeRelativePathSegment = getDefaultFalse(includeRelativePathSegment);
+696 
+697         try {
+698             return getWrappedService().getObjectParents(repositoryId, objectId, filter, includeAllowableActions,
+699                     includeRelationships, renditionFilter, includeRelativePathSegment, extension);
+700         } catch (Exception e) {
+701             throw createCmisException(e);
+702         }
+703     }
+704 
+705     // --- object service ---
+706 
+707     public String create(String repositoryId, Properties properties, String folderId, ContentStream contentStream,
+708             VersioningState versioningState, List<String> policies, ExtensionsData extension) {
+709         checkRepositoryId(repositoryId);
+710         checkProperties(properties);
+711         checkProperty(properties, PropertyIds.OBJECT_TYPE_ID, String.class);
+712 
+713         try {
+714             return getWrappedService().create(repositoryId, properties, folderId, contentStream, versioningState,
+715                     policies, extension);
+716         } catch (Exception e) {
+717             throw createCmisException(e);
+718         }
+719     }
+720 
+721     public String createDocument(String repositoryId, Properties properties, String folderId,
+722             ContentStream contentStream, VersioningState versioningState, List<String> policies, Acl addAces,
+723             Acl removeAces, ExtensionsData extension) {
+724         checkRepositoryId(repositoryId);
+725         checkProperties(properties);
+726         checkProperty(properties, PropertyIds.OBJECT_TYPE_ID, String.class);

[... 552 lines stripped ...]