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

com.unbound.provider.kmip.attribute.RevocationReason 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.provider.kmip.attribute;

import com.unbound.common.Log;
import com.unbound.provider.kmip.KMIP;
import com.unbound.provider.kmip.KMIPConvertException;
import com.unbound.provider.kmip.KMIPConverter;

/**
 * Created by valery.osheter on 19-Nov-15.
 */
public class RevocationReason extends Attribute
{

  public int code = 0;
  public String message = null;

  public RevocationReason()
  {
    super(KMIP.Tag.RevocationReason);
  }

  public RevocationReason(int reason)
  {
    this();
    this.code = reason;
  }

  public void convertValue(KMIPConverter converter, int tag) throws KMIPConvertException
  {
    int begin = converter.convertBegin(tag);
    code = converter.convert(KMIP.Tag.RevocationReasonCode, code);
    message = converter.convertOptional(KMIP.Tag.RevocationMessage, message);
    converter.convertEnd(begin);
  }

  public void convertValue(KMIPConverter converter) throws KMIPConvertException
  {
    convertValue(converter, KMIP.Tag.RevocationReason);
  }

  public void convert(KMIPConverter converter) throws KMIPConvertException
  {
    convertValue(converter, KMIP.tagAttributeValue(KMIP.TagType.Structure));
  }

  public void log()
  {
    Log.print("RevocationReason").
      log("code", code).
      log("message", message).
    end();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy