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

com.unbound.kmip.request.GetAttributesRequest Maven / Gradle / Ivy

Go to download

This is a collection of JAVA libraries that implement Unbound cryptographic classes for JAVA provider, PKCS11 wrapper, cryptoki, and advapi

There is a newer version: 42761
Show newest version
package com.unbound.kmip.request;

import com.unbound.common.Log;
import com.unbound.kmip.KMIP;
import com.unbound.kmip.KMIPConvertException;
import com.unbound.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();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy