Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * Copyright (C) 2009 eXo Platform SAS.
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
   * the License, or (at your option) any later version.
   * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * Lesser General Public License for more details.
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site:
 import java.util.Set;
Common configuration mechanism for WebDAV application. From JAX-RS specification, section 2.1
 The resources and providers that make up a JAX-RS application are configured
 via an application-supplied subclass of Application. An implementation MAY
 provide alternate mechanisms for locating resource classes and providers
 (e.g. runtime class scanning) but use of Application is the only portable
 means of configuration.

Andrey Parfonov
$Id: $
 public final class WebDAVApplication extends Application
    private Set<Class<?>> classes = new HashSet<Class<?>>();
    private Set<Objectsingletons = new HashSet<Object>();

This constructor will be used by third part RESTful frameworks that not use exo container directly.

    public WebDAVApplication()
       ExoContainer container = ExoContainerContext.getCurrentContainer();
       if (container instanceof RootContainer)
          container = RootContainer.getInstance().getPortalContainer(getPortalContainerName());
       // singleton
       // per-request

This constructor will be used by exo container.

webdavService WebDavService
    public WebDAVApplication(WebDavService webdavService)

    public Set<Class<?>> getClasses()
       return ;

    public Set<ObjectgetSingletons()
       return ;

Override this if you need other container name. This method should be used to set container name when this class is not component of exo container.

portal container name
   protected String getPortalContainerName()
New to GrepCode? Check out our FAQ X