diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/changelog_knowledgeManagement.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/changelog_knowledgeManagement.xml new file mode 100644 index 0000000000000000000000000000000000000000..06a974df46bd976884bc388f86c95285a26023c8 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/changelog_knowledgeManagement.xml @@ -0,0 +1,14 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <include file="struct/knowledgeManagement_table.xml" relativeToChangelogFile="true" /> + <include file="struct/knowledgeTagModeration_table.xml" relativeToChangelogFile="true" /> + <include file="struct/knowledgeDiscussion_table.xml" relativeToChangelogFile="true" /> + <include file="struct/knowledgeGitInterface_table.xml" relativeToChangelogFile="true" /> + <include file="struct/knowledgeLink_table.xml" relativeToChangelogFile="true" /> + <include file="data/knowledgeKeywords.xml" relativeToChangelogFile="true" /> + <include file="struct/create_KnowledgeRoles.xml" relativeToChangelogFile="true" /> + <include file="struct/knowledgeTag_table.xml" relativeToChangelogFile="true" /> + <include file="struct/knowledgeTagLink_table.xml" relativeToChangelogFile="true" /> + <include file="data/knowledgeTag.xml" relativeToChangelogFile="true" /> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/blobs/git.css b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/blobs/git.css new file mode 100644 index 0000000000000000000000000000000000000000..cb1b3ff2ef344a20d2a636075ad42db25cc9482c --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/blobs/git.css @@ -0,0 +1,450 @@ +/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ +/* Uncomment @import statement below to use as custom stylesheet */ +/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/ +article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} +audio,canvas,video{display:inline-block} +audio:not([controls]){display:none;height:0} +script{display:none!important} +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} +a{background:transparent} +a:focus{outline:thin dotted} +a:active,a:hover{outline:0} +h1{font-size:2em;margin:.67em 0} +abbr[title]{border-bottom:1px dotted} +b,strong{font-weight:bold} +dfn{font-style:italic} +hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} +mark{background:#ff0;color:#000} +code,kbd,pre,samp{font-family:monospace;font-size:1em} +pre{white-space:pre-wrap} +q{quotes:"\201C" "\201D" "\2018" "\2019"} +small{font-size:80%} +sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} +sup{top:-.5em} +sub{bottom:-.25em} +img{border:0} +svg:not(:root){overflow:hidden} +figure{margin:0} +fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} +legend{border:0;padding:0} +button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} +button,input{line-height:normal} +button,select{text-transform:none} +button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} +button[disabled],html input[disabled]{cursor:default} +input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} +button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} +textarea{overflow:auto;vertical-align:top} +table{border-collapse:collapse;border-spacing:0} +*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} +html,body{font-size:100%} +body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased} +a:hover{cursor:pointer} +img,object,embed{max-width:100%;height:auto} +object,embed{height:100%} +img{-ms-interpolation-mode:bicubic} +.left{float:left!important} +.right{float:right!important} +.text-left{text-align:left!important} +.text-right{text-align:right!important} +.text-center{text-align:center!important} +.text-justify{text-align:justify!important} +.hide{display:none} +img,object,svg{display:inline-block;vertical-align:middle} +textarea{height:auto;min-height:50px} +select{width:100%} +.center{margin-left:auto;margin-right:auto} +.stretch{width:100%} +.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} +div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} +a{color:#2156a5;text-decoration:underline;line-height:inherit} +a:hover,a:focus{color:#1d4b8f} +a img{border:none} +p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} +p aside{font-size:.875em;line-height:1.35;font-style:italic} +h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} +h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} +h1{font-size:2.125em} +h2{font-size:1.6875em} +h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} +h4,h5{font-size:1.125em} +h6{font-size:1em} +hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} +em,i{font-style:italic;line-height:inherit} +strong,b{font-weight:bold;line-height:inherit} +small{font-size:60%;line-height:inherit} +code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} +ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} +ul,ol{margin-left:1.5em} +ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} +ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} +ul.square{list-style-type:square} +ul.circle{list-style-type:circle} +ul.disc{list-style-type:disc} +ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} +dl dt{margin-bottom:.3125em;font-weight:bold} +dl dd{margin-bottom:1.25em} +abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} +abbr{text-transform:none} +blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} +blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} +blockquote cite::before{content:"\2014 \0020"} +blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} +blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} +@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} +h1{font-size:2.75em} +h2{font-size:2.3125em} +h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} +h4{font-size:1.4375em}} +table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} +table thead,table tfoot{background:#f7f8f7} +table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} +table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} +table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} +table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} +h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} +h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} +.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table} +.clearfix::after,.float-group::after{clear:both} +*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word} +*:not(pre)>code.nobreak{word-wrap:normal} +*:not(pre)>code.nowrap{white-space:nowrap} +pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} +em em{font-style:normal} +strong strong{font-weight:400} +.keyseq{color:rgba(51,51,51,.8)} +kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap} +.keyseq kbd:first-child{margin-left:0} +.keyseq kbd:last-child{margin-right:0} +.menuseq,.menuref{color:#000} +.menuseq b:not(.caret),.menuref{font-weight:inherit} +.menuseq{word-spacing:-.02em} +.menuseq b.caret{font-size:1.25em;line-height:.8} +.menuseq i.caret{font-weight:bold;text-align:center;width:.45em} +b.button::before,b.button::after{position:relative;top:-1px;font-weight:400} +b.button::before{content:"[";padding:0 3px 0 2px} +b.button::after{content:"]";padding:0 2px 0 3px} +p a>code:hover{color:rgba(0,0,0,.9)} +#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;/*max-width:62.5em;*/*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} +#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table} +#header::after,#content::after,#footnotes::after,#footer::after{clear:both} +#content{margin-top:1.25em} +#content::before{content:none} +#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} +#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} +#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} +#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} +#header .details span:first-child{margin-left:-.125em} +#header .details span.email a{color:rgba(0,0,0,.85)} +#header .details br{display:none} +#header .details br+span::before{content:"\00a0\2013\00a0"} +#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} +#header .details br+span#revremark::before{content:"\00a0|\00a0"} +#header #revnumber{text-transform:capitalize} +#header #revnumber::after{content:"\00a0"} +#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} +#toc{border-bottom:1px solid #efefed;padding-bottom:.5em} +#toc>ul{margin-left:.125em} +#toc ul.sectlevel0>li>a{font-style:italic} +#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} +#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} +#toc li{line-height:1.3334;margin-top:.3334em} +#toc a{text-decoration:none} +#toc a:active{text-decoration:underline} +#toctitle{color:#7a2518;font-size:1.2em} +@media screen and (min-width:768px){#toctitle{font-size:1.375em} +body.toc2{padding-left:15em;padding-right:0} +#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} +#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em} +#toc.toc2>ul{font-size:.9em;margin-bottom:0} +#toc.toc2 ul ul{margin-left:0;padding-left:1em} +#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} +body.toc2.toc-right{padding-left:0;padding-right:15em} +body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}} +@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} +#toc.toc2{width:20em} +#toc.toc2 #toctitle{font-size:1.375em} +#toc.toc2>ul{font-size:.95em} +#toc.toc2 ul ul{padding-left:1.25em} +body.toc2.toc-right{padding-left:0;padding-right:20em}} +#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} +#content #toc>:first-child{margin-top:0} +#content #toc>:last-child{margin-bottom:0} +#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} +#footer-text{color:rgba(255,255,255,.8);line-height:1.44} +#content{margin-bottom:.625em} +.sect1{padding-bottom:.625em} +@media screen and (min-width:768px){#content{margin-bottom:1.25em} +.sect1{padding-bottom:1.25em}} +.sect1:last-child{padding-bottom:0} +.sect1+.sect1{border-top:1px solid #efefed} +#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} +#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} +#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} +#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} +#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} +.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} +.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} +table.tableblock.fit-content>caption.title{white-space:nowrap;width:0} +.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)} +table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit} +.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} +.admonitionblock>table td.icon{text-align:center;width:80px} +.admonitionblock>table td.icon img{max-width:none} +.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} +.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} +.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} +.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} +.exampleblock>.content>:first-child{margin-top:0} +.exampleblock>.content>:last-child{margin-bottom:0} +.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} +.sidebarblock>:first-child{margin-top:0} +.sidebarblock>:last-child{margin-bottom:0} +.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} +.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} +.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} +.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} +.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} +.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} +@media screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}} +@media screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}} +.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} +.listingblock pre.highlightjs{padding:0} +.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} +.listingblock pre.prettyprint{border-width:0} +.listingblock>.content{position:relative} +.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} +.listingblock:hover code[data-lang]::before{display:block} +.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:#999} +.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"} +table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} +table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0;line-height:1.45} +table.pyhltable td.code{padding-left:.75em;padding-right:0} +pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} +pre.pygments .lineno{display:inline-block;margin-right:.25em} +table.pyhltable .linenodiv{background:none!important;padding-right:0!important} +.quoteblock{margin:0 1em 1.25em 1.5em;display:table} +.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} +.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} +.quoteblock blockquote{margin:0;padding:0;border:0} +.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} +.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} +.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} +.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} +.quoteblock .quoteblock blockquote{padding:0 0 0 .75em} +.quoteblock .quoteblock blockquote::before{display:none} +.verseblock{margin:0 1em 1.25em} +.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} +.verseblock pre strong{font-weight:400} +.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} +.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} +.quoteblock .attribution br,.verseblock .attribution br{display:none} +.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)} +.quoteblock.abstract{margin:0 1em 1.25em;display:block} +.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center} +.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{word-spacing:0;line-height:1.6} +.quoteblock.abstract blockquote::before,.quoteblock.abstract p::before{display:none} +table.tableblock{max-width:100%;border-collapse:separate} +p.tableblock:last-child{margin-bottom:0} +td.tableblock>.content{margin-bottom:-1.25em} +table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} +table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0} +table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0} +table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0} +table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px} +table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0} +table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0} +table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0} +table.frame-all{border-width:1px} +table.frame-sides{border-width:0 1px} +table.frame-topbot,table.frame-ends{border-width:1px 0} +table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd){background:#f8f8f7} +table.stripes-none tr,table.stripes-odd tr:nth-of-type(even){background:none} +th.halign-left,td.halign-left{text-align:left} +th.halign-right,td.halign-right{text-align:right} +th.halign-center,td.halign-center{text-align:center} +th.valign-top,td.valign-top{vertical-align:top} +th.valign-bottom,td.valign-bottom{vertical-align:bottom} +th.valign-middle,td.valign-middle{vertical-align:middle} +table thead th,table tfoot th{font-weight:bold} +tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} +tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} +p.tableblock>code:only-child{background:none;padding:0} +p.tableblock{font-size:1em} +td>div.verse{white-space:pre} +ol{margin-left:1.75em} +ul li ol{margin-left:1.5em} +dl dd{margin-left:1.125em} +dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} +ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} +ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none} +ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em} +ul.unstyled,ol.unstyled{margin-left:0} +ul.checklist{margin-left:.625em} +ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em} +ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em} +ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em} +ul.inline>li{margin-left:1.25em} +.unstyled dl dt{font-weight:400;font-style:normal} +ol.arabic{list-style-type:decimal} +ol.decimal{list-style-type:decimal-leading-zero} +ol.loweralpha{list-style-type:lower-alpha} +ol.upperalpha{list-style-type:upper-alpha} +ol.lowerroman{list-style-type:lower-roman} +ol.upperroman{list-style-type:upper-roman} +ol.lowergreek{list-style-type:lower-greek} +.hdlist>table,.colist>table{border:0;background:none} +.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} +td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em} +td.hdlist1{font-weight:bold;padding-bottom:1.25em} +.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} +.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top} +.colist td:not([class]):first-child img{max-width:none} +.colist td:not([class]):last-child{padding:.25em 0} +.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} +.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} +.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} +.imageblock>.title{margin-bottom:0} +.imageblock.thumb,.imageblock.th{border-width:6px} +.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} +.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} +.image.left{margin-right:.625em} +.image.right{margin-left:.625em} +a.image{text-decoration:none;display:inline-block} +a.image object{pointer-events:none} +sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super} +sup.footnote a,sup.footnoteref a{text-decoration:none} +sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline} +#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} +#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0} +#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em} +#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em} +#footnotes .footnote:last-of-type{margin-bottom:0} +#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} +.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} +.gist .file-data>table td.line-data{width:99%} +div.unbreakable{page-break-inside:avoid} +.big{font-size:larger} +.small{font-size:smaller} +.underline{text-decoration:underline} +.overline{text-decoration:overline} +.line-through{text-decoration:line-through} +.aqua{color:#00bfbf} +.aqua-background{background-color:#00fafa} +.black{color:#000} +.black-background{background-color:#000} +.blue{color:#0000bf} +.blue-background{background-color:#0000fa} +.fuchsia{color:#bf00bf} +.fuchsia-background{background-color:#fa00fa} +.gray{color:#606060} +.gray-background{background-color:#7d7d7d} +.green{color:#006000} +.green-background{background-color:#007d00} +.lime{color:#00bf00} +.lime-background{background-color:#00fa00} +.maroon{color:#600000} +.maroon-background{background-color:#7d0000} +.navy{color:#000060} +.navy-background{background-color:#00007d} +.olive{color:#606000} +.olive-background{background-color:#7d7d00} +.purple{color:#600060} +.purple-background{background-color:#7d007d} +.red{color:#bf0000} +.red-background{background-color:#fa0000} +.silver{color:#909090} +.silver-background{background-color:#bcbcbc} +.teal{color:#006060} +.teal-background{background-color:#007d7d} +.white{color:#bfbfbf} +.white-background{background-color:#fafafa} +.yellow{color:#bfbf00} +.yellow-background{background-color:#fafa00} +span.icon>.fa{cursor:default} +a span.icon>.fa{cursor:inherit} +.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} +.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c} +.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} +.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900} +.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400} +.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000} +.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} +.conum[data-value] *{color:#fff!important} +.conum[data-value]+b{display:none} +.conum[data-value]::after{content:attr(data-value)} +pre .conum[data-value]{position:relative;top:-.125em} +b.conum *{color:inherit!important} +.conum:not([data-value]):empty{display:none} +dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility} +h1,h2,p,td.content,span.alt{letter-spacing:-.01em} +p strong,td.content strong,div.footnote strong{letter-spacing:-.005em} +p,blockquote,dt,td.content,span.alt{font-size:1.0625rem} +p{margin-bottom:1.25rem} +.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} +.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} +.print-only{display:none!important} +@page{margin:1.25cm .75cm} +@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} +html{font-size:80%} +a{color:inherit!important;text-decoration:underline!important} +a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} +a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} +abbr[title]::after{content:" (" attr(title) ")"} +pre,blockquote,tr,img,object,svg{page-break-inside:avoid} +thead{display:table-header-group} +svg{max-width:100%} +p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} +h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} +#toc,.sidebarblock,.exampleblock>.content{background:none!important} +#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} +body.book #header{text-align:center} +body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em} +body.book #header .details{border:0!important;display:block;padding:0!important} +body.book #header .details span:first-child{margin-left:0!important} +body.book #header .details br{display:block} +body.book #header .details br+span::before{content:none!important} +body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} +body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} +.listingblock code[data-lang]::before{display:block} +#footer{padding:0 .9375em} +.hide-on-print{display:none!important} +.print-only{display:block!important} +.hide-for-print{display:none!important} +.show-for-print{display:inherit!important}} +@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem} +.sect1{padding:0!important} +.sect1+.sect1{border:0} +#footer{background:none} +#footer-text{color:rgba(0,0,0,.6);font-size:.9em}} +@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}} + +.topcorner { +font-family: Calibri, Verdana; +font-size: 16px; +float:right; +top:100px; +right: 100px; +width: 300px; +height: auto; +background-color: #EBEBEB; +border-width: 1px; +border-color: #666666; +border-style: dotted; +padding: 3px; +box-shadow: 3px 3px 7px #AAAAAA; +} + +.topcorner p { + font-family:inherit;font-weight:400;font-size:1em;text-rendering:optimizeLegibility +} + +.stitletext { +/*font-family: Calibri, Verdana;*/ +color:#ba3925; +font-size: 30px; +padding-top: 4px; +padding-bottom: 4px; +border-bottom: medium solid #000000; +font-weight: bold; +} \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/blobs/standard.css b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/blobs/standard.css new file mode 100644 index 0000000000000000000000000000000000000000..3ca3c40a41e0fa4fcdd58ee461b200b1460da10d --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/blobs/standard.css @@ -0,0 +1,138 @@ +h1 { +font-family: Calibri, Verdana; +color: #E60048; +font-size: 25px; +} + +h2 { +font-family: Calibri, Verdana; +color: #E60048; +font-size: 20px; +} + +h3 { +font-family: Calibri, Verdana; +font-style: italic; +color: #E60048; +font-size: 20px; +} + +h4 { +font-family: Calibri, Verdana; +font-style: italic; +color: #0095B8; +font-size: 20px; +} + +div { +font-family: Calibri, Verdana; +color: #000000; +font-size: 16px; +} + +p { +font-family: Calibri, Verdana; +color: #000000; +font-size: 18px; +} + +li { +font-family: Calibri, Verdana; +color: #000000; +font-size: 18px; +} + +hr { + border: 0; + height: 1px; + background-image: linear-gradient(to right, #22BBFF, #0095B8, #22BBFF); +} + +table { + border-collapse: collapse; +} + +tr:first-child { + background-color: #8EE1FF; +} + +table, th, td { + border: 1px solid #0095B8; +} + +.stitletext { +font-family: Calibri, Verdana; +font-size: 30px; +padding-top: 4px; +padding-bottom: 4px; +color: #E60048; +border-bottom: medium dotted #0095B8; +font-weight: bold; +} + +.proptext { +font-family: Calibri, Verdana; +font-size: 16px; +padding-top: 2px; +padding-bottom: 2px; +color: #E60048; +font-weight: bold; +} + +.liketext { +font-family: Calibri, Verdana; +font-size: 18px; +padding-top: 2px; +padding-bottom: 2px; +color: #e50047; +font-weight: bold; +} + +.hashtag { +font-family: Calibri, Verdana; +font-size: 12px; +font-style: italic; +color: #666666; +} + +.personas { +font-family: Calibri, Verdana; +font-size: 12px; +color: #666666; +font-weight: bold; +} + +.topcorner { +font-family: Calibri, Verdana; +font-size: 16px; +float:right; +top:100px; +right: 100px; +width: 300px; +height: auto; +background-color: #EBEBEB; +border-width: 1px; +border-color: #666666; +border-style: dotted; +padding: 3px; +box-shadow: 3px 3px 7px #AAAAAA; +} + +.amenub { +color: #0095B8; +text-decoration: underline;} + +.processDesc { +float:left; +} + +.mainDiv { + width:100%; + height:100%; +} + +.businessProcess { + margin-top:30px; + width:100%; + height:100%; +} \ No newline at end of file diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/knowledgeKeywords.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/knowledgeKeywords.xml new file mode 100644 index 0000000000000000000000000000000000000000..51f7d6b6984d86786ebf154e20c76b05f996726c --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/knowledgeKeywords.xml @@ -0,0 +1,87 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="e.pollinger" id="6c1bb89e-60db-4a50-ba77-c81a8ec82d2c"> + <!-- KEYWORD ENTRIES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> + <!-- Keywords for discussion status --> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="DISCUSSIONACTIVE"/> + <column name="KEYID" value="ACTIVE"/> + <column name="TITLE" value="Active"/> + <column name="CONTAINER" value="DiscussionStatus"/> + <column name="SORTING" valueNumeric="1"/> + <column name="ISACTIVE" valueNumeric="1"/> + </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="DISCUSSIONCLOSED"/> + <column name="KEYID" value="CLOSED"/> + <column name="TITLE" value="Closed"/> + <column name="CONTAINER" value="DiscussionStatus"/> + <column name="SORTING" valueNumeric="2"/> + <column name="ISACTIVE" valueNumeric="1"/> + </insert> + <!-- Keywords for knowledge type --> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="KNOWLEDGEBASE"/> + <column name="KEYID" value="KNOWLEDGEBASE"/> + <column name="TITLE" value="Knowledgebase"/> + <column name="CONTAINER" value="KnowledgeType"/> + <column name="SORTING" valueNumeric="1"/> + <column name="ISACTIVE" valueNumeric="1"/> + </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="EDITORIAL"/> + <column name="KEYID" value="EDITORIAL"/> + <column name="TITLE" value="Editorial"/> + <column name="CONTAINER" value="KnowledgeType"/> + <column name="SORTING" valueNumeric="2"/> + <column name="ISACTIVE" valueNumeric="1"/> + </insert> + <!-- Keywords for publishing level --> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="INTERNAL"/> + <column name="KEYID" value="INTERNAL"/> + <column name="TITLE" value="Internal"/> + <column name="CONTAINER" value="KnowledgePublishLevel"/> + <column name="SORTING" valueNumeric="1"/> + <column name="ISACTIVE" valueNumeric="1"/> + </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="PARTNER"/> + <column name="KEYID" value="PARTNER"/> + <column name="TITLE" value="Partner"/> + <column name="CONTAINER" value="KnowledgePublishLevel"/> + <column name="SORTING" valueNumeric="2"/> + <column name="ISACTIVE" valueNumeric="1"/> + </insert> + <insert tableName="AB_KEYWORD_ENTRY"> + <column name="AB_KEYWORD_ENTRYID" value="PUBLIC"/> + <column name="KEYID" value="PUBLIC"/> + <column name="TITLE" value="Public"/> + <column name="CONTAINER" value="KnowledgePublishLevel"/> + <column name="SORTING" valueNumeric="3"/> + <column name="ISACTIVE" valueNumeric="1"/> + </insert> + <!-- KEYWORD ATTRIBUTES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> + <insert tableName="AB_KEYWORD_ATTRIBUTE"> + <column name="AB_KEYWORD_ATTRIBUTEID" value="b03f93a2-3b87-4a98-b3f9-9ed2358abdfe"/> + <column name="NAME" value="contentCssStylesheet"/> + <column name="KIND" value="LONG_CHAR_VALUE"/> + <column name="CONTAINER" value="KnowledgeType"/> + </insert> + <!-- KEYWORD ATTRIBUTE RELATIONS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> + <!-- Knowledge type stylesheets--> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="d65d9988-2a50-42ed-8235-e1073d7a035e"/> + <column name="AB_KEYWORD_ENTRY_ID" value="KNOWLEDGEBASE"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="b03f93a2-3b87-4a98-b3f9-9ed2358abdfe"/> + <column name="LONG_CHAR_VALUE" valueClobFile="blobs/standard.css"/> + </insert> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="5c8293eb-2ea2-4de3-a4eb-40e1785c9785"/> + <column name="AB_KEYWORD_ENTRY_ID" value="EDITORIAL"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="b03f93a2-3b87-4a98-b3f9-9ed2358abdfe"/> + <column name="LONG_CHAR_VALUE" valueClobFile="blobs/git.css"/> + </insert> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/knowledgeTag.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/knowledgeTag.xml new file mode 100644 index 0000000000000000000000000000000000000000..4a17a2ef636b13b4149cd96ed23af6735cc726f0 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/data/knowledgeTag.xml @@ -0,0 +1,10 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="e.pollinger" id="9c1bb89e-60db-4a50-ba77-c81a8ec82d2c"> + <insert tableName="KNOWLEDGETAG"> + <column name="KNOWLEDGETAGID" value="9c1bb89e-60db-4a50-ba77-c81a8ec82d2c"/> + <column name="TAG" value="News"/> + </insert> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/create_KnowledgeRoles.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/create_KnowledgeRoles.xml new file mode 100644 index 0000000000000000000000000000000000000000..7a44ef7aefaa703bd41e87f02a1917f13be44247 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/create_KnowledgeRoles.xml @@ -0,0 +1,13 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="f.adler" id="eea7595b-3908-449b-8976-6e822aa1923c"> + <createTable tableName="KNOWLEDGEROLES"> + <column name="KNOWLEDGEROLESID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_KNOWLEDGEROLES_KNOWLEDGEROLESID"/> + </column> + <column name="KNOWLEDGEMANAGEMENT_ID" type="CHAR(36)"></column> + <column name="ROLENAME" type="VARCHAR(100)"/> + </createTable> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeDiscussion_table.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeDiscussion_table.xml new file mode 100644 index 0000000000000000000000000000000000000000..c4b9698f688657379091897d1d13c0096637a622 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeDiscussion_table.xml @@ -0,0 +1,20 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="e.pollinger" id="1261195c-ffc1-4abb-a31f-0732823ee0cb"> + <createTable tableName="KNOWLEDGEDISCUSSION"> + <column name="KNOWLEDGEDISCUSSIONID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_KNOWLEDGEDISCUSSION_KNOWLEDGEDISCUSSIONID"/> + </column> + <column name="KNOWLEDGEMANAGEMENT_ID" type="CHAR(36)"></column> + <column name="DATE_NEW" type="DATETIME2"/> + <column name="DATE_EDIT" type="DATETIME2"/> + <column name="USER_NEW" type="NVARCHAR(50)"/> + <column name="USER_EDIT" type="NVARCHAR(50)"/> + <column name="STATUS" type="VARCHAR(36)"/> + <column name="AUTHOR" type="NVARCHAR(50)"/> + <column name="DISCUSSIONTEXT" type="LONGTEXT"/> + <column name="PARENTENTRY" type="CHAR(36)"/> + </createTable> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeGitInterface_table.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeGitInterface_table.xml new file mode 100644 index 0000000000000000000000000000000000000000..8440cd20fdf2743eb59de8bfee555457cdb59a4b --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeGitInterface_table.xml @@ -0,0 +1,17 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="e.pollinger" id="9e24c875-c592-4839-94aa-3de4269b6fe7"> + <createTable tableName="KNOWLEDGEGITINTERFACE"> + <column name="KNOWLEDGEGITINTERFACEID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_KNOWLEDGEGITINTERFACE_KNOWLEDGEGITINTERFACEID"/> + </column> + <column name="GITCOMMIT" type="NVARCHAR(200)"/> + <column name="SYSTEMNAME" type="NVARCHAR(50)"/> + <column name="DATE_NEW" type="DATETIME2"/> + <column name="DATE_EDIT" type="DATETIME2"/> + <column name="USER_NEW" type="NVARCHAR(50)"/> + <column name="USER_EDIT" type="NVARCHAR(50)"/> + </createTable> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeLink_table.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeLink_table.xml new file mode 100644 index 0000000000000000000000000000000000000000..cdf69919e236ff8b784ebf2d439cdbaff2567ac8 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeLink_table.xml @@ -0,0 +1,18 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="e.pollinger" id="1261195c-ffc1-4abb-a31f-0732823ee0cb"> + <createTable tableName="KNOWLEDGELINK"> + <column name="KNOWLEDGELINKID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_KNOWLEDGELINK_KNOWLEDGELINKID"/> + </column> + <column name="KNOWLEDGEMANAGEMENT_ID" type="CHAR(36)"></column> + <column name="DATE_NEW" type="DATETIME2"/> + <column name="DATE_EDIT" type="DATETIME2"/> + <column name="USER_NEW" type="NVARCHAR(50)"/> + <column name="USER_EDIT" type="NVARCHAR(50)"/> + <column name="ROW_ID" type="CHAR(36)"/> + <column name="OBJECT_TYPE" type="NVARCHAR(100)"/> + </createTable> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeManagement_table.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeManagement_table.xml new file mode 100644 index 0000000000000000000000000000000000000000..ebe0b76822597e70e516335505e6de25c7c85827 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeManagement_table.xml @@ -0,0 +1,29 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="e.pollinger" id="9a0aaba2-c114-4648-ab1e-15acf489f19d"> + <createTable tableName="KNOWLEDGEMANAGEMENT"> + <column name="KNOWLEDGEMANAGEMENTID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_KNOWLEDGEMANAGEMENT_KNOWLEDGEMANAGEMENTID"/> + </column> + <column name="AUTHOR_CONTACT_ID" type="CHAR(36)"></column> + <column name="RESPONSIBLE_CONTACT_ID" type="CHAR(36)"></column> + <column name="USER_NEW" type="NVARCHAR(63)"></column> + <column name="DATE_NEW" type="DATETIME2"></column> + <column name="USER_EDIT" type="NVARCHAR(63)"></column> + <column name="DATE_EDIT" type="DATETIME2"></column> + <column name="TITLE" type="NVARCHAR(255)"></column> + <column name="CONTENT" type="LONGTEXT"></column> + <column name="CONTENTDECODED" type="LONGTEXT"></column> + <column name="PUBLISH" type="VARCHAR(36)"></column> + <column name="TYPE" type="VARCHAR(36)"></column> + </createTable> + + <createIndex tableName="KNOWLEDGEMANAGEMENT" indexName="IDX_KNOWLEDGEMANAGEMENT_TITLE"> + <column name="TITLE"/> + </createIndex> + <createIndex tableName="KNOWLEDGEMANAGEMENT" indexName="IDX_KNOWLEDGEMANAGEMENT_TYPE"> + <column name="TYPE"/> + </createIndex> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeTagLink_table.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeTagLink_table.xml new file mode 100644 index 0000000000000000000000000000000000000000..a6b9b631d5d6155a40dd9448d88b6e454812cfed --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeTagLink_table.xml @@ -0,0 +1,17 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="e.pollinger" id="dc0b71e9-616b-4b5a-ad74-1725f0278a15"> + <createTable tableName="KNOWLEDGETAGLINK"> + <column name="KNOWLEDGETAGLINKID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_KNOWLEDGETAGLINK_KNOWLEDGETAGLINKID"/> + </column> + <column name="KNOWLEDGETAG_ID" type="CHAR(36)"/> + <column name="KNOWLEDGEMANAGEMENT_ID" type="CHAR(36)"/> + <column name="DATE_NEW" type="TIMESTAMP"/> + <column name="DATE_EDIT" type="TIMESTAMP"/> + <column name="USER_NEW" type="nvarchar(50)"/> + <column name="USER_EDIT" type="nvarchar(50)"/> + </createTable> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeTagModeration_table.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeTagModeration_table.xml new file mode 100644 index 0000000000000000000000000000000000000000..e15b847360533f7a523e13c747ef200ef325be1b --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeTagModeration_table.xml @@ -0,0 +1,13 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="e.pollinger" id="50ea4ad8-c864-489e-a121-92f4738e0a7f"> + <createTable tableName="KNOWLEDGEMANAGEMENTTAGMODERATION"> + <column name="KNOWLEDGEMANAGEMENTTAGMODERATIONID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_TAGMODERATION_KNOWLEDGEMANAGEMENTTAGMODERATIONID"/> + </column> + <column name="AB_ATTRIBUTE_ID" type="CHAR(36)"></column> + <column name="STATUS" type="CHAR(36)"/> + </createTable> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeTag_table.xml b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeTag_table.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa0b15c81bba60d40c1310404dffc378bba1657f --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/Knowledgemanagement/struct/knowledgeTag_table.xml @@ -0,0 +1,17 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="e.pollinger" id="95eabecf-82f8-49c8-87b2-594c338d3c15"> + <createTable tableName="KNOWLEDGETAG"> + <column name="KNOWLEDGETAGID" type="CHAR(36)"> + <constraints primaryKey="true" primaryKeyName="PK_KNOWLEDGETAG_KNOWLEDGETAGID"/> + </column> + <column name="TAG" type="VARCHAR(50)"/> + <column name="STATUS" type="CHAR(36)"/> + <column name="DATE_NEW" type="TIMESTAMP"/> + <column name="DATE_EDIT" type="TIMESTAMP"/> + <column name="USER_NEW" type="nvarchar(50)"/> + <column name="USER_EDIT" type="nvarchar(50)"/> + </createTable> + </changeSet> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/changelog.xml b/.liquibase/Data_alias/basic/2020.2.2/changelog.xml new file mode 100644 index 0000000000000000000000000000000000000000..d2c30058760b63b761bd081bea0debf466bfedb5 --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/changelog.xml @@ -0,0 +1,6 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <include relativeToChangelogFile="true" file="insert_commMediumTitleKeywordAttribute.xml"/> + <include relativeToChangelogFile="true" file="Knowledgemanagement/changelog_knowledgeManagement.xml"/> +</databaseChangeLog> diff --git a/.liquibase/Data_alias/basic/2020.2.2/insert_commMediumTitleKeywordAttribute.xml b/.liquibase/Data_alias/basic/2020.2.2/insert_commMediumTitleKeywordAttribute.xml new file mode 100644 index 0000000000000000000000000000000000000000..e67d1cc992d389d0c60a4fe30b7a9fb8a3d5944d --- /dev/null +++ b/.liquibase/Data_alias/basic/2020.2.2/insert_commMediumTitleKeywordAttribute.xml @@ -0,0 +1,55 @@ +<?xml version="1.1" encoding="UTF-8" standalone="no"?> +<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"> + <changeSet author="s.listl" id="deb46cd2-c2e7-424b-93a1-052cd0a5aef7"> + <insert tableName="AB_KEYWORD_ATTRIBUTE"> + <column name="AB_KEYWORD_ATTRIBUTEID" value="ace00630-1e07-4615-8d61-2478995538fa"/> + <column name="CONTAINER" value="CommunicationMedium"/> + <column name="KIND" value="CHAR_VALUE"/> + <column name="NAME" value="placeholderTitle"/> + </insert> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="ebf5a52c-34db-4394-9fc1-21dfbdc3c6ea"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="ace00630-1e07-4615-8d61-2478995538fa"/> + <column name="AB_KEYWORD_ENTRY_ID" value="cc16d938-b95f-4e07-a3b4-73f8524bb664"/> + <column name="CHAR_VALUE" value="Phone number"/> + </insert> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="5a2bb861-31c8-471d-8fb9-a3c28d589b9f"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="ace00630-1e07-4615-8d61-2478995538fa"/> + <column name="AB_KEYWORD_ENTRY_ID" value="66950de5-fa8b-465c-8db1-4eb7aac98bd3"/> + <column name="CHAR_VALUE" value="Email address"/> + </insert> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="c860637f-4182-4cc4-9879-7ed3d009aee4"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="ace00630-1e07-4615-8d61-2478995538fa"/> + <column name="AB_KEYWORD_ENTRY_ID" value="aa2b9cc9-3e87-4fe9-98a2-a4e417a3324f"/> + <column name="CHAR_VALUE" value="Phone number"/> + </insert> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="def9c03f-4f8b-4158-9f9c-4f2c6f1f52be"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="ace00630-1e07-4615-8d61-2478995538fa"/> + <column name="AB_KEYWORD_ENTRY_ID" value="cfebe176-0a64-428d-b0ec-bba454d2ca3e"/> + <column name="CHAR_VALUE" value="URL"/> + </insert> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="bf7be765-ebcc-409f-9c81-66665b6b55f6"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="ace00630-1e07-4615-8d61-2478995538fa"/> + <column name="AB_KEYWORD_ENTRY_ID" value="d80c3689-7e0a-45ac-801d-91d199c08bd5"/> + <column name="CHAR_VALUE" value="URL"/> + </insert> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="9fc7f919-b04c-40f3-8124-9e1d4d8198f5"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="ace00630-1e07-4615-8d61-2478995538fa"/> + <column name="AB_KEYWORD_ENTRY_ID" value="e6c36792-763d-44f8-8afe-157c8f158ef8"/> + <column name="CHAR_VALUE" value="URL"/> + </insert> + <insert tableName="AB_KEYWORD_ATTRIBUTERELATION"> + <column name="AB_KEYWORD_ATTRIBUTERELATIONID" value="5d64759f-acd2-4dbc-9df3-c38bceaf8f6b"/> + <column name="AB_KEYWORD_ATTRIBUTE_ID" value="ace00630-1e07-4615-8d61-2478995538fa"/> + <column name="AB_KEYWORD_ENTRY_ID" value="7abf7fc5-08a1-4bae-b0ca-ec5e406d154c"/> + <column name="CHAR_VALUE" value="URL"/> + </insert> + </changeSet> +</databaseChangeLog> \ No newline at end of file diff --git a/.liquibase/Data_alias/changelog.xml b/.liquibase/Data_alias/changelog.xml index 9d1ca6c5576dd7a291ee576c6f2847f5f0578a8a..3f25ca1dbb1f91ed6ec3330368189a268665602b 100644 --- a/.liquibase/Data_alias/changelog.xml +++ b/.liquibase/Data_alias/changelog.xml @@ -17,6 +17,7 @@ <include relativeToChangelogFile="true" file="basic/2020.1.3/changelog.xml"/> <include relativeToChangelogFile="true" file="basic/2020.2.0/changelog.xml"/> <include relativeToChangelogFile="true" file="basic/2020.2.1/changelog.xml"/> + <include relativeToChangelogFile="true" file="basic/2020.2.2/changelog.xml"/> <!--enable this only when you definetly want to overwrite the existing data with demo records:--> <!--<include relativeToChangelogFile="true" file="basic/_demoData/changelog.xml" context="example"/>--> diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index 96738b180650e265da04ed5ca755f51b7ac40641..0d1539bb13d99a94f9a95b38bb8b2f59b7336170 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -3611,7 +3611,7 @@ <notNull v="true" /> <isUnique v="true" /> <index v="true" /> - <title>Salesproject Id</title> + <title>Sales Project Id</title> <description></description> </entityFieldDb> <entityFieldDb> @@ -8091,7 +8091,7 @@ <isUnique v="false" /> <index v="true" /> <documentation></documentation> - <title>Salesproject Id</title> + <title>Sales Project Id</title> <description></description> <customProperties> <customBooleanProperty> @@ -8140,7 +8140,7 @@ <isUnique v="true" /> <index v="true" /> <documentation></documentation> - <title>Salesproject milestone Id</title> + <title>Sales Project milestone Id</title> <description></description> </entityFieldDb> <entityFieldDb> @@ -10889,8 +10889,8 @@ <name>RECIPIENTS</name> <dbName></dbName> <primaryKey v="false" /> - <columnType v="12" /> - <size v="4000" /> + <columnType v="2005" /> + <size v="2147483647" /> <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> @@ -11711,8 +11711,8 @@ <name>SCAN_PATTERN</name> <dbName></dbName> <primaryKey v="false" /> - <columnType v="12" /> - <size v="4000" /> + <columnType v="2005" /> + <size v="2147483647" /> <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> @@ -13883,6 +13883,34 @@ <title></title> <description></description> </entityFieldDb> + <entityFieldDb> + <name>P_COMMINTERNET</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="254" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>O_COMMINTERNET</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="254" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> </entityFields> </entityDb> <entityDb> @@ -14134,7 +14162,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="true" /> + <index v="false" /> <documentation></documentation> <title></title> <description></description> @@ -14460,7 +14488,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="true" /> + <index v="false" /> <documentation></documentation> <title></title> <description></description> @@ -14515,7 +14543,7 @@ <scale v="0" /> <notNull v="false" /> <isUnique v="false" /> - <index v="true" /> + <index v="false" /> <documentation></documentation> <title></title> <description></description> @@ -15737,6 +15765,992 @@ </entityFieldDb> </entityFields> </entityDb> + <entityDb> + <name>KNOWLEDGEDISCUSSION</name> + <dbName></dbName> + <idColumn>KNOWLEDGEDISCUSSIONID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>PARENTENTRY</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>STATUS</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DISCUSSIONTEXT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="2005" /> + <size v="2147483647" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KNOWLEDGEDISCUSSIONID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KNOWLEDGEMANAGEMENT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>AUTHOR</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> + <entityDb> + <name>KNOWLEDGELINK</name> + <dbName></dbName> + <idColumn>KNOWLEDGELINKID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>KNOWLEDGELINKID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KNOWLEDGEMANAGEMENT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>OBJECT_TYPE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="100" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>ROW_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> + <entityDb> + <name>KNOWLEDGEMANAGEMENT</name> + <dbName></dbName> + <idColumn>KNOWLEDGEMANAGEMENTID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>DATE_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KNOWLEDGEMANAGEMENTID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>AUTHOR_CONTACT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + <customProperties> + <customBooleanProperty> + <name>log</name> + <global v="false" /> + <property v="true" /> + </customBooleanProperty> + </customProperties> + </entityFieldDb> + <entityFieldDb> + <name>PUBLISH</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="63" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>CONTENTDECODED</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="2005" /> + <size v="2147483647" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>TITLE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="255" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + <customProperties> + <customBooleanProperty> + <name>log</name> + <global v="false" /> + <property v="true" /> + </customBooleanProperty> + </customProperties> + </entityFieldDb> + <entityFieldDb> + <name>CONTENT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="2005" /> + <size v="2147483647" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + <customProperties> + <customBooleanProperty> + <name>log</name> + <global v="false" /> + <property v="true" /> + </customBooleanProperty> + </customProperties> + </entityFieldDb> + <entityFieldDb> + <name>DATE_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="63" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>RESPONSIBLE_CONTACT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + <customProperties> + <customBooleanProperty> + <name>log</name> + <global v="false" /> + <property v="true" /> + </customBooleanProperty> + </customProperties> + </entityFieldDb> + <entityFieldDb> + <name>TYPE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> + <entityDb> + <name>KNOWLEDGEROLES</name> + <dbName></dbName> + <idColumn>KNOWLEDGEROLESID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>KNOWLEDGEROLESID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KNOWLEDGEMANAGEMENT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>ROLENAME</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="100" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> + <entityDb> + <name>KNOWLEDGEGITINTERFACE</name> + <dbName></dbName> + <idColumn>KNOWLEDGEGITINTERFACEID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>DATE_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KNOWLEDGEGITINTERFACEID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>GITCOMMIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="200" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>SYSTEMNAME</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> + <entityDb> + <name>KNOWLEDGEMANAGEMENTTAGMODERATION</name> + <dbName></dbName> + <idColumn>KNOWLEDGEMANAGEMENTTAGMODERATIONID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>STATUS</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>AB_ATTRIBUTE_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KNOWLEDGEMANAGEMENTTAGMODERATIONID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> + <entityDb> + <name>KNOWLEDGETAG</name> + <dbName></dbName> + <idColumn>KNOWLEDGETAGID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>KNOWLEDGETAGID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>STATUS</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>TAG</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> + <entityDb> + <name>KNOWLEDGETAGLINK</name> + <dbName></dbName> + <idColumn>KNOWLEDGETAGLINKID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <documentation></documentation> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>DATE_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KNOWLEDGEMANAGEMENT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KNOWLEDGETAGLINKID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="true" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KNOWLEDGETAG_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> </entities> </entityGroup> </aliasDefDb> diff --git a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod index 2de36e834097c76b055a391c9ed833036b720f86..adb51ef4372f7731293b2be3e1ca1360a9bd83b5 100644 --- a/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod +++ b/application/_____SYSTEM_APPLICATION_NEON/_____SYSTEM_APPLICATION_NEON.aod @@ -38,10 +38,6 @@ <name>Task</name> <kind v="10077" /> </entityNode> - <entityNode> - <name>Favorite</name> - <kind v="10077" /> - </entityNode> </childNodes> </entityNode> </childNodes> @@ -247,6 +243,28 @@ </entityNode> </childNodes> </entityNode> + <entityNode> + <name>Group</name> + <kind v="123" /> + <title>Knowledge Management</title> + <icon>VAADIN:ACADEMY_CAP</icon> + <childNodes> + <entityNode> + <name>Group5</name> + <kind v="123" /> + <childNodes> + <entityNode> + <name>INTERNAL_EVERYONE</name> + <kind v="159" /> + </entityNode> + <entityNode> + <name>KnowledgeManagement</name> + <kind v="10077" /> + </entityNode> + </childNodes> + </entityNode> + </childNodes> + </entityNode> <entityNode> <name>Administration</name> <kind v="123" /> diff --git a/entity/360Degree_entity/360Degree_entity.aod b/entity/360Degree_entity/360Degree_entity.aod index e4125015133a7668cae22904bce30d1369e33115..62c86300ec6c74f84a6ac8fbb50ffd4daf7f5259 100644 --- a/entity/360Degree_entity/360Degree_entity.aod +++ b/entity/360Degree_entity/360Degree_entity.aod @@ -126,7 +126,7 @@ </entityActionField> <entityActionField> <name>newSalesproject</name> - <title>Salesproject</title> + <title>Sales Project</title> <onActionProcess>%aditoprj%/entity/360Degree_entity/entityfields/newmodule/children/newsalesproject/onActionProcess.js</onActionProcess> <iconId>VAADIN:BOOK_DOLLAR</iconId> <stateProcess>%aditoprj%/entity/360Degree_entity/entityfields/newmodule/children/newsalesproject/stateProcess.js</stateProcess> diff --git a/entity/AdminViewRow_entity/AdminViewRow_entity.aod b/entity/AdminViewRow_entity/AdminViewRow_entity.aod index 75795a8f2a19547b7ca64bdadba1dc2bea26f996..e957f3e131e1570cc6fd74e143d74bfe0caec1d6 100644 --- a/entity/AdminViewRow_entity/AdminViewRow_entity.aod +++ b/entity/AdminViewRow_entity/AdminViewRow_entity.aod @@ -42,6 +42,11 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityActionField> + <name>copyValueToClipboard</name> + <onActionProcess>%aditoprj%/entity/AdminViewRow_entity/entityfields/copyvaluetoclipboard/onActionProcess.js</onActionProcess> + <iconId>VAADIN:CLIPBOARD</iconId> + </entityActionField> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/AdminViewRow_entity/entityfields/copyvaluetoclipboard/onActionProcess.js b/entity/AdminViewRow_entity/entityfields/copyvaluetoclipboard/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..dd853d9ace41d189f6b152f075fee9c1038e0ecb --- /dev/null +++ b/entity/AdminViewRow_entity/entityfields/copyvaluetoclipboard/onActionProcess.js @@ -0,0 +1,11 @@ +import("system.vars"); +import("system.neon"); + +var fieldValues = JSON.parse(vars.get("$param.Rows_param")); +var fieldId = vars.get("$local.uid"); +var row = fieldValues.find(function ([id]) +{ + return id === fieldId; +}); +if (row) + neon.copyToClipboard(row[2]); \ No newline at end of file diff --git a/entity/AnyContact_entity/AnyContact_entity.aod b/entity/AnyContact_entity/AnyContact_entity.aod index 0d0c5d1d960ce42545577c9ad79cde469d73d4a9..3b3b3c3e9899dc01fc477ddfc3e5f3f910455f69 100644 --- a/entity/AnyContact_entity/AnyContact_entity.aod +++ b/entity/AnyContact_entity/AnyContact_entity.aod @@ -3,6 +3,7 @@ <name>AnyContact_entity</name> <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/AnyContact_entity/documentation.adoc</documentation> + <title>Contact</title> <contentTitleProcess>%aditoprj%/entity/AnyContact_entity/contentTitleProcess.js</contentTitleProcess> <initFilterProcess>%aditoprj%/entity/AnyContact_entity/initFilterProcess.js</initFilterProcess> <imageProcess>%aditoprj%/entity/AnyContact_entity/imageProcess.js</imageProcess> @@ -29,12 +30,6 @@ <fieldName>AnyContacts</fieldName> <isConsumer v="false" /> </entityDependency> - <entityDependency> - <name>336fdc6b-05f8-40bc-89ba-d4ab98bd6948</name> - <entityName>CampaignParticipant_entity</entityName> - <fieldName>AnyContacts</fieldName> - <isConsumer v="false" /> - </entityDependency> <entityDependency> <name>b2895709-2ebf-46ec-a46d-6b2e9a4575a3</name> <entityName>BulkMailRecipient_entity</entityName> @@ -77,11 +72,23 @@ <fieldName>Contacts</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>ea7c855e-dccd-4c05-9efb-a1303f37dab8</name> + <entityName>CampaignParticipant_entity</entityName> + <fieldName>AnyContacts</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> </entityProvider> <entityProvider> <name>ContactsByIds</name> <documentation>%aditoprj%/entity/AnyContact_entity/entityfields/contactsbyids/documentation.adoc</documentation> + <children> + <entityParameter> + <name>ContactId_param</name> + <expose v="false" /> + </entityParameter> + </children> <dependencies> <entityDependency> <name>0206f7a8-fd58-47e8-8b7a-5ff4531e56fb</name> @@ -90,12 +97,6 @@ <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>ContactId_param</name> - <expose v="false" /> - </entityParameter> - </children> </entityProvider> <entityParameter> <name>ContactIds_param</name> @@ -108,6 +109,7 @@ </entityField> <entityField> <name>LANGUAGE</name> + <title>Language</title> </entityField> <entityField> <name>ORGANISATION_ID</name> @@ -157,9 +159,11 @@ See ContactUtils.getRelationTypeByPersOrg for possible values</description> </entityField> <entityField> <name>PERSON_TITLE</name> + <title>Title</title> </entityField> <entityField> <name>PERSON_SALUTATION</name> + <title>Salutation</title> </entityField> <entityField> <name>PERSON_FULL_NAME</name> @@ -173,6 +177,13 @@ See ContactUtils.getRelationTypeByPersOrg for possible values</description> <entityProvider> <name>OnlySameCompany</name> <documentation>%aditoprj%/entity/AnyContact_entity/entityfields/onlysamecompany/documentation.adoc</documentation> + <children> + <entityParameter> + <name>ContactId_param</name> + <expose v="true" /> + <mandatory v="true" /> + </entityParameter> + </children> <dependencies> <entityDependency> <name>28b19d6b-237c-4268-b6c6-323df408c94a</name> @@ -181,13 +192,6 @@ See ContactUtils.getRelationTypeByPersOrg for possible values</description> <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>ContactId_param</name> - <expose v="true" /> - <mandatory v="true" /> - </entityParameter> - </children> </entityProvider> <entityParameter> <name>WithPrivatePersons_param</name> @@ -248,6 +252,7 @@ See ContactUtils.getRelationTypeByPersOrg for possible values</description> <dbRecordFieldMapping> <name>LANGUAGE.value</name> <recordfield>CONTACT.ISOLANGUAGE</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>ORGANISATION_ID.value</name> diff --git a/entity/Appointment_entity/entityfields/attendees/dropDownProcess.js b/entity/Appointment_entity/entityfields/attendees/dropDownProcess.js index 1ab0229fb447c8119504440ad07ccc53c097b2f9..52ca1397cf7c11f6ff54c9bc83aa912e5fe05015 100644 --- a/entity/Appointment_entity/entityfields/attendees/dropDownProcess.js +++ b/entity/Appointment_entity/entityfields/attendees/dropDownProcess.js @@ -3,7 +3,7 @@ import("system.result"); import("system.calendars"); var entry = JSON.parse(vars.getString("$param.Entry_param")); -var allUsers = calendars.getFullCalendarUsers(calendars.RIGHT_WRITE); +var allUsers = calendars.getFullCalendarUsers(calendars.RIGHT_READ); var results = []; for (var i = 0; i < allUsers.length; i++) diff --git a/entity/Attribute_entity/entityfields/openadminview/onActionProcess.js b/entity/Attribute_entity/entityfields/openadminview/onActionProcess.js index 2405febf9b19c521aa76b395b28c7664d84e6357..6f20e15ed4840e4c2cdb74ed5d57da8b30ce4a5c 100644 --- a/entity/Attribute_entity/entityfields/openadminview/onActionProcess.js +++ b/entity/Attribute_entity/entityfields/openadminview/onActionProcess.js @@ -1,6 +1,4 @@ import("system.vars"); import("Context_lib"); -AdminViewUtils.open("ATTRIBUTEID", [ - ["ATTRIBUTE_PARENT_ID", vars.get("$field.ATTRIBUTE_PARENT_ID")] -]); \ No newline at end of file +AdminViewUtils.open("AB_ATTRIBUTEID", ["ATTRIBUTE_PARENT_ID", "ATTRIBUTE_ACTIVE", "ATTRIBUTE_TYPE", "SORTING"]); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod b/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod index 4d3b86ba02c4c01afcd977df57bbd15e493c3c08..42f0af8d639be70deb1552aaab86af3c4dbf0953 100644 --- a/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod +++ b/entity/CampaignParticipant_entity/CampaignParticipant_entity.aod @@ -21,20 +21,6 @@ <targetContextField>CONTACTCONTEXT</targetContextField> <targetIdField>CONTACT_ID</targetIdField> <documentation>%aditoprj%/entity/CampaignParticipant_entity/entityfields/campaignparticipantsprovider/documentation.adoc</documentation> - <dependencies> - <entityDependency> - <name>f28945cd-4613-4dfa-91f7-a7d9d64cef58</name> - <entityName>Campaign_entity</entityName> - <fieldName>CampaignParticipants</fieldName> - <isConsumer v="false" /> - </entityDependency> - <entityDependency> - <name>7ad08378-b36f-4512-8891-db727c6ddcd7</name> - <entityName>CampaignStep_entity</entityName> - <fieldName>CampaignParticipantsConsumer</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> <children> <entityParameter> <name>ContactId_param</name> @@ -49,6 +35,20 @@ <expose v="true" /> </entityParameter> </children> + <dependencies> + <entityDependency> + <name>f28945cd-4613-4dfa-91f7-a7d9d64cef58</name> + <entityName>Campaign_entity</entityName> + <fieldName>CampaignParticipants</fieldName> + <isConsumer v="false" /> + </entityDependency> + <entityDependency> + <name>7ad08378-b36f-4512-8891-db727c6ddcd7</name> + <entityName>CampaignStep_entity</entityName> + <fieldName>CampaignParticipantsConsumer</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> </entityProvider> <entityParameter> <name>CampaignStepId_param</name> @@ -145,11 +145,6 @@ <entityConsumer> <name>CampaignSteps</name> <refreshParent v="true" /> - <dependency> - <name>dependency</name> - <entityName>CampaignStep_entity</entityName> - <fieldName>CampaignSteps</fieldName> - </dependency> <children> <entityParameter> <name>campaignId_param</name> @@ -157,6 +152,11 @@ <expose v="true" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>CampaignStep_entity</entityName> + <fieldName>CampaignSteps</fieldName> + </dependency> </entityConsumer> <entityField> <name>CONTACTCONTEXT</name> @@ -212,17 +212,17 @@ </entityConsumer> <entityConsumer> <name>CommRestrictionIcon</name> - <dependency> - <name>dependency</name> - <entityName>KeywordAttribute_entity</entityName> - <fieldName>SpecificContainerKeyword</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/commrestrictionicon/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordAttribute_entity</entityName> + <fieldName>SpecificContainerKeyword</fieldName> + </dependency> </entityConsumer> <entityField> <name>STANDARD_EMAIL_COMMUNICATION</name> @@ -238,6 +238,12 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityField> + <name>HASADVERTISINGBAN</name> + <title>Advertising ban</title> + <contentType>BOOLEAN</contentType> + <dropDownProcess>%aditoprj%/entity/CampaignParticipant_entity/entityfields/hasadvertisingban/dropDownProcess.js</dropDownProcess> + </entityField> </entityFields> <recordContainers> <dbRecordContainer> @@ -267,6 +273,7 @@ <dbRecordFieldMapping> <name>CAMPAIGNSTEP_ID.value</name> <recordfield>CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>CONTACT_ID.value</name> @@ -293,16 +300,24 @@ <recordfield>CAMPAIGNPARTICIPANT.CAMPAIGNPARTICIPANTID</recordfield> </dbRecordFieldMapping> <dbRecordFieldMapping> - <name>STANDARD_PHONE_COMMUNICATION.displayValue</name> - <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_phone_communication.displayvalue/expression.js</expression> + <name>STANDARD_EMAIL_COMMUNICATION.value</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_email_communication.value/expression.js</expression> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> - <name>STANDARD_EMAIL_COMMUNICATION.displayValue</name> - <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_email_communication.displayvalue/expression.js</expression> + <name>STANDARD_PHONE_COMMUNICATION.value</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_phone_communication.value/expression.js</expression> </dbRecordFieldMapping> + <consumerMapping> + <name>AnyContacts</name> + <filterConditionProcess>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/anycontacts/filterConditionProcess.js</filterConditionProcess> + <isFilterable v="true" /> + <filtertype>BASIC</filtertype> + </consumerMapping> <dbRecordFieldMapping> - <name>ADVERTISINGBAN_ICON.value</name> - <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/advertisingban_icon.value/expression.js</expression> + <name>HASADVERTISINGBAN.value</name> + <expression>%aditoprj%/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/hasadvertisingban.value/expression.js</expression> + <isFilterable v="true" /> </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> diff --git a/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/colorProcess.js b/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/colorProcess.js index 1bcf3daac52e4e4473b002a163317af1c88db283..f322e15de7ad601c5a31941c8e33b1fa34d33e83 100644 --- a/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/colorProcess.js +++ b/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/colorProcess.js @@ -1,16 +1,7 @@ +import("Util_lib"); import("system.result"); -import("Sql_lib"); -import("system.db"); import("system.vars"); import("system.neon"); -import("Campaign_lib"); -if(vars.get("$field.ADVERTISINGBAN_ICON") > 0) -{ - result.string(neon.PRIORITY_MEDIUM_COLOR); -} -else -{ - result.string(neon.PRIORITY_LOW_COLOR); -} - +var hasAdvertisingBan = Utils.toBoolean(vars.get("$field.HASADVERTISINGBAN")); +result.string(hasAdvertisingBan ? neon.PRIORITY_MEDIUM_COLOR : neon.PRIORITY_LOW_COLOR); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/displayValueProcess.js b/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/displayValueProcess.js index 837878d3b76182bb3c42d5b51b73c23349f95204..7ff3faa94c8640ed84148138aef80e3973ba5b6d 100644 --- a/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/displayValueProcess.js +++ b/entity/CampaignParticipant_entity/entityfields/advertisingban_icon/displayValueProcess.js @@ -1,12 +1,7 @@ +import("Util_lib"); import("system.result"); import("system.vars"); // Now show warning always, if any commrestriction exists. No matter which medium the current step has. -if (vars.get("$field.ADVERTISINGBAN_ICON") == 0) -{ - result.string("VAADIN:CHECK"); -} -else -{ - result.string("VAADIN:WARNING"); -} \ No newline at end of file +var hasAdvertisingBan = Utils.toBoolean(vars.get("$field.HASADVERTISINGBAN")); +result.string(hasAdvertisingBan ? "VAADIN:WARNING" : "VAADIN:CHECK"); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/campaignsteps/children/campaignid_param/valueProcess.js b/entity/CampaignParticipant_entity/entityfields/campaignsteps/children/campaignid_param/valueProcess.js index 90d07eb4d8a93c6e438b230582858b05be010468..a22fac8bd5302593f1b008cf40574f6d662c3bb9 100644 --- a/entity/CampaignParticipant_entity/entityfields/campaignsteps/children/campaignid_param/valueProcess.js +++ b/entity/CampaignParticipant_entity/entityfields/campaignsteps/children/campaignid_param/valueProcess.js @@ -1,3 +1,8 @@ import("system.vars"); import("system.result"); -result.string(vars.get("$field.CAMPAIGN_ID")); \ No newline at end of file +import("system.neon"); + +if (vars.get("$sys.viewmode") == neon.FRAME_VIEWMODE_TABLE) + result.string(vars.get("$param.CampaignId_param")); +else + result.string(vars.get("$field.CAMPAIGN_ID")); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/entityfields/hasadvertisingban/dropDownProcess.js b/entity/CampaignParticipant_entity/entityfields/hasadvertisingban/dropDownProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3373b8a886df7267c9205c206442cb2e091128fb --- /dev/null +++ b/entity/CampaignParticipant_entity/entityfields/hasadvertisingban/dropDownProcess.js @@ -0,0 +1,7 @@ +import("system.translate"); +import("system.result"); + +result.object([ + ["1", translate.text("Yes")], + ["0", translate.text("No")] +]); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/advertisingban_icon.value/expression.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/advertisingban_icon.value/expression.js deleted file mode 100644 index 27052d9123b71810bd3c103ca52ea5926567dd69..0000000000000000000000000000000000000000 --- a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/advertisingban_icon.value/expression.js +++ /dev/null @@ -1,11 +0,0 @@ -import("system.vars"); -import("Contact_lib"); -import("Sql_lib"); -import("system.result"); - -// Now show warning always, if any commrestriction exists. No matter which medium the current step has. -result.string("(" + newSelect("count(*)") - .from("CONTACT") - .where("CONTACT.CONTACTID = CAMPAIGNPARTICIPANT.CONTACT_ID") - .and(newWhere(ContactUtils.getCommRestrictionCondition(undefined, false, vars.get("$sys.date")))) // TODO: the newWhere can be removed when getCommRestrictionCondition returns a sqlBuilder instead of a SqlCondition - .toString() + ")"); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/anycontacts/filterConditionProcess.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/anycontacts/filterConditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c37a5f4a9b9f278e371d4609622c78b70aafe351 --- /dev/null +++ b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/anycontacts/filterConditionProcess.js @@ -0,0 +1,10 @@ +import("system.result"); +import("system.vars"); +import("Contact_lib"); +import("Sql_lib"); + +var condition = newWhere(null, ContactUtils.getFullContactSqlBuilder("CONTACTID") + .where("CONTACTID = CAMPAIGNPARTICIPANT.CONTACT_ID") + .and(vars.get("$local.condition")), SqlBuilder.EXISTS()); + +result.string(condition.toString()); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/hasadvertisingban.value/expression.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/hasadvertisingban.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..b1292f5439920657e37cfaa83ca71afd2ce1a5a8 --- /dev/null +++ b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/hasadvertisingban.value/expression.js @@ -0,0 +1,11 @@ +import("system.vars"); +import("Contact_lib"); +import("Sql_lib"); +import("system.result"); + +var commRestrictionContactSubSql = newSelect("CONTACT.CONTACTID") + .from("CONTACT") + .where("CONTACT.CONTACTID = CAMPAIGNPARTICIPANT.CONTACT_ID") + .and(ContactUtils.getCommRestrictionCondition()); + +result.string(SqlBuilder.caseWhen(null, commRestrictionContactSubSql, SqlBuilder.EXISTS()).thenString("1").elseString("0").toString()); \ No newline at end of file diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_email_communication.displayvalue/expression.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_email_communication.value/expression.js similarity index 100% rename from entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_email_communication.displayvalue/expression.js rename to entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_email_communication.value/expression.js diff --git a/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_phone_communication.displayvalue/expression.js b/entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_phone_communication.value/expression.js similarity index 100% rename from entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_phone_communication.displayvalue/expression.js rename to entity/CampaignParticipant_entity/recordcontainers/participantsdbrecordcontainer/recordfieldmappings/standard_phone_communication.value/expression.js diff --git a/entity/Communication_entity/Communication_entity.aod b/entity/Communication_entity/Communication_entity.aod index dbc7bf89b31da1c696fa6870dea497360ae54ea7..f931c15531a870c0828c7706d110e39542b74bbd 100644 --- a/entity/Communication_entity/Communication_entity.aod +++ b/entity/Communication_entity/Communication_entity.aod @@ -13,6 +13,7 @@ <title>${COMM_ADDRESS}</title> <contentTypeProcess>%aditoprj%/entity/Communication_entity/entityfields/addr/contentTypeProcess.js</contentTypeProcess> <mandatory v="true" /> + <titleProcess>%aditoprj%/entity/Communication_entity/entityfields/addr/titleProcess.js</titleProcess> <valueProcess>%aditoprj%/entity/Communication_entity/entityfields/addr/valueProcess.js</valueProcess> <onValidation>%aditoprj%/entity/Communication_entity/entityfields/addr/onValidation.js</onValidation> </entityField> @@ -62,6 +63,27 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <name>AllCommunications</name> <documentation>%aditoprj%/entity/Communication_entity/entityfields/allcommunications/documentation.adoc</documentation> <recordContainer>db</recordContainer> + <children> + <entityParameter> + <name>CommCategory_param</name> + <expose v="true" /> + <description>TODO: expose auf false. aktuell wird der Code nicht ausgeführt, wenn Expose false ist.</description> + </entityParameter> + <entityParameter> + <name>ContactId_param</name> + <expose v="true" /> + <description>This parameter is used for specifing a related "CONTACTID" to a COMMUNICATION-entry. +Usually this is used for filtering COMMUNICATION-entries by a specified contact or creating a new entry that is related to a contact.</description> + </entityParameter> + <entityParameter> + <name>Address_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>AdditionalContactIds_param</name> + <expose v="false" /> + </entityParameter> + </children> <dependencies> <entityDependency> <name>070b2457-3766-4c8a-b43f-a2bf7c9ef638</name> @@ -88,10 +110,16 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <isConsumer v="false" /> </entityDependency> </dependencies> + </entityProvider> + <entityProvider> + <name>PhoneCommunications</name> + <documentation>%aditoprj%/entity/Communication_entity/entityfields/phonecommunications/documentation.adoc</documentation> + <recordContainer>db</recordContainer> <children> <entityParameter> <name>CommCategory_param</name> - <expose v="true" /> + <valueProcess>%aditoprj%/entity/Communication_entity/entityfields/phonecommunications/children/commcategory_param/valueProcess.js</valueProcess> + <expose v="false" /> <description>TODO: expose auf false. aktuell wird der Code nicht ausgeführt, wenn Expose false ist.</description> </entityParameter> <entityParameter> @@ -102,18 +130,14 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact </entityParameter> <entityParameter> <name>Address_param</name> - <expose v="false" /> + <expose v="true" /> + <mandatory v="false" /> </entityParameter> <entityParameter> <name>AdditionalContactIds_param</name> <expose v="false" /> </entityParameter> </children> - </entityProvider> - <entityProvider> - <name>PhoneCommunications</name> - <documentation>%aditoprj%/entity/Communication_entity/entityfields/phonecommunications/documentation.adoc</documentation> - <recordContainer>db</recordContainer> <dependencies> <entityDependency> <name>7382242a-aa18-4a31-ab77-69a79f2b97b8</name> @@ -128,10 +152,16 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <isConsumer v="false" /> </entityDependency> </dependencies> + </entityProvider> + <entityProvider> + <name>EmailCommunications</name> + <documentation>%aditoprj%/entity/Communication_entity/entityfields/emailcommunications/documentation.adoc</documentation> + <recordContainer>db</recordContainer> <children> <entityParameter> <name>CommCategory_param</name> - <valueProcess>%aditoprj%/entity/Communication_entity/entityfields/phonecommunications/children/commcategory_param/valueProcess.js</valueProcess> + <title></title> + <valueProcess>%aditoprj%/entity/Communication_entity/entityfields/emailcommunications/children/commcategory_param/valueProcess.js</valueProcess> <expose v="false" /> <description>TODO: expose auf false. aktuell wird der Code nicht ausgeführt, wenn Expose false ist.</description> </entityParameter> @@ -143,19 +173,13 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact </entityParameter> <entityParameter> <name>Address_param</name> - <expose v="true" /> - <mandatory v="false" /> + <expose v="false" /> </entityParameter> <entityParameter> <name>AdditionalContactIds_param</name> <expose v="false" /> </entityParameter> </children> - </entityProvider> - <entityProvider> - <name>EmailCommunications</name> - <documentation>%aditoprj%/entity/Communication_entity/entityfields/emailcommunications/documentation.adoc</documentation> - <recordContainer>db</recordContainer> <dependencies> <entityDependency> <name>ecfbf518-fe92-4661-8ebe-e2d3c8d259e1</name> @@ -182,29 +206,6 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <isConsumer v="false" /> </entityDependency> </dependencies> - <children> - <entityParameter> - <name>CommCategory_param</name> - <title></title> - <valueProcess>%aditoprj%/entity/Communication_entity/entityfields/emailcommunications/children/commcategory_param/valueProcess.js</valueProcess> - <expose v="false" /> - <description>TODO: expose auf false. aktuell wird der Code nicht ausgeführt, wenn Expose false ist.</description> - </entityParameter> - <entityParameter> - <name>ContactId_param</name> - <expose v="true" /> - <description>This parameter is used for specifing a related "CONTACTID" to a COMMUNICATION-entry. -Usually this is used for filtering COMMUNICATION-entries by a specified contact or creating a new entry that is related to a contact.</description> - </entityParameter> - <entityParameter> - <name>Address_param</name> - <expose v="false" /> - </entityParameter> - <entityParameter> - <name>AdditionalContactIds_param</name> - <expose v="false" /> - </entityParameter> - </children> </entityProvider> <entityParameter> <name>CommCategory_param</name> @@ -218,11 +219,6 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact </entityParameter> <entityConsumer> <name>KeywordMediums</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> @@ -230,6 +226,11 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact <expose v="false" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityField> <name>USER_NEW</name> diff --git a/entity/Communication_entity/entityfields/addr/titleProcess.js b/entity/Communication_entity/entityfields/addr/titleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8bacbaa9a703edcdb8e4ade535013cde65ea17b8 --- /dev/null +++ b/entity/Communication_entity/entityfields/addr/titleProcess.js @@ -0,0 +1,10 @@ +import("system.translate"); +import("system.result"); +import("KeywordRegistry_basic"); +import("Keyword_lib"); +import("system.vars"); + +var commMedium = vars.get("$field.MEDIUM_ID"); +var keywordAttributes = KeywordUtils.getAttributeRelationsByKey(commMedium, $KeywordRegistry.communicationMedium()); +if (keywordAttributes && keywordAttributes.placeholderTitle) + result.string(translate.text(keywordAttributes.placeholderTitle)); \ No newline at end of file diff --git a/entity/Contract_entity/recordcontainers/index/query.js b/entity/Contract_entity/recordcontainers/index/query.js index e12356c93b0c2cefab1f3d847d91dfa563ffbbbe..62196bdcbb7ac0867788fcdd4f7ad7d99a664c6a 100644 --- a/entity/Contract_entity/recordcontainers/index/query.js +++ b/entity/Contract_entity/recordcontainers/index/query.js @@ -10,8 +10,8 @@ import("KeywordRegistry_basic"); var sqlHelper = new SqlMaskingUtils(); var querySelect = newSelect([ "CONTRACTID", //#UID - sqlHelper.concat(["CONTRACTCODE", KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.contractStatus(), "CONTRACTSTATUS")], " | "), //#TITLE - sqlHelper.concat(["ORGANISATION.NAME", "'| " + translate.text("Type of contract") + ":'", + sqlHelper.concatWithSeparator(["CONTRACTCODE", KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.contractStatus(), "CONTRACTSTATUS")], " | "), //#TITLE + sqlHelper.concatWithSeparator(["ORGANISATION.NAME", "'| " + translate.text("Type of contract") + ":'", KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.contractType(), "CONTRACTTYPE")]), //#DESCRIPTION "CONTRACTCODE", "CONTACT.ORGANISATION_ID", //CONTACT_ORG_ID diff --git a/entity/DefaultAdminView_entity/DefaultAdminView_entity.aod b/entity/DefaultAdminView_entity/DefaultAdminView_entity.aod index a84b79d58a22aff0e293f7115c2f4fcdcede4b84..7b0b1dd8ef9bc50a75c65fe7b422dc6d06d6a575 100644 --- a/entity/DefaultAdminView_entity/DefaultAdminView_entity.aod +++ b/entity/DefaultAdminView_entity/DefaultAdminView_entity.aod @@ -19,17 +19,17 @@ <entityConsumer> <name>Rows</name> <state>READONLY</state> - <dependency> - <name>dependency</name> - <entityName>AdminViewRow_entity</entityName> - <fieldName>AdminViewRows</fieldName> - </dependency> <children> <entityParameter> <name>Rows_param</name> <valueProcess>%aditoprj%/entity/DefaultAdminView_entity/entityfields/rows/children/rows_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>AdminViewRow_entity</entityName> + <fieldName>AdminViewRows</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>Uid_param</name> @@ -40,6 +40,14 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityParameter> + <name>Entity_param</name> + <expose v="true" /> + </entityParameter> + <entityField> + <name>ENTITY</name> + <title>Entity</title> + </entityField> </entityFields> <recordContainers> <jDitoRecordContainer> @@ -49,6 +57,9 @@ <jDitoRecordFieldMapping> <name>UID.value</name> </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ENTITY.value</name> + </jDitoRecordFieldMapping> </recordFieldMappings> </jDitoRecordContainer> </recordContainers> diff --git a/entity/DefaultAdminView_entity/recordcontainers/jdito/contentProcess.js b/entity/DefaultAdminView_entity/recordcontainers/jdito/contentProcess.js index b6f288f713ee37fdc2431d8713d06ab465528c88..aa5a7e9b8e4b2bf005c0e43b99498e430d18726a 100644 --- a/entity/DefaultAdminView_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/DefaultAdminView_entity/recordcontainers/jdito/contentProcess.js @@ -1,4 +1,4 @@ import("system.vars"); import("system.result"); -result.object([[vars.get("$param.Uid_param")]]); \ No newline at end of file +result.object([[vars.get("$param.Uid_param"), vars.get("$param.Entity_param")]]); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/KnowledgeDiscussion_entity.aod b/entity/KnowledgeDiscussion_entity/KnowledgeDiscussion_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..a5465f6d0a9fc19452bbd8ae4cae975e8c022634 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/KnowledgeDiscussion_entity.aod @@ -0,0 +1,209 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>KnowledgeDiscussion_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <title>Discussion</title> + <grantCreateProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/grantCreateProcess.js</grantCreateProcess> + <grantUpdateProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/grantUpdateProcess.js</grantUpdateProcess> + <grantDeleteProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/grantDeleteProcess.js</grantDeleteProcess> + <iconIdProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/iconIdProcess.js</iconIdProcess> + <titlePlural>Discussions</titlePlural> + <recordContainer>JDito_KnowledgeDiscussionContainer</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>DISCUSSIONTEXT</name> + <title>Discussion</title> + <contentType>LONG_TEXT</contentType> + </entityField> + <entityField> + <name>KNOWLEDGEMANAGEMENT_ID</name> + <valueProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/entityfields/knowledgemanagement_id/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>AUTHOR</name> + <title>Author</title> + <valueProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/entityfields/author/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>STATUS</name> + <title>Status</title> + <consumer>StatusKeyword</consumer> + <valueProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/entityfields/status/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_NEW</name> + </entityField> + <entityField> + <name>USER_EDIT</name> + </entityField> + <entityField> + <name>DATE_NEW</name> + <title>new</title> + <contentType>DATE</contentType> + <valueProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_EDIT</name> + <title>edited</title> + <contentType>DATE</contentType> + <valueProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/entityfields/date_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>PARENTENTRY</name> + </entityField> + <entityField> + <name>ICON</name> + <title>Icon</title> + <contentType>IMAGE</contentType> + </entityField> + <entityConsumer> + <name>StatusKeyword</name> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/entityfields/statuskeyword/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>OnlyActives_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/entityfields/statuskeyword/children/onlyactives_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + </entityConsumer> + <entityProvider> + <name>ByKnowledgeId</name> + <dependencies> + <entityDependency> + <name>fbacb136-2690-495a-82c5-b6ab1576d3f9</name> + <entityName>KnowledgeManagement_entity</entityName> + <fieldName>DiscussionsByKnowledgeId</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityParameter> + <name>KnowledgeId_param</name> + <expose v="true" /> + </entityParameter> + <entityActionGroup> + <name>Edit_ActionGroup</name> + <title>Bearbeiten</title> + <children> + <entityActionField> + <name>addAnswer_action</name> + <title>Reply</title> + <onActionProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/addanswer_action/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <isSelectionAction v="true" /> + <iconId>VAADIN:COMMENT_O</iconId> + <tooltip>Adds an answer to the selected discussion</tooltip> + </entityActionField> + <entityActionField> + <name>toggleDiscussionStatus_action</name> + <title>Toggle status</title> + <onActionProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/togglediscussionstatus_action/onActionProcess.js</onActionProcess> + <isObjectAction v="false" /> + <isSelectionAction v="true" /> + <iconId>VAADIN:LOCK</iconId> + <tooltip>Toggles the status of selected discussion between open and closed</tooltip> + </entityActionField> + </children> + </entityActionGroup> + <entityParameter> + <name>ParentId_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>RowCount_param</name> + </entityParameter> + <entityField> + <name>nodeType</name> + </entityField> + <entityField> + <name>showAll</name> + <contentType>BOOLEAN</contentType> + </entityField> + <entityField> + <name>discussionTitle</name> + <title>Last change</title> + </entityField> + <entityField> + <name>UID</name> + </entityField> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + </entityFields> + <recordContainers> + <jDitoRecordContainer> + <name>JDito_KnowledgeDiscussionContainer</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <isPageable v="false" /> + <isFilterable v="true" /> + <isRequireContainerFiltering v="true" /> + <isSortable v="false" /> + <contentProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/contentProcess.js</contentProcess> + <rowCountProcess>%aditoprj%/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/rowCountProcess.js</rowCountProcess> + <hasDependentRecords v="true" /> + <onInsert>%aditoprj%/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onInsert.js</onInsert> + <onUpdate>%aditoprj%/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onUpdate.js</onUpdate> + <onDelete>%aditoprj%/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onDelete.js</onDelete> + <recordFieldMappings> + <jDitoRecordFieldMapping> + <name>UID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>PARENTENTRY.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>KNOWLEDGEMANAGEMENT_ID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>AUTHOR.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>DISCUSSIONTEXT.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>STATUS.value</name> + <isFilterable v="true" /> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>STATUS.displayValue</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>DATE_NEW.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>DATE_EDIT.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>USER_NEW.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>USER_EDIT.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>AUTHOR.displayValue</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>ICON.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>nodeType.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>discussionTitle.value</name> + </jDitoRecordFieldMapping> + </recordFieldMappings> + </jDitoRecordContainer> + </recordContainers> +</entity> diff --git a/entity/KnowledgeDiscussion_entity/entityfields/author/valueProcess.js b/entity/KnowledgeDiscussion_entity/entityfields/author/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..2301fca2d43398da856f6cde418bed45abb1aca7 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/entityfields/author/valueProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$this.value") === null && vars.get("$sys.recordstate") === neon.OPERATINGSTATE_NEW) +{ + result.string(vars.get("$sys.user")); +} \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/entityfields/date_edit/valueProcess.js b/entity/KnowledgeDiscussion_entity/entityfields/date_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..090ae91afeada702f00db3cb657dfcac0d63650b --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/entityfields/date_edit/valueProcess.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("system.datetime"); + +if(vars.get("$sys.recordstate") === neon.OPERATINGSTATE_EDIT) + result.string(datetime.date()); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/entityfields/date_new/valueProcess.js b/entity/KnowledgeDiscussion_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..cb4f3c1d5a116427fe672eb6973e64a206b312f1 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,7 @@ +import("system.datetime"); +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.recordstate") === neon.OPERATINGSTATE_NEW) + result.string(datetime.date()); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/addanswer_action/onActionProcess.js b/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/addanswer_action/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..014090f103f492b497d4c4aec743a7108ad3eb0a --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/addanswer_action/onActionProcess.js @@ -0,0 +1,9 @@ +import("system.vars"); +import("system.neon"); + +var params = { + "KnowledgeId_param":vars.get("$param.KnowledgeId_param") + ,"ParentId_param":vars.get("$field.UID") +} + +neon.openContext("KnowledgeDiscussion", "KnowledgeDiscussionEdit_view", null, neon.OPERATINGSTATE_NEW, params); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/togglediscussionstatus_action/onActionProcess.js b/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/togglediscussionstatus_action/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..79943300955b21920d3260068e2b4b3dde93e69c --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/entityfields/edit_actiongroup/children/togglediscussionstatus_action/onActionProcess.js @@ -0,0 +1,12 @@ +import("KnowledgeManagement_lib"); +import("KeywordRegistry_basic"); +import("system.vars"); +import("system.neon"); + +var status = (vars.get("$field.STATUS") == $KeywordRegistry.discussionStatus$acitve()) + ? $KeywordRegistry.discussionStatus$closed() + : $KeywordRegistry.discussionStatus$acitve(); + +KnowledgeDiscussion.getInstance(vars.get("$param.KnowledgeId_param")) + .setDiscussionStatus(vars.get("$field.UID"), status); +neon.refresh(); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/entityfields/knowledgemanagement_id/valueProcess.js b/entity/KnowledgeDiscussion_entity/entityfields/knowledgemanagement_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3204947cd26a0f50de3268f8be7ab8ce6ea654d1 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/entityfields/knowledgemanagement_id/valueProcess.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("system.result"); + +if(vars.exists("$param.KnowledgeId_param") + && vars.get("$param.KnowledgeId_param") + && vars.get("$this.value") === null) + result.string(vars.get("$param.KnowledgeId_param")); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/entityfields/status/valueProcess.js b/entity/KnowledgeDiscussion_entity/entityfields/status/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..051fa1deb287bb12bddf8b7a57015bdb2cf74677 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/entityfields/status/valueProcess.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("KeywordRegistry_basic"); + +if(vars.get("$this.value") === null && vars.get("$sys.recordstate") === neon.OPERATINGSTATE_NEW) + result.string($KeywordRegistry.discussionStatus$acitve()); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/entityfields/statuskeyword/children/containername_param/valueProcess.js b/entity/KnowledgeDiscussion_entity/entityfields/statuskeyword/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..10532b30b86375408acb062445dccc28b4d9a8a5 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/entityfields/statuskeyword/children/containername_param/valueProcess.js @@ -0,0 +1,4 @@ +import("KeywordRegistry_basic"); +import("system.result"); + +result.string($KeywordRegistry.discussionStatus()); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/entityfields/statuskeyword/children/onlyactives_param/valueProcess.js b/entity/KnowledgeDiscussion_entity/entityfields/statuskeyword/children/onlyactives_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..40effa0178464da0c7850912345f19c7fa95975a --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/entityfields/statuskeyword/children/onlyactives_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string(true); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/grantCreateProcess.js b/entity/KnowledgeDiscussion_entity/grantCreateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..241a88da0b592ff695a2b6182e867a75cf8460b6 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/grantCreateProcess.js @@ -0,0 +1,18 @@ +import("system.logging"); +import("system.vars"); +import("system.result"); +import("KnowledgeManagement_lib"); +import("KeywordRegistry_basic"); + +var status = KnowledgeUtils.trimAndUp(vars.get("$field.STATUS")); +var parent = vars.exists("$param.ParentId_param") && vars.get("$param.ParentId_param"); + +var cond = ( + ( + status == KnowledgeUtils.trimAndUp($KeywordRegistry.discussionStatus$acitve()) + || + status == "" + ) +); + +result.string(cond); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/grantDeleteProcess.js b/entity/KnowledgeDiscussion_entity/grantDeleteProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b76b609eeb198e6c199d261a5d4760d685b4c0a1 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/grantDeleteProcess.js @@ -0,0 +1,24 @@ +import("system.vars"); +import("system.result"); +import("KnowledgeManagement_lib"); +import("KeywordRegistry_basic"); + +var hasChildren = KnowledgeDiscussion.hasChildren(vars.get("$field.UID")); +var status = vars.get("$field.STATUS"); +var user = vars.get("$sys.user"); +var author = vars.get("$field.AUTHOR"); +//As long as it doesn't have children AND ( ((author == user) and status == active) OR user is academy) +var cond = ( + !hasChildren + && + ( + ( + KnowledgeUtils.trimAndUp(author) === KnowledgeUtils.trimAndUp(user) + && ( KnowledgeUtils.trimAndUp(status) === KnowledgeUtils.trimAndUp($KeywordRegistry.discussionStatus$acitve().slice(0))) + ) + || + KnowledgeUtils.isAcademy(user) + ) +); + +result.string(cond); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/grantUpdateProcess.js b/entity/KnowledgeDiscussion_entity/grantUpdateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..07664375a4dd09efc3c2f5c5ba428b9adf1f5b7b --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/grantUpdateProcess.js @@ -0,0 +1,30 @@ +import("system.vars"); +import("system.result"); +import("KeywordRegistry_basic"); +import("KnowledgeManagement_lib"); + +var user = vars.get("$sys.user"); +var author = vars.get("$field.AUTHOR"); +var status = vars.get("$field.STATUS"); + + + +//if (author == user and status == active) OR user is of role "academy" allow edit +var cond = ( + ( + KnowledgeUtils.trimAndUp(author) === KnowledgeUtils.trimAndUp(user) + && ( KnowledgeUtils.trimAndUp(status) === KnowledgeUtils.trimAndUp($KeywordRegistry.discussionStatus$acitve().slice(0))) + ) + || + KnowledgeUtils.isAcademy(user) +); + +/* + * ( + author === user + && + status === $KeywordRegistry.discussionStatus$acitve() +); + */ + +result.string(cond); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/iconIdProcess.js b/entity/KnowledgeDiscussion_entity/iconIdProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f86b12ac2a9815380d0355d333a56acb87083bb0 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/iconIdProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.ICON")); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/contentProcess.js b/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/contentProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ea4631c51b75573cd3141a5fd97c8c8060fc5f42 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/contentProcess.js @@ -0,0 +1,14 @@ +import("JditoFilter_lib"); +import("KnowledgeManagement_lib"); +import("system.vars"); +import("system.result"); +import("system.neon"); + +var kId = vars.exists("$param.KnowledgeId_param") && vars.get("$param.KnowledgeId_param"); + +var idValues = vars.exists("$local.idvalues") && vars.get("$local.idvalues"); +var filterCondition = new FilterSqlTranslator(vars.get("$local.filter"), "KNOWLEDGEDISCUSSION").getSqlCondition(); + +var discussions = KnowledgeDiscussion.getInstance(kId); +var retData = discussions.buildCompleteTree(filterCondition, idValues).data; +result.object(retData); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onDelete.js b/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..8493a27873be85550c508c18b535f6ddb7844ad4 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onDelete.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("KnowledgeManagement_lib"); + +KnowledgeDiscussion.getInstance(vars.get("$field.KNOWLEDGEMANAGEMENT_ID")) + .deleteDiscussion(vars.get("$local.uid")); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onInsert.js b/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onInsert.js new file mode 100644 index 0000000000000000000000000000000000000000..350267a4b0634fc24b6cad0370cbaf9c932cc4f3 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onInsert.js @@ -0,0 +1,9 @@ +import("system.vars"); +import("system.result"); +import("KnowledgeManagement_lib"); + +var parent = vars.exists("$param.ParentId_param") && vars.get("$param.ParentId_param"); + +KnowledgeDiscussion.getInstance(vars.get("$param.KnowledgeId_param")) + .addDiscussion(parent + ,vars.get("$local.rowdata")); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onUpdate.js b/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onUpdate.js new file mode 100644 index 0000000000000000000000000000000000000000..dbd17c4439fd624cff63481d8aace9983b8a4fa5 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/onUpdate.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("KnowledgeManagement_lib"); + +KnowledgeDiscussion.getInstance(vars.get("$field.KNOWLEDGEMANAGEMENT_ID")) + .editDiscussion(vars.get("$local.uid") + , vars.get("$local.rowdata") + , vars.get("$local.changed")); \ No newline at end of file diff --git a/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/rowCountProcess.js b/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/rowCountProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ceb82cc107097c83f8a907f842e5ed320e255490 --- /dev/null +++ b/entity/KnowledgeDiscussion_entity/recordcontainers/jdito_knowledgediscussioncontainer/rowCountProcess.js @@ -0,0 +1,17 @@ +import("KnowledgeManagement_lib"); +import("JditoFilter_lib"); +import("system.vars"); +import("system.result"); +import("system.neon"); + +var kId = vars.exists("$param.KnowledgeId_param") && vars.get("$param.KnowledgeId_param"); + +var idValues = vars.exists("$local.idvalues") && vars.get("$local.idvalues"); +var filterCondition = new FilterSqlTranslator(vars.get("$local.filter"), "KNOWLEDGEDISCUSSION").getSqlCondition(); + +if(kId) +{ + var discussions = KnowledgeDiscussion.getInstance(kId); + var retData = discussions.getDatasetCount(filterCondition, idValues); + result.object(retData); +} \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/KnowledgeLink_entity.aod b/entity/KnowledgeLink_entity/KnowledgeLink_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..81ffc1da3d81fde9f4aea3c88dd1ef664d8af182 --- /dev/null +++ b/entity/KnowledgeLink_entity/KnowledgeLink_entity.aod @@ -0,0 +1,173 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>KnowledgeLink_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <title>Link</title> + <iconIdProcess>%aditoprj%/entity/KnowledgeLink_entity/iconIdProcess.js</iconIdProcess> + <titlePlural>Links</titlePlural> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>KNOWLEDGELINKID</name> + <usePermissions v="false" /> + </entityField> + <entityField> + <name>ROW_ID</name> + <title>Dataset</title> + <consumer>Objects</consumer> + <linkedContextProcess>%aditoprj%/entity/KnowledgeLink_entity/entityfields/row_id/linkedContextProcess.js</linkedContextProcess> + <displayValueProcess>%aditoprj%/entity/KnowledgeLink_entity/entityfields/row_id/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>OBJECT_TYPE</name> + <title>Type</title> + <consumer>Contexts</consumer> + <displayValueProcess>%aditoprj%/entity/KnowledgeLink_entity/entityfields/object_type/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>KNOWLEDGEMANAGEMENT_ID</name> + <valueProcess>%aditoprj%/entity/KnowledgeLink_entity/entityfields/knowledgemanagement_id/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_NEW</name> + <valueProcess>%aditoprj%/entity/KnowledgeLink_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_EDIT</name> + <valueProcess>%aditoprj%/entity/KnowledgeLink_entity/entityfields/date_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_NEW</name> + <valueProcess>%aditoprj%/entity/KnowledgeLink_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_EDIT</name> + <valueProcess>%aditoprj%/entity/KnowledgeLink_entity/entityfields/user_edit/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>Contexts</name> + <dependency> + <name>dependency</name> + <entityName>Context_entity</entityName> + <fieldName>ActivityLinkable</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>Objects</name> + <children> + <entityParameter> + <name>Entity_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeLink_entity/entityfields/objects/children/entity_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>ObjectProxy_entity</entityName> + <fieldName>FilteredObjects</fieldName> + </dependency> + </entityConsumer> + <entityParameter> + <name>KnowledgeManagementId_param</name> + <expose v="true" /> + </entityParameter> + <entityProvider> + <name>ByKnowledgeId</name> + <targetContextField>OBJECT_TYPE</targetContextField> + <targetIdField>ROW_ID</targetIdField> + <children> + <entityParameter> + <name>ObjectType_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>RowId_param</name> + <expose v="false" /> + </entityParameter> + </children> + <dependencies> + <entityDependency> + <name>c3ed10c1-db55-4e55-9c18-2b8d400df033</name> + <entityName>KnowledgeManagement_entity</entityName> + <fieldName>LinksByKnowledgeId</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityProvider> + <name>ByLink</name> + <targetContextField>OBJECT_TYPE</targetContextField> + <targetIdField>ROW_ID</targetIdField> + <children> + <entityParameter> + <name>KnowledgeManagementId_param</name> + <expose v="false" /> + </entityParameter> + </children> + </entityProvider> + <entityParameter> + <name>RowId_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <expose v="true" /> + </entityParameter> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <conditionProcess>%aditoprj%/entity/KnowledgeLink_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <linkInformation> + <linkInformation> + <name>aea9524a-589e-47df-87d7-5f79519eb135</name> + <tableName>KNOWLEDGELINK</tableName> + <primaryKey>KNOWLEDGELINKID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>DATE_EDIT.value</name> + <recordfield>KNOWLEDGELINK.DATE_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>KNOWLEDGELINK.DATE_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>KNOWLEDGELINKID.value</name> + <recordfield>KNOWLEDGELINK.KNOWLEDGELINKID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>KNOWLEDGEMANAGEMENT_ID.value</name> + <recordfield>KNOWLEDGELINK.KNOWLEDGEMANAGEMENT_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>OBJECT_TYPE.value</name> + <recordfield>KNOWLEDGELINK.OBJECT_TYPE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ROW_ID.value</name> + <recordfield>KNOWLEDGELINK.ROW_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_EDIT.value</name> + <recordfield>KNOWLEDGELINK.USER_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_NEW.value</name> + <recordfield>KNOWLEDGELINK.USER_NEW</recordfield> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/KnowledgeLink_entity/entityfields/date_edit/valueProcess.js b/entity/KnowledgeLink_entity/entityfields/date_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f9bd2052348245b216ddc07324deaab863cbf1e1 --- /dev/null +++ b/entity/KnowledgeLink_entity/entityfields/date_edit/valueProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && vars.exists("$this.value") && vars.get("$this.value") == null) + result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/entityfields/date_new/valueProcess.js b/entity/KnowledgeLink_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..2fc9c2258e740f035482eaf127d1268e24a7cf48 --- /dev/null +++ b/entity/KnowledgeLink_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$this.value") && vars.get("$this.value") == null) + result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/entityfields/knowledgemanagement_id/valueProcess.js b/entity/KnowledgeLink_entity/entityfields/knowledgemanagement_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d21371587c7b477fd47c83652d1f061f6450f0a5 --- /dev/null +++ b/entity/KnowledgeLink_entity/entityfields/knowledgemanagement_id/valueProcess.js @@ -0,0 +1,13 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +result.string( + ( + vars.exists("$param.KnowledgeManagementId_param") + && vars.get("$this.value") == null + && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW + ) + ? vars.getString("$param.KnowledgeManagementId_param") + : "" +); \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/entityfields/object_type/displayValueProcess.js b/entity/KnowledgeLink_entity/entityfields/object_type/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3922264dc37d0431952c91c91192f7c422453e7e --- /dev/null +++ b/entity/KnowledgeLink_entity/entityfields/object_type/displayValueProcess.js @@ -0,0 +1,7 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); +import("Context_lib"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && vars.get("$field.OBJECT_TYPE")) + result.string(ContextUtils.getTitle(vars.get("$field.OBJECT_TYPE"))); \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/entityfields/objects/children/entity_param/valueProcess.js b/entity/KnowledgeLink_entity/entityfields/objects/children/entity_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..7f9d49710e5f4b78cca4b7c0fa61bf80d015daf6 --- /dev/null +++ b/entity/KnowledgeLink_entity/entityfields/objects/children/entity_param/valueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("Context_lib"); +import("system.result"); + +result.string(ContextUtils.getEntity(vars.get("$field.OBJECT_TYPE"))); \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/entityfields/row_id/displayValueProcess.js b/entity/KnowledgeLink_entity/entityfields/row_id/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3dbbcf620a10c6c02d3326da49ece763bf738dc5 --- /dev/null +++ b/entity/KnowledgeLink_entity/entityfields/row_id/displayValueProcess.js @@ -0,0 +1,11 @@ +import("system.neon"); +import("system.vars"); +import("system.db"); +import("system.result"); +import("Context_lib"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.ROW_ID")) { + result.string(""); +} else if (vars.exists("$field.OBJECT_TYPE") && vars.get("$field.OBJECT_TYPE")) { + result.string(db.cell(ContextUtils.getNameSql(vars.get("$field.OBJECT_TYPE"), vars.get("$field.ROW_ID")))); +} \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/entityfields/row_id/linkedContextProcess.js b/entity/KnowledgeLink_entity/entityfields/row_id/linkedContextProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d868fe097f20bc5d880af358b27fdea7a2c86063 --- /dev/null +++ b/entity/KnowledgeLink_entity/entityfields/row_id/linkedContextProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); +import("Context_lib"); + +result.string(ContextUtils.getContextName(vars.get("$field.OBJECT_TYPE"))) \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/entityfields/user_edit/valueProcess.js b/entity/KnowledgeLink_entity/entityfields/user_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d0d7b9894d5d7d012f144c21f5d2747652d67534 --- /dev/null +++ b/entity/KnowledgeLink_entity/entityfields/user_edit/valueProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && vars.exists("$this.value") && vars.get("$this.value") == null) + result.string(vars.get("$sys.user")); \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/entityfields/user_new/valueProcess.js b/entity/KnowledgeLink_entity/entityfields/user_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..444094080244a63d3d5b1d099b3a1e40df9730b8 --- /dev/null +++ b/entity/KnowledgeLink_entity/entityfields/user_new/valueProcess.js @@ -0,0 +1,6 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$this.value") && vars.get("$this.value") == null) + result.string(vars.get("$sys.user")); \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/iconIdProcess.js b/entity/KnowledgeLink_entity/iconIdProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..07e66a14ebd280538d18ad5fa3958dd44f28903b --- /dev/null +++ b/entity/KnowledgeLink_entity/iconIdProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); +import("Context_lib"); + +result.string("TEXT:" + ContextUtils.getContextName(vars.get("$field.OBJECT_TYPE"))) \ No newline at end of file diff --git a/entity/KnowledgeLink_entity/recordcontainers/db/conditionProcess.js b/entity/KnowledgeLink_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ba94f4a6e340e9367aa0d46741c5c0dac78d7949 --- /dev/null +++ b/entity/KnowledgeLink_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,10 @@ +import("Sql_lib"); +import("system.vars"); +import("system.result"); + +var localId = (vars.exists("$local.idvalue")) ? vars.get("$local.idvalue") : null; + +var cond = newWhereIfSet("KNOWLEDGELINK.KNOWLEDGEMANAGEMENT_ID", "$param.KnowledgeManagementId_param") + .andIfSet("KNOWLEDGELINK.KNOWLEDGELINKID", localId); + +result.string(cond.toString(SqlBuilder.NORESULT_CONDITION())); \ No newline at end of file diff --git a/entity/KnowledgeManagementTagList_entity/KnowledgeManagementTagList_entity.aod b/entity/KnowledgeManagementTagList_entity/KnowledgeManagementTagList_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..c7b24df7f146ca735ea1aa07927aafbd8a298a67 --- /dev/null +++ b/entity/KnowledgeManagementTagList_entity/KnowledgeManagementTagList_entity.aod @@ -0,0 +1,48 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>KnowledgeManagementTagList_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <contentTitleProcess>%aditoprj%/entity/KnowledgeManagementTagList_entity/contentTitleProcess.js</contentTitleProcess> + <recordContainer>JDito_TagList</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>UID</name> + </entityField> + <entityField> + <name>NAME</name> + </entityField> + <entityProvider> + <name>CompleteList</name> + <dependencies> + <entityDependency> + <name>85925baa-5edc-4908-804e-f7ec4c5a2a0c</name> + <entityName>KnowledgeManagementTags_entity</entityName> + <fieldName>CompleteTagList</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + </entityFields> + <recordContainers> + <jDitoRecordContainer> + <name>JDito_TagList</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <contentProcess>%aditoprj%/entity/KnowledgeManagementTagList_entity/recordcontainers/jdito_taglist/contentProcess.js</contentProcess> + <recordFieldMappings> + <jDitoRecordFieldMapping> + <name>UID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>NAME.value</name> + </jDitoRecordFieldMapping> + </recordFieldMappings> + </jDitoRecordContainer> + </recordContainers> +</entity> diff --git a/entity/KnowledgeManagementTagList_entity/contentTitleProcess.js b/entity/KnowledgeManagementTagList_entity/contentTitleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..28fd67de270b497ba718dd4e91766bd22936f67e --- /dev/null +++ b/entity/KnowledgeManagementTagList_entity/contentTitleProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.NAME")); \ No newline at end of file diff --git a/entity/KnowledgeManagementTagList_entity/recordcontainers/jdito_taglist/contentProcess.js b/entity/KnowledgeManagementTagList_entity/recordcontainers/jdito_taglist/contentProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..65e0462c8e4605032d2d8e19aa5040c68131c4af --- /dev/null +++ b/entity/KnowledgeManagementTagList_entity/recordcontainers/jdito_taglist/contentProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.logging"); +import("KnowledgeManagement_lib"); +import("system.result"); + +var res = KnowledgeManagementTagsModel.getInstance().getPossibleTags(KnowledgeUtils.getLocalIdValue()).array; + +result.object(res); \ No newline at end of file diff --git a/entity/KnowledgeManagementTags_entity/KnowledgeManagementTags_entity.aod b/entity/KnowledgeManagementTags_entity/KnowledgeManagementTags_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..552ce5d4c60ec37bc0accaf3ae5b4f1dc9f4d98e --- /dev/null +++ b/entity/KnowledgeManagementTags_entity/KnowledgeManagementTags_entity.aod @@ -0,0 +1,88 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>KnowledgeManagementTags_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <recordContainer>JDito_KnowledgeManagementKeywords</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityParameter> + <name>KnowledgeManagementId_param</name> + <expose v="true" /> + </entityParameter> + <entityProvider> + <name>ByKnowledgeManagementId</name> + <children> + <entityParameter> + <name>KnowledgeManagementId_param</name> + <mandatory v="true" /> + </entityParameter> + </children> + <dependencies> + <entityDependency> + <name>8d86a61b-0fe3-44c4-a512-e044c990fded</name> + <entityName>KnowledgeManagement_entity</entityName> + <fieldName>TagsByKnowledgeId</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>TAG</name> + <title>Tag</title> + <consumer>CompleteTagList</consumer> + <textInputAllowed v="true" /> + <displayValueProcess>%aditoprj%/entity/KnowledgeManagementTags_entity/entityfields/tag/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>UID</name> + </entityField> + <entityConsumer> + <name>CompleteTagList</name> + <state>EDITABLE</state> + <dependency> + <name>dependency</name> + <entityName>KnowledgeManagementTagList_entity</entityName> + <fieldName>CompleteList</fieldName> + </dependency> + </entityConsumer> + <entityActionField> + <name>ActionField1</name> + <title>a1</title> + </entityActionField> + <entityActionField> + <name>ActionField2</name> + <title>a2</title> + </entityActionField> + <entityActionField> + <name>ActionField3</name> + <title>a3</title> + </entityActionField> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + </entityFields> + <recordContainers> + <jDitoRecordContainer> + <name>JDito_KnowledgeManagementKeywords</name> + <jDitoRecordAlias>Data_alias</jDitoRecordAlias> + <contentProcess>%aditoprj%/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/contentProcess.js</contentProcess> + <onInsert>%aditoprj%/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onInsert.js</onInsert> + <onUpdate>%aditoprj%/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onUpdate.js</onUpdate> + <onDelete>%aditoprj%/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onDelete.js</onDelete> + <recordFieldMappings> + <jDitoRecordFieldMapping> + <name>UID.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>TAG.value</name> + </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>TAG.displayValue</name> + </jDitoRecordFieldMapping> + </recordFieldMappings> + </jDitoRecordContainer> + </recordContainers> +</entity> diff --git a/entity/KnowledgeManagementTags_entity/entityfields/tag/displayValueProcess.js b/entity/KnowledgeManagementTags_entity/entityfields/tag/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..26d516e5a813889ed49009c0c827198157570267 --- /dev/null +++ b/entity/KnowledgeManagementTags_entity/entityfields/tag/displayValueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); +import("Sql_lib"); + +result.string(new SqlBuilder().select("TAG").from("KNOWLEDGETAG").where("KNOWLEDGETAG.KNOWLEDGETAGID", "$field.TAG").cell()); \ No newline at end of file diff --git a/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/contentProcess.js b/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/contentProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d48540b541b3e965acf2ad16d45b0be587ab0672 --- /dev/null +++ b/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/contentProcess.js @@ -0,0 +1,12 @@ +import("system.vars"); +import("system.result"); +import("system.db"); +import("KnowledgeManagement_lib"); +import("system.text"); +import("system.net"); + +var idValue = vars.exists("$local.idvalues") && vars.get("$local.idvalues"); + +result.object(KnowledgeManagementTagsModel.getInstance() + .collectTags(vars.get("$param.KnowledgeManagementId_param"), idValue) + .data); \ No newline at end of file diff --git a/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onDelete.js b/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onDelete.js new file mode 100644 index 0000000000000000000000000000000000000000..8d94951f9666ef9c8606f1c15476d9bd2617350f --- /dev/null +++ b/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onDelete.js @@ -0,0 +1,8 @@ +import("system.logging"); +import("system.vars"); +import("system.result"); +import("KnowledgeManagement_lib"); + +KnowledgeManagementTagsController + .getInstance(vars.get("$param.KnowledgeManagementId_param")) + .deleteTag(vars.get("$local.uid"), vars.get("$local.rowdata")) \ No newline at end of file diff --git a/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onInsert.js b/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onInsert.js new file mode 100644 index 0000000000000000000000000000000000000000..410d6308dafe094e63fc9feccac11bac7fa74ce8 --- /dev/null +++ b/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onInsert.js @@ -0,0 +1,17 @@ +import("system.db"); +import("system.neon"); +import("system.vars"); +import("system.result"); +import("KnowledgeManagement_lib"); +//You have to access this object in Array notation, cause the Keys are like "FIELD.value", +//if you do variable.FIELD.value, you get an error "Cannot find property value of undefined" +//Because FIELD doesn't exist within the object, but "FIELD.value" does... +var rowData = vars.get("$local.rowdata"); + +//UID of this entity is being used for the attribute relation +var attrRelationId = vars.get("$local.uid"); +var knowledgeId = vars.get("$param.KnowledgeManagementId_param"); + +KnowledgeManagementTagsController + .getInstance(knowledgeId) + .addTag(attrRelationId, rowData); \ No newline at end of file diff --git a/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onUpdate.js b/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onUpdate.js new file mode 100644 index 0000000000000000000000000000000000000000..e60c40d6f32af12e6b137ef1a2e067a0c213231e --- /dev/null +++ b/entity/KnowledgeManagementTags_entity/recordcontainers/jdito_knowledgemanagementkeywords/onUpdate.js @@ -0,0 +1,13 @@ +import("system.db"); +import("KnowledgeManagement_lib"); +import("system.logging"); +import("system.vars"); +import("system.result"); +import("Sql_lib"); + +var data = vars.get("$local.rowdata"); +var knowledgeId = vars.get("$param.KnowledgeManagementId_param"); + +KnowledgeManagementTagsController + .getInstance(knowledgeId) + .editTag(data["UID.value"], data); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/KnowledgeManagement_entity.aod b/entity/KnowledgeManagement_entity/KnowledgeManagement_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..c65093499e823c8705bef2c4130ee6ffcb08cc3a --- /dev/null +++ b/entity/KnowledgeManagement_entity/KnowledgeManagement_entity.aod @@ -0,0 +1,510 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>KnowledgeManagement_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:ACADEMY_CAP</icon> + <title>Knowledge</title> + <grantUpdateProcess>%aditoprj%/entity/KnowledgeManagement_entity/grantUpdateProcess.js</grantUpdateProcess> + <grantDeleteProcess>%aditoprj%/entity/KnowledgeManagement_entity/grantDeleteProcess.js</grantDeleteProcess> + <contentTitleProcess>%aditoprj%/entity/KnowledgeManagement_entity/contentTitleProcess.js</contentTitleProcess> + <afterOperatingState>%aditoprj%/entity/KnowledgeManagement_entity/afterOperatingState.js</afterOperatingState> + <useFavorites v="true" /> + <iconIdProcess>%aditoprj%/entity/KnowledgeManagement_entity/iconIdProcess.js</iconIdProcess> + <usePermissions v="true" /> + <titlePlural>Knowledge entries</titlePlural> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + <dependencies> + <entityDependency> + <name>40cf66ca-421f-47f6-8ecc-8360657e0640</name> + <entityName>KnowledgeNewsFeed_entity</entityName> + <fieldName>Consumer</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>KNOWLEDGEMANAGEMENTID</name> + </entityField> + <entityField> + <name>TITLE</name> + <title>Title</title> + <mandatory v="true" /> + </entityField> + <entityField> + <name>CONTENT</name> + <title>Content</title> + <contentType>HTML</contentType> + <outputFormat></outputFormat> + <mandatory v="true" /> + <onValueChangeTypes> + <element>MASK</element> + <element>PROCESS</element> + <element>PROCESS_SETVALUE</element> + </onValueChangeTypes> + </entityField> + <entityField> + <name>CONTENTDECODED</name> + <title>Text content</title> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/contentdecoded/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>AUTHOR_CONTACT_ID</name> + <title>Author</title> + <consumer>PersonContacts</consumer> + <linkedContext>Person</linkedContext> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/author_contact_id/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/author_contact_id/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>DATE_NEW</name> + <title>Created on</title> + <contentType>DATE</contentType> + <resolution>SECOND</resolution> + <outputFormat>dd.MM.yyyy HH:mm</outputFormat> + <inputFormat>dd.MM.yyyy HH:mm</inputFormat> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_EDIT</name> + <title>Edited on</title> + <contentType>DATE</contentType> + <resolution>SECOND</resolution> + <outputFormat>dd.MM.yyyy HH:mm</outputFormat> + <inputFormat>dd.MM.yyyy HH:mm</inputFormat> + <state>READONLY</state> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/date_edit/valueProcess.js</valueProcess> + <onValueChangeTypes> + <element>MASK</element> + <element>PROCESS</element> + <element>PROCESS_SETVALUE</element> + </onValueChangeTypes> + </entityField> + <entityField> + <name>USER_NEW</name> + <title>Created by</title> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_EDIT</name> + <title>Edited by</title> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/user_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>TYPE</name> + <title>Type</title> + <consumer>KeywordKnowledgeType</consumer> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/type/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>htmlView</name> + <title>Content</title> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/htmlview/valueProcess.js</valueProcess> + </entityField> + <entityConsumer> + <name>TagsByKnowledgeId</name> + <refreshParent v="true" /> + <state>EDITABLE</state> + <onValidation>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/tagsbyknowledgeid/onValidation.js</onValidation> + <children> + <entityParameter> + <name>KnowledgeManagementId_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/tagsbyknowledgeid/children/knowledgemanagementid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>KnowledgeManagementTags_entity</entityName> + <fieldName>ByKnowledgeManagementId</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>DiscussionsByKnowledgeId</name> + <refreshParent v="true" /> + <children> + <entityParameter> + <name>KnowledgeId_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/discussionsbyknowledgeid/children/knowledgeid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>KnowledgeDiscussion_entity</entityName> + <fieldName>ByKnowledgeId</fieldName> + </dependency> + </entityConsumer> + <entityProvider> + <name>Provider</name> + </entityProvider> + <entityConsumer> + <name>PersonContacts</name> + <dependency> + <name>dependency</name> + <entityName>Person_entity</entityName> + <fieldName>Contacts</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordKnowledgeType</name> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/keywordknowledgetype/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordPublish</name> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/keywordpublish/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + </entityConsumer> + <entityField> + <name>indexTag</name> + </entityField> + <entityConsumer> + <name>LinkedDocuments</name> + <children> + <entityParameter> + <name>AssignmentTable_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/linkeddocuments/children/assignmenttable_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AssignmentRowId_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/linkeddocuments/children/assignmentrowid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> + </entityConsumer> + <entityActionField> + <name>openEntryAsMail</name> + <title>send as mail</title> + <onActionProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/openentryasmail/onActionProcess.js</onActionProcess> + <isMenuAction v="true" /> + <isSelectionAction v="true" /> + <state>INVISIBLE</state> + </entityActionField> + <entityConsumer> + <name>LinksByKnowledgeId</name> + <refreshParent v="true" /> + <children> + <entityParameter> + <name>KnowledgeManagementId_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/linksbyknowledgeid/children/knowledgemanagementid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>KnowledgeLink_entity</entityName> + <fieldName>ByKnowledgeId</fieldName> + </dependency> + </entityConsumer> + <entityField> + <name>LastChange</name> + <title>Last change</title> + <contentType>DATE</contentType> + </entityField> + <entityConsumer> + <name>LogHistories</name> + <children> + <entityParameter> + <name>tablenames_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> + </dependency> + </entityConsumer> + <entityActionField> + <name>exportHTML_action</name> + <title>Export HTML</title> + <onActionProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/exporthtml_action/onActionProcess.js</onActionProcess> + <iconId>NEON:EXPORT</iconId> + <tooltip>Exports the knowledge entry as a html file</tooltip> + </entityActionField> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + <entityField> + <name>KNOWLEDGEMANAGEMENT_OBJECTTYPE</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/knowledgemanagement_objecttype/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>binaryContents</name> + <contentType>FILE</contentType> + </entityField> + <entityField> + <name>isNewsMark</name> + <title>News</title> + <contentType>BOOLEAN</contentType> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/isnewsmark/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>notificationMark</name> + <title>Notification</title> + <description>Oh Hi Mark</description> + <contentType>BOOLEAN</contentType> + <stateProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/notificationmark/stateProcess.js</stateProcess> + </entityField> + <entityParameter> + <name>isDashlet_param</name> + <expose v="true" /> + </entityParameter> + <entityConsumer> + <name>KnowledgeRoles</name> + <stateProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/stateProcess.js</stateProcess> + <onValidation>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/onValidation.js</onValidation> + <children> + <entityParameter> + <name>KnowledgeManagement_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/children/knowledgemanagement_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>PublishLevelRoles_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/children/publishlevelroles_param/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>KnowledgeRole_entity</entityName> + <fieldName>KnowledgeRole</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>Tasks</name> + <children> + <entityParameter> + <name>ObjectId_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/tasks/children/objectid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>RowId_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/tasks/children/rowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>PresetLinks_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/tasks/children/presetlinks_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>Task_entity</entityName> + <fieldName>Tasks</fieldName> + </dependency> + </entityConsumer> + <entityField> + <name>RESPONSIBLE_CONTACT_ID</name> + <title>Responsible</title> + <consumer>PersonContacts</consumer> + <linkedContext>Person</linkedContext> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/responsible_contact_id/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/responsible_contact_id/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>PUBLISH</name> + <title>Publishing level</title> + <consumer>KeywordPublish</consumer> + <valueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/publish/valueProcess.js</valueProcess> + <displayValueProcess>%aditoprj%/entity/KnowledgeManagement_entity/entityfields/publish/displayValueProcess.js</displayValueProcess> + </entityField> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <isRequireContainerFiltering v="true" /> + <conditionProcess>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <orderClauseProcess>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess> + <onDBInsert>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/onDBInsert.js</onDBInsert> + <onDBUpdate>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> + <linkInformation> + <linkInformation> + <name>9d4a7198-a4d1-45b3-867f-bf12cd558274</name> + <tableName>KNOWLEDGEMANAGEMENT</tableName> + <primaryKey>KNOWLEDGEMANAGEMENTID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>AUTHOR_CONTACT_ID.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.AUTHOR_CONTACT_ID</recordfield> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTENT.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.CONTENT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CONTENTDECODED.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.CONTENTDECODED</recordfield> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_EDIT.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.DATE_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.DATE_NEW</recordfield> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>KNOWLEDGEMANAGEMENTID.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>TITLE.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.TITLE</recordfield> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>TYPE.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.TYPE</recordfield> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_EDIT.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.USER_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_NEW.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.USER_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>AUTHOR_CONTACT_ID.displayValue</name> + <expression>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/author_contact_id.displayvalue/expression.js</expression> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>LastChange.value</name> + <expression>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/lastchange.value/expression.js</expression> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>TYPE.displayValue</name> + <expression>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/type.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + <consumerMapping> + <name>KnowledgeRoles</name> + <filterConditionProcess>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/knowledgeroles/filterConditionProcess.js</filterConditionProcess> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + <filtertype>BASIC</filtertype> + </consumerMapping> + <dbRecordFieldMapping> + <name>RESPONSIBLE_CONTACT_ID.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.RESPONSIBLE_CONTACT_ID</recordfield> + <columnAlias></columnAlias> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>RESPONSIBLE_CONTACT_ID.displayValue</name> + <expression>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/responsible_contact_id.displayvalue/expression.js</expression> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PUBLISH.value</name> + <recordfield>KNOWLEDGEMANAGEMENT.PUBLISH</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>PUBLISH.displayValue</name> + <expression>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/publish.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + </recordFieldMappings> + <filterExtensions> + <filterExtension> + <name>TagFilter</name> + <title>Tag</title> + <contentType>TEXT</contentType> + <filterValuesProcess>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/filterextensions/tagfilter/filterValuesProcess.js</filterValuesProcess> + <filterConditionProcess>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/db/filterextensions/tagfilter/filterConditionProcess.js</filterConditionProcess> + <filtertype>BASIC</filtertype> + </filterExtension> + </filterExtensions> + </dbRecordContainer> + <indexRecordContainer> + <name>indexSearchKnowledgebase</name> + <configMode>INDEXGROUP_DEFINITION</configMode> + <patternExtensionProcess>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/patternExtensionProcess.js</patternExtensionProcess> + <indexRecordAlias>Data_alias</indexRecordAlias> + <query>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/query.js</query> + <subProcess>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/subProcess.js</subProcess> + <affectedTables> + <element>KNOWLEDGEMANAGEMENT</element> + <element>KNOWLEDGETAGLINK</element> + </affectedTables> + <affectedIds>%aditoprj%/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/affectedIds.js</affectedIds> + <title>Knowledgebase</title> + <indexFieldMappings> + <indexRecordSystemFieldMapping> + <name>#UID</name> + </indexRecordSystemFieldMapping> + <indexRecordMultilingualSystemFieldMapping> + <name>#TITLE</name> + </indexRecordMultilingualSystemFieldMapping> + <indexRecordMultilingualSystemFieldMapping> + <name>#DESCRIPTION</name> + </indexRecordMultilingualSystemFieldMapping> + <indexRecordFieldMapping> + <name>KNOWLEDGEMANAGEMENTID.value</name> + <systemField>UID</systemField> + </indexRecordFieldMapping> + <indexRecordFieldMapping> + <name>TITLE.value</name> + <indexFieldType>TEXT</indexFieldType> + </indexRecordFieldMapping> + <indexRecordFieldMapping> + <name>CONTENTDECODED.value</name> + <indexFieldType>TEXT</indexFieldType> + </indexRecordFieldMapping> + <indexRecordFieldMapping> + <name>indexTag.value</name> + </indexRecordFieldMapping> + <indexRecordSystemFieldMapping> + <name>#SUB_GROUP</name> + </indexRecordSystemFieldMapping> + <indexRecordFieldMapping> + <name>binaryContents.value</name> + <isStored v="false" /> + <isMultiValued v="true" /> + </indexRecordFieldMapping> + </indexFieldMappings> + </indexRecordContainer> + </recordContainers> +</entity> diff --git a/entity/KnowledgeManagement_entity/afterOperatingState.js b/entity/KnowledgeManagement_entity/afterOperatingState.js new file mode 100644 index 0000000000000000000000000000000000000000..e94e7d5272132f8c3301112c3135e50713f25686 --- /dev/null +++ b/entity/KnowledgeManagement_entity/afterOperatingState.js @@ -0,0 +1,52 @@ +import("Util_lib"); +import("system.tools"); +import("system.neon"); +import("system.entities"); +import("NewsSystem_lib"); +import("system.vars"); + +if(vars.exists("$field.isNewsMark") && Utils.toBoolean(vars.get("$field.isNewsMark"))) +{ + if(vars.exists("$context.setNotificationMark") + && vars.get("$context.setNotificationMark")) + { + var roles = []; + + /* + * We need a solution for the following problem: + * we need every child role of a parent Role like PROJECT_ADITO because nobody has PROJECT_ADITO but the rest is a child of the parent. + * Maybe a tools. method to get them. Currently I don't know how it translates to the prod system. + * Testing locally works. + */ + + + + var config = entities.createConfigForLoadingConsumerRows() + .consumer("KnowledgeRoles") + .fields(["ROLES"]); + + var roleData = entities.getRows(config); //get the rows of the consumer + + if(roleData) + { + roles = roleData.map(function(row) //check each role of this object and push it into an array + { + return row["ROLES"]; + }); + } + + var users = NewsSystem.getUsersWithRoles(roles); //get users with the given role(s) + + var content = vars.get("$field.CONTENTDECODED"); + if (content.length > 72) + content = content.substring(0, 69) + " ..."; + if(users.length > 0) + NewsSystem.createNewsNotification(content //create notification + ,vars.get("$field.TITLE") + ,users + ,vars.get("$field.KNOWLEDGEMANAGEMENTID") + ); + } + + vars.set("$context.setNotificationMark", false); //set it 'false' so that it doesn't trigger again if it shouldn't +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/contentTitleProcess.js b/entity/KnowledgeManagement_entity/contentTitleProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e3e512ab73cf4d9d8e1512be1786a2b9e238678b --- /dev/null +++ b/entity/KnowledgeManagement_entity/contentTitleProcess.js @@ -0,0 +1,3 @@ +import("system.result"); +import("system.vars"); +result.string(vars.get("$field.TITLE")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/author_contact_id/displayValueProcess.js b/entity/KnowledgeManagement_entity/entityfields/author_contact_id/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ec6e27b3d071457bd455ca6ab815da0f869eef57 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/author_contact_id/displayValueProcess.js @@ -0,0 +1,14 @@ +import("Sql_lib"); +import("system.neon"); +import("system.vars"); +import("system.result"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value")) +{ + result.string(newSelect(new SqlMaskingUtils().concatWithSeparator(["PERSON.FIRSTNAME","PERSON.LASTNAME"])) + .from("PERSON") + .join("CONTACT", "PERSON.PERSONID = CONTACT.PERSON_ID") + .where("CONTACT.CONTACTID", "$this.value") + .cell() + ); +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/author_contact_id/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/author_contact_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..73c38e80b263ed787621164e87482c7f668e818b --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/author_contact_id/valueProcess.js @@ -0,0 +1,6 @@ +import("Employee_lib"); +import("system.vars"); +import("system.result"); + +if(vars.exists("$this.value") && vars.get("$this.value") == null) + result.string(EmployeeUtils.getCurrentContactId()); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/contentdecoded/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/contentdecoded/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..818f75bf6ec997d9f6f9ffe300194e382ddc62c3 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/contentdecoded/valueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.result"); +import("system.text"); + +result.string(text.html2text(vars.get("$field.CONTENT"))); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/date_edit/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/date_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f3fbb8b9401628f02e0b80a2fc5f1bbfc1930f73 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/date_edit/valueProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) + result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/date_new/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..6f4ffab7ba7cc9791b3aced43d5d7e2cd82a2aa0 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,9 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("system.datetime"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.DATE_NEW")) +{ + result.string(datetime.date()); +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/discussionsbyknowledgeid/children/knowledgeid_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/discussionsbyknowledgeid/children/knowledgeid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..78c1da185830c7db84eedbde260e8a2d7df71e52 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/discussionsbyknowledgeid/children/knowledgeid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.KNOWLEDGEMANAGEMENTID")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/exporthtml_action/onActionProcess.js b/entity/KnowledgeManagement_entity/entityfields/exporthtml_action/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..942f98b2ed41cc2cfcf0277e60b211d2daf1bd9e --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/exporthtml_action/onActionProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.neon"); +import("system.util"); + +neon.download(util.encodeBase64String(vars.get("$field.htmlView")), vars.get("$field.TITLE").replace(/\s/gi,"_") + ".html"); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/htmlview/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/htmlview/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..245543678a57558455aea5101b36cea344b11c5c --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/htmlview/valueProcess.js @@ -0,0 +1,12 @@ +import("KnowledgeManagement_lib"); +import("Html_lib"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); +import("system.vars"); +import("system.result"); + +var ret = KnowledgeManagementModel.getInstance(vars.getString("$field.CONTENT"), vars.get("$field.KNOWLEDGEMANAGEMENTID")) + .style(KeywordUtils.getAttributeRelation(vars.get("$field.TYPE"), $KeywordRegistry.knowledgeType(), "contentCssStylesheet")) + .replaceAditoLinks().buildHTML(); + +result.string(ret); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/isnewsmark/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/isnewsmark/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..eff63fa32ee42ccf61dcae9afeea57fb4864458f --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/isnewsmark/valueProcess.js @@ -0,0 +1,18 @@ +import("system.neon"); +import("system.vars"); +import("system.result"); +import("Sql_lib"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT && !vars.getString("$this.value")) +{ + var knowledgeId = vars.get("$field.KNOWLEDGEMANAGEMENTID"); + + var isTagSet = newSelect("'1'") + .from("KNOWLEDGETAGLINK") + .join("KNOWLEDGETAG", "KNOWLEDGETAG.KNOWLEDGETAGID = KNOWLEDGETAGLINK.KNOWLEDGETAG_ID") + .where("KNOWLEDGETAGLINK.KNOWLEDGEMANAGEMENT_ID", knowledgeId) + .and("KNOWLEDGETAG.TAG", "News") + .cell(); + + result.string(isTagSet ? 1 : 0); +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/keywordknowledgetype/children/containername_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/keywordknowledgetype/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..777264ed660b668a661dfec46b03ec6341fcab96 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/keywordknowledgetype/children/containername_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("KeywordRegistry_basic"); + +result.string($KeywordRegistry.knowledgeType()); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/keywordpublish/children/containername_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/keywordpublish/children/containername_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ecc5b27a744bfa1fff0af2b064a6dae550036d5d --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/keywordpublish/children/containername_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.result"); +import("KeywordRegistry_basic"); + +result.string($KeywordRegistry.knowledgePublishLevel()); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/knowledgemanagement_objecttype/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/knowledgemanagement_objecttype/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c437e7b5c35a70149bcea392a1faa1cc442cf687 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/knowledgemanagement_objecttype/valueProcess.js @@ -0,0 +1,2 @@ +import("system.result"); +result.string("KnowledgeManagement"); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/children/knowledgemanagement_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/children/knowledgemanagement_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..78c1da185830c7db84eedbde260e8a2d7df71e52 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/children/knowledgemanagement_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.KNOWLEDGEMANAGEMENTID")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/children/publishlevelroles_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/children/publishlevelroles_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..08d815d9cd504d45325bc5040dd96fe8d4449652 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/children/publishlevelroles_param/valueProcess.js @@ -0,0 +1,28 @@ +import("KeywordRegistry_basic"); +import("system.vars"); +import("system.result"); + +//return a one dimensional array for the excluded roles from the publish level +//$KeywordRegistry.knowledgePublishLevel$internal() + +var level = vars.get("$field.PUBLISH"); + +var res = _getExcludedRoles() + +result.object(res); + + +function _getExcludedRoles() +{ + switch (level) + { + case $KeywordRegistry.knowledgePublishLevel$internal(): + return ["PROJECT_Partner", "PROJECT_Subcontractor", "PROJECT_ExternMitarbeiter"]; + case $KeywordRegistry.knowledgePublishLevel$partner(): + return ["PROJECT_ExternMitarbeiter"]; + case $KeywordRegistry.knowledgePublishLevel$public(): + return [""]; + default: + return ["PROJECT_Partner", "PROJECT_Subcontractor", "PROJECT_ExternMitarbeiter"]; + } +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/onValidation.js b/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..d9426aaf28843c5935941bddb88cfb36616d51a9 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/onValidation.js @@ -0,0 +1,15 @@ +import("system.translate"); +import("Util_lib"); +import("system.result"); +import("system.logging"); +import("system.vars"); +import("Entity_lib"); + +vars.get("$field.KnowledgeRoles.insertedRows"); +vars.get("$field.KnowledgeRoles.changedRows"); +vars.get("$field.KnowledgeRoles.deletedRows"); + +var data = EntityConsumerRowsHelper.getCurrentConsumerRows("KnowledgeRoles", ["ROLES"]) + +if(Utils.toBoolean(vars.get("$field.isNewsMark")) && data[0].ROLES == "" ) + result.string(translate.text("No role(s) selected")) \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/stateProcess.js b/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8a02cf00398251e14d9b58e0a664045736438a66 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/knowledgeroles/stateProcess.js @@ -0,0 +1,11 @@ +import("Util_lib"); +import("system.vars"); +import("system.result"); +import("system.neon"); + +//make invisible if no news +if(!Utils.toBoolean(vars.get("$field.isNewsMark"))) + result.string(neon.COMPONENTSTATE_INVISIBLE); +else + result.string(neon.COMPONENTSTATE_EDITABLE); + diff --git a/entity/KnowledgeManagement_entity/entityfields/linkeddocuments/children/assignmentrowid_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/linkeddocuments/children/assignmentrowid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..78c1da185830c7db84eedbde260e8a2d7df71e52 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/linkeddocuments/children/assignmentrowid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.KNOWLEDGEMANAGEMENTID")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/linkeddocuments/children/assignmenttable_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/linkeddocuments/children/assignmenttable_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3057b0f452d61c97e96fc53ac7646b879e28ebaf --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/linkeddocuments/children/assignmenttable_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("KNOWLEDGEMANAGEMENT"); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/linksbyknowledgeid/children/knowledgemanagementid_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/linksbyknowledgeid/children/knowledgemanagementid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..78c1da185830c7db84eedbde260e8a2d7df71e52 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/linksbyknowledgeid/children/knowledgemanagementid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.KNOWLEDGEMANAGEMENTID")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d31541c503b349b3c03366a9722a35b13b46747b --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); + +var res = []; +res.push({id: vars.get("$field.KNOWLEDGEMANAGEMENTID"), tableNames: ["KNOWLEDGEMANAGEMENT","AB_ATTRIBUTERELATION","KNOWLEDGEDISCUSSION"]}); + +res = JSON.stringify(res);//currently only strings can be passed as param +result.object(res); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/notificationmark/stateProcess.js b/entity/KnowledgeManagement_entity/entityfields/notificationmark/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..1c027a16a263da243a61108bce9a006eaeec96e7 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/notificationmark/stateProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +//make invisible if no news +if(vars.get("$field.isNewsMark") == false) + result.string(neon.COMPONENTSTATE_INVISIBLE); +else + result.string(neon.COMPONENTSTATE_EDITABLE); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/openentryasmail/onActionProcess.js b/entity/KnowledgeManagement_entity/entityfields/openentryasmail/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..069f4e90fe0792cddd473a948b0114415222cecf --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/openentryasmail/onActionProcess.js @@ -0,0 +1,10 @@ +import("system.tools"); +import("Email_lib"); +import("system.vars"); +import("system.result"); + +var toSend = new Email(vars.get("$field.CONTENT")); + +toSend.setSender(tools.getUser(vars.get("$sys.user"))[tools.PARAMS][tools.CONTACTID]); +toSend.subject = "Wissen: " + vars.get("$field.TITLE"); +toSend.openMail(); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/publish/displayValueProcess.js b/entity/KnowledgeManagement_entity/entityfields/publish/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f3b04d3586264c58bb0536c8dbd61046659bc327 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/publish/displayValueProcess.js @@ -0,0 +1,7 @@ +import("system.result"); +import("system.vars"); +import("system.neon"); +import("Keyword_lib"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(KeywordUtils.getViewValue("KnowledgePublishLevel", vars.get("$this.value"))); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/publish/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/publish/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..3ee4bee455432dab7fa7bd7310ff0c1959b12703 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/publish/valueProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("KeywordRegistry_basic"); + +if(vars.get("$this.value") == null) +{ + result.string($KeywordRegistry.knowledgePublishLevel$internal()); +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/responsible_contact_id/displayValueProcess.js b/entity/KnowledgeManagement_entity/entityfields/responsible_contact_id/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ec6e27b3d071457bd455ca6ab815da0f869eef57 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/responsible_contact_id/displayValueProcess.js @@ -0,0 +1,14 @@ +import("Sql_lib"); +import("system.neon"); +import("system.vars"); +import("system.result"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$this.value")) +{ + result.string(newSelect(new SqlMaskingUtils().concatWithSeparator(["PERSON.FIRSTNAME","PERSON.LASTNAME"])) + .from("PERSON") + .join("CONTACT", "PERSON.PERSONID = CONTACT.PERSON_ID") + .where("CONTACT.CONTACTID", "$this.value") + .cell() + ); +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/responsible_contact_id/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/responsible_contact_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..73c38e80b263ed787621164e87482c7f668e818b --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/responsible_contact_id/valueProcess.js @@ -0,0 +1,6 @@ +import("Employee_lib"); +import("system.vars"); +import("system.result"); + +if(vars.exists("$this.value") && vars.get("$this.value") == null) + result.string(EmployeeUtils.getCurrentContactId()); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/tagsbyknowledgeid/children/knowledgemanagementid_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/tagsbyknowledgeid/children/knowledgemanagementid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..78c1da185830c7db84eedbde260e8a2d7df71e52 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/tagsbyknowledgeid/children/knowledgemanagementid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.KNOWLEDGEMANAGEMENTID")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/tagsbyknowledgeid/onValidation.js b/entity/KnowledgeManagement_entity/entityfields/tagsbyknowledgeid/onValidation.js new file mode 100644 index 0000000000000000000000000000000000000000..a7755c7c8e3817c1c4ce2b06c5aed3bf161cccf1 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/tagsbyknowledgeid/onValidation.js @@ -0,0 +1,22 @@ +import("system.translate"); +import("system.result"); +import("system.vars"); +import("Entity_lib"); + +vars.get("$field.TagsByKnowledgeId.insertedRows"); +vars.get("$field.TagsByKnowledgeId.changedRows"); +vars.get("$field.TagsByKnowledgeId.deletedRows"); + +var tagRows = EntityConsumerRowsHelper.getCurrentConsumerRows("TagsByKnowledgeId", ["TAG"]); +var tagSet = new Set(); +var hasDuplicate = tagRows.some(function (row) +{ + var tag = row["TAG"].trim(); + if (tagSet.has(tag)) + return true; + tagSet.add(tag); + return false; +}); + +if (hasDuplicate) + result.string(translate.text("Tags can't be assigned more than once!")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/tasks/children/objectid_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/tasks/children/objectid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..cc6924394ae950c43386275dda2c8db5d7a9c0ed --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/tasks/children/objectid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("Context_lib"); +import("system.result"); + +result.string(ContextUtils.getCurrentContextId()); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/tasks/children/presetlinks_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/tasks/children/presetlinks_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..a540967e165facb01d6e0d912f1ff0490fa3c9fa --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/tasks/children/presetlinks_param/valueProcess.js @@ -0,0 +1,5 @@ +import("Context_lib"); +import("system.result"); +import("system.vars"); + +result.object([[ContextUtils.getCurrentContextId(),vars.get("$field.KNOWLEDGEMANAGEMENTID")]]); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/tasks/children/rowid_param/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/tasks/children/rowid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..78c1da185830c7db84eedbde260e8a2d7df71e52 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/tasks/children/rowid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.KNOWLEDGEMANAGEMENTID")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/type/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/type/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..534409e0c3a40c251eed06e5aa7bb1c1aa5221c6 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/type/valueProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("KeywordRegistry_basic"); + +if(vars.get("$this.value") == null) +{ + result.string($KeywordRegistry.knowledgeType$knowledgeBase()); +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/user_edit/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/user_edit/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..101f9115ca7d48575761308d7d8403f96c241128 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/user_edit/valueProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) +{ + result.string(vars.get("$sys.user")); +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/entityfields/user_new/valueProcess.js b/entity/KnowledgeManagement_entity/entityfields/user_new/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..6dbbcb8ffdc78d1efd3836493e6c6556ac143db9 --- /dev/null +++ b/entity/KnowledgeManagement_entity/entityfields/user_new/valueProcess.js @@ -0,0 +1,8 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && !vars.get("$field.USER_NEW")) +{ + result.string(vars.get("$sys.user")); +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/grantDeleteProcess.js b/entity/KnowledgeManagement_entity/grantDeleteProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b91bca7d6742ca3f48aceffd0ab4c8c46d031507 --- /dev/null +++ b/entity/KnowledgeManagement_entity/grantDeleteProcess.js @@ -0,0 +1,9 @@ +import("system.result"); +import("KeywordRegistry_basic"); +import("system.vars"); + +var type = vars.getString("$field.TYPE"); + +var ret = (type != $KeywordRegistry.knowledgeType$editorial()); + +result.string(ret); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/grantUpdateProcess.js b/entity/KnowledgeManagement_entity/grantUpdateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b91bca7d6742ca3f48aceffd0ab4c8c46d031507 --- /dev/null +++ b/entity/KnowledgeManagement_entity/grantUpdateProcess.js @@ -0,0 +1,9 @@ +import("system.result"); +import("KeywordRegistry_basic"); +import("system.vars"); + +var type = vars.getString("$field.TYPE"); + +var ret = (type != $KeywordRegistry.knowledgeType$editorial()); + +result.string(ret); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/iconIdProcess.js b/entity/KnowledgeManagement_entity/iconIdProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..385d0165847bff5290aad71dbcf66dfe6cec0b83 --- /dev/null +++ b/entity/KnowledgeManagement_entity/iconIdProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); + +var type = vars.get("$field.TYPE.displayValue"); + +result.string("TEXT:" + type); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/conditionProcess.js b/entity/KnowledgeManagement_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..d73eb83fe46705ad872645c30e31657f9aea9436 --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,26 @@ +import("system.logging"); +import("AttributeRegistry_basic"); +import("Sql_lib"); +import("system.vars"); +import("system.tools"); +import("system.result"); + +var cond = newWhere(); + +if(vars.exists("$param.isDashlet_param") && vars.get("$param.isDashlet_param")) //check if the parameter exists and is filled +{ + var userRoles = tools.getRoles(vars.get("$sys.user")); //get all Roles from the current User + cond.and(null //create a new condition where we check if any data sets exists with the given parameters + ,newSelect("KNOWLEDGEROLES.ROLENAME") //create a subselect for all data sets with the current user roles + .from("KNOWLEDGEROLES") + .where("KNOWLEDGEROLES.KNOWLEDGEMANAGEMENT_ID = KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID") + .and("KNOWLEDGEROLES.ROLENAME", userRoles, SqlBuilder.IN()), SqlBuilder.EXISTS()) + .and(null + ,newSelect("KNOWLEDGETAGLINK.KNOWLEDGETAGLINKID") + .from("KNOWLEDGETAGLINK") + .join("KNOWLEDGETAG", "KNOWLEDGETAGLINK.KNOWLEDGETAG_ID = KNOWLEDGETAG.KNOWLEDGETAGID") + .where("KNOWLEDGETAGLINK.KNOWLEDGEMANAGEMENT_ID = KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID") + .and("KNOWLEDGETAG.TAG", "News"), SqlBuilder.EXISTS()); +} + +result.string(cond.toString()); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/filterextensions/tagfilter/filterConditionProcess.js b/entity/KnowledgeManagement_entity/recordcontainers/db/filterextensions/tagfilter/filterConditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c05ae19af196f98abd32e4f906c9614c8050a27e --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/filterextensions/tagfilter/filterConditionProcess.js @@ -0,0 +1,25 @@ +import("Sql_lib"); +import("system.result"); +import("system.vars"); + +var condition = newWhere(); +var tagLinkSql = newSelect("KNOWLEDGEMANAGEMENT_ID") + .from("KNOWLEDGETAGLINK") + .where("KNOWLEDGETAGLINK.KNOWLEDGEMANAGEMENT_ID = KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID"); +var condType = SqlBuilder.EXISTS(); + +switch (vars.get("$local.comparison")) +{ + case "NOT_EQUAL": + condType = SqlBuilder.NOT_EXISTS(); + case "EQUAL": + condition.and(null, tagLinkSql.and("KNOWLEDGETAGLINK.KNOWLEDGETAG_ID", "$local.rawvalue"), condType); + break; + case "ISNULL": + condType = SqlBuilder.NOT_EXISTS(); + case "ISNOTNULL": + condition.and(null, tagLinkSql, condType); + break; +} + +result.string(condition.toString(SqlBuilder.NORESULT_CONDITION())); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/filterextensions/tagfilter/filterValuesProcess.js b/entity/KnowledgeManagement_entity/recordcontainers/db/filterextensions/tagfilter/filterValuesProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b2c2c7b07ef169e69c4d169d7ab1577179140b95 --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/filterextensions/tagfilter/filterValuesProcess.js @@ -0,0 +1,4 @@ +import("Sql_lib"); +import("system.result"); + +result.object(new SqlBuilder().selectDistinct(["KNOWLEDGETAGID", "TAG"]).from("KNOWLEDGETAG").orderBy("TAG").table()); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/onDBInsert.js b/entity/KnowledgeManagement_entity/recordcontainers/db/onDBInsert.js new file mode 100644 index 0000000000000000000000000000000000000000..091635be04440cb3b695a6eb09172a7c54415eec --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/onDBInsert.js @@ -0,0 +1,17 @@ +import("system.neon"); +import("system.vars"); +import("NewsSystem_lib"); +import("Util_lib"); + +var bool = Utils.toBoolean; //Alias Utils.toBoolean to bool for easier reading + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW + && vars.exists("$field.isNewsMark") + && bool(vars.get("$field.isNewsMark"))) +{ + NewsSystem.setAsNews( + vars.get("$field.KNOWLEDGEMANAGEMENTID") + , bool(vars.get("$field.notificationMark")) + , bool(vars.get("$field.isNewsMark")) + ); +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/onDBUpdate.js b/entity/KnowledgeManagement_entity/recordcontainers/db/onDBUpdate.js new file mode 100644 index 0000000000000000000000000000000000000000..091635be04440cb3b695a6eb09172a7c54415eec --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/onDBUpdate.js @@ -0,0 +1,17 @@ +import("system.neon"); +import("system.vars"); +import("NewsSystem_lib"); +import("Util_lib"); + +var bool = Utils.toBoolean; //Alias Utils.toBoolean to bool for easier reading + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW + && vars.exists("$field.isNewsMark") + && bool(vars.get("$field.isNewsMark"))) +{ + NewsSystem.setAsNews( + vars.get("$field.KNOWLEDGEMANAGEMENTID") + , bool(vars.get("$field.notificationMark")) + , bool(vars.get("$field.isNewsMark")) + ); +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/orderClauseProcess.js b/entity/KnowledgeManagement_entity/recordcontainers/db/orderClauseProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..bc51d2191bf3857fd1120908f74afa44073e32ce --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/orderClauseProcess.js @@ -0,0 +1,8 @@ +import("system.db"); +import("system.result"); +import("Sql_lib"); + +var sortOrder = {}; +sortOrder[new SqlMaskingUtils().isNull("KNOWLEDGEMANAGEMENT.DATE_EDIT", "KNOWLEDGEMANAGEMENT.DATE_NEW")] = db.DESCENDING; + +result.object(sortOrder); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/author_contact_id.displayvalue/expression.js b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/author_contact_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..4ed9cfc3749ec9653c2b47f8fb8fe78ed04bbfde --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/author_contact_id.displayvalue/expression.js @@ -0,0 +1,10 @@ +import("system.result"); +import("Sql_lib"); + +result.string( + newSelect(new SqlMaskingUtils().concatWithSeparator(["PERSON.FIRSTNAME","PERSON.LASTNAME"])) + .from("PERSON") + .join("CONTACT", "PERSON.PERSONID = CONTACT.PERSON_ID") + .where("CONTACT.CONTACTID = KNOWLEDGEMANAGEMENT.AUTHOR_CONTACT_ID") + .toString() +); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/knowledgeroles/filterConditionProcess.js b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/knowledgeroles/filterConditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..e518964b17a4e16412ceb51c57ad73a42d2ca7ec --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/knowledgeroles/filterConditionProcess.js @@ -0,0 +1,9 @@ +import("Sql_lib"); +import("system.vars"); +import("system.result"); + +result.string(newWhere(null, newSelect("KNOWLEDGEROLES.KNOWLEDGEMANAGEMENT_ID") + .from("KNOWLEDGEROLES") + .where("KNOWLEDGEROLES.KNOWLEDGEMANAGEMENT_ID = KNOWLEDGEMANAGEMENTID") + .and(vars.get("$local.condition")), SqlBuilder.EXISTS()) +); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/lastchange.value/expression.js b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/lastchange.value/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..c62b199149670a9eeee28c2257a23cc68bc36438 --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/lastchange.value/expression.js @@ -0,0 +1,6 @@ +import("system.result"); +import("Sql_lib"); + +var maskUtil = new SqlMaskingUtils(); + +result.string( maskUtil.coalesce(["DATE_EDIT","DATE_NEW"]) ); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/publish.displayvalue/expression.js b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/publish.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..caefc84ff51f719625700138a42f45fe88421803 --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/publish.displayvalue/expression.js @@ -0,0 +1,4 @@ +import("Keyword_lib"); +import("system.result"); + +result.string(KeywordUtils.getResolvedTitleSqlPart("KnowledgePublishLevel", "knowledgemanagement.PUBLISH")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/responsible_contact_id.displayvalue/expression.js b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/responsible_contact_id.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..4ed9cfc3749ec9653c2b47f8fb8fe78ed04bbfde --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/responsible_contact_id.displayvalue/expression.js @@ -0,0 +1,10 @@ +import("system.result"); +import("Sql_lib"); + +result.string( + newSelect(new SqlMaskingUtils().concatWithSeparator(["PERSON.FIRSTNAME","PERSON.LASTNAME"])) + .from("PERSON") + .join("CONTACT", "PERSON.PERSONID = CONTACT.PERSON_ID") + .where("CONTACT.CONTACTID = KNOWLEDGEMANAGEMENT.AUTHOR_CONTACT_ID") + .toString() +); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/type.displayvalue/expression.js b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/type.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..3f4fde9ce6da84535a3b4a822110440836cb948b --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/db/recordfieldmappings/type.displayvalue/expression.js @@ -0,0 +1,4 @@ +import("Keyword_lib"); +import("system.result"); + +result.string(KeywordUtils.getResolvedTitleSqlPart("KnowledgeType", "knowledgemanagement.TYPE")); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/affectedIds.js b/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/affectedIds.js new file mode 100644 index 0000000000000000000000000000000000000000..7e282414273e4d43616a68225934740b96eef5df --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/affectedIds.js @@ -0,0 +1,25 @@ +import("system.db"); +import("system.result"); +import("system.vars"); +import("IndexSearch_lib"); +import("Sql_lib"); + +var infoContainer, onUpdFn, tableName, res; + +tableName = vars.get("$local.table"); +idValue = vars.get("$local.idvalue"); + +switch (tableName) +{ + case "KNOWLEDGEMANAGEMENT": + res = [idValue]; + break; + case "KNOWLEDGETAGLINK": + res = newSelect("KNOWLEDGEMANAGEMENT_ID").from("KNOWLEDGETAGLINK").where("KNOWLEDGETAGLINK.KNOWLEDGETAGLINKID", idValue).arrayColumn(); + break; +} + +if (res) { + result.object(res); +} + \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/patternExtensionProcess.js b/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/patternExtensionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ad39e57e9cd6587861d2480f9fbde1e483008f00 --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/patternExtensionProcess.js @@ -0,0 +1,11 @@ +import("system.logging"); +import("system.result"); +import("system.db"); +import("system.vars"); +import("system.tools"); + +if(tools.hasRole(vars.get("$sys.user"), "PROJECT_Support")) +{ + var filter = "( +_index_group_:KNOWLEDGE_KNOWLEDGEBASE + ( (publish_value: 2)) ) OR ( -_index_group_:KNOWLEDGE_KNOWLEDGEBASE )"; + result.string(filter) +} \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/query.js b/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/query.js new file mode 100644 index 0000000000000000000000000000000000000000..b13c3cdc15dd6b79ec1ecc332a3113a40f8399ae --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/query.js @@ -0,0 +1,32 @@ +import("system.vars"); +import("system.result"); +import("KeywordRegistry_basic"); +import("Sql_lib"); +import("system.SQLTYPES"); + +var sql = newSelect([ + "km1.KNOWLEDGEMANAGEMENTID", "km1.TITLE", new SqlMaskingUtils().castLob("CONTENTDECODED", 255), "km1.KNOWLEDGEMANAGEMENTID", + "km1.TITLE", "km1.CONTENTDECODED", "KNOWLEDGETAG.TAG", + SqlBuilder.caseWhen(null, newSelect("KNOWLEDGEMANAGEMENTID") + .from("KNOWLEDGEMANAGEMENT") + .join("KNOWLEDGETAGLINK", "KNOWLEDGEMANAGEMENTID = KNOWLEDGEMANAGEMENT_ID") + .join("KNOWLEDGETAG", "KNOWLEDGETAGID = KNOWLEDGETAG_ID") + .where("KNOWLEDGETAG.TAG", "News") + .and("KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID = km1.KNOWLEDGEMANAGEMENTID")) + .thenString("News") + .when(newWhere("GITPATH is null").and("TYPE = 1")) + .thenString("Knowledgebase") + .when(newWhere("GITPATH is not null").and("TYPE = 2")) + .thenString("Editorial") + .when("TYPE = 3") + .thenString("Business process"), + "''" + ]).from("KNOWLEDGEMANAGEMENT", "km1") + .leftJoin("KNOWLEDGETAGLINK", "KNOWLEDGEMANAGEMENTID = KNOWLEDGEMANAGEMENT_ID") + .leftJoin("KNOWLEDGETAG", "KNOWLEDGETAGID = KNOWLEDGETAG_ID") + .orderBy("KNOWLEDGEMANAGEMENTID"); + +if (vars.exists("$local.idvalue")) + querySelect.whereIfSet("KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID", "$local.idvalue"); + +result.string(sql.toString()); \ No newline at end of file diff --git a/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/subProcess.js b/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/subProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..197f0230b508d44c9d127d406d015ffa5af2af8a --- /dev/null +++ b/entity/KnowledgeManagement_entity/recordcontainers/indexsearchknowledgebase/subProcess.js @@ -0,0 +1,7 @@ +import("system.vars"); +import("system.result"); +import("KnowledgeManagement_lib"); + +var res = KnowledgeIndexHelper.getInstance(vars.get("$local.idvalue"),vars.get("$local.data")).getDocumentsFromContent().data; + +result.object(res); \ No newline at end of file diff --git a/entity/KnowledgeNewsFeed_entity/KnowledgeNewsFeed_entity.aod b/entity/KnowledgeNewsFeed_entity/KnowledgeNewsFeed_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..aa197ca8d2a1e231c8296d8cf579cc435fc5a060 --- /dev/null +++ b/entity/KnowledgeNewsFeed_entity/KnowledgeNewsFeed_entity.aod @@ -0,0 +1,29 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>KnowledgeNewsFeed_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <documentation>%aditoprj%/entity/KnowledgeNewsFeed_entity/documentation.adoc</documentation> + <title>Feed</title> + <recordContainer>recordContainer</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>HTMLContent</name> + <title>Content</title> + <contentType>HTML</contentType> + <valueProcess>%aditoprj%/entity/KnowledgeNewsFeed_entity/entityfields/htmlcontent/valueProcess.js</valueProcess> + </entityField> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + </entityFields> + <recordContainers> + <datalessRecordContainer> + <name>recordContainer</name> + <alias>Data_alias</alias> + </datalessRecordContainer> + </recordContainers> +</entity> diff --git a/entity/KnowledgeNewsFeed_entity/documentation.adoc b/entity/KnowledgeNewsFeed_entity/documentation.adoc new file mode 100644 index 0000000000000000000000000000000000000000..32d6227c6622e61f9f6dbaf1d02fb6379b22aedf --- /dev/null +++ b/entity/KnowledgeNewsFeed_entity/documentation.adoc @@ -0,0 +1,3 @@ += Knowledge Newsfeed + +This entity is used for the creation of the newsfeed in ADITO. A HTML is generated and will be displayed in the client \ No newline at end of file diff --git a/entity/KnowledgeNewsFeed_entity/entityfields/consumer/children/isdashlet_param/valueProcess.js b/entity/KnowledgeNewsFeed_entity/entityfields/consumer/children/isdashlet_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..40effa0178464da0c7850912345f19c7fa95975a --- /dev/null +++ b/entity/KnowledgeNewsFeed_entity/entityfields/consumer/children/isdashlet_param/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string(true); \ No newline at end of file diff --git a/entity/KnowledgeNewsFeed_entity/entityfields/htmlcontent/valueProcess.js b/entity/KnowledgeNewsFeed_entity/entityfields/htmlcontent/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..ed8c1c9f31549780f8859e20ac982bbd123b4837 --- /dev/null +++ b/entity/KnowledgeNewsFeed_entity/entityfields/htmlcontent/valueProcess.js @@ -0,0 +1,34 @@ +import("KeywordRegistry_basic"); +import("system.vars"); +import("Keyword_lib"); +import("Html_lib"); +import("system.entities"); +import("system.result"); + +var config = entities.createConfigForLoadingRows() + .addParameter("isDashlet_param", true) + .entity("KnowledgeManagement_entity") + .fields(["TITLE", "CONTENT", "AUTHOR_CONTACT_ID.displayValue", "AUTHOR_CONTACT_ID"]) + .ignorePermissions(true) + .count(10); + +var data = entities.getRows(config); + +var htmlContent = ""; + +if(data) +{ + data.forEach(function(row) + { + htmlContent += "<H2>" + row["TITLE"] + "</H2>\n"; + htmlContent += "<h3>" + row["AUTHOR_CONTACT_ID.displayValue"] + "</h3>"; + htmlContent += "<p>" + row["CONTENT"] + "</p>\n"; + htmlContent += "<hr>\n"; + }); +} + +var css = KeywordUtils.getAttributeRelation($KeywordRegistry.knowledgeType$knowledgeBase(), $KeywordRegistry.knowledgeType(), "contentCssStylesheet"); + +var htmlBody = SimpleHtmlObject.getInstance().body(htmlContent).style(css).toString(); + +result.string(htmlBody); diff --git a/entity/KnowledgeRole_entity/KnowledgeRole_entity.aod b/entity/KnowledgeRole_entity/KnowledgeRole_entity.aod new file mode 100644 index 0000000000000000000000000000000000000000..eb1b5a2d876b1162a4115a44c8ee8b6230a43ffe --- /dev/null +++ b/entity/KnowledgeRole_entity/KnowledgeRole_entity.aod @@ -0,0 +1,111 @@ +<?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.17" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.17"> + <name>KnowledgeRole_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <title>Knowledge Role</title> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>ROLES</name> + <title>Roles</title> + <consumer>NewsRole</consumer> + <displayValueProcess>%aditoprj%/entity/KnowledgeRole_entity/entityfields/roles/displayValueProcess.js</displayValueProcess> + </entityField> + <entityConsumer> + <name>NewsRole</name> + <children> + <entityParameter> + <name>ExcludeRoles_param</name> + <valueProcess>%aditoprj%/entity/KnowledgeRole_entity/entityfields/newsrole/children/excluderoles_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + <dependency> + <name>dependency</name> + <entityName>Role_entity</entityName> + <fieldName>FilterRolesWithoutPermission</fieldName> + </dependency> + </entityConsumer> + <entityProvider> + <name>KnowledgeRole</name> + <lookupIdfield>ROLES</lookupIdfield> + <titlePlural>KnowledgeRoles</titlePlural> + <recordContainer>db</recordContainer> + <dependencies> + <entityDependency> + <name>404bd92c-6222-4b58-95b4-d7f657b62c82</name> + <entityName>KnowledgeManagement_entity</entityName> + <fieldName>KnowledgeRoles</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + <entityField> + <name>KNOWLEDGEROLEID</name> + </entityField> + <entityField> + <name>KNOWLEDGEMANAGMENT_ID</name> + <state>INVISIBLE</state> + <valueProcess>%aditoprj%/entity/KnowledgeRole_entity/entityfields/knowledgemanagment_id/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>TARGETCONTEXT</name> + <valueProcess>%aditoprj%/entity/KnowledgeRole_entity/entityfields/targetcontext/valueProcess.js</valueProcess> + </entityField> + <entityParameter> + <name>KnowledgeManagement_param</name> + <expose v="true" /> + </entityParameter> + <entityParameter> + <name>CurrentRoles_param</name> + </entityParameter> + <entityProvider> + <name>#PROVIDER_AGGREGATES</name> + <useAggregates v="true" /> + </entityProvider> + <entityParameter> + <name>PublishLevelRoles_param</name> + <expose v="true" /> + </entityParameter> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <hasDependentRecords v="true" /> + <conditionProcess>%aditoprj%/entity/KnowledgeRole_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <title>Knowledge Roles</title> + <linkInformation> + <linkInformation> + <name>16e6127e-67c6-4dce-b2e9-4b2b951dbcd4</name> + <tableName>KNOWLEDGEROLES</tableName> + <primaryKey>KNOWLEDGEROLESID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>ROLES.value</name> + <recordfield>KNOWLEDGEROLES.ROLENAME</recordfield> + <isFilterable v="true" /> + <isLookupFilter v="true" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>KNOWLEDGEROLEID.value</name> + <recordfield>KNOWLEDGEROLES.KNOWLEDGEROLESID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>KNOWLEDGEMANAGMENT_ID.value</name> + <recordfield>KNOWLEDGEROLES.KNOWLEDGEMANAGEMENT_ID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ROLES.displayValue</name> + <expression>%aditoprj%/entity/KnowledgeRole_entity/recordcontainers/db/recordfieldmappings/roles.displayvalue/expression.js</expression> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/KnowledgeRole_entity/entityfields/knowledgemanagment_id/valueProcess.js b/entity/KnowledgeRole_entity/entityfields/knowledgemanagment_id/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..10f790fb648c0909495dad89e55599a351001947 --- /dev/null +++ b/entity/KnowledgeRole_entity/entityfields/knowledgemanagment_id/valueProcess.js @@ -0,0 +1,5 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +result.string(vars.get("$param.KnowledgeManagement_param")); \ No newline at end of file diff --git a/entity/KnowledgeRole_entity/entityfields/newsrole/children/excluderoles_param/valueProcess.js b/entity/KnowledgeRole_entity/entityfields/newsrole/children/excluderoles_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..937bc3cba4424062e8c688c103d0e2489cfc1756 --- /dev/null +++ b/entity/KnowledgeRole_entity/entityfields/newsrole/children/excluderoles_param/valueProcess.js @@ -0,0 +1,12 @@ +import("system.vars"); +import("system.result"); + +//RIP Richy +var roles = JSON.parse(vars.get("$param.PublishLevelRoles_param")); +var roleArray = ["XMPP_OK", "INTERNAL_WEBSERVICE", "INTERNAL_CANARY", "INTERNAL_EVERYONE", "INTERNAL_GROUPWARE", "INTERNAL_SNMP", "INTERNAL_DESIGNER", "INTERNAL_TECHNICAL", "INTERNAL_DASHBOARDSTOREADMIN", ] + .concat(roles); //concat the excluded roles with the other roles +var res = JSON.stringify(roleArray); //stringify the array + + + +result.string(res); //return \ No newline at end of file diff --git a/entity/KnowledgeRole_entity/entityfields/roles/displayValueProcess.js b/entity/KnowledgeRole_entity/entityfields/roles/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..34cda7e17c14ba4b8810207343c1e6ded197f955 --- /dev/null +++ b/entity/KnowledgeRole_entity/entityfields/roles/displayValueProcess.js @@ -0,0 +1,11 @@ +import("system.result"); +import("system.vars"); +import("system.tools"); + +var allRoles = tools.getAllRoles(["PROJECT", "CUSTOM", "INTERNAL"], true); +var roleTitle = vars.get("$field.ROLES"); + +if (roleTitle in allRoles) + roleTitle = allRoles[roleTitle][0]; + +result.string(roleTitle); \ No newline at end of file diff --git a/entity/KnowledgeRole_entity/entityfields/targetcontext/valueProcess.js b/entity/KnowledgeRole_entity/entityfields/targetcontext/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c9d54057e5ae103d74826aa989acee631deced0d --- /dev/null +++ b/entity/KnowledgeRole_entity/entityfields/targetcontext/valueProcess.js @@ -0,0 +1,3 @@ +import("system.result"); + +result.string("KnowledgeManagement"); \ No newline at end of file diff --git a/entity/KnowledgeRole_entity/recordcontainers/db/conditionProcess.js b/entity/KnowledgeRole_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..9148537a0db5d39cf5fea801d8659efda903cab3 --- /dev/null +++ b/entity/KnowledgeRole_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("Sql_lib"); + +var cond = newWhereIfSet("KNOWLEDGEROLES.KNOWLEDGEMANAGEMENT_ID", "$param.KnowledgeManagement_param"); + +result.string(cond.toString()); \ No newline at end of file diff --git a/entity/KnowledgeRole_entity/recordcontainers/db/recordfieldmappings/roles.displayvalue/expression.js b/entity/KnowledgeRole_entity/recordcontainers/db/recordfieldmappings/roles.displayvalue/expression.js new file mode 100644 index 0000000000000000000000000000000000000000..c694956db20b566bf4454fe665a548b1acf24ac9 --- /dev/null +++ b/entity/KnowledgeRole_entity/recordcontainers/db/recordfieldmappings/roles.displayvalue/expression.js @@ -0,0 +1,7 @@ +import("system.result"); +import("NewsSystem_lib"); + +var resultSubSQL = NewsSystem.getDisplayValue(); + +result.string(resultSubSQL); + diff --git a/entity/ObjectProxy_entity/ObjectProxy_entity.aod b/entity/ObjectProxy_entity/ObjectProxy_entity.aod index ade8076995cdf19ebddb1dc97d0ed3626fb4ea9e..e197c4de792ba0f970f0db5ece17bb62131cd944 100644 --- a/entity/ObjectProxy_entity/ObjectProxy_entity.aod +++ b/entity/ObjectProxy_entity/ObjectProxy_entity.aod @@ -31,6 +31,12 @@ <fieldName>LinkedObject</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>9d75842d-0f91-4ddf-bd94-d8f092f17224</name> + <entityName>KnowledgeLink_entity</entityName> + <fieldName>Objects</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> </entityProvider> <entityParameter> diff --git a/entity/Offer_entity/entityfields/copyoffer/onActionProcess.js b/entity/Offer_entity/entityfields/copyoffer/onActionProcess.js index 17cc41af8869fdfbe8de679bb2a0190d3367e51a..d610943f3409687827462179063e28df0aa3dde8 100644 --- a/entity/Offer_entity/entityfields/copyoffer/onActionProcess.js +++ b/entity/Offer_entity/entityfields/copyoffer/onActionProcess.js @@ -1,19 +1,19 @@ import("system.vars"); -import("system.neon"); import("Offer_lib"); -var contactId = vars.getString("$field.CONTACT_ID"); -var currency = vars.getString("$field.CURRENCY"); -var language = vars.getString("$field.ISOLANGUAGE"); -var header = vars.getString("$field.HEADER"); -var footer = vars.getString("$field.FOOTER"); var offerId = vars.getString("$field.OFFERID"); -var deliveryTerm = vars.getString("$field.DELIVERYTERMS"); -var paymentTerm = vars.getString("$field.PAYMENTTERMS"); -var rowId = vars.getString("$field.OBJECT_ROWID"); -var objectType = vars.getString("$field.OBJECT_TYPE"); +var fieldValues = { + contactId: vars.getString("$field.CONTACT_ID"), + language: vars.getString("$field.ISOLANGUAGE"), + currency: vars.getString("$field.CURRENCY"), + header: vars.getString("$field.HEADER"), + footer: vars.getString("$field.FOOTER"), + deliveryTerm: vars.getString("$field.DELIVERYTERMS"), + paymentTerm: vars.getString("$field.PAYMENTTERMS"), + objectRowId: vars.getString("$field.OBJECT_ROWID"), + objectType: vars.getString("$field.OBJECT_TYPE") +}; - -OfferUtils.copyOffer(offerId, contactId, language, currency, header, footer, deliveryTerm, paymentTerm, objectType, rowId); +OfferUtils.copyOffer(offerId, fieldValues); \ No newline at end of file diff --git a/entity/Offer_entity/recordcontainers/db/onDBInsert.js b/entity/Offer_entity/recordcontainers/db/onDBInsert.js index 086ca1c55981c155c21009f26992a12a4a701fac..da551808a8c82e05a35c7aecf40d283434b2f4c0 100644 --- a/entity/Offer_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Offer_entity/recordcontainers/db/onDBInsert.js @@ -1,23 +1,28 @@ +import("Context_lib"); import("system.workflow"); import("Workflow_lib"); -import("system.db"); import("system.datetime"); -import("system.util"); import("system.neon"); import("system.vars"); import("Offer_lib"); +import("Sql_lib"); if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) { + var offerId = vars.get("$local.uid"); if (vars.exists("$param.OfferOriginal_Id_param")) - OfferUtils.copyOfferItems(vars.getString("$param.OfferOriginal_Id_param"), vars.get("$local.uid")); + OfferUtils.copyOfferItems(vars.getString("$param.OfferOriginal_Id_param"), offerId); var activityId = vars.get("$param.ActivityId_param"); if (activityId) { - var activityLinkColumns = ["ACTIVITYLINKID", "ACTIVITY_ID", "DATE_NEW", "USER_NEW", "OBJECT_TYPE", "OBJECT_ROWID"]; - var activityLinkValues = [util.getNewUUID(), activityId, datetime.date(), vars.get("$sys.user"), "Offer", vars.get("$field.OFFERID")]; - db.insertData("ACTIVITYLINK", activityLinkColumns, null, activityLinkValues); + new SqlBuilder().insertFields({ + "ACTIVITY_ID": activityId, + "DATE_NEW": datetime.date(), + "USER_NEW": vars.get("$sys.user"), + "OBJECT_TYPE": ContextUtils.getCurrentContextId(), + "OBJECT_ROWID": offerId + }, "ACTIVITYLINK", "ACTIVITYLINKID"); } } diff --git a/entity/Offer_entity/recordcontainers/index/query.js b/entity/Offer_entity/recordcontainers/index/query.js index 7d975c8bb3ea9f1aca3528603f54089ca89cbfbb..b2853b92f92016f237a151162f814427c4ecc671 100644 --- a/entity/Offer_entity/recordcontainers/index/query.js +++ b/entity/Offer_entity/recordcontainers/index/query.js @@ -9,8 +9,8 @@ import("KeywordRegistry_basic"); var sqlHelper = new SqlMaskingUtils(); var querySelect = newSelect([ "OFFER.OFFERID", //#UID - sqlHelper.concat([sqlHelper.cast("OFFER.OFFERCODE", SQLTYPES.CHAR, 10), KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.offerStatus(), "OFFER.STATUS")], " | "), //#TITLE - sqlHelper.concat(["ORGANISATION.NAME", "'| " + translate.text("Description") + ":'", sqlHelper.castLob("OFFER.INFO", 250)]), //#DESCRIPTION + sqlHelper.concatWithSeparator([sqlHelper.cast("OFFER.OFFERCODE", SQLTYPES.CHAR, 10), KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.offerStatus(), "OFFER.STATUS")], " | "), //#TITLE + sqlHelper.concatWithSeparator(["ORGANISATION.NAME", "'| " + translate.text("Description") + ":'", sqlHelper.castLob("OFFER.INFO", 250)]), //#DESCRIPTION "OFFER.OFFERCODE", "OFFER.CONTACT_ID", "CONTACT.ORGANISATION_ID", //CONTACT_ORG_ID diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index 06389d921d507bf630d1baddcbbcd03d570f6faa..ae39a7c436493de461a6b378849dbaee88d57bc2 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -100,11 +100,6 @@ <entityConsumer> <name>Orderitems</name> <description></description> - <dependency> - <name>dependency</name> - <entityName>Orderitem_entity</entityName> - <fieldName>Orderitems</fieldName> - </dependency> <children> <entityParameter> <name>OrderId_param</name> @@ -130,6 +125,11 @@ <mandatory v="true" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Orderitem_entity</entityName> + <fieldName>Orderitems</fieldName> + </dependency> </entityConsumer> <entityField> <name>NET</name> @@ -191,11 +191,6 @@ <entityConsumer> <name>Documents</name> <selectionMode>MULTI</selectionMode> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>Documents</fieldName> - </dependency> <children> <entityParameter> <name>AssignmentRowId_param</name> @@ -206,19 +201,16 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>MainDocuments</name> - <stateProcess>%aditoprj%/entity/Order_entity/entityfields/maindocuments/stateProcess.js</stateProcess> <dependency> <name>dependency</name> <entityName>Document_entity</entityName> - <fieldName>MainDocuments</fieldName> + <fieldName>Documents</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>MainDocuments</name> + <stateProcess>%aditoprj%/entity/Order_entity/entityfields/maindocuments/stateProcess.js</stateProcess> <children> - <entityParameter> - <name>AssignmentName_param</name> - </entityParameter> <entityParameter> <name>AssignmentRowId_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/maindocuments/children/assignmentrowid_param/valueProcess.js</valueProcess> @@ -228,28 +220,28 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/maindocuments/children/assignmenttable_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>Salesprojects</name> <dependency> <name>dependency</name> - <entityName>Salesproject_entity</entityName> - <fieldName>Salesprojects</fieldName> + <entityName>Document_entity</entityName> + <fieldName>MainDocuments</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Salesprojects</name> <children> <entityParameter> <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/salesprojects/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>KeywordCurrencies</name> <dependency> <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> + <entityName>Salesproject_entity</entityName> + <fieldName>Salesprojects</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordCurrencies</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -257,14 +249,14 @@ <expose v="false" /> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>KeywordStates</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordStates</name> <children> <entityParameter> <name>ContainerName_param</name> @@ -272,6 +264,11 @@ <expose v="false" /> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Languages</name> @@ -290,11 +287,6 @@ </entityParameter> <entityConsumer> <name>Activities</name> - <dependency> - <name>dependency</name> - <entityName>Activity_entity</entityName> - <fieldName>LinkedObjects</fieldName> - </dependency> <children> <entityParameter> <name>RowId_param</name> @@ -309,6 +301,11 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/activities/children/presetlinks_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Activity_entity</entityName> + <fieldName>LinkedObjects</fieldName> + </dependency> </entityConsumer> <entityField> <name>OFFER_ID</name> @@ -322,11 +319,6 @@ <entityConsumer> <name>Tasks</name> <stateProcess>%aditoprj%/entity/Order_entity/entityfields/tasks/stateProcess.js</stateProcess> - <dependency> - <name>dependency</name> - <entityName>Task_entity</entityName> - <fieldName>Tasks</fieldName> - </dependency> <children> <entityParameter> <name>RowId_param</name> @@ -341,15 +333,15 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/tasks/children/presetlinks_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Task_entity</entityName> + <fieldName>Tasks</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>Attributes</name> <onValidation>%aditoprj%/entity/Order_entity/entityfields/attributes/onValidation.js</onValidation> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>AttributeRelations</fieldName> - </dependency> <children> <entityParameter> <name>ObjectRowId_param</name> @@ -360,15 +352,15 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>AttributeTree</name> - <stateProcess>%aditoprj%/entity/Order_entity/entityfields/attributetree/stateProcess.js</stateProcess> <dependency> <name>dependency</name> <entityName>AttributeRelation_entity</entityName> - <fieldName>TreeProvider</fieldName> + <fieldName>AttributeRelations</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>AttributeTree</name> + <stateProcess>%aditoprj%/entity/Order_entity/entityfields/attributetree/stateProcess.js</stateProcess> <children> <entityParameter> <name>ObjectType_param</name> @@ -379,20 +371,25 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>LogHistories</name> <dependency> <name>dependency</name> - <entityName>LogHistory_entity</entityName> - <fieldName>LogHistoryProvider</fieldName> + <entityName>AttributeRelation_entity</entityName> + <fieldName>TreeProvider</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>LogHistories</name> <children> <entityParameter> <name>tablenames_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/loghistories/children/tablenames_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>LogHistory_entity</entityName> + <fieldName>LogHistoryProvider</fieldName> + </dependency> </entityConsumer> <entityField> <name>ORDERTYPE</name> @@ -470,31 +467,31 @@ </entityField> <entityConsumer> <name>KeywordOrderTypes</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/keywordordertypes/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>KeywordDunningLevels</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordDunningLevels</name> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/keyworddunninglevels/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityField> <name>OBJECT_ROWID</name> @@ -522,11 +519,6 @@ </entityField> <entityConsumer> <name>Objects</name> - <dependency> - <name>dependency</name> - <entityName>Object_entity</entityName> - <fieldName>FilteredObjects</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> @@ -537,14 +529,14 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/objects/children/objecttype_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>Contexts</name> <dependency> <name>dependency</name> - <entityName>Context_entity</entityName> - <fieldName>Exclusive</fieldName> + <entityName>Object_entity</entityName> + <fieldName>FilteredObjects</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>Contexts</name> <children> <entityParameter> <name>Blacklist_param</name> @@ -555,6 +547,11 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/contexts/children/invertblacklist_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Context_entity</entityName> + <fieldName>Exclusive</fieldName> + </dependency> </entityConsumer> <entityParameter> <name>PossibleConnectionTypes</name> @@ -607,46 +604,46 @@ </entityField> <entityConsumer> <name>KeywordPaymentTerms</name> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/keywordpaymentterms/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>KeywordDeliveryTerms</name> <dependency> <name>dependency</name> <entityName>KeywordEntry_entity</entityName> <fieldName>SpecificContainerKeywords</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordDeliveryTerms</name> <children> <entityParameter> <name>ContainerName_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/keyworddeliveryterms/children/containername_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> </entityConsumer> <entityConsumer> <name>PossibleAddresses</name> <documentation>%aditoprj%/entity/Order_entity/entityfields/possibleaddresses/documentation.adoc</documentation> - <dependency> - <name>dependency</name> - <entityName>Address_entity</entityName> - <fieldName>OrganisationAndContactAddresses</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/possibleaddresses/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>Address_entity</entityName> + <fieldName>OrganisationAndContactAddresses</fieldName> + </dependency> </entityConsumer> <entityField> <name>NOTICE</name> @@ -663,25 +660,20 @@ </entityField> <entityConsumer> <name>Offers</name> - <dependency> - <name>dependency</name> - <entityName>Offer_entity</entityName> - <fieldName>ContactOffers</fieldName> - </dependency> <children> <entityParameter> <name>ContactId_param</name> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/offers/children/contactid_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>DocumentTemplateTexHeader</name> <dependency> <name>dependency</name> - <entityName>DocumentTemplate_entity</entityName> - <fieldName>DocumentTemplateProvider</fieldName> + <entityName>Offer_entity</entityName> + <fieldName>ContactOffers</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>DocumentTemplateTexHeader</name> <children> <entityParameter> <name>DocumentTemplateType_param</name> @@ -692,14 +684,14 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/documenttemplatetexheader/children/documenttemplatetypeclassification_param/valueProcess.js</valueProcess> </entityParameter> </children> - </entityConsumer> - <entityConsumer> - <name>DocumentTemplateTexFooter</name> <dependency> <name>dependency</name> <entityName>DocumentTemplate_entity</entityName> <fieldName>DocumentTemplateProvider</fieldName> </dependency> + </entityConsumer> + <entityConsumer> + <name>DocumentTemplateTexFooter</name> <children> <entityParameter> <name>DocumentTemplateType_param</name> @@ -710,6 +702,11 @@ <valueProcess>%aditoprj%/entity/Order_entity/entityfields/documenttemplatetexfooter/children/documenttemplatetypeclassification_param/valueProcess.js</valueProcess> </entityParameter> </children> + <dependency> + <name>dependency</name> + <entityName>DocumentTemplate_entity</entityName> + <fieldName>DocumentTemplateProvider</fieldName> + </dependency> </entityConsumer> <entityField> <name>ChosenTexHeader</name> @@ -797,10 +794,10 @@ <title>Count</title> </entityAggregateField> <entityActionField> - <name>newOrder</name> - <documentation>%aditoprj%/entity/Order_entity/entityfields/neworder/documentation.adoc</documentation> + <name>copyOrder</name> + <documentation>%aditoprj%/entity/Order_entity/entityfields/copyorder/documentation.adoc</documentation> <title>Copy receipt</title> - <onActionProcess>%aditoprj%/entity/Order_entity/entityfields/neworder/onActionProcess.js</onActionProcess> + <onActionProcess>%aditoprj%/entity/Order_entity/entityfields/copyorder/onActionProcess.js</onActionProcess> <iconId>VAADIN:COPY</iconId> </entityActionField> <entityActionField> @@ -916,6 +913,11 @@ </entityActionField> </children> </entityActionGroup> + <entityParameter> + <name>SourceOrderId_param</name> + <expose v="true" /> + <description></description> + </entityParameter> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Order_entity/entityfields/neworder/documentation.adoc b/entity/Order_entity/entityfields/copyorder/documentation.adoc similarity index 100% rename from entity/Order_entity/entityfields/neworder/documentation.adoc rename to entity/Order_entity/entityfields/copyorder/documentation.adoc diff --git a/entity/Order_entity/entityfields/copyorder/onActionProcess.js b/entity/Order_entity/entityfields/copyorder/onActionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..57c33c7f0149a55843b44c007ac0c13ab4645ede --- /dev/null +++ b/entity/Order_entity/entityfields/copyorder/onActionProcess.js @@ -0,0 +1,30 @@ +import("system.vars"); +import("system.neon"); +import("Order_lib"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); + + +var orderId = vars.get("$field.SALESORDERID"); +var fieldValues = { + contactId: vars.getString("$field.CONTACT_ID"), + currency: vars.getString("$field.CURRENCY"), + language: vars.getString("$field.ISOLANGUAGE"), + header: vars.getString("$field.HEADER"), + footer: vars.getString("$field.FOOTER"), + offerId: vars.getString("$field.OFFER_ID"), + deliveryTerm: vars.getString("$field.DELIVERYTERMS"), + paymentTerm: vars.getString("$field.PAYMENTTERMS"), + paymentAddress: vars.getString("$field.PAYMENTADDRESS"), + deliveryAddress: vars.getString("$field.DELIVERYADDRESS"), + objectRowId: vars.getString("$field.OBJECT_ROWID"), + objectType: vars.getString("$field.OBJECT_TYPE"), + dunningDate: vars.getString("$field.DUNNINGDATE"), + dunningLevel: vars.getString("$field.DUNNINGLEVEL"), + orderType: vars.getString("$field.ORDERTYPE"), + cancellation: vars.getString("$field.CANCELLATION"), + orderStatus:vars.getString("$field.ORDERSTATUS") +}; + +OrderUtils.copyOrder(orderId, fieldValues); + \ No newline at end of file diff --git a/entity/Order_entity/entityfields/neworder/onActionProcess.js b/entity/Order_entity/entityfields/neworder/onActionProcess.js deleted file mode 100644 index d73a39e61fe0b77c7736dd936384a78344dd2e9d..0000000000000000000000000000000000000000 --- a/entity/Order_entity/entityfields/neworder/onActionProcess.js +++ /dev/null @@ -1,26 +0,0 @@ -import("system.vars"); -import("system.neon"); -import("Order_lib"); -import("Keyword_lib"); -import("KeywordRegistry_basic"); - -var contactId = vars.getString("$field.CONTACT_ID"); -var currency = vars.getString("$field.CURRENCY"); -var language = vars.getString("$field.ISOLANGUAGE"); -var header = vars.getString("$field.HEADER"); -var footer = vars.getString("$field.FOOTER"); -var offerId = vars.getString("$field.OFFER_ID"); -var deliveryTerm = vars.getString("$field.DELIVERYTERMS"); -var paymentTerm = vars.getString("$field.PAYMENTTERMS"); -var paymentAddress = vars.getString("$field.PAYMENTADDRESS"); -var deliveryAddress = vars.getString("$field.DELIVERYADDRESS"); -var rowId = vars.getString("$field.OBJECT_ROWID"); -var objectType = vars.getString("$field.OBJECT_TYPE"); -var dunningDate = vars.getString("$field.DUNNINGDATE"); -var dunningLevel = vars.getString("$field.DUNNINGLEVEL"); -var orderType= vars.getString("$field.ORDERTYPE"); -var cancellation= vars.getString("$field.CANCELLATION"); -var orderStatus=vars.getString("$field.ORDERSTATUS"); - -OrderUtils.copyOrder(offerId, contactId, orderType, language, currency, header, footer, deliveryTerm, paymentTerm, paymentAddress, deliveryAddress, objectType, rowId, dunningDate, dunningLevel, cancellation, orderStatus); - \ No newline at end of file diff --git a/entity/Order_entity/recordcontainers/db/onDBInsert.js b/entity/Order_entity/recordcontainers/db/onDBInsert.js index 8e0f20e8575328e3bb330498cf028d3c9a7ee08c..bd3c2bb14b920b17de3b9bfba245f260f445b66d 100644 --- a/entity/Order_entity/recordcontainers/db/onDBInsert.js +++ b/entity/Order_entity/recordcontainers/db/onDBInsert.js @@ -4,7 +4,11 @@ import("system.neon"); import("system.vars"); //@TODO: OfferId_param is also set by 'copy order' -> the items of the offer are copied. What should happen? -if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.OfferId_param")) - OrderUtils.copyOfferItemsToOrder(vars.getString("$param.OfferId_param"), vars.get("$local.rowdata")["SALESORDER.SALESORDERID"]); - +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + if (vars.exists("$param.OfferId_param") && vars.get("$param.OfferId_param")) + OrderUtils.copyOfferItemsToOrder(vars.get("$param.OfferId_param"), vars.get("$local.uid")); + if (vars.exists("$param.SourceOrderId_param") && vars.get("$param.SourceOrderId_param")) + OrderUtils.copyOrderItems(vars.get("$param.SourceOrderId_param"), vars.get("$local.uid")); +} WorkflowSignalSender.inserted(); \ No newline at end of file diff --git a/entity/Order_entity/recordcontainers/db/recordfieldmappings/offer_id.displayvalue/expression.js b/entity/Order_entity/recordcontainers/db/recordfieldmappings/offer_id.displayvalue/expression.js index 2aec63a8d1bbd3bd15e9522ccb53fa52f74f7623..cb7fa7682e14113a60f86371e225422c41d088bf 100644 --- a/entity/Order_entity/recordcontainers/db/recordfieldmappings/offer_id.displayvalue/expression.js +++ b/entity/Order_entity/recordcontainers/db/recordfieldmappings/offer_id.displayvalue/expression.js @@ -2,4 +2,4 @@ import("system.result"); import("Context_lib"); import("system.db"); -result.string(db.translateStatement(ContextUtils.getNameSql("Offer", "SALESORDER.OFFER_ID"))); \ No newline at end of file +result.string(db.translateStatement(ContextUtils.getNameSql("Offer", null, "SALESORDER.OFFER_ID"))); \ No newline at end of file diff --git a/entity/Order_entity/recordcontainers/index/query.js b/entity/Order_entity/recordcontainers/index/query.js index 75ed9d1999b1e1b53073b2c6f99a368fb69cb874..74db3c61d092e8fc771d678ec24bbccd860ca727 100644 --- a/entity/Order_entity/recordcontainers/index/query.js +++ b/entity/Order_entity/recordcontainers/index/query.js @@ -8,8 +8,8 @@ import("KeywordRegistry_basic"); var sqlHelper = new SqlMaskingUtils(); var querySelect = newSelect([ "SALESORDERID", //#UID - sqlHelper.concat([sqlHelper.cast("SALESORDERCODE", SQLTYPES.CHAR, 10)], " | "), //#TITLE - sqlHelper.concat(["ORGANISATION.NAME"], " | "), //#DESCRIPTION + sqlHelper.concatWithSeparator([sqlHelper.cast("SALESORDERCODE", SQLTYPES.CHAR, 10)], " | "), //#TITLE + sqlHelper.concatWithSeparator(["ORGANISATION.NAME"], " | "), //#DESCRIPTION "SALESORDERCODE", "SALESORDER.CONTACT_ID", "CONTACT.ORGANISATION_ID", //as CONTACT_ORG_ID diff --git a/entity/Organisation_entity/recordcontainers/index/query.js b/entity/Organisation_entity/recordcontainers/index/query.js index 2d434dc250ffc55f3a17d7dfc6994f29dc86f083..ee0f4bb6cea37016e4a159e5b65aac515a7991ad 100644 --- a/entity/Organisation_entity/recordcontainers/index/query.js +++ b/entity/Organisation_entity/recordcontainers/index/query.js @@ -20,14 +20,14 @@ var commMediumMailIds = CommUtil.getMediumIdsByCategory("EMAIL"); var sqlHelper = new SqlMaskingUtils(); var querySelect = newSelect([ "CONTACT.CONTACTID", - sqlHelper.concat(["ORGANISATION.NAME", "'|'", "ORGANISATION.CUSTOMERCODE"]), - sqlHelper.concat([ - sqlHelper.concat(["standardAddress.ADDRESS", "standardAddress.BUILDINGNO", "'-'" + sqlHelper.concatWithSeparator(["ORGANISATION.NAME", "'|'", "ORGANISATION.CUSTOMERCODE"]), + sqlHelper.concatWithSeparator([ + sqlHelper.concatWithSeparator(["standardAddress.ADDRESS", "standardAddress.BUILDINGNO", "'-'" ,"standardAddress.COUNTRY", "standardAddress.ZIP", "standardAddress.CITY"]), - sqlHelper.concat(["'" + translate.text("Phone") + ":'", "(" + CommUtil.getStandardSubSqlPhone() + ")"]), - sqlHelper.concat(["'" + translate.text("Email") + ":'", "(" + CommUtil.getStandardSubSqlMail() + ")"]) + sqlHelper.concatWithSeparator(["'" + translate.text("Phone") + ":'", "(" + CommUtil.getStandardSubSqlPhone() + ")"]), + sqlHelper.concatWithSeparator(["'" + translate.text("Email") + ":'", "(" + CommUtil.getStandardSubSqlMail() + ")"]) ], " | "), - sqlHelper.concat([sqlHelper.cast("standardAddress.LAT", SQLTYPES.VARCHAR, 16), sqlHelper.cast("standardAddress.LON", SQLTYPES.VARCHAR, 16)], ","), + sqlHelper.concatWithSeparator([sqlHelper.cast("standardAddress.LAT", SQLTYPES.VARCHAR, 16), sqlHelper.cast("standardAddress.LON", SQLTYPES.VARCHAR, 16)], ","), //additional indexed fields "ORGANISATION.NAME", sqlHelper.trim("ORGANISATION.ORGANISATIONID"),//trim to enable filter patterns like: >> -organisationid_value:0<< @@ -39,8 +39,8 @@ var querySelect = newSelect([ "ADDRESS.CITY", "standardEmail.ADDR", "standardPhone.ADDR", - sqlHelper.concat([sqlHelper.concat(["standardAddress.ADDRESS", "standardAddress.BUILDINGNO"]) - ,sqlHelper.concat(["standardAddress.COUNTRY", "standardAddress.ZIP", "standardAddress.CITY"]) + sqlHelper.conconcatWithSeparatorcat([sqlHelper.concatWithSeparator(["standardAddress.ADDRESS", "standardAddress.BUILDINGNO"]) + ,sqlHelper.concatWithSeparator(["standardAddress.COUNTRY", "standardAddress.ZIP", "standardAddress.CITY"]) ], " - ") ]) .from("ORGANISATION") diff --git a/entity/Person_entity/initFilterProcess.js b/entity/Person_entity/initFilterProcess.js index c30d06ea24f7a12f1a5dfdec27fcf47948a78dc9..f64ef8977cc3f20a910f104d6196bfe90c43fc34 100644 --- a/entity/Person_entity/initFilterProcess.js +++ b/entity/Person_entity/initFilterProcess.js @@ -1,3 +1,4 @@ +import("system.entities"); import("Keyword_lib"); import("KeywordRegistry_basic"); import("system.result"); diff --git a/entity/Person_entity/recordcontainers/index/query.js b/entity/Person_entity/recordcontainers/index/query.js index 57faf589990bf78e08b17cdc4ad1b49b4f03c1af..e5c704e81ad9981791035100cf08dade778bc713 100644 --- a/entity/Person_entity/recordcontainers/index/query.js +++ b/entity/Person_entity/recordcontainers/index/query.js @@ -18,12 +18,12 @@ var commMediumPhoneIds = CommUtil.getMediumIdsByCategory("PHONE"); sqlHelper = new SqlMaskingUtils(); var querySelect = newSelect([ "CONTACT.CONTACTID", //#UID - sqlHelper.concat(["PERSON.SALUTATION", "PERSON.FIRSTNAME", "PERSON.LASTNAME", "'|'", "ORGANISATION.NAME"]), //#TITLE - sqlHelper.concat([ - sqlHelper.concat(["defaultAddress.ADDRESS", "defaultAddress.BUILDINGNO", "'-'", + sqlHelper.concatWithSeparator(["PERSON.SALUTATION", "PERSON.FIRSTNAME", "PERSON.LASTNAME", "'|'", "ORGANISATION.NAME"]), //#TITLE + sqlHelper.concatWithSeparator([ + sqlHelper.concatWithSeparator(["defaultAddress.ADDRESS", "defaultAddress.BUILDINGNO", "'-'", "defaultAddress.COUNTRY", "defaultAddress.ZIP", "defaultAddress.CITY"]), - sqlHelper.concat(["'" + translate.text("Phone") + ":'", "(" + CommUtil.getStandardSubSqlPhone() + ")"]), - sqlHelper.concat(["'" + translate.text("Email") + ":'", "(" + CommUtil.getStandardSubSqlMail() + ")"]) + sqlHelper.concatWithSeparator(["'" + translate.text("Phone") + ":'", "(" + CommUtil.getStandardSubSqlPhone() + ")"]), + sqlHelper.concatWithSeparator(["'" + translate.text("Email") + ":'", "(" + CommUtil.getStandardSubSqlMail() + ")"]) ], " | "), //#DESCRIPTION //additional indexed fields "CONTACT.CONTACTID", diff --git a/entity/Product_entity/recordcontainers/index/query.js b/entity/Product_entity/recordcontainers/index/query.js index e06093cbebec627842468acb868e1e5c0dd57403..b1d7ae47756f3a528ab7279735c4cfdc2b224a6f 100644 --- a/entity/Product_entity/recordcontainers/index/query.js +++ b/entity/Product_entity/recordcontainers/index/query.js @@ -7,7 +7,7 @@ import("KeywordRegistry_basic"); var sqlHelper = new SqlMaskingUtils(); var sqlQuery = newSelect([ "PRODUCTID", //#UID - sqlHelper.concat(["PRODUCTCODE", "PRODUCTNAME"], " | "), //#TITLE + sqlHelper.concatWithSeparator(["PRODUCTCODE", "PRODUCTNAME"], " | "), //#TITLE KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.productGroupcode(), "GROUPCODEID"), //#DESCRIPTION "PRODUCTCODE" ]) diff --git a/entity/Productprice_entity/recordcontainers/db/recordfieldmappings/fromquantity.displayvalue/expression.js b/entity/Productprice_entity/recordcontainers/db/recordfieldmappings/fromquantity.displayvalue/expression.js index 9d2ad815005cb83931979b4390e103fbdb198533..cd8dcbf86f1142e272d7b70bc2b01aa1c3c3c592 100644 --- a/entity/Productprice_entity/recordcontainers/db/recordfieldmappings/fromquantity.displayvalue/expression.js +++ b/entity/Productprice_entity/recordcontainers/db/recordfieldmappings/fromquantity.displayvalue/expression.js @@ -7,7 +7,7 @@ import("Sql_lib"); var helper = new SqlMaskingUtils(); -var res = newSelect(helper.concat([helper.cast("PRODUCTPRICE.FROMQUANTITY", SQLTYPES.CHAR, 36), "' '", KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.quantityUnit(), "PRODUCT.UNIT")], "|")) +var res = newSelect(helper.concatWithSeparator([helper.cast("PRODUCTPRICE.FROMQUANTITY", SQLTYPES.CHAR, 36), "' '", KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.quantityUnit(), "PRODUCT.UNIT")], "|")) .from("PRODUCT") .where("PRODUCT.PRODUCTID = PRODUCTPRICE.PRODUCT_ID") .toString() diff --git a/entity/Role_entity/Role_entity.aod b/entity/Role_entity/Role_entity.aod index b1e75e67c1de2cb4e7b72f7307b74a81a6e6f0cf..6bff89e164df6c4a4c4d6da1120d2496db260384 100644 --- a/entity/Role_entity/Role_entity.aod +++ b/entity/Role_entity/Role_entity.aod @@ -173,6 +173,10 @@ <name>#PROVIDER_AGGREGATES</name> <useAggregates v="true" /> </entityProvider> + <entityProvider> + <name>FilterRolesWithoutPermission</name> + <usePermissions v="false" /> + </entityProvider> </entityFields> <recordContainers> <jDitoRecordContainer> diff --git a/entity/SalesprojectAnalyses_entity/SalesprojectAnalyses_entity.aod b/entity/SalesprojectAnalyses_entity/SalesprojectAnalyses_entity.aod index 5b2898641b5f0cf0d33f29c1dd3c81bd07806201..3c35c7cf03086585c3973d2112236a060fc1d1c7 100644 --- a/entity/SalesprojectAnalyses_entity/SalesprojectAnalyses_entity.aod +++ b/entity/SalesprojectAnalyses_entity/SalesprojectAnalyses_entity.aod @@ -3,7 +3,7 @@ <name>SalesprojectAnalyses_entity</name> <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/SalesprojectAnalyses_entity/documentation.adoc</documentation> - <title>Salesproject Analyses</title> + <title>Sales Project Analyses</title> <iconId>VAADIN:PIE_CHART</iconId> <recordContainer>jdito</recordContainer> <entityFields> @@ -41,14 +41,14 @@ </entityField> <entityField> <name>SENT_OFFERS</name> - <title>Sent offers</title> + <title>Sent Offers</title> <contentType>NUMBER</contentType> <state>READONLY</state> <valueProcess>%aditoprj%/entity/SalesprojectAnalyses_entity/entityfields/sent_offers/valueProcess.js</valueProcess> </entityField> <entityField> <name>OPEN_SALESPROJECTS</name> - <title>Open salesprojects</title> + <title>Open Salesprojects</title> <contentType>NUMBER</contentType> <state>READONLY</state> <valueProcess>%aditoprj%/entity/SalesprojectAnalyses_entity/entityfields/open_salesprojects/valueProcess.js</valueProcess> diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod index f33a33912223de0d1e2047b7f1de11979c36c939..1191ebd36bedf99364471aedad4a2bf9660934f0 100644 --- a/entity/Salesproject_entity/Salesproject_entity.aod +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -14,7 +14,7 @@ <useFavorites v="true" /> <iconId>VAADIN:BOOK_DOLLAR</iconId> <imageProcess>%aditoprj%/entity/Salesproject_entity/imageProcess.js</imageProcess> - <titlePlural>Sales Projects</titlePlural> + <titlePlural>Salesprojects</titlePlural> <recordContainer>db</recordContainer> <entityFields> <entityProvider> diff --git a/entity/Salesproject_entity/onValidation.js b/entity/Salesproject_entity/onValidation.js index c9618796815b4f0e83c28c43a12320cd981a3ed9..ffe29cce81f26b649d2866fd163f7600df045eb9 100644 --- a/entity/Salesproject_entity/onValidation.js +++ b/entity/Salesproject_entity/onValidation.js @@ -9,4 +9,4 @@ var endDate = vars.get("$field.ENDDATE"); if (!DateUtils.validateBeginnBeforeEnd(startDate, endDate)) result.string(DateUtils.getValidationFailString()); else if(!vars.get("$field.PROJECTTITLE") && vars.get("$field.PROJECTTYPE") && vars.exists("$param.PresetTitle_param")) - result.string(translate.text("The Sales Project can only be filled when a company has been specified")); \ No newline at end of file + result.string(translate.text("The Salesproject can only be filled when a company has been specified")); \ No newline at end of file diff --git a/entity/Salesproject_entity/recordcontainers/index/query.js b/entity/Salesproject_entity/recordcontainers/index/query.js index 000f54e04cea1de1398266fc8b5bba9f267a5026..ca558d146bc636a845f5660561b9eb2e8533a225 100644 --- a/entity/Salesproject_entity/recordcontainers/index/query.js +++ b/entity/Salesproject_entity/recordcontainers/index/query.js @@ -10,7 +10,7 @@ var sqlHelper = new SqlMaskingUtils(); var sqlQuery = newSelect([ "SALESPROJECTID", //#UID "PROJECTTITLE", //#TITLE - sqlHelper.concat([ + sqlHelper.concatWithSeparator([ "'" + translate.text("Status") + ":'", KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.salesprojectState(), "STATUS"), "'| " + translate.text("Phase") + ":'", KeywordUtils.getResolvedTitleSqlPart($KeywordRegistry.salesprojectPhase(), "PHASE") ]), //#DESCRIPTION diff --git a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod index 3439544cfe83b426af1216d5545709508f9cdf3e..55f7497ad1ec5a7115e2f660c6bf618a0d6304b8 100644 --- a/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod +++ b/language/_____LANGUAGE_EXTRA/_____LANGUAGE_EXTRA.aod @@ -61,7 +61,7 @@ <key>Female</key> </entry> <entry> - <key>Contactmanagement</key> + <key>Contact Management</key> </entry> <entry> <key>Office address</key> @@ -646,7 +646,7 @@ <key>Orderitems</key> </entry> <entry> - <key>Sent receipts</key> + <key>Sent Receipts</key> </entry> <entry> <key>Copy receipt</key> @@ -664,7 +664,7 @@ <key>Turnover</key> </entry> <entry> - <key>Sent offers</key> + <key>Sent Offers</key> </entry> <entry> <key>Show all activities</key> @@ -733,7 +733,7 @@ <key>Show all salesprojects</key> </entry> <entry> - <key>Open salesprojects</key> + <key>Open Salesprojects</key> </entry> <entry> <key>July</key> @@ -2374,7 +2374,7 @@ <key>{$ADDRESS_IDENTIFIER}</key> </entry> <entry> - <key>Salesproject phases</key> + <key>Salesproject Phases</key> </entry> <entry> <key>Add to Campaign</key> @@ -2392,7 +2392,7 @@ <key>Add participants to Campaign</key> </entry> <entry> - <key>Key figures</key> + <key>Key Figures</key> </entry> <entry> <key>Delete all usage</key> @@ -4105,7 +4105,7 @@ <key>Show my campaigns</key> </entry> <entry> - <key>My campaigns</key> + <key>My Campaigns</key> </entry> <entry> <key>Add to Bulkmail</key> @@ -4297,7 +4297,7 @@ <key>Unknown incoming call from %0 to %1</key> </entry> <entry> - <key>All unlinked mails</key> + <key>All Unlinked Mails</key> </entry> <entry> <key>hour</key> @@ -4309,7 +4309,7 @@ <key>Incoming call from %0 (%1) to %2</key> </entry> <entry> - <key>import mails</key> + <key>Import Mails</key> </entry> <entry> <key>Unknown accepted call from %0 to %1, duration: %2</key> @@ -4546,7 +4546,7 @@ <key>Campaign management</key> </entry> <entry> - <key>Campaign costs</key> + <key>Campaign Costs</key> </entry> <entry> <key>Shows all campaigns</key> @@ -4777,7 +4777,7 @@ <key>Credit</key> </entry> <entry> - <key>My tickets</key> + <key>My Tickets</key> </entry> <entry> <key>Replacement name</key> @@ -4933,13 +4933,13 @@ <key>Show my contacts</key> </entry> <entry> - <key>My contacts</key> + <key>My Contacts</key> </entry> <entry> <key>Show my organisations</key> </entry> <entry> - <key>My organisations</key> + <key>My Organisations</key> </entry> <entry> <key>Custom template</key> @@ -5333,9 +5333,6 @@ <entry> <key>Mobility, Transport and Logistics</key> </entry> - <entry> - <key>Sales Project</key> - </entry> <entry> <key>Load data</key> </entry> @@ -5688,7 +5685,7 @@ <key>No letters</key> </entry> <entry> - <key>Own workflow tasks</key> + <key>My Workflow Tasks</key> </entry> <entry> <key>My workflow tasks</key> @@ -6066,7 +6063,7 @@ <key>Workflow management</key> </entry> <entry> - <key>my visit planning</key> + <key>My Visit Planning</key> </entry> <entry> <key>Update offer</key> @@ -6290,9 +6287,6 @@ <entry> <key>Lead Import</key> </entry> - <entry> - <key>Contact Management</key> - </entry> <entry> <key>Campaign Planning</key> </entry> @@ -6521,9 +6515,6 @@ <entry> <key>Full details</key> </entry> - <entry> - <key>Sales Projects</key> - </entry> <entry> <key>set Read</key> </entry> @@ -6705,7 +6696,7 @@ <key>{SENT_MAIL}</key> </entry> <entry> - <key>The Sales Project can only be filled when a company has been specified</key> + <key>The Salesproject can only be filled when a company has been specified</key> </entry> <entry> <key>The workflow could not be deployed</key> @@ -7296,6 +7287,78 @@ <entry> <key>Outstanding Amount</key> </entry> + <entry> + <key>Start marketing mailing</key> + </entry> + <entry> + <key>Email address</key> + </entry> + <entry> + <key>#rememberme</key> + </entry> + <entry> + <key>#login</key> + </entry> + <entry> + <key>Last change</key> + </entry> + <entry> + <key>Knowledge entries</key> + </entry> + <entry> + <key>Newsfeed (Preview)</key> + </entry> + <entry> + <key>Edited on</key> + </entry> + <entry> + <key>Created on</key> + </entry> + <entry> + <key>Discussion</key> + </entry> + <entry> + <key>Newsfeed (Full)</key> + </entry> + <entry> + <key>Closed</key> + </entry> + <entry> + <key>Text content</key> + </entry> + <entry> + <key>Reply</key> + </entry> + <entry> + <key>All Knowledge Entries</key> + </entry> + <entry> + <key>Export HTML</key> + </entry> + <entry> + <key>Publishing level</key> + </entry> + <entry> + <key>Discussions</key> + </entry> + <entry> + <key>Knowledge Management</key> + </entry> + <entry> + <key>List news articles</key> + </entry> + <entry> + <key>Knowledge Role</key> + </entry> + <entry> + <key>Shows complete news articles</key> + </entry> + <entry> + <key>Knowledge</key> + </entry> + <entry> + <key>Toggle status</key> + </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> <sqlModels> diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index 5ae81ef6a8a2856d375b73be7156726e401553e4..ada3bee7bc8f2f08b97d43ac8c5679955ab50b1d 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -42,6 +42,10 @@ <key>Data imported. Contact not found.</key> <value>Daten importiert. Keine weiteren Personendaten gefunden.</value> </entry> + <entry> + <key>Last change</key> + <value>Letzte Änderung</value> + </entry> <entry> <key>Variables</key> <value>Variablen</value> @@ -50,6 +54,10 @@ <key>Finished</key> <value>Fertig</value> </entry> + <entry> + <key>Knowledge Management</key> + <value>Wissensmanagement</value> + </entry> <entry> <key>Show my organisations</key> <value>Meine Firmen anzeigen</value> @@ -58,6 +66,10 @@ <key>Radius Search</key> <value>Umkreissuche</value> </entry> + <entry> + <key>Discussion</key> + <value>Diskussion</value> + </entry> <entry> <key>${FILTER_DYNAMIC_VALUE_ME}</key> <value>Ich</value> @@ -83,7 +95,7 @@ <value>Keine E-Mails</value> </entry> <entry> - <key>My organisations</key> + <key>My Organisations</key> <value>Meine Firmen</value> </entry> <entry> @@ -259,7 +271,7 @@ <value>Eigenschaftsgruppen können nicht verwendet werden</value> </entry> <entry> - <key>My contacts</key> + <key>My Contacts</key> <value>Meine Kontakte</value> </entry> <entry> @@ -407,7 +419,7 @@ <value>Priorität</value> </entry> <entry> - <key>Salesproject phases</key> + <key>Salesproject Phases</key> <value>Vertriebsprojektphasen</value> </entry> <entry> @@ -1028,7 +1040,7 @@ <value>Teilnehmer/innen</value> </entry> <entry> - <key>Contactmanagement</key> + <key>Contact Management</key> <value>Kontaktmanagement</value> </entry> <entry> @@ -1371,6 +1383,10 @@ <key>IN</key> <value>EIN</value> </entry> + <entry> + <key>Knowledge</key> + <value>Wissen</value> + </entry> <entry> <key>OUT</key> <value>AUS</value> @@ -1686,6 +1702,10 @@ <key>Role</key> <value>Rolle</value> </entry> + <entry> + <key>Closed</key> + <value>Geschlossen</value> + </entry> <entry> <key>End date</key> <value>Enddatum</value> @@ -1763,7 +1783,7 @@ <value>Niedrigpreisstrategie</value> </entry> <entry> - <key>Sent offers</key> + <key>Sent Offers</key> <value>Versendete Angebote</value> </entry> <entry> @@ -1787,7 +1807,7 @@ <value>Vertriebsprojekte</value> </entry> <entry> - <key>Open salesprojects</key> + <key>Open Salesprojects</key> <value>Offene Vertriebsprojekte</value> </entry> <entry> @@ -2016,7 +2036,7 @@ <value>Belegposten</value> </entry> <entry> - <key>Sent receipts</key> + <key>Sent Receipts</key> <value>Versendete Belege</value> </entry> <entry> @@ -2200,7 +2220,7 @@ <value>Vertriebsdashboard</value> </entry> <entry> - <key>Key figures</key> + <key>Key Figures</key> <value>Kennzahlen</value> </entry> <entry> @@ -2987,6 +3007,10 @@ <key>Georgia</key> <value>Georgia</value> </entry> + <entry> + <key>Publishing level</key> + <value>Veröffentlichung</value> + </entry> <entry> <key>Saint Kitts and Nevis</key> <value>St. Kitts und Nevis</value> @@ -3071,6 +3095,10 @@ <key>Kgs</key> <value>Kg</value> </entry> + <entry> + <key>Email address</key> + <value>E-Mail Adresse</value> + </entry> <entry> <key>Australia</key> <value>Australien</value> @@ -3167,6 +3195,10 @@ <key>Project manager</key> <value>Projektmanager</value> </entry> + <entry> + <key>List news articles</key> + <value>News-Artikel auflisten</value> + </entry> <entry> <key>Singapore</key> <value>Singapur</value> @@ -4439,6 +4471,10 @@ <key>Relation Title</key> <value>Beziehungstitel</value> </entry> + <entry> + <key>Knowledge entries</key> + <value>Wissenseinträge</value> + </entry> <entry> <key>%0 \"%1\"</key> </entry> @@ -4450,10 +4486,18 @@ <key>Data executed</key> <value>Daten ausgeführt</value> </entry> + <entry> + <key>Export HTML</key> + <value>HTML exportieren</value> + </entry> <entry> <key>Indexsearch</key> <value>Indexsuche</value> </entry> + <entry> + <key>Edited on</key> + <value>Bearbeitet am</value> + </entry> <entry> <key>Appointment link Id</key> <value>Terminverknüpfungs Id</value> @@ -4478,6 +4522,10 @@ <key>Int value</key> <value>Zahlenwert</value> </entry> + <entry> + <key>Text content</key> + <value>Textinhalt</value> + </entry> <entry> <key>Object 2 row Id</key> <value>Objekt 2 Row Id</value> @@ -4618,6 +4666,10 @@ <key>Address addition</key> <value>Adresszusatz</value> </entry> + <entry> + <key>Shows complete news articles</key> + <value>Zeigt News-Artikel vollständig an</value> + </entry> <entry> <key>the \"%0\" table is configured to get logged but this is the logging-stoarge itself and cannot be monitored</key> <value>Die "% 0" -Tabelle ist so konfiguriert, dass sie protokolliert wird. Dies ist jedoch der Protokollierspeicher selbst und kann nicht überwacht werden</value> @@ -5290,6 +5342,10 @@ <key>Minimal count must be a positive whole number</key> <value>Minimale Anzahl muss eine positive, ganze Zahl sein</value> </entry> + <entry> + <key>All Knowledge Entries</key> + <value>Alle Wissenseinträge</value> + </entry> <entry> <key>Maximal count must be one or higher</key> <value>Maximale Anzahl muss eins oder höher sein</value> @@ -5334,6 +5390,10 @@ <key>Privacy agreement</key> <value>Datenschutzabkommen</value> </entry> + <entry> + <key>Newsfeed (Preview)</key> + <value>Newsfeed (Vorschau)</value> + </entry> <entry> <key>Commodity group A</key> <value>Warengruppe A</value> @@ -6146,7 +6206,7 @@ <value>Keine Kontakte ausgewählt</value> </entry> <entry> - <key>My campaigns</key> + <key>My Campaigns</key> <value>Meine Kampagnen</value> </entry> <entry> @@ -6239,7 +6299,7 @@ <value>eine Datei ignoriert</value> </entry> <entry> - <key>All unlinked mails</key> + <key>All Unlinked Mails</key> <value>Alle unverknüpften E-Mails</value> </entry> <entry> @@ -6255,7 +6315,7 @@ <value>Eingehender Anruf von %0 (%1) nach %2</value> </entry> <entry> - <key>import mails</key> + <key>Import Mails</key> <value>E-Mails importieren</value> </entry> <entry> @@ -6459,7 +6519,7 @@ <value>Kampagnenmanagement</value> </entry> <entry> - <key>Campaign costs</key> + <key>Campaign Costs</key> <value>Kampagnenkosten</value> </entry> <entry> @@ -6749,7 +6809,7 @@ <value>Vorlagen-Anhänge verwenden</value> </entry> <entry> - <key>My tickets</key> + <key>My Tickets</key> <value>Meine Tickets</value> </entry> <entry> @@ -6877,6 +6937,10 @@ <key>Faroe Islands</key> <value>Färöer</value> </entry> + <entry> + <key>Discussions</key> + <value>Diskussionen</value> + </entry> <entry> <key>${CONTRACT_STATUS}</key> <value>Vertragsstatus</value> @@ -6960,10 +7024,6 @@ <entry> <key>yyyyMMdd</key> </entry> - <entry> - <key>Sales Project</key> - <value>Vertriebsprojekt</value> - </entry> <entry> <key>closed</key> <value>geschlossen</value> @@ -7116,6 +7176,10 @@ <key>Column 7</key> <value>Spalte 7</value> </entry> + <entry> + <key>Reply</key> + <value>Antworten</value> + </entry> <entry> <key>Column 6</key> <value>Spalte 6</value> @@ -7184,6 +7248,10 @@ <key>Lead</key> <value>Lead </value> </entry> + <entry> + <key>Toggle status</key> + <value>Status ändern</value> + </entry> <entry> <key>Company name</key> <value>Firmenname</value> @@ -7796,7 +7864,7 @@ Bitte Datumseingabe prüfen</value> <key>;</key> </entry> <entry> - <key>Own workflow tasks</key> + <key>My Workflow Tasks</key> <value>Meine Workflow Aufgaben</value> </entry> <entry> @@ -7865,6 +7933,10 @@ Bitte Datumseingabe prüfen</value> <key>${CANCELLED}</key> <value>Abgebrochen</value> </entry> + <entry> + <key>Newsfeed (Full)</key> + <value>Newsfeed (Vollständig)</value> + </entry> <entry> <key>Workflow signal</key> <value>Workflow Signal</value> @@ -8214,7 +8286,7 @@ Bitte Datumseingabe prüfen</value> <value>Workflow management</value> </entry> <entry> - <key>my visit planning</key> + <key>My Visit Planning</key> <value>Meine Besuchsplanung</value> </entry> <entry> @@ -8549,10 +8621,6 @@ Bitte Datumseingabe prüfen</value> <key>Lead Import</key> <value>Leadimport</value> </entry> - <entry> - <key>Contact Management</key> - <value>Kontaktmanagement</value> - </entry> <entry> <key>Campaign Planning</key> <value>Kampagnenplanung</value> @@ -8561,6 +8629,10 @@ Bitte Datumseingabe prüfen</value> <key>Bulk Mail</key> <value>Serienmail</value> </entry> + <entry> + <key>Knowledge Role</key> + <value>Wissensrolle</value> + </entry> <entry> <key>Workflow Definition</key> <value>Workflowdefinition</value> @@ -8721,6 +8793,10 @@ Bitte Datumseingabe prüfen</value> <key>Read and Write Permission</key> <value>Volle Lese- und Schreibberechtigung</value> </entry> + <entry> + <key>Created on</key> + <value>Erstellt am</value> + </entry> <entry> <key>Synchronize calendar permissions from Exchange to ADITO</key> <value>Synchronisiere Kalenderberechtigungen von Exchange nach ADITO</value> @@ -8749,10 +8825,6 @@ Bitte Datumseingabe prüfen</value> <key>Not created yet</key> <value>Noch nicht erstellt</value> </entry> - <entry> - <key>Sales Projects</key> - <value>Vertriebsprojekte</value> - </entry> <entry> <key>set Read</key> <value>Gelesen setzen</value> @@ -9269,12 +9341,12 @@ Bitte Datumseingabe prüfen</value> <value>Punkte</value> </entry> <entry> - <key>The Sales Project can only be filled when a company has been specified</key> + <key>The Salesproject can only be filled when a company has been specified</key> <value>vertriebsprojekt darf nur gefüllt sein wenn eine Firma festgelegt wurde.</value> </entry> <entry> <key>Child Attributes</key> - <value>Diagrameigenschaften</value> + <value>Untergeordnete Eigenschaften</value> </entry> <entry> <key>Recalculate all Classifications</key> diff --git a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod index 193aaea85b4963c84362c964b8e24578e77c0212..f1739f8c88daac1b720f3e73c148aa60820801f7 100644 --- a/language/_____LANGUAGE_en/_____LANGUAGE_en.aod +++ b/language/_____LANGUAGE_en/_____LANGUAGE_en.aod @@ -86,7 +86,7 @@ <key>Female</key> </entry> <entry> - <key>Contactmanagement</key> + <key>Contact Management</key> </entry> <entry> <key>Office address</key> @@ -679,7 +679,7 @@ <key>Orderitems</key> </entry> <entry> - <key>Sent receipts</key> + <key>Sent Receipts</key> </entry> <entry> <key>Copy receipt</key> @@ -697,7 +697,7 @@ <key>Turnover</key> </entry> <entry> - <key>Sent offers</key> + <key>Sent Offers</key> </entry> <entry> <key>Show all activities</key> @@ -766,7 +766,7 @@ <key>Show all salesprojects</key> </entry> <entry> - <key>Open salesprojects</key> + <key>Open Salesprojects</key> </entry> <entry> <key>July</key> @@ -2426,7 +2426,7 @@ <value>Identifier</value> </entry> <entry> - <key>Salesproject phases</key> + <key>Salesproject Phases</key> </entry> <entry> <key>Add to Campaign</key> @@ -2444,7 +2444,7 @@ <key>Add participants to Campaign</key> </entry> <entry> - <key>Key figures</key> + <key>Key Figures</key> </entry> <entry> <key>Hierarchy</key> @@ -4215,7 +4215,7 @@ <key>Show my campaigns</key> </entry> <entry> - <key>My campaigns</key> + <key>My Campaigns</key> </entry> <entry> <key>Add to Bulkmail</key> @@ -4374,7 +4374,7 @@ <key>Unknown incoming call from %0 to %1</key> </entry> <entry> - <key>All unlinked mails</key> + <key>All Unlinked Mails</key> </entry> <entry> <key>hour</key> @@ -4386,7 +4386,7 @@ <key>Incoming call from %0 (%1) to %2</key> </entry> <entry> - <key>import mails</key> + <key>Import Mails</key> </entry> <entry> <key>Unknown accepted call from %0 to %1, duration: %2</key> @@ -4623,7 +4623,7 @@ <key>Add the selection to a serial letter</key> </entry> <entry> - <key>Campaign costs</key> + <key>Campaign Costs</key> </entry> <entry> <key>Shows all campaigns</key> @@ -4869,7 +4869,7 @@ <key>Use template attachments</key> </entry> <entry> - <key>My tickets</key> + <key>My Tickets</key> </entry> <entry> <key>HTML template - Only for .html</key> @@ -5010,13 +5010,13 @@ <key>Show my contacts</key> </entry> <entry> - <key>My contacts</key> + <key>My Contacts</key> </entry> <entry> <key>Show my organisations</key> </entry> <entry> - <key>My organisations</key> + <key>My Organisations</key> </entry> <entry> <key>Custom template</key> @@ -5410,9 +5410,6 @@ <entry> <key>Mobility, Transport and Logistics</key> </entry> - <entry> - <key>Sales Project</key> - </entry> <entry> <key>Load data</key> </entry> @@ -5765,7 +5762,7 @@ <key>No letters</key> </entry> <entry> - <key>Own workflow tasks</key> + <key>My Workflow Tasks</key> </entry> <entry> <key>My workflow tasks</key> @@ -6134,7 +6131,7 @@ <key>Workflow management</key> </entry> <entry> - <key>my visit planning</key> + <key>My Visit Planning</key> </entry> <entry> <key>Update offer</key> @@ -6363,9 +6360,6 @@ <entry> <key>Lead Import</key> </entry> - <entry> - <key>Contact Management</key> - </entry> <entry> <key>Campaign Planning</key> </entry> @@ -6606,9 +6600,6 @@ <entry> <key>Invalid file type; only .html, .eml and .txt are allowed</key> </entry> - <entry> - <key>Sales Projects</key> - </entry> <entry> <key>set Read</key> </entry> @@ -6788,7 +6779,7 @@ <key>Workflow Model</key> </entry> <entry> - <key>The Sales Project can only be filled when a company has been specified</key> + <key>The Salesproject can only be filled when a company has been specified</key> </entry> <entry> <key>{SEND_MAIL}</key> @@ -7377,13 +7368,77 @@ <entry> <key>Outstanding Amount</key> </entry> + <entry> + <key>Start marketing mailing</key> + </entry> + <entry> + <key>Email address</key> + </entry> <entry> <key>#rememberme</key> - <value>Stay logged in</value> </entry> <entry> <key>#login</key> - <value>Login token</value> + </entry> + <entry> + <key>Last change</key> + </entry> + <entry> + <key>Knowledge entries</key> + </entry> + <entry> + <key>Newsfeed (Preview)</key> + </entry> + <entry> + <key>Edited on</key> + </entry> + <entry> + <key>Created on</key> + </entry> + <entry> + <key>Discussion</key> + </entry> + <entry> + <key>Newsfeed (Full)</key> + </entry> + <entry> + <key>Closed</key> + </entry> + <entry> + <key>Text content</key> + </entry> + <entry> + <key>Reply</key> + </entry> + <entry> + <key>All Knowledge Entries</key> + </entry> + <entry> + <key>Export HTML</key> + </entry> + <entry> + <key>Publishing level</key> + </entry> + <entry> + <key>Discussions</key> + </entry> + <entry> + <key>Knowledge Management</key> + </entry> + <entry> + <key>List news articles</key> + </entry> + <entry> + <key>Knowledge Role</key> + </entry> + <entry> + <key>Shows complete news articles</key> + </entry> + <entry> + <key>Knowledge</key> + </entry> + <entry> + <key>Toggle status</key> </entry> </keyValueMap> <font name="Dialog" style="0" size="11" /> diff --git a/neonContext/KnowledgeDiscussion/KnowledgeDiscussion.aod b/neonContext/KnowledgeDiscussion/KnowledgeDiscussion.aod new file mode 100644 index 0000000000000000000000000000000000000000..4c1a61df497a69008899a8952069e9e0e7e9b92c --- /dev/null +++ b/neonContext/KnowledgeDiscussion/KnowledgeDiscussion.aod @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext 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/neonContext/1.1.1"> + <name>KnowledgeDiscussion</name> + <title>Discussion</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterView>KnowledgeDiscussionTree_view</filterView> + <editView>KnowledgeDiscussionEdit_view</editView> + <previewView>KnowledgeDiscussionPreview_view</previewView> + <entity>KnowledgeDiscussion_entity</entity> + <references> + <neonViewReference> + <name>a400341e-5b6b-4952-a0fe-1f88c3e55027</name> + <view>KnowledgeDiscussionTree_view</view> + </neonViewReference> + <neonViewReference> + <name>fbb4d64f-5167-4d8f-b9ac-4cdb4f1ceb59</name> + <view>KnowledgeDiscussionPreview_view</view> + </neonViewReference> + <neonViewReference> + <name>05aa5ff8-7204-4949-b19c-f6fd15dc24fd</name> + <view>KnowledgeDiscussionEdit_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonContext/KnowledgeLink/KnowledgeLink.aod b/neonContext/KnowledgeLink/KnowledgeLink.aod new file mode 100644 index 0000000000000000000000000000000000000000..e7b3b4c531d925a137257cdecadb254aec2dfe0a --- /dev/null +++ b/neonContext/KnowledgeLink/KnowledgeLink.aod @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext 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/neonContext/1.1.1"> + <name>KnowledgeLink</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterView>KnowledgeLinkLookup_view</filterView> + <editView>KnowledgeLinkEdit_view</editView> + <lookupView>KnowledgeLinkLookup_view</lookupView> + <entity>KnowledgeLink_entity</entity> + <references> + <neonViewReference> + <name>04a5480c-7327-46e8-8835-db77de3c6994</name> + <view>KnowledgeLinkLookup_view</view> + </neonViewReference> + <neonViewReference> + <name>7c4b7964-6668-4cfb-a2b3-9ca63dc10741</name> + <view>KnowledgeLinkActionList_view</view> + </neonViewReference> + <neonViewReference> + <name>51436b95-a74b-406a-8029-ab5113eedfa3</name> + <view>KnowledgeLinkEdit_view</view> + </neonViewReference> + <neonViewReference> + <name>051675e5-f526-4588-9b5c-72d9b4de00ab</name> + <view>KnowledgeLinkMultiEdit_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonContext/KnowledgeManagement/KnowledgeManagement.aod b/neonContext/KnowledgeManagement/KnowledgeManagement.aod new file mode 100644 index 0000000000000000000000000000000000000000..392aeb6cef2557a829bdbf58b76fe76597e5061f --- /dev/null +++ b/neonContext/KnowledgeManagement/KnowledgeManagement.aod @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext 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/neonContext/1.1.1"> + <name>KnowledgeManagement</name> + <title>Knowledge Management</title> + <description><null value></description> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:ACADEMY_CAP</icon> + <mainView>KnowledgeManagementMain_view</mainView> + <filterView>KnowledgeManagementFilter_view</filterView> + <editView>KnowledgeManagementEdit_view</editView> + <previewView>KnowledgeManagementPreview_view</previewView> + <lookupView>KnowledgeManagementLookup_view</lookupView> + <entity>KnowledgeManagement_entity</entity> + <references> + <neonViewReference> + <name>37f60641-26b3-4fbd-b2fa-b69169de0cfe</name> + <view>KnowledgeManagementMain_view</view> + </neonViewReference> + <neonViewReference> + <name>aa5aab07-8093-4c3f-802e-3c5e2f15a307</name> + <view>KnowledgeManagementFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>1c97f522-d463-42ce-ae31-2973b48f9be4</name> + <view>KnowledgeManagementPreview_view</view> + </neonViewReference> + <neonViewReference> + <name>3977743f-ab3a-472e-bb80-cea475f48aaa</name> + <view>KnowledgeManagementEdit_view</view> + </neonViewReference> + <neonViewReference> + <name>d6960882-2d57-40e1-b5bf-bf317e0ca9f4</name> + <view>KnowledgeManagementDetails_view</view> + </neonViewReference> + <neonViewReference> + <name>d94d09f3-b02c-4b8d-849e-c15d3fcbb393</name> + <view>KnowledgeManagementLookup_view</view> + </neonViewReference> + <neonViewReference> + <name>d94d09f3-b02c-4b8d-849e-c15d3fcbb394</name> + <view>KnowledgeManagementTimeline_view</view> + </neonViewReference> + <neonViewReference> + <name>4e903d37-f2ac-4368-99aa-aee2492a03dc</name> + <view>KnowledgeManagementRole_view</view> + </neonViewReference> + <neonViewReference> + <name>be95c2fc-b29b-4d46-a8fc-0d79c09f67b6</name> + <view>KnowledgeManagementContent_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonContext/KnowledgeManagementTagList/KnowledgeManagementTagList.aod b/neonContext/KnowledgeManagementTagList/KnowledgeManagementTagList.aod new file mode 100644 index 0000000000000000000000000000000000000000..979843a0d36ef659b596db11b4c04db6a524268e --- /dev/null +++ b/neonContext/KnowledgeManagementTagList/KnowledgeManagementTagList.aod @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext 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/neonContext/1.1.1"> + <name>KnowledgeManagementTagList</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <entity>KnowledgeManagementTagList_entity</entity> +</neonContext> diff --git a/neonContext/KnowledgeManagementTags/KnowledgeManagementTags.aod b/neonContext/KnowledgeManagementTags/KnowledgeManagementTags.aod new file mode 100644 index 0000000000000000000000000000000000000000..038ba14e3878092dbc7720df38e3a45229b70518 --- /dev/null +++ b/neonContext/KnowledgeManagementTags/KnowledgeManagementTags.aod @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext 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/neonContext/1.1.1"> + <name>KnowledgeManagementTags</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <entity>KnowledgeManagementTags_entity</entity> + <references> + <neonViewReference> + <name>019050b1-db8f-4900-9ad1-d412cc9ec5b5</name> + <view>KnowledgeTagList_view</view> + </neonViewReference> + <neonViewReference> + <name>82e1dc21-123d-41f1-b9b7-cdd0a3c3d4c9</name> + <view>KnowledgeTagList_GenMult_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonContext/KnowledgeNewsFeed/KnowledgeNewsFeed.aod b/neonContext/KnowledgeNewsFeed/KnowledgeNewsFeed.aod new file mode 100644 index 0000000000000000000000000000000000000000..ecb8b2484303f956026174396a3144998b9cc3fc --- /dev/null +++ b/neonContext/KnowledgeNewsFeed/KnowledgeNewsFeed.aod @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext 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/neonContext/1.1.1"> + <name>KnowledgeNewsFeed</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <mainView>KnowledgeNewsFeed_view</mainView> + <filterView>KnowledgeNewsFeed_view</filterView> + <entity>KnowledgeNewsFeed_entity</entity> + <references> + <neonViewReference> + <name>a6965156-ab52-4520-a3be-1351eacd863d</name> + <view>KnowledgeNewsFeed_view</view> + </neonViewReference> + <neonViewReference> + <name>e4604c82-a42f-47c6-a1d1-0f1d1727ee38</name> + </neonViewReference> + </references> +</neonContext> diff --git a/neonContext/KnowledgeRole/KnowledgeRole.aod b/neonContext/KnowledgeRole/KnowledgeRole.aod new file mode 100644 index 0000000000000000000000000000000000000000..a41da5ae918b712afae42092d543094a77a81188 --- /dev/null +++ b/neonContext/KnowledgeRole/KnowledgeRole.aod @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext 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/neonContext/1.1.1"> + <name>KnowledgeRole</name> + <title>Knowledge Role</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <entity>KnowledgeRole_entity</entity> + <references> + <neonViewReference> + <name>d36e2044-65ed-4055-89ad-e8488f43123d</name> + <view>KnowledgeRoleEdit_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonNotificationType/News/News.aod b/neonNotificationType/News/News.aod new file mode 100644 index 0000000000000000000000000000000000000000..239ea9b1feb37d6ba9407cd6ff015dd715abaa08 --- /dev/null +++ b/neonNotificationType/News/News.aod @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonNotificationType xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonNotificationType/1.1.0"> + <name>News</name> + <title>News</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:NEWSPAPER</icon> +</neonNotificationType> diff --git a/neonView/ActivityFilter_view/ActivityFilter_view.aod b/neonView/ActivityFilter_view/ActivityFilter_view.aod index a94234cc3f8111fcfbd178556efd0d9f5b4be5a6..3dff8e3ef367495de8cf892a5ce093874ad6a900 100644 --- a/neonView/ActivityFilter_view/ActivityFilter_view.aod +++ b/neonView/ActivityFilter_view/ActivityFilter_view.aod @@ -16,7 +16,7 @@ <categories> <neonDashletCategory> <name>contactmanagement</name> - <title>Contactmanagement</title> + <title>Contact Management</title> </neonDashletCategory> </categories> </neonDashletConfiguration> @@ -31,7 +31,7 @@ <categories> <neonDashletCategory> <name>contactmanagement</name> - <title>Contactmanagement</title> + <title>Contact Management</title> </neonDashletCategory> </categories> <parameters> diff --git a/neonView/AdminViewRow_view/AdminViewRow_view.aod b/neonView/AdminViewRow_view/AdminViewRow_view.aod index ddb44338654f0ae8150274622336ec6b45bba50e..cd5a8658bb4b433a42fd9e83b2ecd310d412389d 100644 --- a/neonView/AdminViewRow_view/AdminViewRow_view.aod +++ b/neonView/AdminViewRow_view/AdminViewRow_view.aod @@ -3,22 +3,16 @@ <name>AdminViewRow_view</name> <majorModelMode>DISTRIBUTED</majorModelMode> <layout> - <noneLayout> + <boxLayout> <name>layout</name> - </noneLayout> + </boxLayout> </layout> <children> - <titledListViewTemplate> - <name>TitledList</name> + <actionListViewTemplate> + <name>ActionList</name> <titleField>TITLE</titleField> - <fixedDrawer v="true" /> - <entityField>#ENTITY</entityField> - <columns> - <neonTitledListTableColumn> - <name>d42ddaa4-1996-41b3-be19-2f3c721f9536</name> - <entityField>VALUE</entityField> - </neonTitledListTableColumn> - </columns> - </titledListViewTemplate> + <descriptionField>VALUE</descriptionField> + <entryAction>copyValueToClipboard</entryAction> + </actionListViewTemplate> </children> </neonView> diff --git a/neonView/CampaignCostChart_view/CampaignCostChart_view.aod b/neonView/CampaignCostChart_view/CampaignCostChart_view.aod index 9c8daa4a4eb3d5133e1831909f0c9f0c7b9712f8..24159367f94612a4b7887229f13a811a9d4c1acc 100644 --- a/neonView/CampaignCostChart_view/CampaignCostChart_view.aod +++ b/neonView/CampaignCostChart_view/CampaignCostChart_view.aod @@ -5,7 +5,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>CampaignCostsChart</name> - <title>Campaign costs</title> + <title>Campaign Costs</title> <description>Shows campaing costs graphically processed</description> <fragment>Campaign/full</fragment> <singleton v="true" /> diff --git a/neonView/CampaignFilter_view/CampaignFilter_view.aod b/neonView/CampaignFilter_view/CampaignFilter_view.aod index 0dcb198305db9a4021ace200c99df40b0018904d..4d7c3aac1c158be044fc069bf96cff0cf4c12a3c 100644 --- a/neonView/CampaignFilter_view/CampaignFilter_view.aod +++ b/neonView/CampaignFilter_view/CampaignFilter_view.aod @@ -8,7 +8,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>CurrentUsersOwnedCampaigns</name> - <title>My campaigns</title> + <title>My Campaigns</title> <description>Show my campaigns</description> <fragment>Campaign/filter</fragment> <singleton v="true" /> diff --git a/neonView/DefaultAdminView_view/DefaultAdminView_view.aod b/neonView/DefaultAdminView_view/DefaultAdminView_view.aod index dbd985c9477eb4df3b09527182866eddc41f9fb9..dcba6ff281318aaf3c687579d0dc84e77d088485 100644 --- a/neonView/DefaultAdminView_view/DefaultAdminView_view.aod +++ b/neonView/DefaultAdminView_view/DefaultAdminView_view.aod @@ -5,11 +5,21 @@ <size>SMALL</size> <overlayOrientation>PORTRAIT</overlayOrientation> <layout> - <noneLayout> + <boxLayout> <name>layout</name> - </noneLayout> + </boxLayout> </layout> <children> + <genericViewTemplate> + <name>EntityInfo</name> + <isEditable v="false" /> + <fields> + <entityFieldLink> + <name>09fb02da-699a-431b-8a5c-a22396ddf5b5</name> + <entityField>ENTITY</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> <neonViewReference> <name>80206d15-7132-45c1-9cf5-e2236d0f2fdb</name> <entityField>Rows</entityField> diff --git a/neonView/KnowledgeDiscussionEdit_view/KnowledgeDiscussionEdit_view.aod b/neonView/KnowledgeDiscussionEdit_view/KnowledgeDiscussionEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..8982a1358125b81e9ea28dacb3380a4924538b75 --- /dev/null +++ b/neonView/KnowledgeDiscussionEdit_view/KnowledgeDiscussionEdit_view.aod @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeDiscussionEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <size>SMALL</size> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>Generic</name> + <editMode v="true" /> + <drawerCaption>Discussion</drawerCaption> + <fixedDrawer v="true" /> + <hideLabels v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>c87217ce-184e-4436-9b58-0d20b218c864</name> + <entityField>DISCUSSIONTEXT</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeDiscussionPreview_view/KnowledgeDiscussionPreview_view.aod b/neonView/KnowledgeDiscussionPreview_view/KnowledgeDiscussionPreview_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..e98045a42c239c7ba0ac505595373871d633bd4f --- /dev/null +++ b/neonView/KnowledgeDiscussionPreview_view/KnowledgeDiscussionPreview_view.aod @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeDiscussionPreview_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <size>SMALL</size> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>Text</name> + <editMode v="false" /> + <drawerCaption>Discussion</drawerCaption> + <fixedDrawer v="true" /> + <hideLabels v="true" /> + <entityField>#ENTITY</entityField> + <title>Discussion</title> + <devices> + <element>MOBILE</element> + <element>TABLET</element> + <element>DESKTOP</element> + </devices> + <fields> + <entityFieldLink> + <name>672eae9f-abfb-4256-879b-6ceb945bff4d</name> + <entityField>discussionTitle</entityField> + </entityFieldLink> + <entityFieldLink> + <name>c0ff5819-7bb6-4e7b-b051-bb4d74fe10c1</name> + <entityField>DISCUSSIONTEXT</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeDiscussionTree_view/KnowledgeDiscussionTree_view.aod b/neonView/KnowledgeDiscussionTree_view/KnowledgeDiscussionTree_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..ec4ef34471b15239151ca9603f34964ceda1cbcd --- /dev/null +++ b/neonView/KnowledgeDiscussionTree_view/KnowledgeDiscussionTree_view.aod @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeDiscussionTree_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <treeTableViewTemplate> + <name>Treetable</name> + <parentField>PARENTENTRY</parentField> + <favoriteActionGroup1>Edit_ActionGroup</favoriteActionGroup1> + <entityField>#ENTITY</entityField> + <title>Discussions</title> + <columns> + <neonTreeTableColumn> + <name>0462213d-ce08-44e8-9a78-8fd761ca13ce</name> + <entityField>#ICON</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>be38dc3a-7295-407b-afa3-a409348985c8</name> + <entityField>DISCUSSIONTEXT</entityField> + </neonTreeTableColumn> + <neonTreeTableColumn> + <name>924ee584-22b6-4fa8-9b7d-a22b45e05c10</name> + <entityField>discussionTitle</entityField> + </neonTreeTableColumn> + </columns> + </treeTableViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeLinkActionList_view/KnowledgeLinkActionList_view.aod b/neonView/KnowledgeLinkActionList_view/KnowledgeLinkActionList_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..23ed8823319a976056fe99e089fbfef34a181fd2 --- /dev/null +++ b/neonView/KnowledgeLinkActionList_view/KnowledgeLinkActionList_view.aod @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeLinkActionList_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <actionListViewTemplate> + <name>ActionList</name> + <titleField>ROW_ID</titleField> + <descriptionField>OBJECT_TYPE</descriptionField> + <iconField>#ICON</iconField> + <entityField>#ENTITY</entityField> + </actionListViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeLinkEdit_view/KnowledgeLinkEdit_view.aod b/neonView/KnowledgeLinkEdit_view/KnowledgeLinkEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..34e51015d714cc08e473abe61060d2cfbda2c611 --- /dev/null +++ b/neonView/KnowledgeLinkEdit_view/KnowledgeLinkEdit_view.aod @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeLinkEdit_view</name> + <title>Links</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <size>SMALL</size> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>Edit</name> + <editMode v="true" /> + <drawerCaption>Link</drawerCaption> + <hideEmptyFields v="false" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>4dce246e-8ac8-491f-bc77-fc2d6ef9f62d</name> + <entityField>OBJECT_TYPE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>7fedd111-a1d3-4159-b206-11d11d80c769</name> + <entityField>ROW_ID</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeLinkLookup_view/KnowledgeLinkLookup_view.aod b/neonView/KnowledgeLinkLookup_view/KnowledgeLinkLookup_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..49df3025f21d176be96bea6728b179764148070c --- /dev/null +++ b/neonView/KnowledgeLinkLookup_view/KnowledgeLinkLookup_view.aod @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeLinkLookup_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>TableLooukup</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>5e32fe5d-6932-4c68-b5fd-2c995ba8fbd2</name> + <entityField>OBJECT_TYPE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>a180c48b-1e09-4e84-ad4d-92aeeb4b6542</name> + <entityField>ROW_ID</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeLinkMultiEdit_view/KnowledgeLinkMultiEdit_view.aod b/neonView/KnowledgeLinkMultiEdit_view/KnowledgeLinkMultiEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..0b3448b225cd0b231c554715f931b86acea8e7a0 --- /dev/null +++ b/neonView/KnowledgeLinkMultiEdit_view/KnowledgeLinkMultiEdit_view.aod @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeLinkMultiEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <size>SMALL</size> + <layout> + <boxLayout> + <name>layout</name> + <autoHeight v="true" /> + </boxLayout> + </layout> + <children> + <genericMultipleViewTemplate> + <name>MultiEdit</name> + <entityField>#ENTITY</entityField> + <title>Verknüpfungen</title> + <columns> + <neonGenericMultipleTableColumn> + <name>eb1bc3cb-3cf0-479c-901f-906a7ddde485</name> + <entityField>OBJECT_TYPE</entityField> + </neonGenericMultipleTableColumn> + <neonGenericMultipleTableColumn> + <name>331a348d-efdd-4a1b-a140-2c0b2adc27f0</name> + <entityField>ROW_ID</entityField> + </neonGenericMultipleTableColumn> + </columns> + </genericMultipleViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeManagementContent_view/KnowledgeManagementContent_view.aod b/neonView/KnowledgeManagementContent_view/KnowledgeManagementContent_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..2318cac28850af5be02942a87ed574063dee9c3f --- /dev/null +++ b/neonView/KnowledgeManagementContent_view/KnowledgeManagementContent_view.aod @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeManagementContent_view</name> + <title>Content</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <webContentViewTemplate> + <name>htmlContent</name> + <entityField>htmlView</entityField> + </webContentViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeManagementDetails_view/KnowledgeManagementDetails_view.aod b/neonView/KnowledgeManagementDetails_view/KnowledgeManagementDetails_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..43c26e82585c0e23b39d4a02cb3cb894b1f29a18 --- /dev/null +++ b/neonView/KnowledgeManagementDetails_view/KnowledgeManagementDetails_view.aod @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeManagementDetails_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <headerFooterLayout> + <name>layout</name> + <header>KnowledgeDetails</header> + </headerFooterLayout> + </layout> + <children> + <cardViewTemplate> + <name>KnowledgeDetails</name> + <iconField>#ICON</iconField> + <titleField>TITLE</titleField> + <subtitleField>LastChange</subtitleField> + <entityField>#ENTITY</entityField> + <isEditable v="false" /> + </cardViewTemplate> + <favoriteViewTemplate> + <name>favorites</name> + <objectType>KNOWLEDGEMANAGEMENT_OBJECTTYPE</objectType> + <rowId>#UID</rowId> + <entityField>#ENTITY</entityField> + <title>Favoriten</title> + </favoriteViewTemplate> + <genericViewTemplate> + <name>Details</name> + <showDrawer v="true" /> + <drawerCaption>Details</drawerCaption> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>2ed87edf-4aed-42cd-9ebe-f206810c86a7</name> + <entityField>AUTHOR_CONTACT_ID</entityField> + </entityFieldLink> + <entityFieldLink> + <name>e9d5fe54-9261-4ca4-9c20-c839c8d26395</name> + <entityField>RESPONSIBLE_CONTACT_ID</entityField> + </entityFieldLink> + <entityFieldLink> + <name>1248f0fc-e370-42e5-8d64-6d89da366580</name> + <entityField>DATE_NEW</entityField> + </entityFieldLink> + <entityFieldLink> + <name>59c020ac-3b20-45b4-83ce-d0e7bb9372ad</name> + <entityField>DATE_EDIT</entityField> + </entityFieldLink> + <entityFieldLink> + <name>6252c147-e35f-4c54-8e9c-f65eee2d5283</name> + <entityField>PUBLISH</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + <neonViewReference> + <name>9322369a-d82b-402e-aaff-dedac00d1971</name> + <entityField>TagsByKnowledgeId</entityField> + <view>KnowledgeTagList_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/KnowledgeManagementEdit_view/KnowledgeManagementEdit_view.aod b/neonView/KnowledgeManagementEdit_view/KnowledgeManagementEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..5d41560c646764c463f88de8f3b61babc65f771f --- /dev/null +++ b/neonView/KnowledgeManagementEdit_view/KnowledgeManagementEdit_view.aod @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeManagementEdit_view</name> + <title>Knowledge</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:ACADEMY_CAP</icon> + <size>NORMAL</size> + <quickEntry v="6" /> + <layout> + <boxLayout> + <name>layout</name> + <autoHeight v="true" /> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>Details</name> + <editMode v="true" /> + <drawerCaption></drawerCaption> + <entityField>#ENTITY</entityField> + <title></title> + <devices> + <element>MOBILE</element> + <element>TABLET</element> + <element>DESKTOP</element> + </devices> + <fields> + <entityFieldLink> + <name>7be58130-991a-47e3-89d7-d01fc531ddd6</name> + <entityField>TITLE</entityField> + </entityFieldLink> + <entityFieldLink> + <name>59c18990-a0e2-4cbd-b728-f156a421081f</name> + <entityField>CONTENT</entityField> + </entityFieldLink> + <entityFieldLink> + <name>781765cb-93a4-431e-bc92-9bef2a17e39f</name> + <entityField>AUTHOR_CONTACT_ID</entityField> + </entityFieldLink> + <entityFieldLink> + <name>776ee39f-b666-4168-a758-0c17a3ed41a5</name> + <entityField>RESPONSIBLE_CONTACT_ID</entityField> + </entityFieldLink> + <entityFieldLink> + <name>bfa39723-52e1-45e5-945c-cc1db1c81b81</name> + <entityField>PUBLISH</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + <neonViewReference> + <name>a62e4251-76b5-427c-b758-ae57bcdf5956</name> + <entityField>TagsByKnowledgeId</entityField> + <view>KnowledgeTagList_GenMult_view</view> + </neonViewReference> + <neonViewReference> + <name>6ac6f960-eaf3-4196-acc8-f516184215f1</name> + <entityField>LinksByKnowledgeId</entityField> + <view>KnowledgeLinkMultiEdit_view</view> + </neonViewReference> + <genericViewTemplate> + <name>genericc</name> + <editMode v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>a753ed28-28fa-402e-a98f-5fa0301158b2</name> + <entityField>isNewsMark</entityField> + </entityFieldLink> + <entityFieldLink> + <name>54f5adf2-800e-4dae-a4a0-7a9fb16ed083</name> + <entityField>notificationMark</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + <neonViewReference> + <name>2649f436-3025-4f0b-bbd4-580e5dcf2cba</name> + <entityField>KnowledgeRoles</entityField> + <view>KnowledgeRoleEdit_view</view> + </neonViewReference> + <neonViewReference> + <name>ed706714-6290-4d6b-9e59-7e8833e8936f</name> + <entityField>LinkedDocuments</entityField> + <view>DocumentMultipleEdit_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/KnowledgeManagementFilter_view/KnowledgeManagementFilter_view.aod b/neonView/KnowledgeManagementFilter_view/KnowledgeManagementFilter_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..69bb0a57328b9d60c7dd86c5b02d76b6b15d6298 --- /dev/null +++ b/neonView/KnowledgeManagementFilter_view/KnowledgeManagementFilter_view.aod @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeManagementFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <dashletConfigurations> + <neonDashletConfiguration> + <name>Knowledge</name> + <title>Knowledge</title> + <description>All Knowledge Entries</description> + <fragment>KnowledgeManagement/filter</fragment> + <icon>VAADIN:ACADEMY_CAP</icon> + <categories> + <neonDashletCategory> + <name>knowledge</name> + <title>Knowledge</title> + </neonDashletCategory> + </categories> + </neonDashletConfiguration> + </dashletConfigurations> + <layout> + <groupLayout> + <name>layout</name> + </groupLayout> + </layout> + <children> + <tableViewTemplate> + <name>FilterTable</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>6536f7bc-b655-4011-b8ce-20b27fb0f656</name> + <entityField>#ICON</entityField> + </neonTableColumn> + <neonTableColumn> + <name>6a5fd77d-537b-4f27-a372-93838a76ff2e</name> + <entityField>TITLE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>69905c5d-27c4-49aa-a10c-589fee93b67b</name> + <entityField>AUTHOR_CONTACT_ID</entityField> + </neonTableColumn> + <neonTableColumn> + <name>6f9daef0-872f-486c-8d1b-19fbde27efff</name> + <entityField>LastChange</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + <timelineViewTemplate> + <name>Timeline</name> + <dateField>LastChange</dateField> + <titleField>TITLE</titleField> + <descriptionField>CONTENT</descriptionField> + <subdescriptionField>AUTHOR_CONTACT_ID</subdescriptionField> + </timelineViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeManagementLookup_view/KnowledgeManagementLookup_view.aod b/neonView/KnowledgeManagementLookup_view/KnowledgeManagementLookup_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..8b9981d87da43b9463552ea737e987bbc3bbcef0 --- /dev/null +++ b/neonView/KnowledgeManagementLookup_view/KnowledgeManagementLookup_view.aod @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeManagementLookup_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <tableViewTemplate> + <name>LookupTable</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>5a7ab4ba-48a5-47bf-95e9-5631938af5b2</name> + <entityField>#IMAGE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>b715bc0e-a6b7-478d-9aaf-9bc212812650</name> + <entityField>ViewKnowledgeNumber</entityField> + </neonTableColumn> + <neonTableColumn> + <name>4176e200-836f-475c-bc35-ae9c27bf1ed9</name> + <entityField>TITLE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>0afc1762-3889-4eb5-bef9-4c14cd648eb6</name> + <entityField>CONTENTDECODED</entityField> + </neonTableColumn> + </columns> + </tableViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeManagementMain_view/KnowledgeManagementMain_view.aod b/neonView/KnowledgeManagementMain_view/KnowledgeManagementMain_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..dd357ba38b8129753cd65065742eada940bf7268 --- /dev/null +++ b/neonView/KnowledgeManagementMain_view/KnowledgeManagementMain_view.aod @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeManagementMain_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <masterSlaveLayout> + <name>layout</name> + <master>88686b9f-0333-4f8b-a24d-c1018bcf394b</master> + </masterSlaveLayout> + </layout> + <children> + <neonViewReference> + <name>88686b9f-0333-4f8b-a24d-c1018bcf394b</name> + <entityField>#ENTITY</entityField> + <view>KnowledgeManagementDetails_view</view> + </neonViewReference> + <neonViewReference> + <name>0c32cd6f-82a6-466a-9a71-16eeeb9c6890</name> + <entityField>#ENTITY</entityField> + <view>KnowledgeManagementContent_view</view> + </neonViewReference> + <neonViewReference> + <name>79fcef8e-c0ba-4463-a239-6faf332b6bc9</name> + <entityField>DiscussionsByKnowledgeId</entityField> + <view>KnowledgeDiscussionTree_view</view> + </neonViewReference> + <neonViewReference> + <name>914652b1-891f-4d79-a9e8-766a792da539</name> + <entityField>LinkedDocuments</entityField> + <view>DocumentFilter_view</view> + </neonViewReference> + <neonViewReference> + <name>b03ac69f-ed82-4a90-87b0-89d1822c749a</name> + <entityField>LinksByKnowledgeId</entityField> + <view>KnowledgeLinkLookup_view</view> + </neonViewReference> + <neonViewReference> + <name>40b21927-4fb9-46f3-8e99-682b1a114d19</name> + <entityField>LogHistories</entityField> + <view>LogHistoryFilter_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/KnowledgeManagementPreview_view/KnowledgeManagementPreview_view.aod b/neonView/KnowledgeManagementPreview_view/KnowledgeManagementPreview_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..e8ae6cd155b35cd92bed414f8b606171770f19fd --- /dev/null +++ b/neonView/KnowledgeManagementPreview_view/KnowledgeManagementPreview_view.aod @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeManagementPreview_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <headerFooterLayout> + <name>layout</name> + </headerFooterLayout> + </layout> + <children> + <webContentViewTemplate> + <name>PreviewHTML</name> + <height v="6000" /> + <entityField>htmlView</entityField> + </webContentViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeManagementRole_view/KnowledgeManagementRole_view.aod b/neonView/KnowledgeManagementRole_view/KnowledgeManagementRole_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..ef4ea428e8507d991c7faa803080e79b0f6feb88 --- /dev/null +++ b/neonView/KnowledgeManagementRole_view/KnowledgeManagementRole_view.aod @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeManagementRole_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + <autoHeight v="true" /> + </boxLayout> + </layout> + <children> + <genericViewTemplate> + <name>Roles</name> + <editMode v="true" /> + <entityField>#ENTITY</entityField> + <fields> + <entityFieldLink> + <name>f339bf74-1d3e-4584-8961-eebb730221dd</name> + <entityField>isNewsMark</entityField> + </entityFieldLink> + <entityFieldLink> + <name>6c6c1ee1-421c-4102-9ed4-a2770f8cc58c</name> + <entityField>notificationMark</entityField> + </entityFieldLink> + </fields> + </genericViewTemplate> + <neonViewReference> + <name>15f19382-186c-4ca7-b3f6-e7efa11a7edb</name> + <entityField>KnowledgeRoles</entityField> + <view>KnowledgeRoleEdit_view</view> + </neonViewReference> + </children> +</neonView> diff --git a/neonView/KnowledgeManagementTimeline_view/KnowledgeManagementTimeline_view.aod b/neonView/KnowledgeManagementTimeline_view/KnowledgeManagementTimeline_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..0dab386afebcd71c6651be4acf7161e3f3a71c95 --- /dev/null +++ b/neonView/KnowledgeManagementTimeline_view/KnowledgeManagementTimeline_view.aod @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeManagementTimeline_view</name> + <title>Newsfeed (Preview)</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <filterable v="true" /> + <dashletConfigurations> + <neonDashletConfiguration> + <name>timelineDashletConfig</name> + <title>Newsfeed (Preview)</title> + <fragment>KnowledgeManagement/filter</fragment> + <icon>NEON:TIMELINE</icon> + <categories> + <neonDashletCategory> + <name>knowledge</name> + <title>Knowledge</title> + </neonDashletCategory> + </categories> + <parameters> + <neonDashletParameter> + <name>isDashlet_param</name> + <value>true</value> + </neonDashletParameter> + </parameters> + </neonDashletConfiguration> + </dashletConfigurations> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <timelineViewTemplate> + <name>time</name> + <dateField>LastChange</dateField> + <titleField>TITLE</titleField> + <descriptionField>CONTENT</descriptionField> + <subdescriptionField>AUTHOR_CONTACT_ID</subdescriptionField> + <entityField>#ENTITY</entityField> + <isDeletable v="false" /> + <isEditable v="false" /> + <title>Newsfeed Timeline</title> + <isCreatable v="false" /> + </timelineViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeNewsFeed_view/KnowledgeNewsFeed_view.aod b/neonView/KnowledgeNewsFeed_view/KnowledgeNewsFeed_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..e0334d035e7a99758544d71f93a5536f3f0dcea3 --- /dev/null +++ b/neonView/KnowledgeNewsFeed_view/KnowledgeNewsFeed_view.aod @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeNewsFeed_view</name> + <title>Newsfeed (Complete Article)</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <dashletConfigurations> + <neonDashletConfiguration> + <name>knowledgeNewsFeed_dashletConfig</name> + <title>Newsfeed (Full)</title> + <description>Shows complete news articles</description> + <fragment>KnowledgeNewsFeed/filter</fragment> + <icon>VAADIN:NEWSPAPER</icon> + <categories> + <neonDashletCategory> + <name>knowledge</name> + <title>Knowledge</title> + </neonDashletCategory> + </categories> + </neonDashletConfiguration> + </dashletConfigurations> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <webContentViewTemplate> + <name>WebContent</name> + <entityField>HTMLContent</entityField> + <devices> + <element>MOBILE</element> + <element>TABLET</element> + <element>DESKTOP</element> + </devices> + </webContentViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeRoleEdit_view/KnowledgeRoleEdit_view.aod b/neonView/KnowledgeRoleEdit_view/KnowledgeRoleEdit_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..5d6473c3512dc0a2b0d09d953b4e5ad012fcc4f4 --- /dev/null +++ b/neonView/KnowledgeRoleEdit_view/KnowledgeRoleEdit_view.aod @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeRoleEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + <autoHeight v="true" /> + </boxLayout> + </layout> + <children> + <genericMultipleViewTemplate> + <name>GenericMultiple</name> + <entityField>#ENTITY</entityField> + <title>Roles</title> + <columns> + <neonGenericMultipleTableColumn> + <name>8fc4c848-f071-4c9d-b764-8d03e750937a</name> + <entityField>ROLES</entityField> + <fullWidth v="true" /> + </neonGenericMultipleTableColumn> + <neonGenericMultipleTableColumn> + <name>23bbcd15-8d81-4d82-82c8-890a0091ccff</name> + <entityField>KNOWLEDGEMANAGMENT_ID</entityField> + <fullWidth v="false" /> + </neonGenericMultipleTableColumn> + </columns> + </genericMultipleViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeTagList_GenMult_view/KnowledgeTagList_GenMult_view.aod b/neonView/KnowledgeTagList_GenMult_view/KnowledgeTagList_GenMult_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..15748243a6829bd8de904a1c01e4e38acae26c43 --- /dev/null +++ b/neonView/KnowledgeTagList_GenMult_view/KnowledgeTagList_GenMult_view.aod @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeTagList_GenMult_view</name> + <title>Tags</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <size>SMALL</size> + <layout> + <boxLayout> + <name>layout</name> + <autoHeight v="true" /> + </boxLayout> + </layout> + <children> + <genericMultipleViewTemplate> + <name>TagList</name> + <entityField>#ENTITY</entityField> + <title>Tags</title> + <columns> + <neonGenericMultipleTableColumn> + <name>7a59bcdd-e807-44db-9b5e-7b389ab10db8</name> + <entityField>TAG</entityField> + <fullWidth v="true" /> + </neonGenericMultipleTableColumn> + </columns> + </genericMultipleViewTemplate> + </children> +</neonView> diff --git a/neonView/KnowledgeTagList_view/KnowledgeTagList_view.aod b/neonView/KnowledgeTagList_view/KnowledgeTagList_view.aod new file mode 100644 index 0000000000000000000000000000000000000000..61be3f1b770f229a18e8d2f754a91a15ea38fd8b --- /dev/null +++ b/neonView/KnowledgeTagList_view/KnowledgeTagList_view.aod @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> + <name>KnowledgeTagList_view</name> + <title>Tags</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <titledListViewTemplate> + <name>TagList</name> + <entityField>#ENTITY</entityField> + <title>Tags</title> + <columns> + <neonTitledListTableColumn> + <name>03ec809f-d410-4247-98a8-50022222c785</name> + <entityField>TAG</entityField> + <fullWidth v="true" /> + </neonTitledListTableColumn> + </columns> + </titledListViewTemplate> + </children> +</neonView> diff --git a/neonView/MyDashboardScoreCard_view/MyDashboardScoreCard_view.aod b/neonView/MyDashboardScoreCard_view/MyDashboardScoreCard_view.aod index 723a24964e2f2b1d78bb42e38728212ea9c257c8..2c2b62c43e2b9117a8b95aeaa0c72d42a74647d1 100644 --- a/neonView/MyDashboardScoreCard_view/MyDashboardScoreCard_view.aod +++ b/neonView/MyDashboardScoreCard_view/MyDashboardScoreCard_view.aod @@ -13,7 +13,7 @@ <categories> <neonDashletCategory> <name>contactmanagement</name> - <title>Contactmanagement</title> + <title>Contact Management</title> </neonDashletCategory> </categories> </neonDashletConfiguration> diff --git a/neonView/OfferFilter_view/OfferFilter_view.aod b/neonView/OfferFilter_view/OfferFilter_view.aod index dcfe1e8da8909c739b4d2d7d7cfad05ed4272a66..3e058b7c388417269c73cd30d2ad9e2000be1064 100644 --- a/neonView/OfferFilter_view/OfferFilter_view.aod +++ b/neonView/OfferFilter_view/OfferFilter_view.aod @@ -25,7 +25,7 @@ </neonDashletConfiguration> <neonDashletConfiguration> <name>SendOffersDashlet</name> - <title>Sent offers</title> + <title>Sent Offers</title> <description>Show all sent offers</description> <fragment>Offer/filter</fragment> <singleton v="true" /> diff --git a/neonView/OrderFilter_view/OrderFilter_view.aod b/neonView/OrderFilter_view/OrderFilter_view.aod index 31110f64b91a482ce3b2a3122f0c45fd722a81d9..c2afbae5ef609d323e04c8cef7455021e0f88def 100644 --- a/neonView/OrderFilter_view/OrderFilter_view.aod +++ b/neonView/OrderFilter_view/OrderFilter_view.aod @@ -25,7 +25,7 @@ </neonDashletConfiguration> <neonDashletConfiguration> <name>SendOrdersDashlet</name> - <title>Sent receipts</title> + <title>Sent Receipts</title> <description>Show all sent receipts</description> <fragment>Order/filter?search=eyJ0eXBlIjoiZ3JvdXAiLCJvcGVyYXRvciI6IkFORCIsImNoaWxkcyI6W3sidHlwZSI6InJvdyIsIm5hbWUiOiJPUkRFUlNUQVRVUyIsIm9wZXJhdG9yIjoiQ09OVEFJTlMiLCJ2YWx1ZSI6IkphIiwia2V5IjoiMSIsImNvbnRlbnR0eXBlIjoiQk9PTEVBTiJ9XX0%3D</fragment> <singleton v="false" /> diff --git a/neonView/OrganisationFilter_view/OrganisationFilter_view.aod b/neonView/OrganisationFilter_view/OrganisationFilter_view.aod index 1cbde0c53092405404ec0d317720691ca55d14e3..8fdf03af01df304cbc91a44895bc3912a2c3cc4b 100644 --- a/neonView/OrganisationFilter_view/OrganisationFilter_view.aod +++ b/neonView/OrganisationFilter_view/OrganisationFilter_view.aod @@ -15,13 +15,13 @@ <categories> <neonDashletCategory> <name>contactmanagement</name> - <title>Contactmanagement</title> + <title>Contact Management</title> </neonDashletCategory> </categories> </neonDashletConfiguration> <neonDashletConfiguration> <name>OwnSupervisedOrganisations</name> - <title>My organisations</title> + <title>My Organisations</title> <description>Show my organisations</description> <fragment>Organisation/filter</fragment> <singleton v="false" /> @@ -30,7 +30,7 @@ <categories> <neonDashletCategory> <name>contactmanagement</name> - <title>Contactmanagement</title> + <title>Contact Management</title> </neonDashletCategory> </categories> <parameters> diff --git a/neonView/PersonFilter_view/PersonFilter_view.aod b/neonView/PersonFilter_view/PersonFilter_view.aod index 721f83815ee9106aa481022db138b8fcf77e11cb..7c17332f6979b0bd956542a2794a7ef6b001431f 100644 --- a/neonView/PersonFilter_view/PersonFilter_view.aod +++ b/neonView/PersonFilter_view/PersonFilter_view.aod @@ -15,13 +15,13 @@ <categories> <neonDashletCategory> <name>contactmanagement</name> - <title>Contactmanagement</title> + <title>Contact Management</title> </neonDashletCategory> </categories> </neonDashletConfiguration> <neonDashletConfiguration> <name>OwnSupervisedContacts</name> - <title>My contacts</title> + <title>My Contacts</title> <description>Show my contacts</description> <fragment>Person/filter</fragment> <singleton v="false" /> @@ -30,7 +30,7 @@ <categories> <neonDashletCategory> <name>contactmanagement</name> - <title>Contactmanagement</title> + <title>Contact Management</title> </neonDashletCategory> </categories> <parameters> diff --git a/neonView/SalesprojectAnalyses_view/SalesprojectAnalyses_view.aod b/neonView/SalesprojectAnalyses_view/SalesprojectAnalyses_view.aod index 67c3c7369040ce1004d8d223db8fa989e450cef7..8ed958a995286eb7e91f5ea8fd0de16b10b2e214 100644 --- a/neonView/SalesprojectAnalyses_view/SalesprojectAnalyses_view.aod +++ b/neonView/SalesprojectAnalyses_view/SalesprojectAnalyses_view.aod @@ -6,7 +6,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>SalesprojectPhases</name> - <title>Salesproject phases</title> + <title>Sales Project Phases</title> <description>Shows how many sales projects are in the various sales phases</description> <fragment>Salesproject/filter?search=eyJ0eXBlIjoiZ3JvdXAiLCJvcGVyYXRvciI6IkFORCIsImNoaWxkcyI6W3sidHlwZSI6InJvdyIsIm5hbWUiOiJQSEFTRSIsIm9wZXJhdG9yIjoiTk9UX0VRVUFMIiwidmFsdWUiOiJOZWdvdGlhdGlvbiIsImtleSI6IlNBTFBST0pQSEFTRU5FR08iLCJjb250ZW50dHlwZSI6IlRFWFQifSx7InR5cGUiOiJyb3ciLCJuYW1lIjoiU1RBVFVTIiwib3BlcmF0b3IiOiJFUVVBTCIsInZhbHVlIjoiT2ZmZW4iLCJrZXkiOiJTQUxQUk9KU1RBVE9QRU4iLCJjb250ZW50dHlwZSI6IlRFWFQifV19&axes=COUNT&grouping=%23EXTENSION.Phase_filterExtention.Phase_filterExtention%23TEXT</fragment> <singleton v="true" /> diff --git a/neonView/SalesprojectConversionRate_view/SalesprojectConversionRate_view.aod b/neonView/SalesprojectConversionRate_view/SalesprojectConversionRate_view.aod index dfb2ef2e310f8697d97db79098d64d03f61f8b7f..c17221595c4bba474e17448187b33e190fca79d8 100644 --- a/neonView/SalesprojectConversionRate_view/SalesprojectConversionRate_view.aod +++ b/neonView/SalesprojectConversionRate_view/SalesprojectConversionRate_view.aod @@ -6,7 +6,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>ConvertionRates</name> - <title>Salesproject Convertion Rates</title> + <title>Sales Project Convertion Rates</title> <description>Shows the different conversion rates of the sales project phases</description> <fragment>SalesprojectConversionRate/filter?search=eyJ0eXBlIjoiZ3JvdXAiLCJvcGVyYXRvciI6IkFORCIsImNoaWxkcyI6W3sidHlwZSI6InJvdyIsIm5hbWUiOiIjRVhURU5TSU9OLkRBVEVfU1RBUlQuREFURV9TVEFSVCNEQVRFIiwib3BlcmF0b3IiOiJUSU1FRlJBTUVfRVFVQUwiLCJ2YWx1ZSI6IkRpZXNlcyBKYWhyIiwia2V5IjoiUkVMPUFESlVTVEVEO1VOSVQ9WUVBUiIsImNvbnRlbnR0eXBlIjoiREFURSJ9XX0%3D&axes=conversionRate&grouping=AB_KEYWORD_ENTRYID_KEYID%2C%23EXTENSION.Month.Month%23NUMBER</fragment> <singleton v="true" /> diff --git a/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod b/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod index afcbeee47f90b46c036d3b0a22e5a903640b6dd7..04b352527d95799e97be7733ae721d540effcc0f 100644 --- a/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod +++ b/neonView/SalesprojectEdit_view/SalesprojectEdit_view.aod @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6"> <name>SalesprojectEdit_view</name> - <title>Salesproject</title> + <title>Sales Project</title> <majorModelMode>DISTRIBUTED</majorModelMode> <icon>VAADIN:FILTER</icon> <quickEntry v="6" /> diff --git a/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod b/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod index c055908d5269a0ba8e895e831523b86782eda5a0..5a88276721b08a3621d0957993345367ef7b89f7 100644 --- a/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod +++ b/neonView/SalesprojectFilter_view/SalesprojectFilter_view.aod @@ -6,7 +6,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>AllSalesprojectDashlet</name> - <title>Salesprojects</title> + <title>Sales Projects</title> <description>Show all salesprojects</description> <fragment>Salesproject/filter</fragment> <singleton v="true" /> @@ -25,7 +25,7 @@ </neonDashletConfiguration> <neonDashletConfiguration> <name>OpenSalesprojectsDashlet</name> - <title>Open salesprojects</title> + <title>Open Salesprojects</title> <description>Show open salesprojects</description> <fragment>Salesproject/filter?search=eyJ0eXBlIjoiZ3JvdXAiLCJvcGVyYXRvciI6IkFORCIsImNoaWxkcyI6W3sidHlwZSI6InJvdyIsIm5hbWUiOiJTVEFUVVMiLCJvcGVyYXRvciI6IkVRVUFMIiwidmFsdWUiOiJPZmZlbiIsImtleSI6IlNBTFBST0pTVEFUT1BFTiAgICAgICAgICAgICAgICAgICAgICIsImNvbnRlbnR0eXBlIjoiVEVYVCJ9XX0%253D</fragment> <singleton v="true" /> diff --git a/neonView/SalesprojectScoreCard_view/SalesprojectScoreCard_view.aod b/neonView/SalesprojectScoreCard_view/SalesprojectScoreCard_view.aod index d56d4278c12fe6fee75cb02baca95041ecd617f9..6a0e513a643be14140cbb9d813397460e75b34da 100644 --- a/neonView/SalesprojectScoreCard_view/SalesprojectScoreCard_view.aod +++ b/neonView/SalesprojectScoreCard_view/SalesprojectScoreCard_view.aod @@ -5,7 +5,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>KeyFigures</name> - <title>Key figures</title> + <title>Key Figures</title> <description>Most important salse key figures</description> <fragment>SalesprojectAnalyses/full</fragment> <singleton v="true" /> diff --git a/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod b/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod index 6dc1c376ae6f99ba2a9c57624194e4b709e1365a..7b5e818ce4f7b63cc5acc2d5e86ff805aa06d317 100644 --- a/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod +++ b/neonView/SupportTicketFilter_view/SupportTicketFilter_view.aod @@ -6,7 +6,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>mytickets</name> - <title>My tickets</title> + <title>My Tickets</title> <description>Show tickets where I am the editor</description> <fragment>SupportTicket/filter</fragment> <singleton v="true" /> diff --git a/neonView/TaskFilter_view/TaskFilter_view.aod b/neonView/TaskFilter_view/TaskFilter_view.aod index e42baf0ab3dbc846a09889295e65fd2bf9e2df07..77601cb3a2e8a1775811b18d1bcc1e4ba4e47f1e 100644 --- a/neonView/TaskFilter_view/TaskFilter_view.aod +++ b/neonView/TaskFilter_view/TaskFilter_view.aod @@ -16,7 +16,7 @@ <categories> <neonDashletCategory> <name>contactmanagement</name> - <title>Contactmanagement</title> + <title>Contact Management</title> </neonDashletCategory> </categories> <parameters> diff --git a/neonView/UniversalFileProcessorDropzone_view/UniversalFileProcessorDropzone_view.aod b/neonView/UniversalFileProcessorDropzone_view/UniversalFileProcessorDropzone_view.aod index 8072435ed1e7c2dd82d0177d949b9d1fea218418..441059938ffb4695c93c648ec837b9ae33bc881a 100644 --- a/neonView/UniversalFileProcessorDropzone_view/UniversalFileProcessorDropzone_view.aod +++ b/neonView/UniversalFileProcessorDropzone_view/UniversalFileProcessorDropzone_view.aod @@ -5,7 +5,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>MailDropzone</name> - <title>import mails</title> + <title>Import Mails</title> <description>Drop area for creating activities from mails</description> <fragment>UniversalFileProcessor/dropzone</fragment> <preview></preview> diff --git a/neonView/UnlinkedMailFilter_view/UnlinkedMailFilter_view.aod b/neonView/UnlinkedMailFilter_view/UnlinkedMailFilter_view.aod index 6b4b8b73154e60819b752b795acd9e93de7f23b5..fc53c28edde7f3d5d71b910bde1f7734d1406a88 100644 --- a/neonView/UnlinkedMailFilter_view/UnlinkedMailFilter_view.aod +++ b/neonView/UnlinkedMailFilter_view/UnlinkedMailFilter_view.aod @@ -5,7 +5,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>allUnlinkedMailsDashlet</name> - <title>All unlinked mails</title> + <title>All Unlinked Mails</title> <description>All mails that could not automatically linked are displayed here</description> <fragment>UnlinkedMail/filter</fragment> <icon>VAADIN:AT</icon> diff --git a/neonView/VisitPlanEntryFilter_view/VisitPlanEntryFilter_view.aod b/neonView/VisitPlanEntryFilter_view/VisitPlanEntryFilter_view.aod index 4233a41959165dbc19972cf740ef8fab1fdbece6..d98e4cb1e5a0b94cb927ad4f019a2d4e8fb3e903 100644 --- a/neonView/VisitPlanEntryFilter_view/VisitPlanEntryFilter_view.aod +++ b/neonView/VisitPlanEntryFilter_view/VisitPlanEntryFilter_view.aod @@ -6,7 +6,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>currentWeek</name> - <title>my visit planning</title> + <title>My Visit Planning</title> <description>show visit planning of the week</description> <fragment>VisitPlanEntry/filter</fragment> <singleton v="true" /> diff --git a/neonView/WorkflowTaskOwn_view/WorkflowTaskOwn_view.aod b/neonView/WorkflowTaskOwn_view/WorkflowTaskOwn_view.aod index 9e0e3392f9574849928895ee78ac1cdea5d68aa7..a6c4dbff4e545b602a01c9fbe032e59d9edea93d 100644 --- a/neonView/WorkflowTaskOwn_view/WorkflowTaskOwn_view.aod +++ b/neonView/WorkflowTaskOwn_view/WorkflowTaskOwn_view.aod @@ -6,7 +6,7 @@ <dashletConfigurations> <neonDashletConfiguration> <name>OwnWorkflowTasks</name> - <title>Own workflow tasks</title> + <title>My Workflow Tasks</title> <description>My workflow tasks</description> <fragment>WorkflowTask/filter</fragment> <icon>VAADIN:CHECK_SQUARE_O</icon> diff --git a/process/Contact_lib/process.js b/process/Contact_lib/process.js index 4d53dde63a7f80b5e864330f7aec39f0d3f405ee..4f73f699c57aad857c11d8e5aaa30420dc5dab3c 100644 --- a/process/Contact_lib/process.js +++ b/process/Contact_lib/process.js @@ -434,6 +434,26 @@ ContactUtils.getFullContactString = function() + " left join ADDRESS on ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID"; } +/** + * Returns a SqlBuilder for selecting a contact with organisation, person and address. + * + * @param {String|Array|SqlBuilder} [pSelectFields] The select-part to set for the query, if it is omitted, no select will be set. + * @return {SqlBuilder} + */ +ContactUtils.getFullContactSqlBuilder = function (pSelectFields) +{ + var sql = new SqlBuilder() + .from("CONTACT") + .join("ORGANISATION", "ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID") + .leftJoin("PERSON", "PERSON.PERSONID = CONTACT.PERSON_ID") + .leftJoin("ADDRESS", "ADDRESS.ADDRESSID = CONTACT.ADDRESS_ID"); + + if (pSelectFields) + sql.select(pSelectFields); + + return sql; +} + /** * get the addressid of the default address * @@ -532,7 +552,7 @@ ContactUtils.getActiveCommRestrictionsSubselect = function() parts.push("case when exists(" + subquery.toString() + ") then '" + pMedium[1] + "' else '' end"); }) - return sqlMasking.concat(parts, " ", false); + return sqlMasking.concatWithSeparator(parts, " ", false); } /** @@ -659,12 +679,12 @@ function ContactTitleRenderer(pContact, pOptions) //function that renders the contact into a sql expression (e.g. for a subselect) this._asSqlFn = function(){ var maskingUtil = new SqlMaskingUtils(); - var res = maskingUtil.concat([this.contact.salutation, this.contact.title, this.contact.firstname, this.contact.middlename, this.contact.lastname].filter(function (e){ + var res = maskingUtil.concatWithSeparator([this.contact.salutation, this.contact.title, this.contact.firstname, this.contact.middlename, this.contact.lastname].filter(function (e){ return e != ""; }), " ", false); //binary AND check for possibility to check serveral options if (this._options & ContactTitleRenderer.OPTIONS.IncludeOrganisation && this.contact.organisationName) - res = maskingUtil.concat([res, this.contact.organisationName], " | "); + res = maskingUtil.concatWithSeparator([res, this.contact.organisationName], " | "); return res; }; diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index a9b9eac3121960b68e3d6a4cf4d740fa3aa21457..7aa6dedab7b0ef5734961b8843144d2a9cbcdd3d 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -1,3 +1,4 @@ +import("Util_lib"); import("system.entities"); import("system.tools"); import("system.neon"); @@ -506,7 +507,7 @@ ContextUtils.getSelectMap = function() "Person": [newSelect("CONTACTID").from("CONTACT").where("PERSON_ID is not null"), "CONTACT.ORGANISATION_ID", ["Offer", "Order", "Contract", "SupportTicket"]] }) ,"Person": ContextSelector.create("CONTACT", "CONTACTID") - .setTitleExpression(maskingUtils.concat([ + .setTitleExpression(maskingUtils.concatWithSeparator([ new ContactTitleRenderer(Contact.createWithColumnPreset()).asSql() ,"' - '"//looks pretty bad; TODO: workaround till Lookups can be loaded over a link-entity; then use displayProc ,"defaultAddress.ADDRESS", "defaultAddress.BUILDINGNO" @@ -517,7 +518,7 @@ ContextUtils.getSelectMap = function() + " join ORGANISATION on ORGANISATION.ORGANISATIONID = CONTACT.ORGANISATION_ID " + " left join ADDRESS defaultAddress on defaultAddress.ADDRESSID = CONTACT.ADDRESS_ID") ,"PrivatePerson": ContextSelector.create("PERSON", "PERSONID") - .setTitleExpression(maskingUtils.concat([ + .setTitleExpression(maskingUtils.concatWithSeparator([ new ContactTitleRenderer(Contact.createWithColumnPresetForPrivatePerson()).asSql() ,"' - '"//looks pretty bad; TODO: workaround till Lookups can be loaded over a link-entity; then use displayProc ,"defaultAddress.ADDRESS", "defaultAddress.BUILDINGNO" @@ -528,19 +529,19 @@ ContextUtils.getSelectMap = function() .setContactIdField("CONTACT.CONTACTID") ,"Activity": ContextSelector.create("ACTIVITY", "ACTIVITYID", "SUBJECT") ,"Salesproject": ContextSelector.create("SALESPROJECT", "SALESPROJECTID") - .setTitleExpression(maskingUtils.concat([ + .setTitleExpression(maskingUtils.concatenate([ "'" + translate.text("Salesproject") + "'", "' '", maskingUtils.cast("PROJECTCODE", SQLTYPES.VARCHAR, 10), "' | '", "PROJECTTITLE" - ], "", false)) + ])) .setContactIdField("CONTACT_ID") .setCreationDateField("STARTDATE") .setStateField("STATUS") .setActiveStates([$KeywordRegistry.salesprojectState$open(), $KeywordRegistry.salesprojectState$postponed()]) ,"Contract": ContextSelector.create("CONTRACT", "CONTRACTID") - .setTitleExpression(maskingUtils.cast(maskingUtils.concat([ + .setTitleExpression(maskingUtils.cast(maskingUtils.concatWithSeparator([ KeywordUtils.getResolvedTitleSqlPart("ContractType", "CONTRACTTYPE"), maskingUtils.cast("CONTRACTCODE", SQLTYPES.VARCHAR, 10) ], " "), isOracle ? SQLTYPES.NVARCHAR : SQLTYPES.VARCHAR, 50)) @@ -549,19 +550,19 @@ ContextUtils.getSelectMap = function() .setStateField("CONTRACTSTATUS") .setActiveStates([$KeywordRegistry.contractState$validLimited(), $KeywordRegistry.contractState$validUnlimited(), $KeywordRegistry.contractState$notSigned()]) ,"Offer": ContextSelector.create("OFFER", "OFFERID") - .setTitleExpression(maskingUtils.cast(maskingUtils.concat([ + .setTitleExpression(maskingUtils.cast(maskingUtils.concatenate([ "'" + translate.text("Offer") + "'", "' '", maskingUtils.cast("OFFERCODE", SQLTYPES.VARCHAR, 10), "'-'", maskingUtils.cast("VERSNR", SQLTYPES.VARCHAR, 10) - ], "", false), isOracle ? SQLTYPES.NVARCHAR : SQLTYPES.VARCHAR, 50)) + ]), isOracle ? SQLTYPES.NVARCHAR : SQLTYPES.VARCHAR, 50)) .setContactIdField("CONTACT_ID") .setCreationDateField("OFFERDATE") .setStateField("STATUS") .setActiveStates([$KeywordRegistry.offerStatus$open(), $KeywordRegistry.offerStatus$checked(), $KeywordRegistry.offerStatus$sent()]) ,"Order": ContextSelector.create("SALESORDER", "SALESORDERID") - .setTitleExpression(maskingUtils.cast(maskingUtils.concat([ + .setTitleExpression(maskingUtils.cast(maskingUtils.concatWithSeparator([ KeywordUtils.getResolvedTitleSqlPart("OrderType", "ORDERTYPE"), maskingUtils.cast("SALESORDERCODE", SQLTYPES.VARCHAR, 10) ], " "), isOracle ? SQLTYPES.NVARCHAR : SQLTYPES.VARCHAR, 50)) @@ -570,14 +571,14 @@ ContextUtils.getSelectMap = function() .setStateField("ORDERSTATUS") .setActiveStates([0, 1]) ,"Product": ContextSelector.create("PRODUCT", "PRODUCTID") - .setTitleExpression(maskingUtils.concat([ + .setTitleExpression(maskingUtils.concatenate([ "PRODUCTCODE", "' | '", "PRODUCTNAME" - ], "", false)) + ])) ,"Task": ContextSelector.create("TASK", "TASKID", "SUBJECT") ,"Campaign": ContextSelector.create("CAMPAIGN", "CAMPAIGNID") - .setTitleExpression(maskingUtils.concat(["CAMPAIGN.NAME", "CAMPAIGNSTEP.NAME"], " - ", false)) + .setTitleExpression(maskingUtils.concatWithSeparator(["CAMPAIGN.NAME", "CAMPAIGNSTEP.NAME"], " - ", false)) .setContactIdField("CAMPAIGNPARTICIPANT.CONTACT_ID") .setJoinExpression("left join CAMPAIGNPARTICIPANT on CAMPAIGNPARTICIPANT.CAMPAIGN_ID = CAMPAIGN.CAMPAIGNID " + "left join CAMPAIGNSTEP on CAMPAIGNSTEP.CAMPAIGNSTEPID = CAMPAIGNPARTICIPANT.CAMPAIGNSTEP_ID") @@ -629,15 +630,18 @@ ContextUtils.getNameSubselectSql = function(pContextIdDbField, pRowIdDbField) /** * TODO: !!!temporary function until you can get fields from another Entity!!! */ -ContextUtils.getNameSql = function(pContextId, pRowId) +ContextUtils.getNameSql = function(pContextId, pRowId, pRowIdField) { var selectMap = ContextUtils.getSelectMap () if (selectMap[pContextId] != undefined) { - return newSelect(selectMap[pContextId].titleExpression) - .from(selectMap[pContextId].getFullFromClause()) - .whereIfSet(selectMap[pContextId].getFullIdField(), pRowId) - .build(SqlBuilder.NORESULT_CONDITION()); + var sql = newSelect(selectMap[pContextId].titleExpression) + .from(selectMap[pContextId].getFullFromClause()); + if (pRowIdField) + sql.where(selectMap[pContextId].getFullIdField() + " = " + pRowIdField); + else + sql.whereIfSet(selectMap[pContextId].getFullIdField(), pRowId); + return sql.build(SqlBuilder.NORESULT_CONDITION()); } else return "select 1 from person where 1=2"; @@ -751,6 +755,8 @@ function AdminViewUtils () {} */ AdminViewUtils.open = function (pUidField, pFields) { + if (!AdminViewUtils.userHasAdminRole) + return; var uid = vars.get("$sys.uid"); if (!pUidField) pUidField = "UID"; @@ -763,19 +769,31 @@ AdminViewUtils.open = function (pUidField, pFields) { pFields.forEach(function (field) { - rows.push([field[0], field[0], field[1], field[2] || "TEXT"]); + if (Utils.isString(field)) + { + var fieldVar = field.startsWith("$") ? field : "$field." + field; + rows.push([field, field, vars.get(fieldVar), "TEXT"]); + } + else + rows.push([field[0], field[0], field[1], field[2] || "TEXT"]); }); } var params = { - "Uid_param" : uid, - "Rows_param" : JSON.stringify(rows) + "Uid_param": uid, + "Rows_param": JSON.stringify(rows), + "Entity_param": vars.get("$sys.currententityname") }; neon.openContext("DefaultAdminView", "DefaultAdminView_view", [uid], neon.OPERATINGSTATE_VIEW, params); } AdminViewUtils.getActionState = function () { - if (tools.currentUserHasRole("INTERNAL_ADMINISTRATOR")) + if (AdminViewUtils.userHasAdminRole()) return neon.COMPONENTSTATE_EDITABLE; return neon.COMPONENTSTATE_INVISIBLE; +} + +AdminViewUtils.userHasAdminRole = function () +{ + return tools.currentUserHasRole("INTERNAL_ADMINISTRATOR"); } \ No newline at end of file diff --git a/process/Html_lib/Html_lib.aod b/process/Html_lib/Html_lib.aod new file mode 100644 index 0000000000000000000000000000000000000000..98ca38b6fb0b91eaf40a3bc4df951523298405b6 --- /dev/null +++ b/process/Html_lib/Html_lib.aod @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.1"> + <name>Html_lib</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <process>%aditoprj%/process/Html_lib/process.js</process> + <variants> + <element>LIBRARY</element> + </variants> +</process> diff --git a/process/Html_lib/process.js b/process/Html_lib/process.js new file mode 100644 index 0000000000000000000000000000000000000000..b12525e1ad245069dc619c664cc4621471a7c961 --- /dev/null +++ b/process/Html_lib/process.js @@ -0,0 +1,149 @@ +function SimpleHtmlObject(pHtmlString, pUpdateFunc, pUpdateId) +{ + this.htmlObj = {head:{headers:"",style:""}, body:{content:""}}; + this.updateFunc = pUpdateFunc || null; + this.updateId = pUpdateId || null; + + if(pHtmlString && typeof pHtmlString === "string") + this.readHTML(pHtmlString); +} + +SimpleHtmlObject.getInstance = function(pHtmlString, pUpdateFunc, pUpdateId) +{ + return new SimpleHtmlObject(pHtmlString, pUpdateFunc, pUpdateId); +} + +SimpleHtmlObject.prototype.style = function(pCss) +{ + this.htmlObj.head.style = (pCss) ? pCss : ""; + return this; +} + +SimpleHtmlObject.prototype.body = function(pContent) +{ + this.htmlObj.body.content = (pContent) ? pContent : ""; + return this; +} + +SimpleHtmlObject.prototype.headers = function(pHeaders) +{ + this.htmlObj.head.headers = (pHeaders) ? pHeaders : ""; + return this; +} + +SimpleHtmlObject.prototype.readTagContent = function (pIn, pTag) +{ + var ret = null; + var openTag = new RegExp("<" + pTag + ">","i"); + var closeTag = new RegExp("<\\/" + pTag + ">","i"); + //If for some reason + if(pIn.search(new RegExp("<" + pTag + ".*\\/>","i")) > 0) + ret = ""; + else + { + var start = pIn.search(openTag); + var end = pIn.search(closeTag); + if(start > -1 && end > -1) + ret = pIn.substring(start+(pTag.length+2), end); + } + + return ret; +} + +SimpleHtmlObject.prototype.accumulateStyleTags = function(pIn) +{ + var htmlString = pIn; + var matches = htmlString.match(/<STYLE.*>.*<\/STYLE>/gi); + + var styles = ""; + + for(let i = 0; matches && i < matches.length; i++) + { + styles += this.readTagContent(matches[i], "STYLE") + "\n"; + } + + return styles; +} + +SimpleHtmlObject.prototype.readHTML = function(pInput) +{ + var htmlString = pInput; + //if no HTML opening Tag is present, assume its pure body content + try + { + if(htmlString.search(/<HTML>/gi) < 0) + this.body(htmlString); + else + { + this.htmlObj.body.content = this.readTagContent(htmlString, "BODY"); + //Getting Headers without style info, because we store them seperately + this.htmlObj.head.headers = this.readTagContent(htmlString, "HEAD").replace(/<STYLE.*>.*<\/STYLE>/gi,""); + this.htmlObj.head.style = this.accumulateStyleTags(htmlString); + } + + return + } + catch(ex) + { + var fixedHTML = HtmlFixer.getInstance(pInput).fixHtml(); + if(this.updateFunc && typeof this.updateFunc == "function" && this.updateId) + this.updateFunc(fixedHTML, this.updateId); + + this.readHTML(fixedHTML); + return + } +} + +SimpleHtmlObject.prototype.toString = function() +{ + return "<HTML>\n" + + "<HEAD>\n" + + this.htmlObj.head.headers + (this.htmlObj.head.headers.length > 0 ? "\n" : "") + + "<STYLE type='text/css'>" + this.htmlObj.head.style + "</STYLE>" + "\n" + + "</HEAD>\n" + + "<BODY>\n" + + this.htmlObj.body.content + "\n" + + "</BODY>\n" + +"</HTML>"; +} + +SimpleHtmlObject.prototype.getBody = function() +{ + return this.htmlObj.body.content.slice(0); +} + +SimpleHtmlObject.prototype.getStyle = function() +{ + return this.htmlObj.head.style.slice(0); +} + + +function HtmlFixer(pIn) +{ + this.htmlString = pIn || ""; +} + +HtmlFixer.getInstance = function(pIn) +{ + return new HtmlFixer(pIn); +} + +HtmlFixer.prototype.fixHtml = function() +{ + var htmlObj = SimpleHtmlObject.getInstance(); + var readTag = htmlObj.readTagContent; //borrow a function from another Object, so i don't have to code the same thing twice + + //get a copy of the HTML, so we can modify it without chainging the original + var toFix = this.htmlString.slice(0); + + var style = readTag(toFix,"STYLE"); + var head = readTag(toFix,"HEAD"); + var body = readTag(toFix,"BODY"); + + if(!body) + { + body = toFix.replace(/<HEAD>.*<\/HEAD>/gi,"").replace(/(<HTML>|<\/HTML>)/gi,""); + } + + return htmlObj.headers(head).style(style).body(body).toString(); +} \ No newline at end of file diff --git a/process/KeywordRegistry_basic/process.js b/process/KeywordRegistry_basic/process.js index aa1c2042a6007f78f2d2311d85b15f3e3e7db3c2..eaa206920ca8d3e012f686c6830db4b63d9942fd 100644 --- a/process/KeywordRegistry_basic/process.js +++ b/process/KeywordRegistry_basic/process.js @@ -296,3 +296,16 @@ $KeywordRegistry.workflowCategory = function(){return "WorkflowCategory";}; $KeywordRegistry.notificationState = function(){ return "NotificationState";}; $KeywordRegistry.notificationState$unseen = function(){return "UNSEEN";}; $KeywordRegistry.notificationState$seen = function(){return "SEEN";}; + +$KeywordRegistry.discussionStatus = function(){return "DiscussionStatus";} +$KeywordRegistry.discussionStatus$acitve = function(){return "ACTIVE";} +$KeywordRegistry.discussionStatus$closed = function(){return "CLOSED";} + +$KeywordRegistry.knowledgeType = function(){return "KnowledgeType";} +$KeywordRegistry.knowledgeType$knowledgeBase = function(){return "KNOWLEDGEBASE";} +$KeywordRegistry.knowledgeType$editorial = function(){return "EDITORIAL";} + +$KeywordRegistry.knowledgePublishLevel = function(){return "KnowledgePublishLevel";} +$KeywordRegistry.knowledgePublishLevel$internal = function(){return "INTERNAL";} +$KeywordRegistry.knowledgePublishLevel$partner = function(){return "PARTNER";} +$KeywordRegistry.knowledgePublishLevel$public = function(){return "PUBLIC";} \ No newline at end of file diff --git a/process/KnowledgeManagement_lib/KnowledgeManagement_lib.aod b/process/KnowledgeManagement_lib/KnowledgeManagement_lib.aod new file mode 100644 index 0000000000000000000000000000000000000000..7119bdb3846ad9854af7575629a9c7a7c46b7d48 --- /dev/null +++ b/process/KnowledgeManagement_lib/KnowledgeManagement_lib.aod @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.1"> + <name>KnowledgeManagement_lib</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <process>%aditoprj%/process/KnowledgeManagement_lib/process.js</process> + <alias>Data_alias</alias> + <variants> + <element>LIBRARY</element> + </variants> +</process> diff --git a/process/KnowledgeManagement_lib/process.js b/process/KnowledgeManagement_lib/process.js new file mode 100644 index 0000000000000000000000000000000000000000..9ec7cfda580870f5f0d99653149271e816528390 --- /dev/null +++ b/process/KnowledgeManagement_lib/process.js @@ -0,0 +1,1178 @@ +import("system.project"); +import("system.fileIO"); +import("system.translate"); +import("system.tools"); +import("system.util"); +import("system.datetime"); +import("system.vars"); +import("system.db"); +import("system.logging"); +import("Html_lib"); +import("Sql_lib"); +import("Attribute_lib"); +import("AttributeRegistry_basic"); +import("Keyword_lib"); +import("KeywordRegistry_basic"); +import("Util_lib"); +import("system.tools"); +import("system.neon"); +import("system.text"); + +/** + * Object that contains function for displying the knowledge entries + * @param {String} pHtml HTML Script as string. + * @param {String} pKnowledgeId Id of the knowledge entry, that's represented by this object + */ +function KnowledgeManagementModel(pHtml, pKnowledgeId) +{ + this.knowledgeId = pKnowledgeId || null; + + var updFunc = function(pContent, pId) + { + newWhere("KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID", pId) + .updateFields({ + "CONTENT": pContent, + "CONTENTDECODED": text.html2text(pContent) + }); + } + + //this turns a HTML String into an instance of SimpleHtmlObject for further processing + //or if an instance of SimpleHtmlObject is given in pHtml it uses the given Object + this.html = (typeof pHtml === "string") + ? SimpleHtmlObject.getInstance(pHtml, updFunc, this.knowledgeId) + : ( + (pHtml instanceof SimpleHtmlObject) + ? pHtml + : null + ); + //provides the knowledge entry with it's tags + this.knowledgeTagModel = KnowledgeManagementTagsModel.getInstance(this.knowledgeId); +} +/** + * Factory function of KnowledgeManagementModel + * @param {String} pHtml HTML Script as string. + * @param {String} pId Id of the knowledge entry, that's represented by this object + * + * @return {KnowledgeManagementModel} + */ +KnowledgeManagementModel.getInstance = function(pHtml, pId) +{ + return new KnowledgeManagementModel(pHtml, pId); +} + +/** + * Function for setting a CSS Stylesheet for the knowledge entry + * @param pStyle {String|function} This parameter takes either a string or a function + * the function has to return a CSS Stylesheet as String + * @param pArgs {Array} This parameter takes the arguments for calling a style function, Required if pStyle is of type function + * + * @return {this} return the instance of KnowledgeManagementModel to enable function chaining + */ +KnowledgeManagementModel.prototype.style = function(pStyle, pArgs) +{ + switch(typeof pStyle) + { + case "function": + let args = (pArgs && pArgs.length)? pArgs : []; + this.html.style(pStyle.apply(pStyle, args)); + break; + case "string": + this.html.style(pStyle); + break; + } + + return this; +} + +KnowledgeManagementModel.prototype.headers = function(pHeaders) +{ + this.html.headers(pHeaders); + + return this; +} + +/** + * Function for setting the content of the HTML Body for the knowledge entry + * @param pContent {String|function} This parameter takes either a string or a function + * the function has to return the content of the HTML Body as String + * @param pArgs {Array} This parameter takes the arguments for calling a function, Required if pStyle is of type function + * + * @return {this} return the instance of KnowledgeManagementModel to enable function chaining + */ +KnowledgeManagementModel.prototype.content = function(pContent, pArgs) +{ + switch(typeof pContent) + { + case "function": + let args = (pArgs && pArgs.length)? pArgs : []; + this.html.body(pContent.apply(pContent, args)); + break; + case "string": + this.html.body(pContent); + break; + } + + return this; +} +/** + * Wrapper for SimpleHtmlObject.prototype.toString, which is overridden so it provides a HTML Script + * containing the content and style set by the respective functions + * + * @return {String} HTML Script + */ +KnowledgeManagementModel.prototype.buildHTML = function() +{ + return this.html.toString(); +} +/** + * Returns the content of the HTML Body + * @return {String} + */ +KnowledgeManagementModel.prototype.getContent = function() +{ + return this.html.getBody(); +} +/** + * Returns the contents of the set Style Tag + * @return {String} + */ +KnowledgeManagementModel.prototype.getStyle = function() +{ + return this.html.getStyle(); +} + +KnowledgeManagementModel.getFrameMapping = function(pFrame) +{ + switch(pFrame.toUpperCase()) + { + case "KNOWLEDGEMANAGEMENT": + return "KnowledgeManagement"; + break; + default: + return null; + } +} +/** + * Function for replacing the http://adito/ and http://aditoknowledge links with links to the neon client + * @return {this} + */ +KnowledgeManagementModel.prototype.replaceAditoLinks = function() +{ + var clientUrl = project.getInstanceConfigValue("custom.aditoLink.clientUrl", ""); + var content = this.getContent(); + //RegExp for finding regular ADITO Links + var regExAditoLink = /href\s*=\s*["']http:\/\/adito\/(\w+)\/([\w-]{0,36})["']/gi; + //RegExp for finding aditoknowledge links + var regExEditorialLink = /href\s*=\s*["']http:\/\/aditoknowledge\/(.+?\.adoc)["']/gi; + + var match, frame, uid, gitPath; + + function _getNeonLink(pContext, pUid) + { + if(pContext) + return "href = '" + clientUrl + "client/" + pContext + "/full?id=" + pUid + "' target='_parent'"; + else + return "CONTEXT NOT MAPPED"; + } + + while ((match = regExAditoLink.exec(content)) !== null) + { + [match, frame, uid] = match; + content = content.replace(match, _getNeonLink(KnowledgeManagementModel.getFrameMapping(frame), uid)); + } + + var idSql; + + + while ((match = regExEditorialLink.exec(content)) !== null) + { + [match, gitPath] = match; + idSql = new SqlBuilder().select("KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID") + .from("KNOWLEDGEMANAGEMENT") + .where("KNOWLEDGEMANAGEMENT.GITPATH", gitPath).cell(); + + content = content.replace( + match + , _getNeonLink("KnowledgeManagement" + , (idSql) ? idSql : "DOCUMENT-NOT-EXISTING" + ) + ); + } + + this.content(content); + + return this; +} +/** + * Object for gathering the tags of a knowledge entry + * @param {String} pKnowledgemanagementId Id of the knowledge entry for which the tags should be collected + */ +function KnowledgeManagementTagsModel(pKnowledgemanagementId) +{ + this.data = []; + this.existingTags = { + array:[], + ByIdMap:{}, + ByNameMap:{} + }; + this.knowledgeId = pKnowledgemanagementId || null; +} + +/** + * Factory function of KnowledgeManagementTagsModel + * @return {KnowledgeManagementTagsModel} + */ +KnowledgeManagementTagsModel.getInstance = function(pId) +{ + return new KnowledgeManagementTagsModel(pId); +} +/** + * Function for getting the list of already existing tags + * @param {String} pLocalUid If the id is given only one entry is loaded + * @return {Object} returns an object containing three keys: array, ByIdMap, ByNameMap + * the latter two are maps for quick lookup of TagIDs by Name or Name by Id + */ +KnowledgeManagementTagsModel.prototype.getPossibleTags = function(pLocalUid) +{ + this.existingTags.array = new SqlBuilder() + .select("KNOWLEDGETAGID, TAG") + .from("KNOWLEDGETAG") + .table(); + + for(let i in this.existingTags.array) + { + this.existingTags.ByIdMap[this.existingTags.array[i][0]] = this.existingTags.array[i][1]; + this.existingTags.ByNameMap[this.existingTags.array[i][1].toUpperCase()] = this.existingTags.array[i][0]; + //if a single id is requested, return only that specific dataset + if(pLocalUid && pLocalUid == this.existingTags.array[i][0]) + { + let singleReturn = { + array:[], + ByIdMap:{}, + ByNameMap:{} + }; + singleReturn.array = [this.existingTags.array[i]]; + singleReturn.ByIdMap[this.existingTags.array[i][0]] = this.existingTags.array[i][1]; + singleReturn.ByNameMap[this.existingTags.array[i][1].toUpperCase()] = this.existingTags.array[i][0] + + return singleReturn; + } + } + + return this.existingTags; +} +/** + * Function to collect the set tags of a knowledge entry + * If no Id is present in either the function parameter or the object itself, it returns an empty dataset + * + * @param {String} pKnowledgeId Id of the knowledge entry to gather the tags for. + * @param {Array} pIdValue If we get one id from the system, we only need to load this one dataset + * + * @return {this} + */ +KnowledgeManagementTagsModel.prototype.collectTags = function(pKnowledgeId, pIdValue) +{ + //if no ID is given either by pKnowledgeId or by the property of the this object + //it sets an empty dataset and returns this. + if(!pKnowledgeId && !this.knowledgeId) + { + this.data = db.createEmptyTable(3); + return this; + } + + if(!this.knowledgeId) + this.knowledgeId = pKnowledgeId.slice(0); + + var sqlString = new SqlBuilder() + .select("KNOWLEDGETAGLINKID, KNOWLEDGETAG_ID, TAG") + .from("KNOWLEDGETAGLINK") + .join("KNOWLEDGETAG on KNOWLEDGETAGID = KNOWLEDGETAG_ID") + .where("KNOWLEDGETAGLINK.KNOWLEDGEMANAGEMENT_ID", this.knowledgeId) + + if(pIdValue) + sqlString.and("KNOWLEDGETAGLINK.KNOWLEDGETAGLINKID", pIdValue, SqlBuilder.IN()); + + this.data = sqlString.table(); + + return this; +} +/** + * Object for handling tags. + * I.e. adding, editing and deleting tags of an knowledge entry + * + * @param {String} pKnowledgeId + * @param {KnowledgeManagementTagsModel} pTagsModel If you already have an instance of the Tags Model, you can give it to the function + * instead of creating a new instance + */ +function KnowledgeManagementTagsController(pKnowledgeId, pTagsModel) +{ + this.model = (pTagsModel instanceof KnowledgeManagementTagsModel) + ? pTagsModel + : KnowledgeManagementTagsModel.getInstance(pKnowledgeId); + + this.knowledgeId = pKnowledgeId || null; +} +/** + * Factory fucntion for KnowledgeManagementTagsController + * @return {KnowledgeManagementTagsController} + */ +KnowledgeManagementTagsController.getInstance = function(pId, pModel) +{ + return new KnowledgeManagementTagsController(pId, pModel); +} +/** + * This function is used to add a new tag to a knowledge entry + * If the tag is already used on the given entry, it does nothing + * If a completely new tag is entered, it gets created in the Tags Attribute and then it gets added to the knowledge entry + * + * @param {String} pIdValue, id of the new AttributeRelation typically read from $local.idvalue + * @param {Array} pRowData, data of the new tag, typically read from $local.rowdata + * + * @return {this} + */ +KnowledgeManagementTagsController.prototype.addTag = function(pIdValue, pRowData, pFromUpdate) +{ + if(!pRowData["TAG.value"] || !pRowData["TAG.value"].trim() || !pIdValue) + return this; + pRowData["TAG.value"] = pRowData["TAG.value"].trim(); + //if we get an UUID, an existing tag was chosen and can be added directly + if(IdUtils.isUUID(pRowData["TAG.value"])) + _add.apply(this,[pIdValue, pRowData]); + else //else if get a new string, we have to create the tag in the attribute first + { + this.createNewTag(pIdValue, pRowData); + } + /** + * private function for adding the tag to the knowledge entry + * @param {String} pId, id of the new AttributeRelation typically read from $local.idvalue + * @param {Array} pData, data of the new tag, typically read from $local.rowdata + */ + function _add(pId, pData) + { + //get all possible tags, to make sure the new tag is already registered + var existingTags = this.model.getPossibleTags(); + + + var countSql = newSelect("count(*)") + .from("KNOWLEDGETAGLINK") + .where("KNOWLEDGETAGLINK.KNOWLEDGETAG_ID", pData["TAG.value"]) + .and("KNOWLEDGETAGLINK.KNOWLEDGEMANAGEMENT_ID", this.knowledgeId) + .cell(); + + // if the tag is registered and isn't already used on this knowledge entry, add a attribute relation + if(existingTags.ByIdMap[pData["TAG.value"]] && Number(countSql) === 0 && !pFromUpdate) + { + var fields = ["KNOWLEDGETAGLINKID","KNOWLEDGEMANAGEMENT_ID","KNOWLEDGETAG_ID","USER_NEW","DATE_NEW"];//["AB_ATTRIBUTERELATIONID", "AB_ATTRIBUTE_ID", "OBJECT_ROWID", "OBJECT_TYPE", "ID_VALUE", "USER_NEW", "DATE_NEW"]; + var values = [pId, this.knowledgeId, pData["TAG.value"], vars.get("$sys.user"), datetime.date()]; + + db.insertData("KNOWLEDGETAGLINK", fields, null, values); + } + } + + return this; +} +/** + * Function for updating/editing an existing tag + * @param {String} pIdValue, id of the new AttributeRelation typically read from $local.idvalue + * @param {Array} pRowData, data of the new tag, typically read from $local.rowdata + * + * @return {this} + */ +KnowledgeManagementTagsController.prototype.editTag = function(pIdValue, pRowData) +{ + if(!pRowData["TAG.value"] || !pIdValue) + return this; + + var existingTags = this.model.getPossibleTags(); + //if we get an UUID and it is in the existing IDs Map, we can just update the database field + if(IdUtils.isUUID(data["TAG.value"]) && existingTags.ByIdMap[data["TAG.value"]]) + { + _update.apply(this,[pIdValue, pRowData]); + } + else // if we get text, we have to get the old tags id, create the new tag and then check if the old tag is used somewhere else + { // if it's not used anymore, it gets deleted from the attribute + var oldTag = new SqlBuilder() + .select("KNOWLEDGETAG_ID") + .from("KNOWLEDGETAGLINK") + .where("KNOWLEDGETAGLINK.KNOWLEDGETAGLINKID", pIdValue) + .cell(); + + var newTag = this.createNewTag(pIdValue, pRowData, true); + pRowData["TAG.value"] = newTag; + + _clear.apply(this,[oldTag]); + _update.apply(this, [pIdValue, pRowData]); + } + /** + * private function for updating an AttributeRelation with the new tag + */ + function _update(pId, pData) + { + var fields = ["KNOWLEDGETAG_ID", "USER_EDIT", "DATE_EDIT"]; + var dataTypes = db.getColumnTypes("KNOWLEDGETAGLINK", fields); + var values = [pData["TAG.value"], vars.get("$sys.user"), datetime.date()]; + var cond = newWhere("KNOWLEDGETAGLINK.KNOWLEDGETAGLINKID", pId).toString(); + + db.updateData("KNOWLEDGETAGLINK", fields, dataTypes, values, cond); + } + /** + * private function for checking, if an old tag is used anywhere else. If it's not used anymore, it gets deleted + */ + function _clear(pOldValue) + { + var count = new SqlBuilder() + .select("count(*)") + .from("KNOWLEDGETAGLINK") + .where("KNOWLEDGETAGLINK.KNOWLEDGETAG_ID", pOldValue) + .cell(); + if(count == 0) + { + db.deleteData("KNOWLEDGETAG", newWhere("KNOWLEDGETAG.KNOWLEDGETAGID", pOldValue).toString()); + } + } + + return this; +} +/** + * Function for deleting a tag from a knowledge entry + * If a tag isn't used anywhere else, it gets deleted from the list of existing tags + * + * @param {String} pIdValue Value of $local.idvalue in onDelete Process + * @param {[][]} pData Value of $local.rowdata in onDelete Process + * + * @return {this} + */ +KnowledgeManagementTagsController.prototype.deleteTag = function(pIdValue, pData) +{ + if(!pIdValue || !pData["TAG.value"]) + return this; + + db.deleteData("KNOWLEDGETAGLINK", newWhere("KNOWLEDGETAGLINK.KNOWLEDGETAGLINKID", pIdValue).toString()); + + var count = new SqlBuilder() + .select("count(*)") + .from("KNOWLEDGETAGLINK") + .where("KNOWLEDGETAGLINK.KNOWLEDGETAG_ID", pData["TAG.value"]) + .cell(); + + if(count == 0) + { + db.deleteData("KNOWLEDGETAG", newWhere("KNOWLEDGETAG.KNOWLEDGETAGID", pData["TAG.value"]).toString()); + } + + return this; +} +/** + * Function to clear all tags from an entry + * Used in the Git Interface, to get rid of all tags and then newly create them + * + * @return {KnowledgeManagementTagsController} Returns this for chaining + */ +KnowledgeManagementTagsController.prototype.clearTags = function() +{ + this.model.collectTags(this.knowledgeId).data.forEach( + function(item) + { + let rowData = {}; + rowData["TAG.value"] = item[1]; + + this.deleteTag(item[0], rowData); + } + ,this); + + return this; +} +/** + * Fucntion for adding a new tag to the list of existing tags + * It adds it also to the table KNOWLEDGEMANAGEMENTTAGMODERATION where all new tags are stored for further moderation + * + * @param {String} pIdValue typically the $local.idvalue of the onInsert process, it is being used, if for some reason the entered tag is already existing. + * then a new AttributeRelation is created instead of the tag. + * @param {[][]} pData typically the $local.rowdata of the onInsert or onUpdate process + * + * @return {String|null} returns the id of the new tag attribute or null, if it couldn't be created + */ +KnowledgeManagementTagsController.prototype.createNewTag = function(pIdValue, pData, pFromUpdate) +{ + if(!pData["TAG.value"] || !pIdValue) + throw "no Tag was passed or no pIdValue was passed"; + + var existingTags = this.model.getPossibleTags(); + var tagFields = ["KNOWLEDGETAGID" + ,"TAG" + ,"DATE_NEW" + ,"USER_NEW"]; + var newAttrId; + var tagValues; + + //If the user entered text without choosing a list entry, do a lookup on the existing tags by upper case and add tag by id, if it already exists + if(existingTags.ByNameMap[pData["TAG.value"].toUpperCase()]) + { + pData["TAG.value"] = existingTags.ByNameMap[pData["TAG.value"].toUpperCase()]; + this.addTag(pIdValue, pData); + } + else + { + newAttrId = util.getNewUUID(); + tagValues = [newAttrId, pData["TAG.value"], datetime.date(), vars.get("$sys.user")]; + + db.insertData("KNOWLEDGETAG", tagFields, null, tagValues); + + pData["TAG.value"] = newAttrId; + + this.addTag(pIdValue, pData, pFromUpdate); + + return newAttrId; + } + + return null; +} +/** + * Object for handling the discussions + */ +function KnowledgeDiscussion(pKnowledgeId) +{ + this.knowledgeId = pKnowledgeId; + this.data = []; +} +/** + * Factory function of KnwoledgeDiscussion + * @param {String|null} pKnowledgeId UUID if only the discussion on on specific knowledge entry are needed, null if all discussions of all knowledge entries should be loaded. + */ +KnowledgeDiscussion.getInstance = function(pKnowledgeId) +{ + return new KnowledgeDiscussion(pKnowledgeId); +} +/** + * Function for getting the row count, uses less complex SQL and doesn't have the tree generation. + * It's used in the rowCountProcess of the RecordContainer of the KnowledgeDiscussion entity, to improve performance + * + * @param {SqlBuilder} pCondition sql condition + * @param {Array} pIdValues Takes an array of ids, typically one id with single selection, to only load the selected discusssion for the preview view + * + * @return {int} Total number of Datasets to load + */ +KnowledgeDiscussion.prototype.getDatasetCount = function(pCondition, pIdValues) +{ + var knowledgeSql = newSelect("count(*)").from("KNOWLEDGEMANAGEMENT").join("KNOWLEDGEDISCUSSION", "KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID = KNOWLEDGEDISCUSSION.KNOWLEDGEMANAGEMENT_ID").where(); + + var knowledgeData = 0; + + var discussionSql = newSelect("count(*)").from("KNOWLEDGEDISCUSSION").where(); + + if(pCondition) + { + discussionSql.andIfSet(pCondition); + knowledgeSql.andIfSet(pCondition); + } + + if(pIdValues) + { + knowledgeSql.and("KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID", pIdValues, SqlBuilder.IN()); + discussionSql.and("KNOWLEDGEDISCUSSION.KNOWLEDGEDISCUSSIONID", pIdValues, SqlBuilder.IN()); + } + + //if we have a specific knowledge, we don't need all knowledge entries. Otherwise load all knowledge entries that have discussions + if(this.knowledgeId) + discussionSql.and("KNOWLEDGEDISCUSSION.KNOWLEDGEMANAGEMENT_ID", this.knowledgeId); + else + knowledgeData = knowledgeSql.table() + + + var discussionData = discussionSql.table() + + var sum = ((Number(knowledgeData) > 0) ? Number(knowledgeData) + Number(discussionData) : Number(discussionData)); + + return sum; +} + +/** + * Complex function to build the DiscussionTree. + * Loads the data depending on this.knowledgeId, pMode and pIdValues and builds the tree out of the data + * The tree always gets sorted by the date of the most recent action. Either a new answer to an discussion or an edit of an discussion + * Data is retireved by reading the data property of your instance of KnowledgeDiscussion after running buildCompleteTree + * + * @param {SqlBuilder} pCondition sql condition + * @param {Array} pIdValues Takes an array of ids, typically one id with single selection, to only load the selected discusssion for the preview view + * @param {Boolean} pGetAll Switch, which determines if all discussions on all knowledge entries should be loaded or only the discussion for one specific knowledge. + * + * @return {this} returns the now filled instance of the object. + */ +KnowledgeDiscussion.prototype.buildCompleteTree = function(pCondition, pIdValues, pGetAll) +{ + var knowledgeSql = newSelect("KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID, KNOWLEDGEMANAGEMENT.TITLE").from("KNOWLEDGEMANAGEMENT") + .join("KNOWLEDGEDISCUSSION", "KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID = KNOWLEDGEDISCUSSION.KNOWLEDGEMANAGEMENT_ID") + .where() + + var knowledgeData = null; + + var discussionSql = newSelect("KNOWLEDGEDISCUSSIONID,PARENTENTRY,KNOWLEDGEMANAGEMENT_ID ,AUTHOR,DISCUSSIONTEXT,STATUS,'InsertKEyowrdSubselecthere' ,DATE_NEW,DATE_EDIT,USER_NEW,USER_EDIT") + .from("KNOWLEDGEDISCUSSION").where() + + var iconMap = { + TOP:"VAADIN:PIN" + , + ANSWER:"VAADIN:COMMENT_O" + , + KNOWLEDGE:"VAADIN:ACADEMY_CAP" + , + TOP_CLOSED:"VAADIN:LOCK" + }; + + if(pCondition && !(pIdValues && pIdValues.length == 1)) + { + discussionSql.andIfSet(pCondition); + knowledgeSql.andIfSet(pCondition); + } + + if(pIdValues) + { + discussionSql.and("KNOWLEDGEDISCUSSION.KNOWLEDGEDISCUSSIONID", pIdValues, SqlBuilder.IN()); + } + + //if we have a specific knowledge, we don't need all knowledge entries. Otherwise load all knowledge entries that have discussions + if(pGetAll) + knowledgeData = knowledgeSql.table() + else if(this.knowledgeId) + discussionSql.and("KNOWLEDGEDISCUSSION.KNOWLEDGEMANAGEMENT_ID", this.knowledgeId); + + var discussionData = discussionSql.table(); + + //remove all parent-ids that can't be found in the array, otherwise these would not be included in the tree + //(if these entries were not included, the result from the rowCountProcess would be incorrect) + if (Utils.isNullOrEmpty(pIdValues)) + { + var allDiscussionIds = new Set(); + discussionData.forEach(function ([discussionId]) + { + allDiscussionIds.add(discussionId); + }); + discussionData.forEach(function (row) + { + if (!allDiscussionIds.has(row[1])) + row[1] = ""; + }); + } + + var user, userTitle, discussionTitle; + + //adding firstname and lastname from employee as author displayvalue and add icon + for(var i = 0; i < discussionData.length; i++) + { + discussionData[i][4] = discussionData[i][4].trim(); + user = tools.getUser(discussionData[i][3]); + userTitle = _getNamefromUser(user); + //old icon code: KeywordUtils.getAttributeRelation(discussionData[i][5], "DiscussionStatus", "knowledgeDiscussionIcon") + discussionData[i].push(userTitle); + discussionData[i].push(_getIcon("D", discussionData[i][1].trim(), discussionData[i][5].trim())); + discussionData[i].push("D"); //Node type for discussions + + discussionTitle = userTitle; + if(discussionData[i][7]) + discussionTitle += " "+ translate.text("added on") +": " + datetime.toDate(discussionData[i][7], "dd.MM.yyyy"); + + + if(discussionData[i][8]) + { + if(discussionData[i][10] && discussionData[i][3] != discussionData[i][10]) + { + user = tools.getUser(discussionData[i][10]); + userTitle = _getNamefromUser(user); + } + discussionTitle += ", " + userTitle + " " + translate.text("edited on") +": " + datetime.toDate(discussionData[i][8], "dd.MM.yyyy"); + } + + discussionData[i].push(discussionTitle); + } + + //if something gets selected in the tree, only return those datasets + if(pIdValues && !this.knowledgeId && !discussionData.length) + { + this.data = knowledgeData; + return this; + } + else if(pIdValues && discussionData.length) + { + this.data = discussionData; + return this; + } + + var tempTree = []; + //if a specific knowledge is given, then use the empty tree to fill with top parents + //, otherwise insert knowledge entries into the tree first via _fillKnowledge() and then add top parents to those + tempTree = _fillTopParents(((this.knowledgeId) + ? tempTree + : _fillKnowledge(tempTree, knowledgeData)) + , discussionData + , this.knowledgeId); + //if we have a specific knowledgeId, we recursively add all children for each top parent. + if(this.knowledgeId) + { + for(let i = 0; i < tempTree.length; i++) + { + _fillInChildren(tempTree[i], discussionData, tempTree[i].id); + tempTree[i].date = _propagateMostRecentDate(tempTree[i]); + } + tempTree.sort(_sortByDateDesc); + } + else + { + for(let i = 0; i < tempTree.length; i++) // loop over knowledge + { + for(let ii = 0; ii < tempTree[i].children.length; ii++) // loop over opening threads + { + _fillInChildren(tempTree[i].children[ii], discussionData, tempTree[i].children[ii].id); //add children recursively to opening threads + tempTree[i].children[ii].date = _propagateMostRecentDate(tempTree[i].children[ii]); + } + tempTree[i].children.sort(_sortByDateDesc); + tempTree[i].date = tempTree[i].children[0].date; + } + tempTree.sort(_sortByDateDesc); + } + + this.data = _buildArrayFromTree.apply(this, [tempTree]); + + return this; + + function _getIcon(pNodeType, pParentId, pStatus) + { + if(pNodeType == "K") + return iconMap.KNOWLEDGE; + if(pNodeType == "D" && pStatus == $KeywordRegistry.discussionStatus$closed()) + return iconMap.TOP_CLOSED; + if(pNodeType == "D" && pParentId == "") + return iconMap.TOP; + if(pNodeType == "D" && pParentId != "") + return iconMap.ANSWER; + + return ""; + } + + function _getNamefromUser(pUser) + { + return ((pUser && pUser[tools.PARAMS]) ? pUser[tools.PARAMS][tools.FIRSTNAME] + " " + pUser[tools.PARAMS][tools.LASTNAME] : null); + } + + function _buildArrayFromTree(pTree) + { + var dataArray = []; + + function __runLayers(pBranch) + { + dataArray.push(pBranch.data); + + for(let i = 0; i < pBranch.children.length; i++) + { + __runLayers(pBranch.children[i]); + } + } + + for(let i = 0; i < pTree.length; i++) + { + __runLayers.apply(this, [pTree[i]]); + } + + return dataArray; + } + + function _sortByDateDesc(a,b) + { + return b.date - a.date; + } + + function _fillKnowledge(pTree, pData) + { + for(let i = 0; i < pData.length; i++) + { + pTree.push({ + id:pData[i][0] + , + parent:null + , + data:[ + pData[i][0] + ,null + ,null + ,null + ,pData[i][2] + ,null + ,null + ,null + ,null + ,null + ,null + ,null + ,"" + ,"K"] + , + children:[] + }); + pData.splice(i--,1); + } + + return pTree; + } + + function _fillTopParents(pTree, pData, pHasSpecificKnowledge) + { + function __addNode(pTree, pNodeData, pNodeIndex, pSetAsParentId) + { + if(!pNodeIndex && !pSetAsParentId) + { + pTree.push({ + id:pNodeData[0] + , + parent:null + , + data:pNodeData + , + nodeType:pNodeData[13] + , + children:[] + }); + } + else + { + pNodeData[1] = pSetAsParentId; + pTree[pNodeIndex].children.push({ + id:pNodeData[0] + , + parent:pSetAsParentId + , + data:pNodeData + , + nodeType:pNodeData[13] + , + children:[] + }); + } + } + + if(pHasSpecificKnowledge) + { + for(let i = 0; i < pData.length; i++) + { + if(!pData[i][1]) + { + __addNode(pTree, pData.splice(i--,1)[0]); + } + } + } + else + { + for(let i = 0; i < pTree.length; i++) + for(let ii = 0; ii < pData.length; ii++) + { + if(!pData[ii][1] && pData[ii][2] == pTree[i].id) + { + __addNode(pTree, pData.splice(ii--,1)[0], i, pTree[i].id); + } + } + } + + return pTree; + } + + function _fillInChildren(pNode, pData, pParentId) + { + var tempNodes = []; + for(let i = 0; i < pData.length; i++) + { + let tempData = null; + if(pData[i][1] == pParentId) + { + tempData = pData.splice(i--,1)[0]; + tempNodes.push({ + id:tempData[0] + , + parent:tempData[1] + , + data:tempData + , + children:[] + , + nodeType:tempData[13] + }); + } + } + + for(let i = 0; i < tempNodes.length; i++) + { + _fillInChildren(tempNodes[i], pData, tempNodes[i].id); + pNode.children.push(tempNodes[i]); + } + } + + function _propagateMostRecentDate(pNode) + { + //this funcion takes n arguments, sorts them numerically descending + //, so the biggest and therefore most recent timestamp is on the first index + //, which then gets returned + function __getMostRecentDate() + { + return [].slice.call(arguments).sort(function(a, b){ + return b - a; + })[0]; + } + + var propagatedDate = null; + //if we are on the last child, only get the most recent date of this child + if(!pNode.children.length) + propagatedDate = __getMostRecentDate(pNode.data[7], pNode.data[8]); + else + { + propagatedDate = [] + //if we have children, we need to get the most recent date from the children and our current node. + for(let i = 0; i < pNode.children.length; i++) + { + propagatedDate.push(__getMostRecentDate(_propagateMostRecentDate(pNode.children[i]), pNode.data[7], pNode.data[8])); + } + + propagatedDate = __getMostRecentDate.apply(null,propagatedDate); + } + //return the most recent date, which got propagated all the way through the tree branch + return propagatedDate; + } +} +/** + * Function for adding a new Discussion. + * Used in the onInsert process of the RecordContainer of the KnowledgeDiscussion entity + * + * @param {String} pDiscussionId $local.idvalue of the onInsert process + * @param {Array} pRowData $local.rowdata of the onInsert process + * + * @return {this} + */ +KnowledgeDiscussion.prototype.addDiscussion = function(pDiscussionId, pRowData) +{ + if(!pRowData["DISCUSSIONTEXT.value"]) + return this; + + if(!pDiscussionId) + pDiscussionId = ""; + + var fields = ["KNOWLEDGEDISCUSSIONID","PARENTENTRY" + ,"KNOWLEDGEMANAGEMENT_ID","DISCUSSIONTEXT" + ,"STATUS","AUTHOR" + ,"DATE_NEW","USER_NEW"]; + + var values = [ + pRowData["UID.value"] + ,pDiscussionId.trim() + ,this.knowledgeId.trim() + ,pRowData["DISCUSSIONTEXT.value"] + ,pRowData["STATUS.value"] + ,pRowData["AUTHOR.value"].trim() + ,datetime.date() + ,vars.get("$sys.user").trim() + ]; + + db.insertData("KNOWLEDGEDISCUSSION", fields, null, values); + + return this; +} +/** + * Function for editing an existing Discussion. + * Used in the onUpdate process of the RecordContainer of the KnowledgeDiscussion entity + * + * @param {String} pDiscussionId $local.idvalue of the onUpdate process + * @param {Array} pRowData $local.rowdata of the onUpdate process + * @param {Array} pChanged $local.changed of the onUpdate process + * + * @return {this} + */ +KnowledgeDiscussion.prototype.editDiscussion = function(pDiscussionId, pRowData, pChanged) +{ + if(!pDiscussionId) + return this; + + var i; + var fields = []; + var values = []; + + for(i = 0; i < pChanged.length; i++) + { + let field = pChanged[i]; + values.push(pRowData[field]); + fields.push(field.split(".")[0]); + } + + + db.updateData("KNOWLEDGEDISCUSSION" + , fields + , null + , values + , newWhere("KNOWLEDGEDISCUSSION.KNOWLEDGEDISCUSSIONID", pDiscussionId) + .and("KNOWLEDGEDISCUSSION.KNOWLEDGEMANAGEMENT_ID", this.knowledgeId).toString()); + + return this; +} +/** + * Function for deleting an existing Discussion. + * Used in the onUpdate process of the RecordContainer of the KnowledgeDiscussion entity + * + * @param {String} pDiscussionId $local.idvalue of the onUpdate process + * + * @return {this} + */ +KnowledgeDiscussion.prototype.deleteDiscussion = function(pDiscussionId) +{ + if(!pDiscussionId) + return this; + + db.deleteData("KNOWLEDGEDISCUSSION" + , newWhere("KNOWLEDGEDISCUSSION.KNOWLEDGEDISCUSSIONID", pDiscussionId) + .and("KNOWLEDGEDISCUSSION.KNOWLEDGEMANAGEMENT_ID", this.knowledgeId).toString()); + + return this; +} +/** + * Static function for checking if a discussion has children below itself + * + * @param {String} pId Id of the discussion to check + * + * @return {Boolean} true if number of children is greater than 0 + */ +KnowledgeDiscussion.hasChildren = function(pId) +{ + return newSelect("count(*)").from("KNOWLEDGEDISCUSSION").where("KNOWLEDGEDISCUSSION.PARENTENTRY", pId).cell() > 0 +} + +/** + * Function for setting the status of a discussion AND its children + * @param {String} pDiscussionId The id of the discussion + * @param {String} pStatus $KeywordRegistry.discussionStatus$acitve() or $KeywordRegistry.discussionStatus$closed() + * + * @return {this} + */ +KnowledgeDiscussion.prototype.setDiscussionStatus = function(pDiscussionId, pStatus) +{ + + if(!pDiscussionId || (pStatus !== $KeywordRegistry.discussionStatus$acitve() && pStatus !== $KeywordRegistry.discussionStatus$closed())) + return this; + + let table = "KNOWLEDGEDISCUSSION"; + let cols = ["STATUS"]; + let updates = []; + let updateTemplate = [table, cols, null, [pStatus]]; + + _addChildrenToUpdates(pDiscussionId, pStatus); + let parentUpdate = [].slice.call(updateTemplate,0); + parentUpdate.push(table+"ID = '" + pDiscussionId + "'"); + updates.push(parentUpdate); + + db.updates(updates); + + function _addChildrenToUpdates(pId, pStatus) + { + var data = newSelect(["KNOWLEDGEDISCUSSIONID", "PARENTENTRY"]) + .from("KNOWLEDGEDISCUSSION") + .where("KNOWLEDGEDISCUSSION.PARENTENTRY", pId) + .table(); + if(!data.length) + return; + + for(var i = 0; i < data.length; i++) + { + let upd = [].slice.call(updateTemplate,0); + upd.push(table+"ID = '" + data[i][0] + "'"); + updates.push(upd); + //db.updateData(table, cols, colTypes, [pStatus], table+"ID = '" + data[i][0] + "'"); + _addChildrenToUpdates(data[i][0], pStatus); + } + } + + return this; +} + +function KnowledgeIndexHelper(pKnowledgeId, pData) +{ + this.knowledgeId = pKnowledgeId || null; + this.data = pData || null; +} + +KnowledgeIndexHelper.getInstance = function(pId, pData) +{ + return new KnowledgeIndexHelper(pId, pData); +} + +KnowledgeIndexHelper.prototype.getDocumentsFromContent = function() +{ + var tempArray = []; + var content = newSelect("CONTENT") + .from("KNOWLEDGEMANAGEMENT") + .where("KNOWLEDGEMANAGEMENT.KNOWLEDGEMANAGEMENTID", this.knowledgeId) + .cell(); + var invalidLink = false; + // the question mark quantifier is in (.*?) to make sure, that more than one file link can be present in one line! + var matches = content.match( new RegExp("<a href=\"file(.*?)((htm(l?))|(pdf)|(doc(x?)))\"", "gi") ); + var i = 0; + + if(matches) + matches.forEach( + function(match) + { + var data = null; + match = match.replace(/^(<a href="file:(\/*))/gi,"").replace(/"$/gi,""); + + if(vars.get("$sys.serveros").indexOf("windows") != -1) + { + match = match.replace(/[/\\]+FILER[/\\]publicshare\$/, "//filer/publicshare$", "gi").replace("S:", "//filer/publicshare$").replace(/\\/g, "/"); + } + else + { + match = match.replace(/[/\\]+FILER[/\\]publicshare\$/, "/mnt/filer_publicshare", "gi").replace("S:", "/mnt/filer_publicshare").replace(/\\/g, "/"); + } + + var decodedMatch = decodeURIComponent(match); + + if(fileIO.exists(decodedMatch)) + { + //only get data, if it's not a directory. getData on a directory fails with an exception + if(!fileIO.isDirectory(decodedMatch)) + { + data = fileIO.getData(decodeURIComponent(decodedMatch), util.DATA_BINARY); + } + } + else + { + invalidLink = true; + } + + if(data != null) + { + tempArray.push(data); + } + } + ,this); + + this.data[8] = tempArray; + + return this; +} + +function KnowledgeUtils(){} + +KnowledgeUtils.getLocalIdValue = function() +{ + var id = vars.exists("$local.idvalues") && vars.get("$local.idvalues"); + id = ( id && (typeof id == "object") && id.length == 1 ) ? id[0] : id; + + return id; +} + +KnowledgeUtils.isAcademy = function(pUser) +{ + let roles = tools.getRoles(pUser); + + for(let i = 0; i < roles.length; i++) + if(roles[i] == "PROJECT_Abt_Akademie") + return true; + + return false; +} + +KnowledgeUtils.trimAndUp = function(pIn) +{ + return pIn.trim().toUpperCase(); +} \ No newline at end of file diff --git a/process/Neon_lib/process.js b/process/Neon_lib/process.js index b758e7db586995f24a7a3051427e610e5e053b7f..4d7d910d5d98598a85aec882756dd42d87cc0693 100644 --- a/process/Neon_lib/process.js +++ b/process/Neon_lib/process.js @@ -177,12 +177,11 @@ CopyModuleUtils.copyModule = function(pInputMapping) var ModuleColumnsStructure = AliasDefinitionStructure.tables[pModule].columns; var cols = Object.keys(ModuleColumnsStructure); - - var condition = "1=1"; + var dataQuery = newSelect(cols).from(pModule); if(pCondition != undefined) - condition = pCondition; + dataQuery.where(pCondition) - var dbData = newSelect(cols).from(pModule).where(condition).table(); + var dbData = dataQuery.table(); //map 2d-Array to Object { $rowNumber$: { $columnName$: { value: "valueInDB" } } } var DataObj = {}; @@ -304,23 +303,15 @@ CopyModuleUtils.copyModule = function(pInputMapping) } break; case "OFFERLINK": - { - - } default: { - } - - + } } return ModuleRowMapping; } - - - function _columnMapping(pNewValue, pOldValue, pDestinationColumn) { return { @@ -329,7 +320,6 @@ CopyModuleUtils.copyModule = function(pInputMapping) destinationColumn: pDestinationColumn }; } - } /** @@ -356,33 +346,26 @@ CopyModuleUtils.copyModule = function(pInputMapping) for(var subModule in pMapping.SubModules) { - for(var row in pMapping.SubModules[subModule].DataRows) { statements.push(_statement(pMapping.SubModules[subModule].DataRows[row])); } - _subordinatedStatements(pMapping.SubModules[subModule]); } - } function _statement(pRowMapping) { - var cols = []; - var vals = []; + var fieldValues = new Map(); var destTable = pRowMapping.ModuleMapping.destinationModuleName; var colMapping = pRowMapping.ColumnMapping; - for(var col in colMapping) + for (let col in colMapping) { - cols.push(colMapping[col].destinationColumn); - vals.push(colMapping[col].newValue.toString()); + fieldValues.set(colMapping[col].destinationColumn, colMapping[col].newValue) } - var colTypes = db.getColumnTypes(destTable, cols)//load once for better performance - - return [destTable, cols, colTypes, vals]; + return new SqlBuilder().buildInsertStatement(fieldValues, destTable); } } } diff --git a/process/NewsSystem_lib/NewsSystem_lib.aod b/process/NewsSystem_lib/NewsSystem_lib.aod new file mode 100644 index 0000000000000000000000000000000000000000..f4907ecd213576e621efc14f752d3cfcf07c539e --- /dev/null +++ b/process/NewsSystem_lib/NewsSystem_lib.aod @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.1"> + <name>NewsSystem_lib</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <process>%aditoprj%/process/NewsSystem_lib/process.js</process> + <variants> + <element>LIBRARY</element> + </variants> +</process> diff --git a/process/NewsSystem_lib/process.js b/process/NewsSystem_lib/process.js new file mode 100644 index 0000000000000000000000000000000000000000..08af9ed2029b68510491acd2341584bd452e5703 --- /dev/null +++ b/process/NewsSystem_lib/process.js @@ -0,0 +1,91 @@ +import("Sql_lib"); +import("system.vars"); +import("system.util"); +import("KnowledgeManagement_lib"); +import("system.entities"); +import("system.text"); +import("system.notification"); +import("system.tools"); + +function NewsSystem() {} + +/* + * Returns the selected users with the given role/s. + * + * @param {Array} roleArray req roles, that need to are selected. + * + * @return {Array} User internal name of user model. + */ +NewsSystem.getUsersWithRoles = function(roleArray) +{ + var users = tools.getUsers(tools.getUsersWithAnyRole(roleArray), tools.PROFILE_FULL); + var arr = []; + + for(var i = 0; i < users.length; i++) + { + arr.push(users[i][tools.NAME]); + } + + return arr; +} + +/* + * Creates a news notification for the selected users. + * + * @param {String} description req The description of the news. + * @param {String} caption req The title of the news. + * @param {Array} users req Selected users. + * @param {String} id req KnowledgemanagementID to connect the notification. + * + * @return {void} + */ +NewsSystem.createNewsNotification = function(description, caption, users, id) +{ + var config = notification.createConfig() + .notificationType("News") + .description(description) + .caption(caption) + .linkInfo(text.encodeMS(["KnowledgeManagement", id])) + .initialState(notification.STATE_UNSEEN) + .addUsersWithIds(users); + + notification.addNotificationWith(config); +} + +/* + * Returns a sub-sql for the translated Roles. + * + * @return {String} Returns a sub-sql for the translated Roles. + */ +NewsSystem.getDisplayValue = function() +{ + var resultSet = SqlBuilder.caseStatement(); + var allRolesObject = tools.getAllRoles(); + + for (let role in allRolesObject) + { + let currentRoleObject = allRolesObject[role]; + resultSet.when("KNOWLEDGEROLES.ROLENAME", currentRoleObject[3]).thenString(currentRoleObject[0]); + } + + return resultSet.toString(); +} + +NewsSystem.setAsNews = function(pKnowledgeID, pNotification, pIsNews) +{ + if(pNotification) //check if the field "mark" is ticked + { + vars.set("$context.setNotificationMark", true); //set context variable true to trigger the afterOperatingState process + } + + if(pIsNews) //check if the field "isNewsMark" is ticked + { + var knowledgeId = pKnowledgeID; + var data = {}; + data["TAG.value"] = "News"; + + KnowledgeManagementTagsController + .getInstance(knowledgeId) + .addTag(util.getNewUUID(), data); //set the "news"-tag to the current data set + } +} diff --git a/process/Offer_lib/process.js b/process/Offer_lib/process.js index f5a8cd0138d503694a5e0e0a52b21bb277eb156c..78ea329bfc0de71f18965d80cc03b82397687b0e 100644 --- a/process/Offer_lib/process.js +++ b/process/Offer_lib/process.js @@ -319,29 +319,24 @@ OfferUtils.openOfferReport = function (pOfferID) * opens an offer in NEW mode with values from an offer * * @param {String} pOfferId of the offer - * @param {String} pContactId - * @param {String} pLanguage - * @param {String} [pCurrency=""] - * @param {String} [pHeader=""] - * @param {String} [pFooter=""] - * @param {String} [pDeliveryTerm=""] - * @param {String} [pPaymentTerm=""] - * @param {String} [pObjectType=""] - * @param {String} [pRowId=""] + * @param {Object} [pOfferData={}] additional offer properties: + * contactId, language, currency, header, footer, deliveryTerm, paymentTerm, objectType, objectRowId */ -OfferUtils.copyOffer = function (pOfferId, pContactId, pLanguage, pCurrency, pHeader, pFooter, pDeliveryTerm, pPaymentTerm, pObjectType, pRowId) +OfferUtils.copyOffer = function (pOfferId, pOfferData) { + if (!pOfferData) + pOfferData = {}; var params = { - "ContactId_param" : pContactId, - "OfferLanguage_param" : pLanguage, - "OfferOriginal_Id_param" : pOfferId, - "OfferCurrency_param" : pCurrency || "", - "OfferHeader_param" : pHeader || "", - "OfferFooter_param" : pFooter || "", - "OfferDeliveryTerm_param" : pDeliveryTerm || "", - "OfferPaymentTerm_param" : pPaymentTerm || "", - "ObjectType_param" : pObjectType || "", - "ObjectRowId_param" : pRowId || "" + "OfferOriginal_Id_param": pOfferId, + "ContactId_param": pOfferData.contactId, + "OfferLanguage_param": pOfferData.language, + "OfferCurrency_param": pOfferData.currency || "", + "OfferHeader_param": pOfferData.header || "", + "OfferFooter_param": pOfferData.footer || "", + "OfferDeliveryTerm_param": pOfferData.deliveryTerm || "", + "OfferPaymentTerm_param": pOfferData.paymentTerm || "", + "ObjectType_param": pOfferData.objectType || "", + "ObjectRowId_param": pOfferData.objectRowId || "" }; neon.openContext("Offer", null, null, neon.OPERATINGSTATE_NEW, params); } @@ -354,24 +349,26 @@ OfferUtils.copyOffer = function (pOfferId, pContactId, pLanguage, pCurrency, pHe */ OfferUtils.copyOfferItems = function (pSourceOfferId, pTargetOfferId) { - var InputMapping = { + var inputMapping = { "OFFERITEM": { - condition: newWhereIfSet("OFFERITEM.OFFER_ID", pSourceOfferId).orderBy("ITEMSORT").toString(SqlBuilder.NORESULT_CONDITION(), true), + condition: newWhere("OFFERITEM.OFFER_ID", pSourceOfferId), ValueMapping: { - "OFFER_ID" : pTargetOfferId + "OFFER_ID": pTargetOfferId } } }; - CopyModuleUtils.copyModule(InputMapping); + CopyModuleUtils.copyModule(inputMapping); var oiUtils = new OfferItemUtils(pTargetOfferId); //update order price - cols = ["NET", "VAT"]; - var vals = oiUtils.getNetAndVat(); + var [netPrice, vat] = oiUtils.getNetAndVat(); newWhere("OFFER.OFFERID", pTargetOfferId) - .updateData(true, "OFFER", cols, null, vals); + .updateFields({ + "NET": netPrice, + "VAT": vat + }); } /** diff --git a/process/Order_lib/process.js b/process/Order_lib/process.js index bcb1b8428693ab99e51713ecb61a1b44fc6a4857..10c273583ad42d884846b814b622899c7d9b3f5f 100644 --- a/process/Order_lib/process.js +++ b/process/Order_lib/process.js @@ -97,32 +97,42 @@ OrderUtils.createNewOrder = function(pContextId, pRowId, pRelationId) neon.openContext("Order", null, null, neon.OPERATINGSTATE_NEW, params); } -OrderUtils.copyOrder = function (pSourceOfferId, pContactId, pOrderType, pLanguage, pCurrency, pHeader, pFooter, pDeliveryTerm, pPaymentTerm, pPaymentAddress, pDeliveryAddress, pObjectType, pRowId, pDunningDate, pDunningLevel, pCancellation, pOrderStatus) +/** + * Opens a new Order copy + * + * @param {String} pSourceOrderId id of the source order + * @param {Object} [pOrderData] the field values to preset, possible properties: contactId, orderType, language, offerId, currency, + * header, footer, deliveryTerm, paymentTerm, paymentAddress, deliveryAddress, objectType, objectRowId, + * dunningDate, dunningLevel, cancellation, orderStatus + */ +OrderUtils.copyOrder = function (pSourceOrderId, pOrderData) { - + if (!pOrderData) + pOrderData = {}; var fieldparams = { - "$field.CONTACT_ID" : pContactId, - "$field.ORDERTYPE" : pOrderType, - "$field.ISOLANGUAGE" : pLanguage, - "$field.OFFER_ID" : pSourceOfferId, - "$field.CURRENCY" : pCurrency || "", - "$field.HEADER" : pHeader || "", - "$field.FOOTER" : pFooter || "", - "$field.DELIVERYTERMS" : pDeliveryTerm || "", - "$field.PAYMENTTERMS" : pPaymentTerm || "", - "$field.PAYMENTADDRESS" : pPaymentAddress || "", - "$field.DELIVERYADDRESS" : pDeliveryAddress || "", - "$field.OBJECT_TYPE" : pObjectType || "", - "$field.OBJECT_ROWID" : pRowId || "", - "$field.DUNNINGDATE" : pDunningDate || "", - "$field.DUNNINGLEVEL" : pDunningLevel || "", - "$field.CANCELLATION" : pCancellation || "", - "$field.ORDERSTATUS" : pOrderStatus || "" + "$field.CONTACT_ID": pOrderData.contactId, + "$field.ORDERTYPE": pOrderData.orderType, + "$field.ISOLANGUAGE": pOrderData.language, + "$field.OFFER_ID": pOrderData.offerId, + "$field.CURRENCY": pOrderData.currency || "", + "$field.HEADER": pOrderData.header || "", + "$field.FOOTER": pOrderData.footer || "", + "$field.DELIVERYTERMS": pOrderData.deliveryTerm || "", + "$field.PAYMENTTERMS": pOrderData.paymentTerm || "", + "$field.PAYMENTADDRESS": pOrderData.paymentAddress || "", + "$field.DELIVERYADDRESS": pOrderData.deliveryAddress || "", + "$field.OBJECT_TYPE": pOrderData.objectType || "", + "$field.OBJECT_ROWID": pOrderData.objectRowId || "", + "$field.DUNNINGDATE": pOrderData.dunningDate || "", + "$field.DUNNINGLEVEL": pOrderData.dunningLevel || "", + "$field.CANCELLATION": pOrderData.cancellation || "", + "$field.ORDERSTATUS": pOrderData.orderStatus || "" }; - var params = {}; - params["Copy_param"] = JSON.stringify(fieldparams); - params["OfferId_param"] = pSourceOfferId; + var params = { + "Copy_param": JSON.stringify(fieldparams), + "SourceOrderId_param": pSourceOrderId + }; neon.openContext("Order", null, null, neon.OPERATINGSTATE_NEW, params); } @@ -174,6 +184,36 @@ OrderUtils.copyOfferItemsToOrder = function (pSourceOfferId, pOrderId) .updateData(true, "SALESORDER", cols, null, vals); } +/** + * copies all orderItems and creates orderItems for an order + * + * @param {String} pSourceOrderId the order to get the items from + * @param {String} pTargetOrderId the order to create the items for + */ +OrderUtils.copyOrderItems = function (pSourceOrderId, pTargetOrderId) +{ + var inputMapping = { + "SALESORDERITEM": { + condition: newWhere("SALESORDERITEM.SALESORDER_ID", pSourceOrderId), + ValueMapping: { + "SALESORDER_ID": pTargetOrderId + } + } + }; + CopyModuleUtils.copyModule(inputMapping); + + var oiUtils = new OrderItemUtils(pTargetOrderId); + + //update order price + var [netValue, vat] = oiUtils.getNetAndVat(); + + newWhere("SALESORDER.SALESORDERID", pTargetOrderId) + .updateFields({ + "NET": netValue, + "VAT": vat + }); +} + /** * Will build the order report for the given order. * diff --git a/process/Placeholder_lib/process.js b/process/Placeholder_lib/process.js index 2c1cb9d8214a5b5ca9d0698a3d7dc14d345cdf64..a162fc7ee5d7514746718d5054fa10f7cb73df71 100644 --- a/process/Placeholder_lib/process.js +++ b/process/Placeholder_lib/process.js @@ -53,10 +53,10 @@ PlaceholderUtils.getPlaceholders = function (pLocale, pIsExportTemplateField) _addSqlPart("title", "PERSON.TITLE", null , translate.text("Title", locale)); _addSqlPart("phone", CommUtil.getStandardSubSqlPhone(), null , translate.text("Phone", locale)); _addSqlPart("email", CommUtil.getStandardSubSqlMail(), null , translate.text("Email", locale)); - _addSqlPart("name", sqlUtil.concat(["SALUTATION", "TITLE", "FIRSTNAME", "LASTNAME"]), null , translate.text("Name", locale)); + _addSqlPart("name", sqlUtil.concatWithSeparator(["SALUTATION", "TITLE", "FIRSTNAME", "LASTNAME"]), null , translate.text("Name", locale)); _addSqlPart("senderPhone", CommUtil.getStandardSubSqlPhone(), Placeholder.targets.SENDER, null); _addSqlPart("senderEmail", CommUtil.getStandardSubSqlMail(), Placeholder.targets.SENDER, null); - _addSqlPart("senderName", sqlUtil.concat(["SALUTATION", "TITLE", "FIRSTNAME", "LASTNAME"]), Placeholder.targets.SENDER, null); + _addSqlPart("senderName", sqlUtil.concatWithSeparator(["SALUTATION", "TITLE", "FIRSTNAME", "LASTNAME"]), Placeholder.targets.SENDER, null); _addSqlPart("date", "'" + datetime.toDate(vars.get("sys.date"), translate.text("dd.MM.yyyy")) + "'", Placeholder.targets.SENDER, null); diff --git a/process/PostalAddress_lib/process.js b/process/PostalAddress_lib/process.js index b7cf917b59474c3ae70496de43be1554e4b28aea..996991dd07a980a6ba91ed1851171b0d2a8ce9f2 100644 --- a/process/PostalAddress_lib/process.js +++ b/process/PostalAddress_lib/process.js @@ -42,7 +42,7 @@ AddressUtils.formatOnelineSql = function () { //request (and resulting change) was made here to NOT include Country int othe title var maskingHelper = new SqlMaskingUtils(); - var sqlExpression = maskingHelper.concat(["ADDRESS.ADDRESS", "ADDRESS.BUILDINGNO", "'-'", "ADDRESS.COUNTRY", "ADDRESS.ZIP", "ADDRESS.CITY", "ADDRESS.ADDRIDENTIFIER"]); + var sqlExpression = maskingHelper.concatWithSeparator(["ADDRESS.ADDRESS", "ADDRESS.BUILDINGNO", "'-'", "ADDRESS.COUNTRY", "ADDRESS.ZIP", "ADDRESS.CITY", "ADDRESS.ADDRIDENTIFIER"]); return sqlExpression; }; diff --git a/process/SetAttribute_workflowService/process.js b/process/SetAttribute_workflowService/process.js index c9f17d88c318b1f97b6efb9894f68cd20a161bf0..aebb4c992da87e3b4e07edd6b47ee62e6e6436e3 100644 --- a/process/SetAttribute_workflowService/process.js +++ b/process/SetAttribute_workflowService/process.js @@ -16,4 +16,12 @@ if (variables.attributeName) else attributeId = variables.attributeId; +//attributeValueVariable -> instance variable to use for the attribute value +if (variables.attributeValueVariable) +{ + var attributeValue = variables[variables.attributeValueVariable]; + if (attributeValue !== null && attributeValue !== undefined && attributeValue !== "") + variables.attributeValue = attributeValue; +} + new AttributeRelationQuery(variables.targetId, attributeId, variables.targetContext).insertAttribute(variables.attributeValue); \ No newline at end of file diff --git a/process/SetAttribute_workflowService/serviceTaskParameterProcess.js b/process/SetAttribute_workflowService/serviceTaskParameterProcess.js index 118269c0c1e6b7093e9e3923e44df5c9c5c10ac3..97d40e0f704a8424f82703311cbeb4ed56babc05 100644 --- a/process/SetAttribute_workflowService/serviceTaskParameterProcess.js +++ b/process/SetAttribute_workflowService/serviceTaskParameterProcess.js @@ -31,19 +31,22 @@ attributes = attributes.map(function (attributeId) var parentId = attributeId; var fullName = ""; //the loop will stop if an id comes up twice, because otherwise that could cause an infinite loop if the data is faulty - var alreadyEncountered = {}; - while (parentId && attributeNameMap[parentId] && !alreadyEncountered[parentId]) + var alreadyEncountered = new Set(); + while (parentId && attributeNameMap[parentId] && !alreadyEncountered.has(parentId)) { var [currentName, currentParent] = attributeNameMap[parentId]; if (!fullName) fullName = currentName; else fullName = currentName + " / " + fullName; - alreadyEncountered[parentId] = true; + alreadyEncountered.add(parentId); parentId = currentParent; } - return {id : attributeId, name : fullName}; + return { + id: attributeId, + name: fullName + }; }); var parameters = [ @@ -74,4 +77,6 @@ if (currentValues.attributeId && currentValues.attributeId.value) parameters.push(new WorkflowServiceTaskParameter("attributeValue", "Value", paramType, enumValues)); } +parameters.push(new WorkflowServiceTaskParameter("attributeValueVariable", "Value variable", WorkflowServiceTaskParameter.STRING())); + result.object(parameters); \ No newline at end of file diff --git a/process/Sql_lib/process.js b/process/Sql_lib/process.js index 75c6923e24957c4f574efec077d73d60d9a52680..e90835fbafdf4bab5326148ab248fce6706c4546 100644 --- a/process/Sql_lib/process.js +++ b/process/Sql_lib/process.js @@ -3568,9 +3568,64 @@ SqlMaskingUtils.prototype.substring = function (pField, pStartPos, pLength) return sqlFnName + "(" + pField + ", " + pStartPos + ", " + pLength + ")"; } +/** +* masks the function concat (without separator) +* +* @param {Array} pFields fields (or expressions) that should be concatenated +* +* @return {String} part of SQL-querey +*/ +SqlMaskingUtils.prototype.concatenate = function (pFields) +{ + if (pFields.length === 0) + return "''"; + + switch (this.dbType) + { + case db.DBTYPE_MYSQL4: + case db.DBTYPE_MARIADB10: + case db.DBTYPE_POSTGRESQL8: + return " concat(" + pFields.join(", ") + ")"; + case db.DBTYPE_ORACLE10_CLUSTER: + case db.DBTYPE_ORACLE10_THIN: + case db.DBTYPE_ORACLE10_OCI: + break; + case db.DBTYPE_SQLSERVER2000: + //MS SQL Server supports "concat_ws" (and ignoring null values) from version SQL Server 2017 and newer: + //https://docs.microsoft.com/de-de/sql/t-sql/functions/concat-ws-transact-sql?view=sql-server-2017 + break; + case db.DBTYPE_DERBY10: + break; + default: + throw new Error(translate.withArguments("${SQL_LIB_UNSUPPORTED_DBTYPE} function: %0", ["SqlMaskingUtils.prototype.concatenate"])); + } + + var fields = []; + + for (let i = 0; i < pFields.length; i++) + { + let field = pFields[i]; + let isLast = i + 1 === pFields.length; + + if (field && field != "''") + { + if (_isFixedValue(field)) + fields.push(field); + else + fields.push(this.isNull(field)); + } + } + + return fields.join(this.getConcatSymbol()) || "''"; + + function _isFixedValue (pSqlField) + { + return pSqlField.startsWith("'") && pSqlField.endsWith("'") && !pSqlField.slice(1, -1).includes("'"); + } +} /** -* masks the function concat +* masks the function concat_ws * if a sql field is empty no separator will be added * note that this function will often create a lot of sql-code * @@ -3580,13 +3635,16 @@ SqlMaskingUtils.prototype.substring = function (pField, pStartPos, pLength) * * @return {String} part of SQL-querey */ -SqlMaskingUtils.prototype.concat = function (pFields, pSeparator, pAutoTrimFields) +SqlMaskingUtils.prototype.concatWithSeparator = function (pFields, pSeparator, pAutoTrimFields) { if (pFields.length === 0) return "''"; if (pFields.length === 1) return pFields[0]; + if (pSeparator === "" && pAutoTrimFields == false) + return this.concatenate(pFields); + if (pAutoTrimFields == undefined) pAutoTrimFields = true; @@ -3595,7 +3653,7 @@ SqlMaskingUtils.prototype.concat = function (pFields, pSeparator, pAutoTrimField else if (pSeparator || pSeparator === "") pSeparator = "'" + db.quote(pSeparator, this.alias) + "'"; - var doEmptyStringCheck = true; + var isEmptyStringNull = false; switch (this.dbType) { @@ -3608,7 +3666,7 @@ SqlMaskingUtils.prototype.concat = function (pFields, pSeparator, pAutoTrimField case db.DBTYPE_ORACLE10_CLUSTER: case db.DBTYPE_ORACLE10_THIN: case db.DBTYPE_ORACLE10_OCI: - doEmptyStringCheck = false; //empty strings are changed to DB-null-values internally in oracle; by specifing JS-null we disable this check + isEmptyStringNull = true; //empty strings are changed to DB-null-values internally in oracle break; case db.DBTYPE_SQLSERVER2000: //MS SQL Server supports "concat_ws" (and ignoring null values) from version SQL Server 2017 and newer: @@ -3617,7 +3675,7 @@ SqlMaskingUtils.prototype.concat = function (pFields, pSeparator, pAutoTrimField case db.DBTYPE_DERBY10: break; default: - throw new Error(translate.withArguments("${SQL_LIB_UNSUPPORTED_DBTYPE} function: %0", ["SqlMaskingUtils.prototype.concat"])); + throw new Error(translate.withArguments("${SQL_LIB_UNSUPPORTED_DBTYPE} function: %0", ["SqlMaskingUtils.prototype.concatWithSeparator"])); } var concatCharacter = this.getConcatSymbol(); @@ -3628,10 +3686,13 @@ SqlMaskingUtils.prototype.concat = function (pFields, pSeparator, pAutoTrimField let field = pFields[i]; let isLast = i + 1 === pFields.length; - if (!_isFixedValue(field)) - concatSql += (pAutoTrimFields ? this.trim(this.isNull(field)) : this.isNull(field)); - else + if (_isFixedValue(field)) concatSql += (pAutoTrimFields ? "'" + field.slice(1, -1).trim() + "'" : field); + else + { + let stringField = isEmptyStringNull ? field : this.isNull(field); + concatSql += (pAutoTrimFields ? this.trim(stringField) : this.isNull(stringField)); + } if (!isLast) { @@ -3644,10 +3705,12 @@ SqlMaskingUtils.prototype.concat = function (pFields, pSeparator, pAutoTrimField } else if (pSeparator) { + let nextNotNullCondition; let nextFieldTrimmed = pAutoTrimFields ? this.trim(nextField) : nextField; - let nextNotNullCondition = nextField + " is not null "; - if (doEmptyStringCheck || pAutoTrimFields) - nextNotNullCondition += " and " + nextFieldTrimmed + " != '' "; + if (isEmptyStringNull) + nextNotNullCondition = nextFieldTrimmed + " is not null"; + else + nextNotNullCondition = nextField + " is not null and " + nextFieldTrimmed + " != ''"; concatSql += "case when " + nextNotNullCondition + " then " + pSeparator + " else '' end " + concatCharacter; } @@ -3662,6 +3725,25 @@ SqlMaskingUtils.prototype.concat = function (pFields, pSeparator, pAutoTrimField } } +/** +* masks the function concat +* if a sql field is empty no separator will be added +* note that this function will often create a lot of sql-code +* +* @param {Array} pFields fields (or expressions) that should be concatenated +* @param {String} [pSeparator=space-character] character for separating the fields +* @param {String} [pAutoTrimFields=true] autoTrimFields if true the expressions are always trimmed, false no change will be applied +* +* @return {String} part of SQL-querey +* +* @deprecated The function has been renamed to SqlMaskingUtils.prototype.concatWithSeparator to differentiate it from +* SqlMaskingUtils.prototype.concatenate. +*/ +SqlMaskingUtils.prototype.concat = function (pFields, pSeparator, pAutoTrimFields) +{ + return this.concatWithSeparator(pFields, pSeparator, pAutoTrimFields); +} + /** * returns the function for replacing a null value * @@ -3766,6 +3848,33 @@ SqlMaskingUtils.prototype.yearFromDate = function(pField) } } +/** + * returns the first field, that is not null or empty + * masks the behaviour of coalesce with case when + * + * @param pFields {Array} Array of fieldnames. Has to be in the right order. It will be checked from 0 upwards + */ +SqlMaskingUtils.prototype.coalesce = function(pFields) +{ + var retSql = ""; + + if(pFields && typeof pFields == "object" && pFields.length) + { + retSql = "case "; + + for(let i = 0; i < pFields.length; i++) + { + retSql += " when (" + pFields[i] + " is not null or " + pFields[i] + " <> '') then " + pFields[i] + " " + } + + retSql += " else null end"; + } + else + throw {message:"The input to coalesce has to be an Array containing the column names"}; + + return retSql; +} + /** * functions for various Sql-actions * Do not create an instance of this! diff --git a/process/Util_lib/process.js b/process/Util_lib/process.js index 778e4ae46cb0b4b5a7c5e2887baef1e71b2884a2..697b1e2dd7b50adeb79dc4d451fb89a7f81934a1 100644 --- a/process/Util_lib/process.js +++ b/process/Util_lib/process.js @@ -1082,4 +1082,11 @@ ConsecutiveCodeUtils.setCode = function(pId, pTable, pIdCol, pCodeCol) newWhereIfSet(pTable + "." + pIdCol, pId) .updateData(true, pTable, [pCodeCol], null, [parseInt(max)+1]); +} + +function IdUtils() {} + +IdUtils.isUUID = function(pIn) +{ + return /\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/i.test(pIn); } \ No newline at end of file