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 B720A17969 for ; Mon, 6 Apr 2015 17:13:38 +0000 (UTC) Received: (qmail 47614 invoked by uid 500); 6 Apr 2015 17:13:37 -0000 Delivered-To: apmail-chemistry-commits-archive@chemistry.apache.org Received: (qmail 47504 invoked by uid 500); 6 Apr 2015 17:13:37 -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 45455 invoked by uid 99); 6 Apr 2015 17:13:36 -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:13:36 +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 1F107AC0163 for ; Mon, 6 Apr 2015 17:13:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r946531 [30/44] - in /websites/staging/chemistry/trunk/content: ./ java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/ java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/css/ java/0.13... Date: Mon, 06 Apr 2015 17:13:32 -0000 To: commits@chemistry.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150406171336.1F107AC0163@hades.apache.org> Added: websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/browser/VersioningService.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/browser/VersioningService.html (added) +++ websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/browser/VersioningService.html Mon Apr 6 17:13:30 2015 @@ -0,0 +1,254 @@ + + + + +VersioningService xref + + + +
+
+1   /*
+2    * Licensed to the Apache Software Foundation (ASF) under one
+3    * or more contributor license agreements.  See the NOTICE file
+4    * distributed with this work for additional information
+5    * regarding copyright ownership.  The ASF licenses this file
+6    * to you under the Apache License, Version 2.0 (the
+7    * "License"); you may not use this file except in compliance
+8    * with the License.  You may obtain a copy of the License at
+9    *
+10   * http://www.apache.org/licenses/LICENSE-2.0
+11   *
+12   * Unless required by applicable law or agreed to in writing,
+13   * software distributed under the License is distributed on an
+14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+15   * KIND, either express or implied.  See the License for the
+16   * specific language governing permissions and limitations
+17   * under the License.
+18   */
+19  package org.apache.chemistry.opencmis.server.impl.browser;
+20  
+21  import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_ALLOWABLE_ACTIONS;
+22  import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_CHECKIN_COMMENT;
+23  import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_FILTER;
+24  import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_MAJOR;
+25  import static org.apache.chemistry.opencmis.commons.impl.Constants.PARAM_TOKEN;
+26  
+27  import java.util.Collections;
+28  import java.util.List;
+29  
+30  import javax.servlet.http.HttpServletRequest;
+31  import javax.servlet.http.HttpServletResponse;
+32  
+33  import org.apache.chemistry.opencmis.commons.data.ContentStream;
+34  import org.apache.chemistry.opencmis.commons.data.ObjectData;
+35  import org.apache.chemistry.opencmis.commons.enums.DateTimeFormat;
+36  import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+37  import org.apache.chemistry.opencmis.commons.impl.Constants;
+38  import org.apache.chemistry.opencmis.commons.impl.JSONConverter;
+39  import org.apache.chemistry.opencmis.commons.impl.TypeCache;
+40  import org.apache.chemistry.opencmis.commons.impl.json.JSONArray;
+41  import org.apache.chemistry.opencmis.commons.impl.json.JSONObject;
+42  import org.apache.chemistry.opencmis.commons.server.CallContext;
+43  import org.apache.chemistry.opencmis.commons.server.CmisService;
+44  import org.apache.chemistry.opencmis.commons.spi.Holder;
+45  
+46  /**
+47   * Versioning Service operations.
+48   */
+49  public class VersioningService {
+50  
+51      /**
+52       * checkOut.
+53       */
+54      public static class CheckOut extends AbstractBrowserServiceCall {
+55          public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
+56                  HttpServletResponse response) throws Exception {
+57              assert context != null;
+58              assert service != null;
+59              assert repositoryId != null;
+60              assert request != null;
+61              assert response != null;
+62  
+63              // get parameters
+64              String objectId = ((BrowserCallContextImpl) context).getObjectId();
+65              String token = getStringParameter(request, PARAM_TOKEN);
+66              boolean succinct = getBooleanParameter(request, Constants.CONTROL_SUCCINCT, false);
+67              DateTimeFormat dateTimeFormat = getDateTimeFormatParameter(request);
+68  
+69              // execute
+70              if (stopBeforeService(service)) {
+71                  return;
+72              }
+73  
+74              Holder<String> checkOutId = new Holder<String>(objectId);
+75              service.checkOut(repositoryId, checkOutId, null, null);
+76  
+77              if (stopAfterService(service)) {
+78                  return;
+79              }
+80  
+81              ObjectData object = getSimpleObject(service, repositoryId, checkOutId.getValue());
+82              if (object == null) {
+83                  throw new CmisRuntimeException("PWC is null!");
+84              }
+85  
+86              // return object
+87              TypeCache typeCache = new ServerTypeCacheImpl(repositoryId, service);
+88              JSONObject jsonObject = JSONConverter.convert(object, typeCache, JSONConverter.PropertyMode.OBJECT,
+89                      succinct, dateTimeFormat);
+90  
+91              // set headers
+92              setStatus(request, response, HttpServletResponse.SC_CREATED);
+93              response.setHeader("Location", compileObjectLocationUrl(request, repositoryId, object.getId()));
+94  
+95              setCookie(request, response, repositoryId, token,
+96                      createCookieValue(HttpServletResponse.SC_CREATED, object.getId(), null, null));
+97  
+98              writeJSON(jsonObject, request, response);
+99          }
+100     }
+101 
+102     /**
+103      * checkOut.
+104      */
+105     public static class CancelCheckOut extends AbstractBrowserServiceCall {
+106         public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
+107                 HttpServletResponse response) throws Exception {
+108             assert context != null;
+109             assert service != null;
+110             assert repositoryId != null;
+111             assert request != null;
+112             assert response != null;
+113 
+114             // get parameters
+115             String objectId = ((BrowserCallContextImpl) context).getObjectId();
+116 
+117             // execute
+118             if (stopBeforeService(service)) {
+119                 return;
+120             }
+121 
+122             service.cancelCheckOut(repositoryId, objectId, null);
+123 
+124             if (stopAfterService(service)) {
+125                 return;
+126             }
+127 
+128             response.setStatus(HttpServletResponse.SC_OK);
+129             writeEmpty(request, response);
+130         }
+131     }
+132 
+133     /**
+134      * checkIn.
+135      */
+136     public static class CheckIn extends AbstractBrowserServiceCall {
+137         public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
+138                 HttpServletResponse response) throws Exception {
+139             assert context != null;
+140             assert service != null;
+141             assert repositoryId != null;
+142             assert request != null;
+143             assert response != null;
+144 
+145             // get parameters
+146             String objectId = ((BrowserCallContextImpl) context).getObjectId();
+147             String typeId = ((BrowserCallContextImpl) context).getTypeId();
+148             Boolean major = getBooleanParameter(request, PARAM_MAJOR);
+149             String checkinComment = getStringParameter(request, PARAM_CHECKIN_COMMENT);
+150             String token = getStringParameter(request, PARAM_TOKEN);
+151             boolean succinct = getBooleanParameter(request, Constants.CONTROL_SUCCINCT, false);
+152             DateTimeFormat dateTimeFormat = getDateTimeFormatParameter(request);
+153 
+154             // execute
+155             ControlParser cp = new ControlParser(request);
+156             TypeCache typeCache = new ServerTypeCacheImpl(repositoryId, service);
+157             Holder<String> objectIdHolder = new Holder<String>(objectId);
+158             ContentStream contentStream = createContentStream(request);
+159 
+160             if (stopBeforeService(service)) {
+161                 return;
+162             }
+163 
+164             service.checkIn(repositoryId, objectIdHolder, major,
+165                     createUpdateProperties(cp, typeId, null, Collections.singletonList(objectId), typeCache),
+166                     contentStream, checkinComment, createPolicies(cp), createAddAcl(cp), createRemoveAcl(cp), null);
+167 
+168             if (stopAfterService(service)) {
+169                 return;
+170             }
+171 
+172             String newObjectId = (objectIdHolder.getValue() == null ? objectId : objectIdHolder.getValue());
+173 
+174             ObjectData object = getSimpleObject(service, repositoryId, newObjectId);
+175             if (object == null) {
+176                 throw new CmisRuntimeException("New version is null!");
+177             }
+178 
+179             // return object
+180             JSONObject jsonObject = JSONConverter.convert(object, typeCache, JSONConverter.PropertyMode.OBJECT,
+181                     succinct, dateTimeFormat);
+182 
+183             // set headers
+184             setStatus(request, response, HttpServletResponse.SC_CREATED);
+185             response.setHeader("Location", compileObjectLocationUrl(request, repositoryId, object.getId()));
+186 
+187             setCookie(request, response, repositoryId, token,
+188                     createCookieValue(HttpServletResponse.SC_CREATED, object.getId(), null, null));
+189 
+190             writeJSON(jsonObject, request, response);
+191         }
+192     }
+193 
+194     /**
+195      * getAllVersions.
+196      */
+197     public static class GetAllVersions extends AbstractBrowserServiceCall {
+198         public void serve(CallContext context, CmisService service, String repositoryId, HttpServletRequest request,
+199                 HttpServletResponse response) throws Exception {
+200             assert context != null;
+201             assert service != null;
+202             assert repositoryId != null;
+203             assert request != null;
+204             assert response != null;
+205 
+206             // get parameters
+207             String objectId = ((BrowserCallContextImpl) context).getObjectId();
+208             String filter = getStringParameter(request, PARAM_FILTER);
+209             Boolean includeAllowableActions = getBooleanParameter(request, PARAM_ALLOWABLE_ACTIONS);
+210             boolean succinct = getBooleanParameter(request, Constants.PARAM_SUCCINCT, false);
+211             DateTimeFormat dateTimeFormat = getDateTimeFormatParameter(request);
+212 
+213             // execute
+214             if (stopBeforeService(service)) {
+215                 return;
+216             }
+217 
+218             List<ObjectData> versions = service.getAllVersions(repositoryId, objectId, null, filter,
+219                     includeAllowableActions, null);
+220 
+221             if (stopAfterService(service)) {
+222                 return;
+223             }
+224 
+225             if (versions == null) {
+226                 throw new CmisRuntimeException("Versions are null!");
+227             }
+228 
+229             TypeCache typeCache = new ServerTypeCacheImpl(repositoryId, service);
+230             JSONArray jsonVersions = new JSONArray();
+231             for (ObjectData version : versions) {
+232                 jsonVersions.add(JSONConverter.convert(version, typeCache, JSONConverter.PropertyMode.OBJECT, succinct,
+233                         dateTimeFormat));
+234             }
+235 
+236             response.setStatus(HttpServletResponse.SC_OK);
+237             writeJSON(jsonVersions, request, response);
+238         }
+239     }
+240 }
+
+
+ + Added: websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/browser/package-frame.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/browser/package-frame.html (added) +++ websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/browser/package-frame.html Mon Apr 6 17:13:30 2015 @@ -0,0 +1,219 @@ + + + + + + OpenCMIS Server Implementation 0.13.0 Reference Package org.apache.chemistry.opencmis.server.impl.browser + + + + +

