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 3864BD618 for ; Tue, 28 May 2013 07:23:05 +0000 (UTC) Received: (qmail 74352 invoked by uid 500); 28 May 2013 07:23:05 -0000 Delivered-To: apmail-chemistry-commits-archive@chemistry.apache.org Received: (qmail 74289 invoked by uid 500); 28 May 2013 07:23:04 -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 74279 invoked by uid 99); 28 May 2013 07:23:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 May 2013 07:23:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 May 2013 07:22:39 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 644182388BF1; Tue, 28 May 2013 07:21:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1486787 [9/40] - in /chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings: ./ css/ images/ images/logos/ xref-test/ xref-test/org/ xref-test/org/apache/ xref-test/org/apache/chemistry/ ... Date: Tue, 28 May 2013 07:21:44 -0000 To: commits@chemistry.apache.org From: gabriele@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130528072151.644182388BF1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/ProxyHttpServletRequestWrapper.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/ProxyHttpServletRequestWrapper.html?rev=1486787&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/ProxyHttpServletRequestWrapper.html (added) +++ chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/ProxyHttpServletRequestWrapper.html Tue May 28 07:21:41 2013 @@ -0,0 +1,144 @@ + + + + +ProxyHttpServletRequestWrapper 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.filter;
+20  
+21  import javax.servlet.http.HttpServletRequest;
+22  import javax.servlet.http.HttpServletRequestWrapper;
+23  
+24  public class ProxyHttpServletRequestWrapper extends HttpServletRequestWrapper {
+25  
+26      public static final String FORWARDED_HOST_HEADER = "X-Forwarded-Host";
+27      public static final String FORWARDED_PROTO_HEADER = "X-Forwarded-Proto";
+28      public static final String HTTPS_SCHEME = "https";
+29      public static final String HTTP_SCHEME = "http";
+30  
+31      private String scheme;
+32      private String serverName;
+33      private int serverPort;
+34      private final String contextPath;
+35      private final String servletPath;
+36      private final String requestURI;
+37  
+38      public ProxyHttpServletRequestWrapper(HttpServletRequest request, String basePath) {
+39          super(request);
+40  
+41          scheme = request.getHeader(FORWARDED_PROTO_HEADER);
+42  
+43          if (!HTTP_SCHEME.equalsIgnoreCase(scheme) && !HTTPS_SCHEME.equalsIgnoreCase(scheme)) {
+44              scheme = request.getScheme();
+45          }
+46  
+47          serverName = request.getServerName();
+48          serverPort = request.getServerPort();
+49  
+50          String host = request.getHeader(FORWARDED_HOST_HEADER);
+51          if ((host != null) && (host.length() > 0)) {
+52              int index = host.indexOf(':');
+53              if (index < 0) {
+54                  serverName = host;
+55                  serverPort = getDefaultPort(scheme);
+56              } else {
+57                  serverName = host.substring(0, index);
+58                  try {
+59                      serverPort = Integer.parseInt(host.substring(index + 1));
+60                  } catch (NumberFormatException e) {
+61                      serverPort = getDefaultPort(scheme);
+62                  }
+63              }
+64          }
+65  
+66          servletPath = request.getServletPath();
+67  
+68          if (basePath != null) {
+69              final String path = request.getRequestURI().substring(
+70                      request.getContextPath().length() + request.getServletPath().length());
+71  
+72              contextPath = (basePath.startsWith("/") ? basePath : "/" + basePath);
+73              requestURI = contextPath + servletPath + path;
+74          } else {
+75              contextPath = request.getContextPath();
+76              requestURI = request.getRequestURI();
+77          }
+78      }
+79  
+80      private int getDefaultPort(String scheme) {
+81          if (HTTPS_SCHEME.equalsIgnoreCase(scheme)) {
+82              return 443;
+83          }
+84  
+85          return 80;
+86      }
+87  
+88      @Override
+89      public String getScheme() {
+90          return scheme;
+91      }
+92  
+93      @Override
+94      public String getServerName() {
+95          return serverName;
+96      }
+97  
+98      @Override
+99      public int getServerPort() {
+100         return serverPort;
+101     }
+102 
+103     @Override
+104     public String getContextPath() {
+105         return contextPath;
+106     }
+107 
+108     @Override
+109     public String getServletPath() {
+110         return servletPath;
+111     }
+112 
+113     @Override
+114     public String getRequestURI() {
+115         return requestURI;
+116     }
+117 
+118     @Override
+119     public StringBuffer getRequestURL() {
+120         StringBuffer sb = new StringBuffer();
+121         sb.append(scheme);
+122         sb.append("://");
+123         sb.append(serverName);
+124         sb.append(":");
+125         sb.append(serverPort);
+126         sb.append(getRequestURI());
+127 
+128         return sb;
+129     }
+130 }
+
+
+ + Added: chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/package-frame.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/package-frame.html?rev=1486787&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/package-frame.html (added) +++ chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/package-frame.html Tue May 28 07:21:41 2013 @@ -0,0 +1,27 @@ + + + + + + OpenCMIS Server Implementation 0.9.0 Reference Package org.apache.chemistry.opencmis.server.filter + + + + +

