Returns the managed artifact requested in the HTTP call.

@param pathInfo
the path inferred from the GET HTTP URL.
@return the artifact.
962422
public ManagedArtifact getArtifact(String pathInfo) {
        LOGGER.entering();
        ManagedArtifact managedArtifact = serverRepository.getArtifact(pathInfo);
        LOGGER.exiting(managedArtifact);
        return managedArtifact;
    }
1339687
public com.google.api.SourceInfo getSourceInfo() {
    return sourceInfo_ == null ? com.google.api.SourceInfo.getDefaultInstance() : sourceInfo_;
  }
92957
public static String getVersion(String groupId, String artifactId, String defaultVersion) {
        String answer = getVersion(groupId, artifactId);
        if (Strings.isNullOrBlank(answer)) {
            answer = defaultVersion;
        }
        return answer;
    }
661551
public static MavenArtifactUrlReference.VersionResolver asInProject() {
        return new MavenArtifactUrlReference.VersionResolver() {

            @Override
            public String getVersion(final String groupId, final String artifactId) {
                return getArtifactVersion(groupId, artifactId);
            }

        };
    }
244358
@Override
    public String getPathInfo() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getPathInfo();
        } finally {
            collaborator.postInvoke();
        }
    }
301507
public function buildPath($pathInfo)
    {
        if (null === $this->getPath()) {
            return $pathInfo;
        }

        return sprintf($this->getPath(), rtrim($pathInfo, '/'));
    }
1329923
public String getRequestInfo(HttpServletRequest request) {
        return String.format("URI: %s; Scheme: %s; Host: %s; Port: %s; Origin: %s; Method: %s",
                             request.getRequestURI(),
                             request.getScheme(),
                             request.getServerName(),
                             request.getServerPort(),
                             request.getHeader("Origin"),
                             request.getMethod());
    }
855223
private function getUriFromBaseUrl($pathinfo)
    {
        $request = $this->application->getRequest();
        if (basename($request->getBaseUrl()) === basename($request->server->get('SCRIPT_NAME'))) {
            return $request->getSchemeAndHttpHost()
                    . substr($request->getBaseUrl(), 0, -1 * (1 + strlen(basename($request->getBaseUrl()))))
                    . $pathinfo;
        } else {
            return $request->getUriForPath($pathinfo);
        }
    }
56836
@GET
    @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
    @Path("/{gavc}" + ServerAPI.GET_ORGANIZATION)
    public Response getOrganization(@PathParam("gavc") final String gavc, @Context final UriInfo uriInfo){
        if(LOG.isInfoEnabled()) {
            LOG.info(String.format("Got a get artifact's organization request [%s]", gavc));
        }

        final ArtifactHandler artifactHandler = getArtifactHandler();
        final DbArtifact artifact = artifactHandler.getArtifact(gavc);
        final DbModule module = artifactHandler.getModule(artifact);

        if(module == null || module.getOrganization().isEmpty()) {
            return Response.noContent().build();
        }

        final DbOrganization organization = getOrganizationHandler().getOrganization(module.getOrganization());
        final OrganizationView view = new OrganizationView(getModelMapper().getOrganization(organization));
        return Response.ok(view).build();
    }
425970
public String getPathInfo()
    {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        
        SRTServletRequestThreadData reqData=SRTServletRequestThreadData.getInstance();
        // Begin PK06988, strip session id of when url rewriting is enabled
        if (reqData.getPathInfo()==null){
            String aPathInfo = ((WebAppDispatcherContext) this.getDispatchContext()).getPathInfo();
            if (aPathInfo == null)
                return null;
            else { // Do not strip based on ? again, it was already done and we don't want to strip '%3f's that have since been decoded to ?'s
                reqData.setPathInfo(WebGroup.stripURL(aPathInfo,false)); //293696    ServletRequest.getPathInfo() fails    WASCC.web.webcontainer
            }
        }    
        // 321485
        String path = reqData.getPathInfo();
        // PK28078
        if(path.equals("")) {
            if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) 
                logger.logp(Level.FINE, CLASS_NAME,"getPathInfo", " path is \"\", returning null");
            return null;
        }
        else {
            if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) 
                logger.logp(Level.FINE, CLASS_NAME,"getPathInfo", " path --> [" + path + "]");
            return path;
        }
        // return path;
        // End PK06988, strip session id of when url rewriting is enabled
    }
