use of javax.json.bind.annotation.JsonbTransient in project styx by petafuel.
the class AuthorizationCodeRequest method getRawBody.
@JsonbTransient
@Override
public Optional<String> getRawBody() {
String rawBody;
if (isJsonBody()) {
try (Jsonb jsonb = JsonbBuilder.create()) {
rawBody = jsonb.toJson(this);
} catch (Exception e) {
throw new SerializerException("Unable to create request body for AuthorizationCodeRequest", e);
}
} else {
Map<String, String> params = new HashMap<>();
params.put("grant_type", getGrantType());
params.put("client_id", getClientId());
params.put("code", getCode());
params.put("code_verifier", getCodeVerifier());
params.put("redirect_uri", getRedirectUri());
rawBody = BasicService.httpBuildQuery(params).substring(1);
}
return Optional.ofNullable(rawBody);
}
use of javax.json.bind.annotation.JsonbTransient in project SourceCodePortal by Cantara.
the class ScmCommitRevision method getProjectId.
@JsonbTransient
public String getProjectId() {
try {
URL url = new URL(htmlUrl);
String[] pathArray = url.getPath().split("\\/");
return pathArray[2];
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
use of javax.json.bind.annotation.JsonbTransient in project SourceCodePortal by Cantara.
the class GitHubCommitRevision method getProjectId.
@Deprecated
@JsonbTransient
public String getProjectId() {
try {
URL url = new URL(htmlUrl);
String[] pathArray = url.getPath().split("\\/");
return pathArray[2];
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
}
Aggregations