Class RESTArtifactLoaderService

java.lang.Object
org.exoplatform.services.jcr.ext.artifact.rest.RESTArtifactLoaderService
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer

public class RESTArtifactLoaderService extends Object implements org.exoplatform.services.rest.resource.ResourceContainer
Version:
$Id: RESTArtifactLoaderService.java 11:37:47 andrew00x $
Author:
Volodymyr Krasnikov volodymyr.krasnikov@exoplatform.com.ua
  • Constructor Summary

    Constructors
    Constructor
    Description
    RESTArtifactLoaderService(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService, org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.jcr.ext.resource.NodeRepresentationService nodeRepresentationService, org.exoplatform.container.ExoContainerContext context)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.ws.rs.core.Response
    getResource(String mavenPath, javax.ws.rs.core.UriInfo uriInfo, String view, String gadget)
    Return Response with Maven artifact if it is file or HTML page for browsing if requested URL is folder.
    javax.ws.rs.core.Response
    getRootNodeList(javax.ws.rs.core.UriInfo uriInfo, String view, String gadget)
    Browsing of root node of Maven repository.
    protected String
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RESTArtifactLoaderService

      public RESTArtifactLoaderService(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService, org.exoplatform.services.jcr.RepositoryService repositoryService, org.exoplatform.services.jcr.ext.resource.NodeRepresentationService nodeRepresentationService, org.exoplatform.container.ExoContainerContext context) throws Exception
      Parameters:
      initParams - the initialized parameters. Set repository name, workspace name, root node for Maven repository, username(optional) and password (optional).
      sessionProviderService - the SessionProviderService.
      repositoryService - the RepositoryService.
      nodeRepresentationService - the NodeRepresentationService.
      Throws:
      Exception - if any errors occur or not valid configuration.
  • Method Details

    • getResource

      public javax.ws.rs.core.Response getResource(String mavenPath, @Context javax.ws.rs.core.UriInfo uriInfo, String view, String gadget)
      Return Response with Maven artifact if it is file or HTML page for browsing if requested URL is folder.
      Parameters:
      mavenPath - the relative part of requested URL.
      uriInfo -
      view -
      gadget -
      Returns:
      Response.
    • getRootNodeList

      public javax.ws.rs.core.Response getRootNodeList(@Context javax.ws.rs.core.UriInfo uriInfo, String view, String gadget)
      Browsing of root node of Maven repository.
      Parameters:
      uriInfo -
      view -
      gadget -
      Returns:
      Response.
    • getStreamAsString

      protected String getStreamAsString(InputStream stream) throws IOException
      Parameters:
      stream - stream
      Returns:
      string representation of stream
      Throws:
      IOException - if any i/o errors occurs