public class Policy extends Object implements Serializable
| Constructor and Description |
|---|
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 |
fromVendorAttributes(Attributes attributes,
String abeImplementation) |
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(String abeImplementation)
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(int maxAttributeCreations)
maxAttributeCreations - the maximum number of possible attributespublic Policy addAxis(String name, String[] attributes, boolean hierarchical) throws CosmianException
name - axis nameattributes - policy attributes of the axishierarchical - whether the axis is hierarchicalCosmianException - if the addition failspublic VendorAttribute toVendorAttribute(String abeImplementation) throws CosmianException
abeImplementation - abe_gpsw or cover_cryptVendorAttributeCosmianException - if the JSON cannot be serializedpublic static Policy fromVendorAttributes(Attributes attributes, String abeImplementation) throws CosmianException
CosmianExceptionpublic 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.