public class Policy extends Object implements Serializable
| Constructor and Description |
|---|
Policy()
Instantiate an empty policy allowing up to 2^32 rotation of attributes
|
Policy(int maxAttributeCreations)
Instantiate an empty policy allowing the given max number of revocations of attributes
|
Policy(int lastAttributeValue,
int maxAttributeCreations,
HashMap<String,PolicyAxis> axes,
HashMap<PolicyAttributeUid,TreeSet<Integer>> attributeToInt) |
| Modifier and Type | Method and Description |
|---|---|
Policy |
addAxis(String name,
String[] attributes,
boolean hierarchical)
Add the given Axis to this policy and return the policy
|
boolean |
equals(Object o) |
static Policy |
fromAttributes(Attributes attributes)
Extract the policy from the Key Attributes
|
HashMap<PolicyAttributeUid,TreeSet<Integer>> |
getAttributeToInt() |
HashMap<String,PolicyAxis> |
getAxes() |
int |
getLastAttributeValue()
The last attribute value that was assigned.
|
int |
getMaxAttributeCreations() |
int |
hashCode() |
Policy |
lastAttribute(int lastAttribute) |
String |
toString() |
VendorAttribute |
toVendorAttribute()
Convert the policy to a KMIP Vendor attribute that can be set on a KMIP Object
|
public Policy(int lastAttributeValue,
int maxAttributeCreations,
HashMap<String,PolicyAxis> axes,
HashMap<PolicyAttributeUid,TreeSet<Integer>> attributeToInt)
public Policy()
public Policy(int maxAttributeCreations)
maxAttributeCreations - the maximum number of possible attributespublic Policy addAxis(String name, String[] attributes, boolean hierarchical) throws CloudproofException
name - axis nameattributes - policy attributes of the axishierarchical - whether the axis is hierarchicalCloudproofException - if the addition failspublic 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 int getLastAttributeValue()
getMaxAttributeCreations()public int getMaxAttributeCreations()
public HashMap<String,PolicyAxis> getAxes()
public HashMap<PolicyAttributeUid,TreeSet<Integer>> getAttributeToInt()
public Policy lastAttribute(int lastAttribute)
Copyright © 2022. All rights reserved.