Package com.orchestranetworks.instance
Interface RepositoryAnonymizer
-
public interface RepositoryAnonymizerAllows anonymizing records.- Since:
- 5.9.0
- See Also:
Repository.newAnonymizer()
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceRepositoryAnonymizer.RecordContextProvides access to a record to be anonymized, granting the privilege to modify the value of its fields.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidanonymizeHistory(Consumer<RepositoryAnonymizer.RecordContext> aRecordAnonymizer)Anonymizes the history records as specified by this object.RepositoryAnonymizersetDatasetReference(AdaptationReference aDataset)Specifies the dataset reference in which records must be anonymized.RepositoryAnonymizersetRecordKey(PrimaryKey aRecordKey)Specifies the functional primary key of the records to be anonymized.RepositoryAnonymizersetTable(Path aTablePath, SchemaLocation aDataModel)Specifies the table to be impacted by the anonymization.
-
-
-
Method Detail
-
setTable
RepositoryAnonymizer setTable(Path aTablePath, SchemaLocation aDataModel)
Specifies the table to be impacted by the anonymization.- Since:
- 5.9.0
-
setDatasetReference
RepositoryAnonymizer setDatasetReference(AdaptationReference aDataset)
Specifies the dataset reference in which records must be anonymized.- Since:
- 5.9.0
- See Also:
Adaptation.getDatasetReference()
-
setRecordKey
RepositoryAnonymizer setRecordKey(PrimaryKey aRecordKey)
Specifies the functional primary key of the records to be anonymized.- Since:
- 5.9.0
-
anonymizeHistory
void anonymizeHistory(Consumer<RepositoryAnonymizer.RecordContext> aRecordAnonymizer)
Anonymizes the history records as specified by this object. All the history records having the specified primary key in thespecified tablefor thedataset referencewill be anonymized.Some fields cannot be modified:
- the primary key fields of the record,
- the history technical fields (these fields are documented
in the Javadoc of the method
AdaptationTable.getHistory()).
Limitations:
- The specified dataset must be defined in
* at least one open dataspace. If it is defined only in closed
* dataspaces, or has been deleted from all open dataspaces, an
*
IllegalStateExceptionis thrown. - In case of dataset inheritance, only the specified dataset will be impacted. Its children dataset would have to be anonymized individually.
- Parameters:
aRecordAnonymizer- Anonymization operation to be applied; theacceptmethod will be called for every record to be anonymized.- Throws:
IllegalStateException- If the specification of this object is incomplete or not consistent, or if history is not activated by the data model for the specified table.- Since:
- 5.9.0
- See Also:
AdaptationTable.getHistory()
-
-