356832
public static Protos.CommandInfo.URI uri(MesosArtifactResolver resolver, ContainerSpecification.Artifact artifact) {
		checkNotNull(resolver);
		checkNotNull(artifact);
		Option<URL> url = resolver.resolve(artifact.dest);
		if (url.isEmpty()) {
			throw new IllegalArgumentException("Unresolvable artifact: " + artifact.dest);
		}

		return Protos.CommandInfo.URI.newBuilder()
			.setValue(url.get().toExternalForm())
			.setOutputFile(artifact.dest.toString())
			.setExtract(artifact.extract)
			.setCache(artifact.cachable)
			.setExecutable(artifact.executable)
			.build();
	}
340063
public static URI getUri(UriInfo uriInfo,
                             HttpServletRequest req,
                             String path) {
        String suffix = "";
        if (req.getRequestURI().endsWith(".json")) {
            suffix = ".json";
        } else if (req.getRequestURI().endsWith(".xml")) {
            suffix = ".xml";
        }
        return URI.create(uriInfo.getBaseUri() + "/" + path + suffix);
    }
85436
@GET
    @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
    @Path(ServerAPI.GET_GROUPIDS)
    public Response getGroupIds(@Context final UriInfo uriInfo){
        LOG.info("Got a get groupIds request [" + uriInfo.getPath() + "]");
        final ListView view = new ListView("GroupIds view", "groupId");
        final FiltersHolder filters = new FiltersHolder();
        filters.init(uriInfo.getQueryParameters());

        final List<String> groupIds = getArtifactHandler().getArtifactGroupIds(filters);
        Collections.sort(groupIds);
        view.addAll(groupIds);

        return Response.ok(view).build();
    }
758296
public String getURL()
    {
        validateNotEmpty( m_groupId, true, "Group" );
        validateNotEmpty( m_artifactId, true, "Artifact" );
        final StringBuilder url = new StringBuilder();
        url.append( "mvn:" ).append( m_groupId ).append( "/" ).append( m_artifactId );
        if( m_version != null || m_type != null || m_classifier != null )
        {
            url.append( "/" );
        }
        if( m_version != null )
        {
            url.append( m_version );
        }
        if( m_type != null || m_classifier != null )
        {
            url.append( "/" );
        }
        if( m_type != null )
        {
            url.append( m_type );
        }
        if( m_classifier != null )
        {
            url.append( "/" ).append( m_classifier );
        }
        return url.toString();
    }
5734
@Nonnull
  public static String getRequestPathInfo (@Nullable final HttpServletRequest aRequest)
  {
    String ret = null;
    if (aRequest != null)
      try
      {
        // They may return null!
        if (aRequest.isAsyncSupported () && aRequest.isAsyncStarted ())
          ret = (String) aRequest.getAttribute (AsyncContext.ASYNC_PATH_INFO);
        else
          ret = aRequest.getPathInfo ();
      }
      catch (final UnsupportedOperationException ex)
      {
        // Offline request - fall through
      }
      catch (final Exception ex)
      {
        // fall through
        if (isLogExceptions ())
          if (LOGGER.isWarnEnabled ())
            LOGGER.warn ("[ServletHelper] Failed to determine path info of HTTP request", ex);
      }
    return ret == null ? "" : ret;
  }
491034
public static String derivePomUrl(String artifactId, String version, String artifactUrl) {
        return artifactUrl.substring(0, artifactUrl.lastIndexOf('/')) + '/' + artifactId + '-' + version + ".pom";
    }
1013165
@RequestMapping(value = "information/{entityType}/{id}", method = RequestMethod.GET)
    public Resources<EntityInformation> getInformation(@PathVariable ProjectEntityType entityType, @PathVariable ID id) {
        // Gets the entity
        ProjectEntity entity = getEntity(entityType, id);
        // List of informations to return
        List<EntityInformation> informations = extensionManager.getExtensions(EntityInformationExtension.class).stream()
                .map(x -> x.getInformation(entity))
                .filter(Optional::isPresent)
                .map(Optional::get)
                .collect(Collectors.toList());

        // OK
        return Resources.of(
                informations,
                uri(MvcUriComponentsBuilder.on(getClass()).getInformation(entityType, id))
        );
    }