com.unbound.provider.kmip.request.GetRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unbound-java-provider Show documentation
Show all versions of unbound-java-provider Show documentation
This is a collection of JAVA libraries that implement Unbound cryptographic classes for JAVA provider, PKCS11 wrapper, cryptoki, and advapi
package com.unbound.provider.kmip.request;
import com.unbound.common.Log;
import com.unbound.provider.kmip.KMIP;
import com.unbound.provider.kmip.KMIPConvertException;
import com.unbound.provider.kmip.KMIPConverter;
import com.unbound.provider.kmip.attribute.KeyWrappingSpec;
/**
* Created by valery.osheter on 25-Nov-15.
*/
public class GetRequest extends RequestItem
{
public String uid = null;
public Integer formatType = null;
public Integer compressionType = null;
public KeyWrappingSpec keyWrap = null;
public String password;
public GetRequest()
{
super(KMIP.Operation.Get);
}
public void convert(KMIPConverter converter) throws KMIPConvertException
{
uid = converter.convertOptional(KMIP.Tag.UniqueIdentifier, uid);
formatType = converter.convertOptional(KMIP.Tag.KeyFormatType, formatType);
compressionType = converter.convertOptional(KMIP.Tag.KeyCompressionType, compressionType);
if (!converter.isWrite() && converter.getNextTag() == KMIP.Tag.KeyWrappingSpecification)
{
keyWrap = new KeyWrappingSpec();
}
if (keyWrap != null) keyWrap.convert(converter);
password = converter.convertOptional(KMIP.Tag.DyPfxPassword, password);
}
public void log()
{
Log log = Log.func("GetRequest").
log("uid", uid).
log("formatType", formatType).
log("compressionType", compressionType).
end();
if (keyWrap!=null) keyWrap.log();
log.leave();
}
}