com.safelayer.rap.json.model.revocation.JsonRevocationPutRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pki-connector-restapi Show documentation
Show all versions of pki-connector-restapi Show documentation
The PKI Connector RESTAPI is a library that helps developing new PKI Connectors for TrustedX
The newest version!
package com.safelayer.rap.json.model.revocation;
import javax.ws.rs.BadRequestException;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.safelayer.rap.api.model.revocation.RevocationPutCertificatesRequest;
import com.safelayer.rap.api.model.revocation.RevocationPutRequest;
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY,
property = "action")
@JsonSubTypes({
@JsonSubTypes.Type(value=JsonRevocationPutCertificatesRequest.class, name="put_certificates")
})
public abstract class JsonRevocationPutRequest implements RevocationPutRequest {
public JsonRevocationPutRequest() {
}
static public JsonRevocationPutRequest instance(RevocationPutRequest req) throws Exception {
if (req instanceof RevocationPutCertificatesRequest) {
return new JsonRevocationPutCertificatesRequest((RevocationPutCertificatesRequest)req);
}
else {
throw new BadRequestException();
}
}
}