+ org.apache.chemistry.opencmis.server.impl.browser +

+ +

Classes

+ + + + + \ No newline at end of file Added: websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/browser/package-summary.html ============================================================================== --- websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/browser/package-summary.html (added) +++ websites/staging/chemistry/trunk/content/java/0.13.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/browser/package-summary.html Mon Apr 6 17:13:30 2015 @@ -0,0 +1,392 @@ + + + + + + OpenCMIS Server Implementation 0.13.0 Reference Package org.apache.chemistry.opencmis.server.impl.browser + + + +
+ +
+
+ +
+ +

Package org.apache.chemistry.opencmis.server.impl.browser

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class Summary
+ AbstractBrowserServiceCall +
+ AclService +
+ AddObjectToFolder +
+ AppendContentStream +
+ ApplyACL +
+ ApplyPolicy +
+ BrowserCallContextImpl +
+ BulkUpdateProperties +
+ CallUrl +
+ CancelCheckOut +
+ CheckIn +
+ CheckOut +
+ CmisBrowserBindingServlet +
+ ControlParser +
+ CreateDocument +
+ CreateDocumentFromSource +
+ CreateFolder +
+ CreateItem +
+ CreatePolicy +
+ CreateRelationship +
+ CreateType +
+ DeleteContentStream +
+ DeleteObject +
+ DeleteTree +
+ DeleteType +
+ DiscoveryService +
+ ErrorServiceCall +
+ GetACL +
+ GetAllVersions +
+ GetAllowableActions +
+ GetAppliedPolicies +
+ GetCheckedOutDocs +
+ GetChildren +
+ GetContentChanges +
+ GetContentStream +
+ GetDescendants +
+ GetFolderParent +
+ GetFolderTree +
+ GetLastResult +
+ GetObject +
+ GetObjectParents +
+ GetObjectRelationships +
+ GetProperties +
+ GetRenditions +
+ GetRepositories +
+ GetRepositoryInfo +
+ GetTypeChildren +
+ GetTypeDefinition +
+ GetTypeDescendants +
+ MoveObject +
+ MultiFilingService +
+ MultipartParser +
+ NavigationService +
+ ObjectService +
+ POSTHttpServletRequestWrapper +
+ PolicyService +
+ Query +
+ RelationshipService +
+ RemoveObjectFromFolder +
+ RemovePolicy +
+ RepositoryService +
+ ServerTypeCacheImpl +
+ SetContentStream +
+ UpdateProperties +
+ UpdateType +
+ VersioningService +
+ +
+ +
+
+ +
+
+ Copyright © 2009-2015 The Apache Software Foundation. All Rights Reserved. + + \ No newline at end of file