diff --git a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml index ff9a187f9dc1fc2559e37dad29d87378c6f64304..f28453e4b0a1d9b5a639b7026b6bc415ea5644ae 100644 --- a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml +++ b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/create_DSGVO.xml @@ -17,8 +17,8 @@ <column name="ROW_ID" type="CHAR(36)" /> - <column name="RIGHT" type="INTEGER" /> - <column name="USE" type="INTEGER" /> + <column name="RIGHT" type="CHAR(36)" /> + <column name="USE" type="CHAR(36)" /> <column name="TABLENAME" type="NVARCHAR(30)" /> <column name="VALID_TO" type="TIMESTAMP" /> diff --git a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/insert_DSGVO.xml b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/insert_DSGVO.xml index b268177c97e29448f3a713d9bccffcf271fe0d15..518da7b2af7a3c739c847c13e0d27b3afd38bab5 100644 --- a/.liquibase/Data_alias/basic/2019.1.4/DSGVO/insert_DSGVO.xml +++ b/.liquibase/Data_alias/basic/2019.1.4/DSGVO/insert_DSGVO.xml @@ -8,8 +8,8 @@ <column name="USER_EDIT" value="null"/> <column name="DATE_EDIT" value="null"/> <column name="ROW_ID" value="73d73404-e7f5-11e8-9f32-f2801f1b9fd1"/> - <column name="RIGHT" valueNumeric="0"/> - <column name="USE" valueNumeric="0"/> + <column name="RIGHT" value="b3f7038b-622b-45e4-8c5c-4b0c7aed6300"/> + <column name="USE" value="56762dd8-cfe8-4551-a758-0fd0fa4f7e76"/> <column name="TABLENAME" value="ADDRESS"/> <column name="VALID_TO" value="2019-10-10 06:57:51.882"/> <column name="CONTACT_ID" value="7c1efe4c-cc73-4e95-bdf0-208a3ff699b5"/> diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index d611b82424c378f7e295650d516727cb78441dae..3d1bf4244e2cae898ed97ae1a7fb7c2c606cbf19 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -9814,8 +9814,8 @@ <name>USE</name> <dbName></dbName> <primaryKey v="false" /> - <columnType v="4" /> - <size v="10" /> + <columnType v="1" /> + <size v="36" /> <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> @@ -9828,8 +9828,8 @@ <name>RIGHT</name> <dbName></dbName> <primaryKey v="false" /> - <columnType v="4" /> - <size v="10" /> + <columnType v="1" /> + <size v="36" /> <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> diff --git a/entity/DSGVO_entity/DSGVO_entity.aod b/entity/DSGVO_entity/DSGVO_entity.aod index 48cb9e1aa31344c8f79166949a2664739b6e7f31..22df5e3bc844aa2e507ef3c0b2d4b5b39d80234e 100644 --- a/entity/DSGVO_entity/DSGVO_entity.aod +++ b/entity/DSGVO_entity/DSGVO_entity.aod @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.6"> +<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.7"> <name>DSGVO_entity</name> <majorModelMode>DISTRIBUTED</majorModelMode> <icon>VAADIN:LOCK</icon> @@ -47,6 +47,7 @@ <description>The statutory source of the private data. Keyword DSGVORight</description> <consumer>KeywordRight</consumer> <groupable v="true" /> + <linkedContext>KeywordEntry</linkedContext> <mandatory v="true" /> <displayValueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/right/displayValueProcess.js</displayValueProcess> </entityField> @@ -122,16 +123,9 @@ </entityConsumer> <entityField> <name>MEDIUM</name> + <title>Type</title> <description>What kind of data is being saved, e.g. Mail, Home address</description> </entityField> - <entityField> - <name>validToFormat</name> - <contentType>DATE</contentType> - <resolution>DAY</resolution> - <outputFormat>dd.MM.yyyy</outputFormat> - <inputFormat>dd.MM.yyyy</inputFormat> - <searchable v="true" /> - </entityField> <entityParameter> <name>currentPerson_param</name> <expose v="true" /> @@ -172,6 +166,10 @@ </entityActionField> </children> </entityActionGroup> + <entityField> + <name>VALUE</name> + <title>Value</title> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -249,6 +247,14 @@ <name>validToFormat.value</name> <recordfield>DSGVO.VALID_TO</recordfield> </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>MEDIUM.displayValue</name> + <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>MEDIUM.value</name> + <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js</expression> + </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> </recordContainers> diff --git a/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js b/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js index 6f5161310af2b896d515657a6a46a7aa19e3d46a..9528a09d791f1dfdaeae094f6b971ca898fb1ab3 100644 --- a/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js +++ b/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js @@ -1,8 +1,8 @@ -import("system.db"); -import("system.result"); -import("Sql_lib"); - -var cond = new SqlCondition(); -cond.andPrepareVars("DSGVO.CONTACT_ID", "$param.currentPerson_param"); -/* TODO: use a preparedCondition when available*/ -result.string(db.translateCondition(cond.build("1 = 2"))); \ No newline at end of file +//import("system.db"); +//import("system.result"); +//import("Sql_lib"); +// +//var cond = new SqlCondition(); +//cond.andPrepareVars("DSGVO.CONTACT_ID", "$param.currentPerson_param"); +///* TODO: use a preparedCondition when available*/ +//result.string(db.translateCondition(cond.build("1 = 2"))); \ No newline at end of file diff --git a/entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js b/entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js index 1484e554be949d7ea0ba065bae60c844fb0ba703..a502cdaff4c3bbd962b9c9981a2b117cd749b1cb 100644 --- a/entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js +++ b/entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js @@ -1,6 +1,6 @@ -import("system.result"); - -result.string("DSGVO " - + "join CONTACT on DSGVO.CONTACT_ID = CONTACT.CONTACTID "); +//import("system.result"); +// +//result.string("DSGVO " +// + "join CONTACT on DSGVO.CONTACT_ID = CONTACT.CONTACTID "); /* + "join COMMUNICATION on DSGVO.ROW_ID = COMMUNICATION.COMMUNICATIONID " + "join ADDRESS on DSGVO.ROW_ID = ADDRESS.ADDRESSID");*/ \ No newline at end of file diff --git a/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js b/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js index 09754cf5860927f9a6380fa0a8dad7fa1c185b87..bd9bf3dd1602c8a2138bd3d006dc5e0d499a5bbc 100644 --- a/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js +++ b/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js @@ -1,23 +1,23 @@ -import("KeywordRegistry_basic"); -import("Keyword_lib"); -import("system.db"); -import("system.neon"); -import("system.vars"); -import("system.util"); - - -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) -{ - var cols = ["USER_NEW" , "USER_EDIT" , "DSGVOID" , "ROW_ID" , "DATE_NEW" , - "TABLENAME" , "DATE_EDIT" , "RIGHT" , "VALID_TO" , "CONTACT_ID" , "USE"]; - - var vals = [vars.get("$sys.user"), null, util.getNewUUID(), - vars.get("$field.ROW_ID"), vars.get("$sys.date"), vars.get("$field.TABLENAME"), - null, KeywordUtils. vars.get("$field.RIGHT").valueOf(), vars.get("$field.VALID_TO"), - vars.get("$field.CONTACT_ID"), vars.get("$field.USE").valueOf()]; - // KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOUse(), "DSGVO.USE"); - db.insertData("DSGVO", cols, null, vals); -} +//import("KeywordRegistry_basic"); +//import("Keyword_lib"); +//import("system.db"); +//import("system.neon"); +//import("system.vars"); +//import("system.util"); +// +// +//if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +//{ +// var cols = ["USER_NEW" , "USER_EDIT" , "DSGVOID" , "ROW_ID" , "DATE_NEW" , +// "TABLENAME" , "DATE_EDIT" , "RIGHT" , "VALID_TO" , "CONTACT_ID" , "USE"]; +// +// var vals = [vars.get("$sys.user"), null, util.getNewUUID(), +// vars.get("$field.ROW_ID"), vars.get("$sys.date"), vars.get("$field.TABLENAME"), +// null, KeywordUtils. vars.get("$field.RIGHT").valueOf(), vars.get("$field.VALID_TO"), +// vars.get("$field.CONTACT_ID"), vars.get("$field.USE").valueOf()]; +// // KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOUse(), "DSGVO.USE"); +// db.insertData("DSGVO", cols, null, vals); +//} // TODO Eintrag in DSGVO Tabelle /* diff --git a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.displayvalue/expression.js b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..1de26b616b1661dbefb57a4dd8b30731701ae195 --- /dev/null +++ b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.displayvalue/expression.js @@ -0,0 +1,6 @@ +import("system.result"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); + +var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.communicationMedium(), "DSGVO.ROW_ID"); // TODO prüfen +result.string(sql); diff --git a/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..d807c25346caff39a9907ee5584757afeb22016d --- /dev/null +++ b/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js @@ -0,0 +1,22 @@ +import("system.result"); +import("Sql_lib"); +import("system.db"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.vars"); + +var res; +var table = vars.get("$field.TABLENAME"); +if(table == "COMMUNICATION") + { + sql = db.cell(SqlCondition.begin().andPrepare(table + "ID", vars.getString("$field.ROW_ID")) + .andPrepare("1=2") + .buildSql("select MEDIUM_ID from " + table, "1=2")); + res = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.communicationMedium(), sql); + } +else if(table == "ADDRESS") + res = "ADDRESS"; +else + res = "PERSON" + +result.string(res); \ No newline at end of file diff --git a/entity/MediumValue/DSGVO_entity.aod b/entity/MediumValue/DSGVO_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..034db36219d7ed86e5c1ff13ba874c43cc7d8654 --- /dev/null +++ b/entity/MediumValue/DSGVO_entity.aod @@ -0,0 +1,257 @@ +<?xml version="1.0" encoding="UTF-8"?> +<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.7"> + <name>DSGVO_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:LOCK</icon> + <title>Data Privacy</title> + <titlePlural>Data Privacies</titlePlural> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + <dependencies> + <entityDependency> + <name>848916ba-482b-4e53-ac22-48ee6fbf2b64</name> + <entityName>Person_entity</entityName> + <fieldName>DSGVOEntries</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>DSGVOID</name> + <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/dsgvoid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_NEW</name> + <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_EDIT</name> + <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/user_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_NEW</name> + <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_EDIT</name> + <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/date_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>ROW_ID</name> + </entityField> + <entityField> + <name>RIGHT</name> + <title>DataPrivacy Right</title> + <description>The statutory source of the private data. Keyword DSGVORight</description> + <consumer>KeywordRight</consumer> + <groupable v="true" /> + <mandatory v="true" /> + <displayValueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/right/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>USE</name> + <title>DataPrivacy Use</title> + <description>The purpose of the private data. Keyword DSGVOUse</description> + <consumer>KeywordUse</consumer> + <groupable v="true" /> + <mandatory v="true" /> + <displayValueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/use/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>TABLENAME</name> + </entityField> + <entityField> + <name>VALID_TO</name> + <title>Valid to</title> + <description>How long the data will be saved</description> + <contentType>DATE</contentType> + <resolution>MINUTE</resolution> + <outputFormat>dd.MM.yyyy</outputFormat> + <inputFormat>dd.MM.yyyy</inputFormat> + <mandatory v="true" /> + </entityField> + <entityField> + <name>CONTACT_ID</name> + <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/contact_id/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>ContactAdresses</name> + <dependency> + <name>dependency</name> + <entityName>Address_entity</entityName> + <fieldName>ContactAddresses</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordUse</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/keyworduse/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>KeywordRight</name> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/DSGVO_entity/entityfields/keywordright/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Communications</name> + <dependency> + <name>dependency</name> + <entityName>Communication_entity</entityName> + <fieldName>AllCommunications</fieldName> + </dependency> + </entityConsumer> + <entityField> + <name>MEDIUM</name> + <description>What kind of data is being saved, e.g. Mail, Home address</description> + </entityField> + <entityParameter> + <name>currentPerson_param</name> + <expose v="true" /> + <triggerRecalculation v="true" /> + <mandatory v="true" /> + </entityParameter> + <entityActionGroup> + <name>Reports</name> + <children> + <entityActionField> + <name>openDisclosureReport</name> + <title>Disclosure Report</title> + <onActionProcess>%aditoprj%/entity/DSGVO_entity/entityfields/reports/children/opendisclosurereport/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <isSelectionAction v="true" /> + <iconId>VAADIN:INFO_CIRCLE_O</iconId> + </entityActionField> + <entityActionField> + <name>openInfoReport</name> + <title>Information Report</title> + <onActionProcess>%aditoprj%/entity/DSGVO_entity/entityfields/reports/children/openinforeport/onActionProcess.js</onActionProcess> + <isSelectionAction v="true" /> + <iconId>VAADIN:INFO_CIRCLE</iconId> + </entityActionField> + </children> + </entityActionGroup> + <entityActionGroup> + <name>DSGVOActions</name> + <children> + <entityActionField> + <name>anonymPerson</name> + <title>Anonymization</title> + <onActionProcess>%aditoprj%/entity/DSGVO_entity/entityfields/dsgvoactions/children/anonymperson/onActionProcess.js</onActionProcess> + <actionOrder v="0" /> + <isSelectionAction v="true" /> + <iconId>VAADIN:MEH_O</iconId> + <stateProcess>%aditoprj%/entity/DSGVO_entity/entityfields/dsgvoactions/children/anonymperson/stateProcess.js</stateProcess> + </entityActionField> + </children> + </entityActionGroup> + <entityField> + <name>VALUE</name> + </entityField> + <entityFieldGroup> + <name>MediumValue</name> + </entityFieldGroup> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <maximumDbRows v="0" /> + <isPageable v="true" /> + <isRequireContainerFiltering v="false" /> + <fromClauseProcess>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> + <conditionProcess>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <onDBInsert>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/onDBInsert.js</onDBInsert> + <linkInformation> + <linkInformation> + <name>ca40447a-06ab-4d49-97bb-dde5ccfc8c24</name> + <tableName>DSGVO</tableName> + <primaryKey>DSGVOID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>CONTACT_ID.value</name> + <recordfield>DSGVO.CONTACT_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_EDIT.value</name> + <recordfield>DSGVO.DATE_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>DSGVO.DATE_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DSGVOID.value</name> + <recordfield>DSGVO.DSGVOID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>RIGHT.value</name> + <recordfield>DSGVO.RIGHT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ROW_ID.value</name> + <recordfield>DSGVO.ROW_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>TABLENAME.value</name> + <recordfield>DSGVO.TABLENAME</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USE.value</name> + <recordfield>DSGVO.USE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_EDIT.value</name> + <recordfield>DSGVO.USER_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_NEW.value</name> + <recordfield>DSGVO.USER_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>VALID_TO.value</name> + <recordfield>DSGVO.VALID_TO</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>RIGHT.displayValue</name> + <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USE.displayValue</name> + <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>validToFormat.value</name> + <recordfield>DSGVO.VALID_TO</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>MEDIUM.value</name> + <expression>%aditoprj%/entity/DSGVO_entity/recordcontainers/db/recordfieldmappings/medium.value/expression.js</expression> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/MediumValue/entityfields/contact_id/valueProcess.js b/entity/MediumValue/entityfields/contact_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/MediumValue/entityfields/date_edit/valueProcess.js b/entity/MediumValue/entityfields/date_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..5e6ef059738e0c724a468685333a5e257ac228ce --- /dev/null +++ b/entity/MediumValue/entityfields/date_edit/valueProcess.js @@ -0,0 +1,7 @@ +import("system.util"); +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) + result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/date_new/valueProcess.js b/entity/MediumValue/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a72892783bf2bd04fe353c47f1be0cb570bbb323 --- /dev/null +++ b/entity/MediumValue/entityfields/date_new/valueProcess.js @@ -0,0 +1,7 @@ +import("system.util"); +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/onActionProcess.js b/entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..960e1c35e36b05da679d866eb2364d38c3444cf9 --- /dev/null +++ b/entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/onActionProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("DSGVO_lib"); + +// TODO open View DSGVOPreviewAnonym_view mit Auswahl an Kategorien +//dsgvoMkDataAnonymous(vars.get("$field.CONTACT_ID"), vars.get("$field.ROW_ID")); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/stateProcess.js b/entity/MediumValue/entityfields/dsgvoactions/children/anonymperson/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/entity/MediumValue/entityfields/dsgvoid/valueProcess.js b/entity/MediumValue/entityfields/dsgvoid/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ef478411d7874351e0a92618a5bc9e0533bd7c68 --- /dev/null +++ b/entity/MediumValue/entityfields/dsgvoid/valueProcess.js @@ -0,0 +1,8 @@ +import("system.neon"); +import("system.result"); +import("system.util"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW){ + result.string(util.getNewUUID()); +} \ No newline at end of file diff --git a/entity/MediumValue/entityfields/keywordright/children/containername_param/valueProcess.js b/entity/MediumValue/entityfields/keywordright/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..1ecc628d1e190281f67fae93800af14ff61f4c8d --- /dev/null +++ b/entity/MediumValue/entityfields/keywordright/children/containername_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("KeywordRegistry_basic"); + +result.string($KeywordRegistry.DSGVORight()); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/keyworduse/children/containername_param/valueProcess.js b/entity/MediumValue/entityfields/keyworduse/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..6805dc6c2c378b8ff8cd891e1117ddd7a3161779 --- /dev/null +++ b/entity/MediumValue/entityfields/keyworduse/children/containername_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("KeywordRegistry_basic"); + +result.string($KeywordRegistry.DSGVOUse()); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/reports/children/opendisclosurereport/onActionProcess.js b/entity/MediumValue/entityfields/reports/children/opendisclosurereport/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..eb6195e833e50977ad43fde8d00021bf66c4998f --- /dev/null +++ b/entity/MediumValue/entityfields/reports/children/opendisclosurereport/onActionProcess.js @@ -0,0 +1,5 @@ + + +var params = {}; +// TODO params for Reports +// TODO open Report \ No newline at end of file diff --git a/entity/MediumValue/entityfields/reports/children/openinforeport/onActionProcess.js b/entity/MediumValue/entityfields/reports/children/openinforeport/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..eb6195e833e50977ad43fde8d00021bf66c4998f --- /dev/null +++ b/entity/MediumValue/entityfields/reports/children/openinforeport/onActionProcess.js @@ -0,0 +1,5 @@ + + +var params = {}; +// TODO params for Reports +// TODO open Report \ No newline at end of file diff --git a/entity/MediumValue/entityfields/right/displayValueProcess.js b/entity/MediumValue/entityfields/right/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..fa353b3a4098e0f750b45644dadaa8e6e53e8ac2 --- /dev/null +++ b/entity/MediumValue/entityfields/right/displayValueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.vars"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); + +result.string(KeywordUtils.getViewValue($KeywordRegistry.DSGVORight(), vars.get("$field.RIGHT"))); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/use/displayValueProcess.js b/entity/MediumValue/entityfields/use/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..244c7f20cc66a4f36e7df3d6b920c23c61340775 --- /dev/null +++ b/entity/MediumValue/entityfields/use/displayValueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.vars"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); + +result.string(KeywordUtils.getViewValue($KeywordRegistry.DSGVOUse(), vars.get("$field.USE"))); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/user_edit/valueProcess.js b/entity/MediumValue/entityfields/user_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..6af880ae3e0e2b89b4eee8327ed49f1eefe458af --- /dev/null +++ b/entity/MediumValue/entityfields/user_edit/valueProcess.js @@ -0,0 +1,7 @@ +import("system.util"); +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) + result.string(vars.get("$sys.user")); \ No newline at end of file diff --git a/entity/MediumValue/entityfields/user_new/valueProcess.js b/entity/MediumValue/entityfields/user_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e518bc75a9494e53a83613dedd943106e74fc00a --- /dev/null +++ b/entity/MediumValue/entityfields/user_new/valueProcess.js @@ -0,0 +1,7 @@ +import("system.util"); +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(vars.get("$sys.user")); \ No newline at end of file diff --git a/entity/MediumValue/recordcontainers/db/conditionProcess.js b/entity/MediumValue/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..6f5161310af2b896d515657a6a46a7aa19e3d46a --- /dev/null +++ b/entity/MediumValue/recordcontainers/db/conditionProcess.js @@ -0,0 +1,8 @@ +import("system.db"); +import("system.result"); +import("Sql_lib"); + +var cond = new SqlCondition(); +cond.andPrepareVars("DSGVO.CONTACT_ID", "$param.currentPerson_param"); +/* TODO: use a preparedCondition when available*/ +result.string(db.translateCondition(cond.build("1 = 2"))); \ No newline at end of file diff --git a/entity/MediumValue/recordcontainers/db/fromClauseProcess.js b/entity/MediumValue/recordcontainers/db/fromClauseProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f292981e986233ea4fcdc0d165791019a386e065 --- /dev/null +++ b/entity/MediumValue/recordcontainers/db/fromClauseProcess.js @@ -0,0 +1,6 @@ +import("system.result"); + +result.string("DSGVO "); +// + "join CONTACT on DSGVO.CONTACT_ID = CONTACT.CONTACTID "); +/* + "join COMMUNICATION on DSGVO.ROW_ID = COMMUNICATION.COMMUNICATIONID " + + "join ADDRESS on DSGVO.ROW_ID = ADDRESS.ADDRESSID");*/ \ No newline at end of file diff --git a/entity/MediumValue/recordcontainers/db/onDBInsert.js b/entity/MediumValue/recordcontainers/db/onDBInsert.js new file mode 100644 index 0000000000000000000000000000000000000000..db3acc78baf4b1cb48c4a9b51b91dce896a08765 --- /dev/null +++ b/entity/MediumValue/recordcontainers/db/onDBInsert.js @@ -0,0 +1,44 @@ +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.db"); +import("system.neon"); +import("system.vars"); +import("system.util"); + + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + var cols = ["USER_NEW" , "USER_EDIT" , "DSGVOID" , "ROW_ID" , "DATE_NEW" , + "TABLENAME" , "DATE_EDIT" , "RIGHT" , "VALID_TO" , "CONTACT_ID" , "USE"]; + var table = vars.get("$field.TABLENAME"); + + var vals = [vars.get("$sys.user"), null, util.getNewUUID(), + vars.get("$field.ROW_ID"), vars.get("$sys.date"), table, + null, KeywordUtils. vars.get("$field.RIGHT").valueOf(), vars.get("$field.VALID_TO"), + vars.get("$field.CONTACT_ID"), vars.get("$field.USE").valueOf()]; + // KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOUse(), "DSGVO.USE"); + db.insertData("DSGVO", cols, null, vals); +} + // TODO Eintrag in DSGVO Tabelle + + /* + * + var InputMapping = { + "OFFERITEM": { + condition: "OFFER_ID = '" + pSourceOfferId + "' order by ITEMSORT", + ValueMapping: { + "OFFER_ID" : pTargetOfferId + } + } + }; + CopyModuleUtils.copyModule(InputMapping); + + var oiUtils = new OfferItemUtils(pTargetOfferId); + + //update order price + cols = ["NET", "VAT"]; + var vals = oiUtils.getNetAndVat(); + + db.updateData("OFFER", cols, null, vals, SqlCondition.equals("OFFER.OFFERID", pTargetOfferId, "1 = 2")); + * + */ \ No newline at end of file diff --git a/entity/MediumValue/recordcontainers/db/recordfieldmappings/medium.value/expression.js b/entity/MediumValue/recordcontainers/db/recordfieldmappings/medium.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..4cb06aa85a6e94a277c5669f8365e0471dc4c8ed --- /dev/null +++ b/entity/MediumValue/recordcontainers/db/recordfieldmappings/medium.value/expression.js @@ -0,0 +1,22 @@ +import("system.logging"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.vars"); +import("Sql_lib"); +import("system.result"); +import("system.db"); + +var sql = SqlCondition.begin() + .andPrepare("$field.CONTACT_ID", "CONTACT_ID") + .andPrepare("1=2"); +var table = vars.getString("$field.TABLENAME"); +if(table == "COMMUNICATION") + { + sql = db.cell(sql.buildSQL("select MEDIUM_ID from " + table)); + result.string(KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.communicationMedium(), sql)); + } +else + { + logging.log("Medium -->> Table -->> " + vars.getString("$field.TABLENAME")); + result.string("$field.TABLENAME"); + } \ No newline at end of file diff --git a/entity/MediumValue/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js b/entity/MediumValue/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..7bff6895d0d54df5da97486de37e72b9d81734c4 --- /dev/null +++ b/entity/MediumValue/recordcontainers/db/recordfieldmappings/right.displayvalue/expression.js @@ -0,0 +1,6 @@ +import("system.result"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); + +var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVORight(), "DSGVO.RIGHT"); +result.string(sql); diff --git a/entity/MediumValue/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js b/entity/MediumValue/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..4b55075d9970da3c8a28dfd94e6291fbaaba42de --- /dev/null +++ b/entity/MediumValue/recordcontainers/db/recordfieldmappings/use.displayvalue/expression.js @@ -0,0 +1,6 @@ +import("system.result"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); + +var sql = KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.DSGVOUse(), "DSGVO.USE"); +result.string(sql); diff --git a/neonView/DSGVOEdit_view/DSGVOEdit_view.aod b/neonView/DSGVOEdit_view/DSGVOEdit_view.aod index 7ffda7078f83439db2084ad928f18c4cf284ac4f..f18bd070955c872e8d4c19a199e1bc4c711e3d63 100644 --- a/neonView/DSGVOEdit_view/DSGVOEdit_view.aod +++ b/neonView/DSGVOEdit_view/DSGVOEdit_view.aod @@ -2,6 +2,7 @@ <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> <name>DSGVOEdit_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> + <isSmall v="true" /> <layout> <boxLayout> <name>layout</name> @@ -25,6 +26,14 @@ <name>a9e1245c-7798-4170-9f2f-2e33f61cd6aa</name> <entityField>VALID_TO</entityField> </entityFieldLink> + <entityFieldLink> + <name>1e2d81f7-d286-42ee-935d-1a2de2c27c72</name> + <entityField>MEDIUM</entityField> + </entityFieldLink> + <entityFieldLink> + <name>732a0a8a-4db3-4ff9-b4a2-c7ab6f2cf144</name> + <entityField>VALUE</entityField> + </entityFieldLink> </fields> </genericViewTemplate> </children> diff --git a/neonView/DSGVOFilter_view/DSGVOFilter_view.aod b/neonView/DSGVOFilter_view/DSGVOFilter_view.aod index ba07b61b5abb28977e7c09eac3ded9df4da0204c..f956e18ee2432d7fa70540407dfd724b4f7ebbbc 100644 --- a/neonView/DSGVOFilter_view/DSGVOFilter_view.aod +++ b/neonView/DSGVOFilter_view/DSGVOFilter_view.aod @@ -27,6 +27,10 @@ <width v="75" /> <expandRatio v="100" /> </neonTableColumn> + <neonTableColumn> + <name>1d329067-0959-4150-aaa4-ea7887a31ec2</name> + <entityField>VALUE</entityField> + </neonTableColumn> <neonTableColumn> <name>ad9e414f-4f0f-4efb-887a-468e7a9fefb5</name> <entityField>RIGHT</entityField>