+ org.apache.chemistry.opencmis.server.filter +

+ +

Classes

+ + + + + \ No newline at end of file Added: chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/package-summary.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/package-summary.html?rev=1486787&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/package-summary.html (added) +++ chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/filter/package-summary.html Tue May 28 07:21:41 2013 @@ -0,0 +1,72 @@ + + + + + + OpenCMIS Server Implementation 0.9.0 Reference Package org.apache.chemistry.opencmis.server.filter + + + +
+ +
+
+ +
+ +

Package org.apache.chemistry.opencmis.server.filter

+ + + + + + + + + + + + + + + +
Class Summary
+ ProxyFilter +
+ ProxyHttpServletRequestWrapper +
+ +
+ +
+
+ +
+
+ Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved. + + \ No newline at end of file Added: chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/CallContextImpl.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/CallContextImpl.html?rev=1486787&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/CallContextImpl.html (added) +++ chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/CallContextImpl.html Tue May 28 07:21:41 2013 @@ -0,0 +1,216 @@ + + + + +CallContextImpl 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;
+20  
+21  import java.io.File;
+22  import java.math.BigInteger;
+23  import java.util.HashMap;
+24  import java.util.Locale;
+25  import java.util.Map;
+26  
+27  import javax.servlet.ServletContext;
+28  import javax.servlet.http.HttpServletRequest;
+29  import javax.servlet.http.HttpServletResponse;
+30  
+31  import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
+32  import org.apache.chemistry.opencmis.commons.server.CallContext;
+33  import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
+34  import org.apache.chemistry.opencmis.server.shared.ThresholdOutputStreamFactory;
+35  
+36  /**
+37   * Implementation of the {@link CallContext} interface.
+38   */
+39  public class CallContextImpl implements CallContext {
+40  
+41      private final String binding;
+42      private final boolean objectInfoRequired;
+43      private final Map<String, Object> parameter = new HashMap<String, Object>();
+44  
+45      public CallContextImpl(String binding, CmisVersion cmisVersion, String repositoryId, ServletContext servletContext,
+46              HttpServletRequest request, HttpServletResponse response, CmisServiceFactory factory,
+47              ThresholdOutputStreamFactory streamFactory) {
+48          this.binding = binding;
+49          this.objectInfoRequired = BINDING_ATOMPUB.equals(binding);
+50          put(REPOSITORY_ID, repositoryId);
+51  
+52          // CMIS version
+53          put(CallContext.CMIS_VERSION, cmisVersion);
+54  
+55          // servlet context and HTTP servlet request and response
+56          put(CallContext.SERVLET_CONTEXT, servletContext);
+57          put(CallContext.HTTP_SERVLET_REQUEST, request);
+58          put(CallContext.HTTP_SERVLET_RESPONSE, response);
+59  
+60          if (streamFactory != null) {
+61              put(TEMP_DIR, streamFactory.getTempDir());
+62              put(MEMORY_THRESHOLD, streamFactory.getMemoryThreshold());
+63              put(MAX_CONTENT_SIZE, streamFactory.getMaxContentSize());
+64              put(ENCRYPT_TEMP_FILE, streamFactory.isEncrypted());
+65              put(STREAM_FACTORY, streamFactory);
+66          } else if (factory != null) {
+67              put(TEMP_DIR, factory.getTempDirectory());
+68              put(MEMORY_THRESHOLD, factory.getMemoryThreshold());
+69              put(MAX_CONTENT_SIZE, -1);
+70              put(ENCRYPT_TEMP_FILE, false);
+71          }
+72      }
+73  
+74      public void setRange(String rangeHeader) {
+75          if (rangeHeader == null) {
+76              return;
+77          }
+78  
+79          rangeHeader = rangeHeader.trim().toLowerCase(Locale.ENGLISH);
+80  
+81          if (rangeHeader.length() > 6 && rangeHeader.startsWith("bytes=") && rangeHeader.indexOf(',') == -1
+82                  && rangeHeader.charAt(6) != '-') {
+83              BigInteger offset = null;
+84              BigInteger length = null;
+85  
+86              int ds = rangeHeader.indexOf('-');
+87              if (ds > 6) {
+88                  try {
+89                      String firstBytePosStr = rangeHeader.substring(6, ds);
+90                      if (firstBytePosStr.length() > 0) {
+91                          offset = new BigInteger(firstBytePosStr);
+92                      }
+93  
+94                      if (!rangeHeader.endsWith("-")) {
+95                          String lastBytePosStr = rangeHeader.substring(ds + 1);
+96                          if (offset == null) {
+97                              length = (new BigInteger(lastBytePosStr)).add(BigInteger.ONE);
+98                          } else {
+99                              length = (new BigInteger(lastBytePosStr)).subtract(offset).add(BigInteger.ONE);
+100                         }
+101                     }
+102 
+103                     if (offset != null) {
+104                         put(OFFSET, offset);
+105                     }
+106                     if (length != null) {
+107                         put(LENGTH, length);
+108                     }
+109                 } catch (NumberFormatException e) {
+110                     // invalid Range header must be ignored
+111                 }
+112             }
+113         }
+114     }
+115 
+116     public void setAcceptLanguage(String acceptLanguageHeader) {
+117         if (acceptLanguageHeader == null) {
+118             return;
+119         }
+120 
+121         String[] locale = acceptLanguageHeader.split("-");
+122         put(LOCALE_ISO639_LANGUAGE, locale[0].trim());
+123         if (locale.length > 1) {
+124             int x = locale[1].indexOf(',');
+125             if (x == -1) {
+126                 put(LOCALE_ISO3166_COUNTRY, locale[1].trim());
+127             } else {
+128                 put(LOCALE_ISO3166_COUNTRY, locale[1].substring(0, x).trim());
+129             }
+130         }
+131     }
+132 
+133     public String getBinding() {
+134         return binding;
+135     }
+136 
+137     public boolean isObjectInfoRequired() {
+138         return objectInfoRequired;
+139     }
+140 
+141     public Object get(String key) {
+142         return parameter.get(key);
+143     }
+144 
+145     public CmisVersion getCmisVersion() {
+146         return (CmisVersion) get(CMIS_VERSION);
+147     }
+148 
+149     public String getRepositoryId() {
+150         return (String) get(REPOSITORY_ID);
+151     }
+152 
+153     public String getUsername() {
+154         return (String) get(USERNAME);
+155     }
+156 
+157     public String getPassword() {
+158         return (String) get(PASSWORD);
+159     }
+160 
+161     public String getLocale() {
+162         return (String) get(LOCALE);
+163     }
+164 
+165     public BigInteger getOffset() {
+166         return (BigInteger) get(OFFSET);
+167     }
+168 
+169     public BigInteger getLength() {
+170         return (BigInteger) get(LENGTH);
+171     }
+172 
+173     public File getTempDirectory() {
+174         return (File) get(TEMP_DIR);
+175     }
+176 
+177     public boolean encryptTempFiles() {
+178         return Boolean.TRUE.equals(get(ENCRYPT_TEMP_FILE));
+179     }
+180 
+181     public int getMemoryThreshold() {
+182         return (Integer) get(MEMORY_THRESHOLD);
+183     }
+184 
+185     public long getMaxContentSize() {
+186         return (Long) get(MAX_CONTENT_SIZE);
+187     }
+188 
+189     /**
+190      * Adds a parameter.
+191      */
+192     public void put(String key, Object value) {
+193         parameter.put(key, value);
+194     }
+195 
+196     /**
+197      * Removes a parameter.
+198      */
+199     public Object remove(String key) {
+200         return parameter.remove(key);
+201     }
+202 }
+
+
+ + Added: chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.html?rev=1486787&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.html (added) +++ chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.html Tue May 28 07:21:41 2013 @@ -0,0 +1,147 @@ + + + + +CmisRepositoryContextListener 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;
+20  
+21  import java.io.IOException;
+22  import java.io.InputStream;
+23  import java.util.Enumeration;
+24  import java.util.HashMap;
+25  import java.util.Map;
+26  import java.util.Properties;
+27  
+28  import javax.servlet.ServletContextEvent;
+29  import javax.servlet.ServletContextListener;
+30  
+31  import org.apache.chemistry.opencmis.commons.impl.ClassLoaderUtil;
+32  import org.apache.chemistry.opencmis.commons.server.CmisServiceFactory;
+33  import org.slf4j.Logger;
+34  import org.slf4j.LoggerFactory;
+35  
+36  /**
+37   * CMIS context listener.
+38   */
+39  public class CmisRepositoryContextListener implements ServletContextListener {
+40  
+41      public static final String SERVICES_FACTORY = "org.apache.chemistry.opencmis.servicesfactory";
+42  
+43      private static final Logger LOG = LoggerFactory.getLogger(CmisRepositoryContextListener.class.getName());
+44  
+45      private static final String CONFIG_INIT_PARAM = "org.apache.chemistry.opencmis.REPOSITORY_CONFIG_FILE";
+46      private static final String CONFIG_FILENAME = "/repository.properties";
+47      private static final String PROPERTY_CLASS = "class";
+48  
+49      public void contextInitialized(ServletContextEvent sce) {
+50          // get config file name or use default
+51          String configFilename = sce.getServletContext().getInitParameter(CONFIG_INIT_PARAM);
+52          if (configFilename == null) {
+53              configFilename = CONFIG_FILENAME;
+54          }
+55  
+56          // create services factory
+57          CmisServiceFactory factory = createServiceFactory(configFilename);
+58  
+59          // set the services factory into the servlet context
+60          sce.getServletContext().setAttribute(SERVICES_FACTORY, factory);
+61      }
+62  
+63      public void contextDestroyed(ServletContextEvent sce) {
+64          // destroy services factory
+65          CmisServiceFactory factory = (CmisServiceFactory) sce.getServletContext().getAttribute(SERVICES_FACTORY);
+66          if (factory != null) {
+67              factory.destroy();
+68          }
+69      }
+70  
+71      /**
+72       * Creates a service factory.
+73       */
+74      private CmisServiceFactory createServiceFactory(String filename) {
+75          // load properties
+76          InputStream stream = this.getClass().getResourceAsStream(filename);
+77  
+78          if (stream == null) {
+79              LOG.warn("Cannot find configuration!");
+80              return null;
+81          }
+82  
+83          Properties props = new Properties();
+84          try {
+85              props.load(stream);
+86          } catch (IOException e) {
+87              LOG.warn("Cannot load configuration: " + e, e);
+88              return null;
+89          } finally {
+90              try {
+91                  stream.close();
+92              } catch (IOException ioe) {
+93              }
+94          }
+95  
+96          // get 'class' property
+97          String className = props.getProperty(PROPERTY_CLASS);
+98          if (className == null) {
+99              LOG.warn("Configuration doesn't contain the property 'class'!");
+100             return null;
+101         }
+102 
+103         // create a factory instance
+104         Object object = null;
+105         try {
+106             object = ClassLoaderUtil.loadClass(className).newInstance();
+107         } catch (Exception e) {
+108             LOG.warn("Could not create a services factory instance: " + e, e);
+109             return null;
+110         }
+111 
+112         if (!(object instanceof CmisServiceFactory)) {
+113             LOG.warn("The provided class is not an instance of CmisServiceFactory!");
+114         }
+115 
+116         CmisServiceFactory factory = (CmisServiceFactory) object;
+117 
+118         // initialize factory instance
+119         Map<String, String> parameters = new HashMap<String, String>();
+120 
+121         for (Enumeration<?> e = props.propertyNames(); e.hasMoreElements();) {
+122             String key = (String) e.nextElement();
+123             String value = props.getProperty(key);
+124             parameters.put(key, value);
+125         }
+126 
+127         factory.init(parameters);
+128 
+129         LOG.info("Initialized Services Factory: " + factory.getClass().getName());
+130 
+131         return factory;
+132     }
+133 }
+
+
+ + Added: chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/ServerVersion.html URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/ServerVersion.html?rev=1486787&view=auto ============================================================================== --- chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/ServerVersion.html (added) +++ chemistry/site/trunk/content/java/0.9.0/maven/chemistry-opencmis-server/chemistry-opencmis-server-bindings/xref/org/apache/chemistry/opencmis/server/impl/ServerVersion.html Tue May 28 07:21:41 2013 @@ -0,0 +1,50 @@ + + + + +ServerVersion 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;
+20  
+21  public class ServerVersion {
+22  
+23      public static final String OPENCMIS_VERSION;
+24      public static final String OPENCMIS_SERVER;
+25  
+26      static {
+27          Package p = Package.getPackage("org.apache.chemistry.opencmis.server.impl");
+28          if (p == null) {
+29              OPENCMIS_VERSION = "?";
+30              OPENCMIS_SERVER = "Apache-Chemistry-OpenCMIS";
+31          } else {
+32              OPENCMIS_VERSION = p.getImplementationVersion();
+33              OPENCMIS_SERVER = "Apache-Chemistry-OpenCMIS/" + (OPENCMIS_VERSION == null ? "?" : OPENCMIS_VERSION);
+34          }
+35      }
+36  }
+
+
+ +