public class PrivacyConstraint extends Object implements Externalizable
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
PrivacyConstraint.PrivacyLevel  | 
| Constructor and Description | 
|---|
PrivacyConstraint()
Basic Constructor with a fine-grained collection 
 based on a list implementation. 
 | 
PrivacyConstraint(FineGrainedPrivacy fineGrainedPrivacyCollection)
Constructor with the option to choose between 
 different fine-grained collection implementations. 
 | 
PrivacyConstraint(PrivacyConstraint.PrivacyLevel privacyLevel)
Constructor with default fine-grained collection implementation
 where the entire data object is set to the given privacy level. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object other)  | 
FineGrainedPrivacy | 
getFineGrainedPrivacy()
Get fine-grained privacy instance. 
 | 
PrivacyConstraint.PrivacyLevel | 
getPrivacyLevel()  | 
boolean | 
hasConstraints()
Return true if any constraints have level Private or PrivateAggregate. 
 | 
boolean | 
hasFineGrainedConstraints()
Checks if fine-grained privacy is set for this privacy constraint. 
 | 
boolean | 
hasPrivateElements()
Return true if any of the elements has privacy level private 
 | 
void | 
readExternal(ObjectInput is)  | 
void | 
setFineGrainedPrivacyConstraints(FineGrainedPrivacy fineGrainedPrivacy)
Sets fine-grained privacy for the privacy constraint. 
 | 
void | 
setPrivacyLevel(PrivacyConstraint.PrivacyLevel privacyLevel)  | 
void | 
toJson(org.apache.wink.json4j.JSONObject json)
Get privacy constraints and put them into JSON object. 
 | 
String | 
toString()  | 
void | 
writeExternal(ObjectOutput objectOutput)  | 
public PrivacyConstraint()
public PrivacyConstraint(FineGrainedPrivacy fineGrainedPrivacyCollection)
fineGrainedPrivacyCollection - the instance in which fine-grained constraints are storedpublic PrivacyConstraint(PrivacyConstraint.PrivacyLevel privacyLevel)
privacyLevel - for the entire data object.public void setPrivacyLevel(PrivacyConstraint.PrivacyLevel privacyLevel)
public PrivacyConstraint.PrivacyLevel getPrivacyLevel()
public boolean hasFineGrainedConstraints()
public void setFineGrainedPrivacyConstraints(FineGrainedPrivacy fineGrainedPrivacy)
fineGrainedPrivacy - fine-grained privacy instance which is set for the privacy constraintpublic FineGrainedPrivacy getFineGrainedPrivacy()
public boolean hasPrivateElements()
public boolean hasConstraints()
public void toJson(org.apache.wink.json4j.JSONObject json)
            throws org.apache.wink.json4j.JSONException
json - JSON object in which the privacy constraints are putorg.apache.wink.json4j.JSONException - in case of errors in putting into JSON objectpublic void readExternal(ObjectInput is) throws IOException
readExternal in interface ExternalizableIOExceptionpublic void writeExternal(ObjectOutput objectOutput) throws IOException
writeExternal in interface ExternalizableIOExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.