All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.safelayer.rap.json.model.revocation.JsonRevocationPutRequest Maven / Gradle / Ivy

Go to download

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();
		}
		
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy