public class Policy extends Ffi
| Constructor and Description |
|---|
Policy()
Instantiate an empty policy allowing up to 2^32 attribute modifications.
|
Policy(byte[] bytes)
Instantiate a `Policy` with the given bytes.
|
Policy(PolicyAxis[] axes)
Constructs a Policy object with a specified limit on the number of attribute creations and a set of policy axes,
retrieves its policy buffer, and initializes its byte array.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAxis(PolicyAxis axis)
Add the given Axis to this policy in place.
|
boolean |
equals(Object o) |
static Policy |
fromAttributes(Attributes attributes)
Extract the policy from the Key Attributes
|
byte[] |
getBytes()
Return the policy bytes.
|
int |
hashCode() |
void |
rotateAttributes(String[] attributes) |
VendorAttribute |
toVendorAttribute()
Convert the policy to a KMIP Vendor attribute that can be set on a KMIP Object
|
get_last_error, get_last_error, set_error, unwrappublic Policy(byte[] bytes)
bytes - the array of bytes to be used for this policypublic Policy()
throws CloudproofException
CloudproofException - if the policy buffer cannot be retrievedpublic Policy(PolicyAxis[] axes) throws CloudproofException
axes - the set of policy axes to be added to the policyCloudproofException - if the policy buffer cannot be retrievedpublic void addAxis(PolicyAxis axis) throws CloudproofException
axis - acis to add to the policyCloudproofException - if the addition failspublic byte[] getBytes()
public VendorAttribute toVendorAttribute() throws CloudproofException
VendorAttributeCloudproofException - if the JSON cannot be serializedpublic static Policy fromAttributes(Attributes attributes) throws CloudproofException
attributes - the key attributesCloudproofException - if there is no policy in the attributespublic void rotateAttributes(String[] attributes) throws CloudproofException
CloudproofExceptionCopyright © 2023. All rights reserved.