public ApplicationLinkRequest setEntity(final Object entity) { return setDelegate(request.setEntity(entity)); }
public ApplicationLinkRequest setEntity(final Object entity) { return setDelegate(request.setEntity(entity)); }
@SuppressWarnings("unchecked") private void setRemoteStatus(ApplinkOAuthStatus status, ApplicationLink applink, RequestFactoryAdapter requestFactoryAdapter) throws ResponseException, CredentialsRequiredException { createDefaultJsonRequest(requestFactoryAdapter, MethodType.PUT, getStatusResourceUrl(applink)) .setEntity(new RestApplinkOAuthStatus(status)) .executeAndReturn(LoggingReturningResponseHandler.INSTANCE); }
private void remoteEnableUsingAuthenticationApi(OAuthConfig incoming, OAuthConfig outgoing, ApplicationLink applink, RequestFactoryAdapter requestFactoryAdapter, RemoteApplicationCapabilities capabilities) throws AuthenticationConfigurationException { try { // enable consumer (incoming) if (incoming.isEnabled()) { createDefaultJsonRequest(requestFactoryAdapter, MethodType.PUT, getAuthenticationConsumerResourceUrl(applink, capabilities)) .setEntity(getRestConsumer(incoming)) .executeAndReturn(LoggingReturningResponseHandler.INSTANCE); } if (outgoing.isEnabled()) { String authenticationProviderUrl = getAuthenticationProviderResourceUrl(applink); // enable providers (outgoing) for (Class<? extends AuthenticationProvider> providerClass : getProviders(outgoing)) { createDefaultJsonRequest(requestFactoryAdapter, MethodType.PUT, authenticationProviderUrl) .setEntity(new RestAuthenticationProvider(providerClass)) .executeAndReturn(LoggingReturningResponseHandler.INSTANCE); } } } catch (ResponseException | CredentialsRequiredException e) { throw new AuthenticationConfigurationException(e); } }
.toString()); createLinkBackRequest.setEntity(linkBack);
.setEntity(linkBackToMyself) .executeAndReturn(new ReturningResponseHandler<Response, ErrorListEntity>() { public ErrorListEntity handle(final Response response) throws ResponseException {
createSelfLinkFor(internalHostApplication.getId())); createTwoWayLinkRequest.setEntity(linkBackToMyself);