diff --git a/process/DataPrivacy_lib/process.js b/process/DataPrivacy_lib/process.js index 65e179fdd4de873cd59545b02f29b0747180dccb..2d00ca8936d830dd8df5fc799279826f2f194b7c 100644 --- a/process/DataPrivacy_lib/process.js +++ b/process/DataPrivacy_lib/process.js @@ -21,6 +21,27 @@ import("Report_lib"); import("Contact_lib"); import("Address_lib"); +/************************************************ + ******************READ CAREFULLY**************** + ************************************************ + * + * Steps for adding a privacy field: + * - create Keyword Containername: "DSGVOType" + * - Add to list in DataPrivacyType.get - function with the same name as the keyword keyid. (see DataPrivacyType for all possible parameters) + * e.g. if keyword-keyid is "TYPE_HOBBY" then add: + * TYPE_HOBBY: new DataPrivacyType("TYPE_HOBBY", _getHobby), + * - create a function for collecting the data (in this example _getHobby(...)) and put it inside of DataPrivacyType.get() {...} + * like the other ones + * - the function takes two parameters: + * * pContactId: The contact for which the data should be selected. + * This param is always provided. + * * pUid: A uid for your type. If the DSGVO-entity just needs the data for one dataset it calls the function with this param. + * In most cases it is undefined. + * - the function can use any way to load the data. It has to return an array of objects which contain a "value" and a "id". + * (take the already provided functions as reference) + * - add the DataPrivacyUtils.notifyNeedDataPrivacyUpdate() function everywhere where your datasource is updated. + */ + /** * * Do not create new instances anywhere else than inside of the get-function!