Return the request builder based on the resource name for the server
@param requestType the type of the request
@param restOperation the rest operation type
@return the requestbuilder
182923
private Builder getResourceRequest(final RequestTypeEnum requestType, final RestOperationTypeEnum restOperation) {
        return getRequest(requestType, restOperation, getResourceType().getSimpleName());
    }
661038
@Override
    public List<String> buildRequestUrl(final String resourceUri, final Endpoint endpoint) {
        LOGGER.debug("Processing: " + resourceUri);
        Objects.requireNonNull(resourceUri);
        try {
            final Optional<String> nonRdfSourceDescUri =
                    getNonRDFSourceDescribedByUri(resourceUri);
            if ( nonRdfSourceDescUri.isPresent() ) {
                return Collections.singletonList(nonRdfSourceDescUri.get());
            }
        } catch (final IOException ex) {
            throw new UncheckedIOException(ex);
        }
        return Collections.singletonList(resourceUri);
    }
740413
public static <T> SerializerBinderBuilder<T> builderOf(Binder binder, TypeReference<T> type) {
        return new SerializerBinderBuilderImpl<T> (binder, type);
    }
1251378
@POST
  @Path("/{id}/$someCustomOperation")
  public Response someCustomOperationUsingPost(@PathParam("id") String id, String resource) throws Exception {
    return customOperation(resource, RequestTypeEnum.POST, id, "$someCustomOperation", 
            RestOperationTypeEnum.EXTENDED_OPERATION_INSTANCE);
  }
594748
public static Builder builder(ServiceMetadata serviceMetadata) {
    checkNotNull(serviceMetadata, "serviceMetadata: null");
    ServerDto server = ServerDto.builder()
        .setHostName(serviceMetadata.getHostName())
        .setStartupDateTime(serviceMetadata.getStartupTime())
        .build();
    BuildDto build = BuildDto.builder()
        .setArtifactName(serviceMetadata.getBuildInfo().getArtifactId())
        .setVersion(serviceMetadata.getBuildInfo().getVersion())
        .setBuildDateTime(serviceMetadata.getBuildInfo().getBuildDateTime())
        .build();
    return new AutoValue_HealthDto.Builder()
        .setServer(server)
        .setbuild(build)
        .setMessage(Optional.empty())
        .setDependencies(Optional.empty());
  }
410446
private Optional<Configuration> makeRootServiceConfiguration(final Optional<Configuration> serviceConfiguration) {
    final EvaluatorType evaluatorType = this.evaluatorManager.getEvaluatorDescriptor().getProcess().getType();
    if (EvaluatorType.CLR == evaluatorType) {
      LOG.log(Level.FINE, "Not using the ConfigurationProviders as we are configuring a {0} Evaluator.", evaluatorType);
      return serviceConfiguration;
    }

    if (!serviceConfiguration.isPresent() && this.evaluatorConfigurationProviders.isEmpty()) {
      // No configurations to merge.
      LOG.info("No service configuration given and no ConfigurationProviders set.");
      return Optional.empty();
    } else {
      final ConfigurationBuilder configurationBuilder = getConfigurationBuilder(serviceConfiguration);
      for (final ConfigurationProvider configurationProvider : this.evaluatorConfigurationProviders) {
        configurationBuilder.addConfiguration(configurationProvider.getConfiguration());
      }
      return Optional.of(configurationBuilder.build());
    }
  }
1009923
public static ResourceRequest getUnitResourceRequest(ResourceType type) {
    ResourceRequest req = unitResourceRequestMap.get(type);
    if (req == null) {
      req = new ResourceRequest(1, type);
      req.setSpecs(UNIT_COMPUTE_SPECS);

      // instead of using concurrent classes or locking - we clone and replace
      // the map with a new entry. this makes sense because this structure is
      // entirely read-only and will be populated quickly at bootstrap time

      HashMap<ResourceType, ResourceRequest> newMap =
          new HashMap<ResourceType, ResourceRequest>();
      for (Map.Entry<ResourceType, ResourceRequest> entry :
          unitResourceRequestMap.entrySet()) {
        newMap.put(entry.getKey(), entry.getValue());
      }
      newMap.put(type, req);
      unitResourceRequestMap = newMap;
    }
    return req;
  }
391991
public <T> Optional<T> GET(String partialUrl, GenericType<T> returnType)
    {    
        URI uri = buildUri(partialUrl);   
        return executeGetRequest(uri, returnType);
    }
821400
private Type getRequestType(ODataRequest oDataRequest, ODataUri oDataUri) throws ODataTargetTypeException {
        TargetType targetType = WriteMethodUtil.getTargetType(oDataRequest, entityDataModel, oDataUri);
        return entityDataModel.getType(targetType.typeName());
    }
646750
protected <T, K extends Serializable>
    Query<T> _buildQuery(
                    final DAO<T, K>  dao,
                    final Class<T> type,
                    final QueryParams params
                    )
    {
        Query<T>  query = null;
        try {
            query = dao.createQuery();
            QueryBuilder  builder = _getQueryBuilderFactory().newBuilder( type );
            query = builder.build( query, params );
        } catch (RepositoryConfigurationException ex) {
            throw ex;
        } catch (QueryException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new QueryException( ex );
        }

        return query;
    }
1086021
protected org.apache.http.impl.client.HttpClientBuilder customizeBuilder(
        org.apache.http.impl.client.HttpClientBuilder builder
    ) {
        return builder;
    }
205418
public static ClientConfigurationBuilder builder(final String url, final String username, final String password) {
        return new ClientConfigurationBuilder(url, username, password);
    }
699396
public Builder getRequest(final RequestTypeEnum requestType, final RestOperationTypeEnum restOperation, final String theResourceName) {
		return new JaxRsRequest.Builder(this, requestType, restOperation, myUriInfo.getRequestUri().toString(), theResourceName);
	}
885512
public static ServiceDependencyBuilder serviceDependency(final String url) {
        return new ServiceDependencyBuilder()
                .withUrl(url)
                .withType(ServiceDependency.TYPE_SERVICE)
                .withSubtype(ServiceDependency.SUBTYPE_OTHER);
    }
1106603
@Override
	public List<ComponentBindingsProvider> getComponentBindingsProviders(
			String resourceType) {
		List<ComponentBindingsProvider> cis = new ArrayList<ComponentBindingsProvider>();
		for (ServiceReference reference : getReferences(resourceType)) {
			ComponentBindingsProvider ci = ComponentBindingsProvider.class
					.cast(bundleContext.getService(reference));
			cis.add(ci);
		}

		if (cis.size() != 0 && log.isDebugEnabled()) {
			log.debug(
					"Found {} Component Bindings Providers Services for resource type {}",
					cis.size(), resourceType);
		}

		return cis;
	}
1292137
@SuppressWarnings("unchecked")
    @Override
    public <T> T get(EntityGetOperation<T> getter) throws ServiceException {
        getter.setProxyData(createProxyData());
        Object rawResponse = getResource(getter).get(getter.getResponseClass());
        Object processedResponse = getter.processResponse(rawResponse);
        return (T) processedResponse;
    }
376681
@com.fasterxml.jackson.annotation.JsonProperty("ResourceType")
    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }