com.unbound.provider.kmip.request.GetAttributesRequest 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 java.util.ArrayList;
/**
* Created by valery.osheter on 25-Nov-15.
*/
public class GetAttributesRequest extends RequestItem
{
public String uid = null;
public ArrayList names = new ArrayList();
public boolean getCorrespondingKey = false;
public GetAttributesRequest()
{
super(KMIP.Operation.GetAttributes);
}
public GetAttributesRequest(String uid)
{
this();
this.uid = uid;
}
public GetAttributesRequest(String uid, String attribute)
{
this(uid);
this.names.add(attribute);
}
public GetAttributesRequest(String uid, ArrayList names)
{
this(uid);
this.names = names;
}
public void convert(KMIPConverter converter) throws KMIPConvertException
{
uid = converter.convertOptional(KMIP.Tag.UniqueIdentifier, uid);
converter.convertStrList(KMIP.Tag.AttributeName, names);
}
public void log()
{
Log log = Log.func("GetAttributesRequest").log("uid", uid).end();
for (String name : names) Log.print("Attribute").log("name", name).end();
log.leave();
}
}