diff options
39 files changed, 892 insertions, 56 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/pom.xml index 7a421910b..d0dd61812 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/pom.xml +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for handling events being transported over JMS</description> - <properties> - <apex-plugins-event-carrier-jms-dir>${project.basedir}/src</apex-plugins-event-carrier-jms-dir> - </properties> - <dependencies> <dependency> <groupId>org.apache.activemq</groupId> diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/pom.xml index 54996a11a..468799041 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/pom.xml +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for handling events being transported over Kafka</description> - <properties> - <apex-plugins-event-carrier-kafka-dir>${project.basedir}/src</apex-plugins-event-carrier-kafka-dir> - </properties> - <dependencies> <dependency> <groupId>org.apache.kafka</groupId> diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/pom.xml index e61dbadb8..fa3f337b3 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/pom.xml +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for handling events being transported over REST where Apex acts as a REST client</description> - <properties> - <apex-plugins-event-carrier-restclient-dir>${project.basedir}/src</apex-plugins-event-carrier-restclient-dir> - </properties> - <dependencies> <dependency> <groupId>org.glassfish.jersey.core</groupId> diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml index 6377b82f8..f3f992fa5 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for handling REST requests and responses</description> - <properties> - <apex-plugins-event-carrier-restrequestor-dir>${project.basedir}/src</apex-plugins-event-carrier-restrequestor-dir> - </properties> - <dependencies> <dependency> <groupId>org.glassfish.jersey.core</groupId> diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/pom.xml index 86d39badd..7d6584d07 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/pom.xml +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for handling events being transported over REST where Apex acts as a REST server</description> - <properties> - <apex-plugins-event-carrier-restserver-dir>${project.basedir}/src</apex-plugins-event-carrier-restserver-dir> - </properties> - <dependencies> <dependency> <groupId>org.onap.policy.apex-pdp.services</groupId> diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/pom.xml b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/pom.xml index e3816d27f..0d149b1fb 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/pom.xml +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for handling events being transported over web sockets</description> - <properties> - <apex-plugins-event-carrier-websocket-dir>${project.basedir}/src</apex-plugins-event-carrier-websocket-dir> - </properties> - <profiles> <profile> <id>apexSite</id> diff --git a/plugins/plugins-event/plugins-event-carrier/pom.xml b/plugins/plugins-event/plugins-event-carrier/pom.xml index 1e6a41e8a..c07f17d9c 100644 --- a/plugins/plugins-event/plugins-event-carrier/pom.xml +++ b/plugins/plugins-event/plugins-event-carrier/pom.xml @@ -33,10 +33,6 @@ <name>${project.artifactId}</name> <description>Plugins for 3pps that carry events</description> - <properties> - <apex-plugins-event-carrier-dir>${project.basedir}/src</apex-plugins-event-carrier-dir> - </properties> - <modules> <module>plugins-event-carrier-kafka</module> <module>plugins-event-carrier-websocket</module> diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/pom.xml b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/pom.xml index e2518031a..b0c98798e 100644 --- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/pom.xml +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/pom.xml @@ -30,7 +30,23 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugins for handling events that are being transported as JMS messages</description> - <properties> - <apex-plugins-event-protocol-jms-dir>${project.basedir}/src</apex-plugins-event-protocol-jms-dir> - </properties> + <profiles> + <profile> + <id>apexSite</id> + <activation> + <property> + <name>apexSite</name> + </property> + </activation> + <properties> + <adsite-plugins-event-protocol-jms-dir>${project.basedir}/src</adsite-plugins-event-protocol-jms-dir> + </properties> + <distributionManagement> + <site> + <id>${project.artifactId}-site</id> + <url>${apex.adsite.prefix}/modules/plugins/plugins-event/${project.parent.artifactId}/${project.artifactId}/</url> + </site> + </distributionManagement> + </profile> + </profiles> </project>
\ No newline at end of file diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site-docs/adoc/fragments/ep-jms.adoc b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site-docs/adoc/fragments/ep-jms.adoc new file mode 100644 index 000000000..aa33a2b8f --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site-docs/adoc/fragments/ep-jms.adoc @@ -0,0 +1,51 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +== JMS Event + +The event protocol for JMS is provided by the APEX JMS plugin. +The plugin supports encoding as JSON text or as object. +There is no difference in the configuration for the input and output interface. + +=== JMS Text + +If used as input, APEX will take a JMS message and extract a JSON string, then proceed as if a JSON event was received. +If used as output, APEX will take the event produced by a policy, create a JSON string, and then wrap it into a JMS message. + +The configuration for JMS text is as follows: + +[source%nowrap,json] +---- +"eventProtocolParameters":{ + "eventProtocol" : "JMSTEXT", + "parameterClassName" : + "org.onap.policy.apex.plugins.event.protocol.jms.JMSTextEventProtocolParameters" +} +---- + + +=== JMS Object + +If used as input, APEX will will take a JMS message, extract a Java Bean from the `ObjectMessage` message, construct an APEX event and put the bean on the APEX event as a parameter. +If used as output, APEX will take the event produced by a policy, create a Java Bean and send it as a JMS message. + +The configuration for JMS object is as follows: + +[source%nowrap,json] +---- +"eventProtocolParameters":{ + "eventProtocol" : "JMSOBJECT", + "parameterClassName" : + "org.onap.policy.apex.plugins.event.protocol.jms.JMSObjectEventProtocolParameters" +} +---- diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/asciidoc/engine-config.adoc b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/asciidoc/engine-config.adoc new file mode 100644 index 000000000..070781f66 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/asciidoc/engine-config.adoc @@ -0,0 +1,14 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +include::{adsite-plugins-event-protocol-jms-dir}/site-docs/adoc/fragments/ep-jms.adoc[] diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/css/site.css b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/css/site.css new file mode 100644 index 000000000..ef8bd4d15 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/css/site.css @@ -0,0 +1,100 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +@import url(http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.0/css/font-awesome.css); + + +/*************** Table definitions *******************/ + +tableblock > .title, .tableblock > caption { line-height: 1.4; color: #7a2518; font-weight: 300; margin-top: 0.2em; margin-bottom: 0.5em; } + +.tableblock > caption { text-align: left; font-weight: bold; white-space: nowrap; overflow: visible; max-width: 0; } + +table.tableblock { background: white; margin-bottom: 1.25em; border: solid 1px #dddddd; } +table.tableblock thead, table.tableblock tfoot { background: whitesmoke; font-weight: bold; } +table.tableblock thead tr th, table.tableblock thead tr td, table tfoot tr th, table tfoot tr td { padding: 0.5em 0.625em 0.625em; font-size: inherit; color: #222222; text-align: left; } +table.tableblock tr th, table.tableblock tr td { padding: 0.5625em 0.625em; font-size: inherit; color: #222222; } +table.tableblock tr.even, table.tableblock tr.alt, table.tableblock tr:nth-of-type(even) { background: #f9f9f9; } +table.tableblock thead tr th, table.tableblock tfoot tr th, table.tableblock tbody tr td, table.tableblock tr td, table.tableblock tfoot tr td { display: table-cell; line-height: 1.6; } + +table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p { font-size: inherit; } + +table.tableblock.grid-all { border-collapse: separate; border-spacing: 1px; -webkit-border-radius: 4px; border-radius: 4px; border-top: 1px solid #dddddd; border-bottom: 1px solid #dddddd; } + +table.tableblock.frame-topbot, table.tableblock.frame-none { border-left: 0; border-right: 0; } + +table.tableblock.frame-sides, table.tableblock.frame-none { border-top: 0; border-bottom: 0; } + +table.tableblock td .paragraph:last-child p, table.tableblock td > p:last-child { margin-bottom: 0; } + +th.tableblock.halign-left, td.tableblock.halign-left { text-align: left; } + +th.tableblock.halign-right, td.tableblock.halign-right { text-align: right; } + +th.tableblock.halign-center, td.tableblock.halign-center { text-align: center; } + +th.tableblock.valign-top, td.tableblock.valign-top { vertical-align: top; } + +th.tableblock.valign-bottom, td.tableblock.valign-bottom { vertical-align: bottom; } + +th.tableblock.valign-middle, td.tableblock.valign-middle { vertical-align: middle; } + +p.tableblock.header { color: #222222; font-weight: bold; } + + + +/*************** KBD Macro definitions *******************/ + +kbd.keyseq { color: #555555; } + +kbd:not(.keyseq) { display: inline-block; color: #222222; font-size: 0.75em; line-height: 1.4; background-color: #F7F7F7; border: 1px solid #ccc; -webkit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; margin: -0.15em 0.15em 0 0.15em; padding: 0.2em 0.6em 0.2em 0.5em; vertical-align: middle; white-space: nowrap; } + +kbd kbd:first-child { margin-left: 0; } + +kbd kbd:last-child { margin-right: 0; } + + +/*************** Admontion Blocks definitions *******************/ +.admonitionblock td.content > .title, .exampleblock > .title, .imageblock > .title, .videoblock > .title, .listingblock > .title, .literalblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, .sidebarblock > .title, .tableblock > .title, .verseblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-align: left; font-weight: bold; } + +.admonitionblock > table { border: 0; background: none; width: 100%; margin-top: 1em; margin-bottom: 1em;} +.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; text-transform: uppercase; } +.admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px solid #dddddd; color: #6f6f6f; } +.admonitionblock > table td.content > :last-child > :last-child { margin-bottom: 0; } + +.admonitionblock td.icon [class^="fa icon-"]:before {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: #005498; color: #003f72; } +.admonitionblock td.icon .icon-tip:before { content: "\f0eb"; text-shadow: 1px 1px 2px rgba(155, 155, 0, 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; } + + + +/*************** Misc definitions *******************/ + +*:not(pre) > code { font-size: 0.9375em; padding: 1px 3px 0; white-space: nowrap; background-color: #f2f2f2; border: 1px solid #cccccc; -webkit-border-radius: 4px; border-radius: 4px; text-shadow: none; } + +pre, pre > code { line-height: 1.4; color: inherit; font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; } + +code { font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; color: #6d180b; } + diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/images/logos.png b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/images/logos.png Binary files differnew file mode 100644 index 000000000..915d6e59d --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/images/logos.png diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/site.xml b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/site.xml new file mode 100644 index 000000000..9673c5e22 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/site/site.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2016-2018 Ericsson. All rights reserved. + ================================================================================ + This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE + Full license text at https://creativecommons.org/licenses/by/4.0/legalcode + + SPDX-License-Identifier: CC-BY-4.0 + ============LICENSE_END========================================================= + + @author Sven van der Meer (sven.van.der.meer@ericsson.com) + +--> + +<project name="APEX Plugins Event Protocol JMS"> + <body> + <menu name="APEX Plugins Event Protocol JMS"> + <item href="engine-config.html" name="Engine Configuration" /> + <item href="javadocs/index.html" name="API Doc" /> + </menu> + <menu ref="reports" inherit="top" /> + <menu ref="modules" /> + + <breadcrumbs> + <item name="JMS" href="index.html" /> + </breadcrumbs> + </body> +</project>
\ No newline at end of file diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/pom.xml b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/pom.xml index 4a2323dbd..35e3afd5b 100644 --- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/pom.xml +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/pom.xml @@ -105,4 +105,24 @@ </plugin> </plugins> </build> + + <profiles> + <profile> + <id>apexSite</id> + <activation> + <property> + <name>apexSite</name> + </property> + </activation> + <properties> + <adsite-plugins-event-protocol-xml-dir>${project.basedir}/src</adsite-plugins-event-protocol-xml-dir> + </properties> + <distributionManagement> + <site> + <id>${project.artifactId}-site</id> + <url>${apex.adsite.prefix}/modules/plugins/plugins-event/${project.parent.artifactId}/${project.artifactId}/</url> + </site> + </distributionManagement> + </profile> + </profiles> </project> diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site-docs/adoc/fragments/ep-xml.adoc b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site-docs/adoc/fragments/ep-xml.adoc new file mode 100644 index 000000000..316a1ab12 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site-docs/adoc/fragments/ep-xml.adoc @@ -0,0 +1,33 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +== XML Event + +The event protocol for XML is provided by the APEX XML plugin. +There is no difference in the configuration for the input and output interface. + +If used as input, APEX will consume events as XML and map them to policy trigger events. +Not well-formed XML and not understood trigger events will be rejected. +If used as output, APEX produce XML encoded events from the event a policy produces. +Those events will always be well-formed according to the definition in the policy model. + +The following code shows the configuration. + +[source%nowrap,json] +---- +"eventProtocolParameters":{ + "eventProtocol" : "XML", + "parameterClassName" : + "org.onap.policy.apex.plugins.event.protocol.xml.XMLEventProtocolParameters" +} +---- diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/asciidoc/engine-config.adoc b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/asciidoc/engine-config.adoc new file mode 100644 index 000000000..f1de2cbd1 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/asciidoc/engine-config.adoc @@ -0,0 +1,14 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +include::{adsite-plugins-event-protocol-xml-dir}/site-docs/adoc/fragments/ep-xml.adoc[] diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/css/site.css b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/css/site.css new file mode 100644 index 000000000..ef8bd4d15 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/css/site.css @@ -0,0 +1,100 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +@import url(http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.0/css/font-awesome.css); + + +/*************** Table definitions *******************/ + +tableblock > .title, .tableblock > caption { line-height: 1.4; color: #7a2518; font-weight: 300; margin-top: 0.2em; margin-bottom: 0.5em; } + +.tableblock > caption { text-align: left; font-weight: bold; white-space: nowrap; overflow: visible; max-width: 0; } + +table.tableblock { background: white; margin-bottom: 1.25em; border: solid 1px #dddddd; } +table.tableblock thead, table.tableblock tfoot { background: whitesmoke; font-weight: bold; } +table.tableblock thead tr th, table.tableblock thead tr td, table tfoot tr th, table tfoot tr td { padding: 0.5em 0.625em 0.625em; font-size: inherit; color: #222222; text-align: left; } +table.tableblock tr th, table.tableblock tr td { padding: 0.5625em 0.625em; font-size: inherit; color: #222222; } +table.tableblock tr.even, table.tableblock tr.alt, table.tableblock tr:nth-of-type(even) { background: #f9f9f9; } +table.tableblock thead tr th, table.tableblock tfoot tr th, table.tableblock tbody tr td, table.tableblock tr td, table.tableblock tfoot tr td { display: table-cell; line-height: 1.6; } + +table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p { font-size: inherit; } + +table.tableblock.grid-all { border-collapse: separate; border-spacing: 1px; -webkit-border-radius: 4px; border-radius: 4px; border-top: 1px solid #dddddd; border-bottom: 1px solid #dddddd; } + +table.tableblock.frame-topbot, table.tableblock.frame-none { border-left: 0; border-right: 0; } + +table.tableblock.frame-sides, table.tableblock.frame-none { border-top: 0; border-bottom: 0; } + +table.tableblock td .paragraph:last-child p, table.tableblock td > p:last-child { margin-bottom: 0; } + +th.tableblock.halign-left, td.tableblock.halign-left { text-align: left; } + +th.tableblock.halign-right, td.tableblock.halign-right { text-align: right; } + +th.tableblock.halign-center, td.tableblock.halign-center { text-align: center; } + +th.tableblock.valign-top, td.tableblock.valign-top { vertical-align: top; } + +th.tableblock.valign-bottom, td.tableblock.valign-bottom { vertical-align: bottom; } + +th.tableblock.valign-middle, td.tableblock.valign-middle { vertical-align: middle; } + +p.tableblock.header { color: #222222; font-weight: bold; } + + + +/*************** KBD Macro definitions *******************/ + +kbd.keyseq { color: #555555; } + +kbd:not(.keyseq) { display: inline-block; color: #222222; font-size: 0.75em; line-height: 1.4; background-color: #F7F7F7; border: 1px solid #ccc; -webkit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; margin: -0.15em 0.15em 0 0.15em; padding: 0.2em 0.6em 0.2em 0.5em; vertical-align: middle; white-space: nowrap; } + +kbd kbd:first-child { margin-left: 0; } + +kbd kbd:last-child { margin-right: 0; } + + +/*************** Admontion Blocks definitions *******************/ +.admonitionblock td.content > .title, .exampleblock > .title, .imageblock > .title, .videoblock > .title, .listingblock > .title, .literalblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, .sidebarblock > .title, .tableblock > .title, .verseblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-align: left; font-weight: bold; } + +.admonitionblock > table { border: 0; background: none; width: 100%; margin-top: 1em; margin-bottom: 1em;} +.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; text-transform: uppercase; } +.admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px solid #dddddd; color: #6f6f6f; } +.admonitionblock > table td.content > :last-child > :last-child { margin-bottom: 0; } + +.admonitionblock td.icon [class^="fa icon-"]:before {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: #005498; color: #003f72; } +.admonitionblock td.icon .icon-tip:before { content: "\f0eb"; text-shadow: 1px 1px 2px rgba(155, 155, 0, 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; } + + + +/*************** Misc definitions *******************/ + +*:not(pre) > code { font-size: 0.9375em; padding: 1px 3px 0; white-space: nowrap; background-color: #f2f2f2; border: 1px solid #cccccc; -webkit-border-radius: 4px; border-radius: 4px; text-shadow: none; } + +pre, pre > code { line-height: 1.4; color: inherit; font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; } + +code { font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; color: #6d180b; } + diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/images/logos.png b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/images/logos.png Binary files differnew file mode 100644 index 000000000..915d6e59d --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/images/logos.png diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/site.xml b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/site.xml new file mode 100644 index 000000000..e68f6ed67 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/site/site.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2016-2018 Ericsson. All rights reserved. + ================================================================================ + This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE + Full license text at https://creativecommons.org/licenses/by/4.0/legalcode + + SPDX-License-Identifier: CC-BY-4.0 + ============LICENSE_END========================================================= + + @author Sven van der Meer (sven.van.der.meer@ericsson.com) + +--> + +<project name="APEX Plugins Event Protocol XML"> + <body> + <menu name="APEX Plugins Event Protocol XML"> + <item href="engine-config.html" name="Engine Configuration" /> + <item href="javadocs/index.html" name="API Doc" /> + </menu> + <menu ref="reports" inherit="top" /> + <menu ref="modules" /> + + <breadcrumbs> + <item name="XML" href="index.html" /> + </breadcrumbs> + </body> +</project>
\ No newline at end of file diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/pom.xml b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/pom.xml index b40aab498..9aa255a89 100644 --- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/pom.xml +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/pom.xml @@ -41,4 +41,24 @@ <version>1.21</version> </dependency> </dependencies> -</project> + + <profiles> + <profile> + <id>apexSite</id> + <activation> + <property> + <name>apexSite</name> + </property> + </activation> + <properties> + <adsite-plugins-event-protocol-yaml-dir>${project.basedir}/src</adsite-plugins-event-protocol-yaml-dir> + </properties> + <distributionManagement> + <site> + <id>${project.artifactId}-site</id> + <url>${apex.adsite.prefix}/modules/plugins/plugins-event/${project.parent.artifactId}/${project.artifactId}/</url> + </site> + </distributionManagement> + </profile> + </profiles> +</project>
\ No newline at end of file diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site-docs/adoc/fragments/ep-yaml.adoc b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site-docs/adoc/fragments/ep-yaml.adoc new file mode 100644 index 000000000..90c3812af --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site-docs/adoc/fragments/ep-yaml.adoc @@ -0,0 +1,33 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +== YAML Event + +The event protocol for YAML is provided by the APEX YAML plugin. +There is no difference in the configuration for the input and output interface. + +If used as input, APEX will consume events as YAML and map them to policy trigger events. +Not well-formed YAML and not understood trigger events will be rejected. +If used as output, APEX produce YAML encoded events from the event a policy produces. +Those events will always be well-formed according to the definition in the policy model. + +The following code shows the configuration. + +[source%nowrap,json] +---- +"eventProtocolParameters":{ + "eventProtocol" : "XML", + "parameterClassName" : + "org.onap.policy.apex.plugins.event.protocol.yaml.YamlEventProtocolParameters" +} +---- diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/asciidoc/engine-config.adoc b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/asciidoc/engine-config.adoc new file mode 100644 index 000000000..e7103fd6f --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/asciidoc/engine-config.adoc @@ -0,0 +1,14 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +include::{adsite-plugins-event-protocol-yaml-dir}/site-docs/adoc/fragments/ep-yaml.adoc[] diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/css/site.css b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/css/site.css new file mode 100644 index 000000000..ef8bd4d15 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/css/site.css @@ -0,0 +1,100 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +@import url(http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.0/css/font-awesome.css); + + +/*************** Table definitions *******************/ + +tableblock > .title, .tableblock > caption { line-height: 1.4; color: #7a2518; font-weight: 300; margin-top: 0.2em; margin-bottom: 0.5em; } + +.tableblock > caption { text-align: left; font-weight: bold; white-space: nowrap; overflow: visible; max-width: 0; } + +table.tableblock { background: white; margin-bottom: 1.25em; border: solid 1px #dddddd; } +table.tableblock thead, table.tableblock tfoot { background: whitesmoke; font-weight: bold; } +table.tableblock thead tr th, table.tableblock thead tr td, table tfoot tr th, table tfoot tr td { padding: 0.5em 0.625em 0.625em; font-size: inherit; color: #222222; text-align: left; } +table.tableblock tr th, table.tableblock tr td { padding: 0.5625em 0.625em; font-size: inherit; color: #222222; } +table.tableblock tr.even, table.tableblock tr.alt, table.tableblock tr:nth-of-type(even) { background: #f9f9f9; } +table.tableblock thead tr th, table.tableblock tfoot tr th, table.tableblock tbody tr td, table.tableblock tr td, table.tableblock tfoot tr td { display: table-cell; line-height: 1.6; } + +table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p { font-size: inherit; } + +table.tableblock.grid-all { border-collapse: separate; border-spacing: 1px; -webkit-border-radius: 4px; border-radius: 4px; border-top: 1px solid #dddddd; border-bottom: 1px solid #dddddd; } + +table.tableblock.frame-topbot, table.tableblock.frame-none { border-left: 0; border-right: 0; } + +table.tableblock.frame-sides, table.tableblock.frame-none { border-top: 0; border-bottom: 0; } + +table.tableblock td .paragraph:last-child p, table.tableblock td > p:last-child { margin-bottom: 0; } + +th.tableblock.halign-left, td.tableblock.halign-left { text-align: left; } + +th.tableblock.halign-right, td.tableblock.halign-right { text-align: right; } + +th.tableblock.halign-center, td.tableblock.halign-center { text-align: center; } + +th.tableblock.valign-top, td.tableblock.valign-top { vertical-align: top; } + +th.tableblock.valign-bottom, td.tableblock.valign-bottom { vertical-align: bottom; } + +th.tableblock.valign-middle, td.tableblock.valign-middle { vertical-align: middle; } + +p.tableblock.header { color: #222222; font-weight: bold; } + + + +/*************** KBD Macro definitions *******************/ + +kbd.keyseq { color: #555555; } + +kbd:not(.keyseq) { display: inline-block; color: #222222; font-size: 0.75em; line-height: 1.4; background-color: #F7F7F7; border: 1px solid #ccc; -webkit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; margin: -0.15em 0.15em 0 0.15em; padding: 0.2em 0.6em 0.2em 0.5em; vertical-align: middle; white-space: nowrap; } + +kbd kbd:first-child { margin-left: 0; } + +kbd kbd:last-child { margin-right: 0; } + + +/*************** Admontion Blocks definitions *******************/ +.admonitionblock td.content > .title, .exampleblock > .title, .imageblock > .title, .videoblock > .title, .listingblock > .title, .literalblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, .sidebarblock > .title, .tableblock > .title, .verseblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-align: left; font-weight: bold; } + +.admonitionblock > table { border: 0; background: none; width: 100%; margin-top: 1em; margin-bottom: 1em;} +.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; text-transform: uppercase; } +.admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px solid #dddddd; color: #6f6f6f; } +.admonitionblock > table td.content > :last-child > :last-child { margin-bottom: 0; } + +.admonitionblock td.icon [class^="fa icon-"]:before {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: #005498; color: #003f72; } +.admonitionblock td.icon .icon-tip:before { content: "\f0eb"; text-shadow: 1px 1px 2px rgba(155, 155, 0, 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; } + + + +/*************** Misc definitions *******************/ + +*:not(pre) > code { font-size: 0.9375em; padding: 1px 3px 0; white-space: nowrap; background-color: #f2f2f2; border: 1px solid #cccccc; -webkit-border-radius: 4px; border-radius: 4px; text-shadow: none; } + +pre, pre > code { line-height: 1.4; color: inherit; font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; } + +code { font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; color: #6d180b; } + diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/images/logos.png b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/images/logos.png Binary files differnew file mode 100644 index 000000000..915d6e59d --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/images/logos.png diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/site.xml b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/site.xml new file mode 100644 index 000000000..cae64b955 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/site/site.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2016-2018 Ericsson. All rights reserved. + ================================================================================ + This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE + Full license text at https://creativecommons.org/licenses/by/4.0/legalcode + + SPDX-License-Identifier: CC-BY-4.0 + ============LICENSE_END========================================================= + + @author Sven van der Meer (sven.van.der.meer@ericsson.com) + +--> + +<project name="APEX Plugins Event Protocol YAML"> + <body> + <menu name="APEX Plugins Event Protocol YAML"> + <item href="engine-config.html" name="Engine Configuration" /> + <item href="javadocs/index.html" name="API Doc" /> + </menu> + <menu ref="reports" inherit="top" /> + <menu ref="modules" /> + + <breadcrumbs> + <item name="YAML" href="index.html" /> + </breadcrumbs> + </body> +</project>
\ No newline at end of file diff --git a/plugins/plugins-event/plugins-event-protocol/pom.xml b/plugins/plugins-event/plugins-event-protocol/pom.xml index a751dc4ba..006bbdd5a 100644 --- a/plugins/plugins-event/plugins-event-protocol/pom.xml +++ b/plugins/plugins-event/plugins-event-protocol/pom.xml @@ -42,4 +42,24 @@ <module>plugins-event-protocol-xml</module> <module>plugins-event-protocol-yaml</module> </modules> + + <profiles> + <profile> + <id>apexSite</id> + <activation> + <property> + <name>apexSite</name> + </property> + </activation> + <properties> + <adsite-plugins-event-protocol-dir>${project.basedir}/src</adsite-plugins-event-protocol-dir> + </properties> + <distributionManagement> + <site> + <id>${project.artifactId}-site</id> + <url>${apex.adsite.prefix}/modules/plugins/${project.parent.artifactId}/${project.artifactId}/</url> + </site> + </distributionManagement> + </profile> + </profiles> </project> diff --git a/plugins/plugins-event/plugins-event-protocol/src/site-docs/adoc/fragments/ep-apex.adoc b/plugins/plugins-event/plugins-event-protocol/src/site-docs/adoc/fragments/ep-apex.adoc new file mode 100644 index 000000000..16d41ac89 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/src/site-docs/adoc/fragments/ep-apex.adoc @@ -0,0 +1,28 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +== APEX Event + +The event protocol for APEX events does not require a specific plugin, it is supported by default. +Furthermore, there is no difference in the configuration for the input and output interface. + +For input and output APEX uses APEX events. + +The following JSON shows the configuration. + +[source%nowrap,json] +---- +"eventProtocolParameters":{ + "eventProtocol" : "APEX" +} +---- diff --git a/plugins/plugins-event/plugins-event-protocol/src/site-docs/adoc/fragments/ep-json.adoc b/plugins/plugins-event/plugins-event-protocol/src/site-docs/adoc/fragments/ep-json.adoc new file mode 100644 index 000000000..107858dc2 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/src/site-docs/adoc/fragments/ep-json.adoc @@ -0,0 +1,54 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +== JSON Event + +The event protocol for JSON encoding does not require a specific plugin, it is supported by default. +Furthermore, there is no difference in the configuration for the input and output interface. + +For an input, APEX requires a well-formed JSON string. +Well-formed here means according to the definitions of a policy. +Any JSON string that is not defined as a trigger event (consume) will not be consumed (errors will be thrown). +For output JSON events, APEX will always produce valid JSON strings according to the definition in the policy model. + +The following JSON shows the configuration. + +[source%nowrap,json] +---- +"eventProtocolParameters":{ + "eventProtocol" : "JSON" +} +---- + +For JSON events, there are a few more optional parameters, which allow to define a mapping for standard event fields. +An APEX event must have the fields `name`, `version`, `source`, and `target` defined. +Sometimes it is not possible to configure a trigger or actioning system to use those fields. +However, they might be in an event generated outside APEX (or used outside APEX) just with different names. +To configure APEX to map between the different event names, simply add the following parameters to a JSON event: + +[source%nowrap,json] +---- +"eventProtocolParameters":{ + "eventProtocol" : "JSON", + "nameAlias" : "policyName", <1> + "versionAlias" : "policyVersion", <2> + "sourceAlias" : "from", <3> + "targetAlias" : "to", <4> + "nameSpaceAlias": "my.name.space" <5> +} +---- +<1> mapping for the `name` field, here from a field called `policyName` +<2> mapping for the `version` field, here from a field called `policyVersion` +<3> mapping for the `source` field, here from a field called `from` (only for an input event) +<4> mapping for the `target` field, here from a field called `to` (only for an output event) +<5> mapping for the `nameSpace` field, here from a field called `my.name.space` diff --git a/plugins/plugins-event/plugins-event-protocol/src/site-docs/adoc/fragments/event-protocols.adoc b/plugins/plugins-event/plugins-event-protocol/src/site-docs/adoc/fragments/event-protocols.adoc new file mode 100644 index 000000000..603167194 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/src/site-docs/adoc/fragments/event-protocols.adoc @@ -0,0 +1,38 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +== Event Protocols, Format and Encoding + +Event protocols define what event formats APEX can receive (input) and should send (output). +They can be used in any combination for input and output, unless further restricted by a carrier technology plugin (for instance for JMS output). +There can only be 1 event protocol per event plugin. + +Supported _input_ event protocols are: + +- JSON, the event as a JSON string +- APEX, an APEX event +- JMS object, the event as a JMS object, +- JMS text, the event as a JMS text, +- XML, the event as an XML string, +- YAML, the event as YAML text + +Supported _output_ event protocols are: + +- JSON, the event as a JSON string +- APEX, an APEX event +- JMS object, the event as a JMS object, +- JMS text, the event as a JMS text, +- XML, the event as an XML string, +- YAML, the event as YAML text + +New event protocols can be added as plugins to APEX or developed outside APEX and added to an APEX deployment. diff --git a/plugins/plugins-event/plugins-event-protocol/src/site/asciidoc/event-protocols.adoc b/plugins/plugins-event/plugins-event-protocol/src/site/asciidoc/event-protocols.adoc new file mode 100644 index 000000000..4059dd199 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/src/site/asciidoc/event-protocols.adoc @@ -0,0 +1,18 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +include::{adsite-plugins-event-protocol-dir}/site-docs/adoc/fragments/event-protocols.adoc[] + +include::{adsite-plugins-event-protocol-dir}/site-docs/adoc/fragments/ep-json.adoc[] + +include::{adsite-plugins-event-protocol-dir}/site-docs/adoc/fragments/ep-apex.adoc[] diff --git a/plugins/plugins-event/plugins-event-protocol/src/site/css/site.css b/plugins/plugins-event/plugins-event-protocol/src/site/css/site.css new file mode 100644 index 000000000..ef8bd4d15 --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/src/site/css/site.css @@ -0,0 +1,100 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +@import url(http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.0/css/font-awesome.css); + + +/*************** Table definitions *******************/ + +tableblock > .title, .tableblock > caption { line-height: 1.4; color: #7a2518; font-weight: 300; margin-top: 0.2em; margin-bottom: 0.5em; } + +.tableblock > caption { text-align: left; font-weight: bold; white-space: nowrap; overflow: visible; max-width: 0; } + +table.tableblock { background: white; margin-bottom: 1.25em; border: solid 1px #dddddd; } +table.tableblock thead, table.tableblock tfoot { background: whitesmoke; font-weight: bold; } +table.tableblock thead tr th, table.tableblock thead tr td, table tfoot tr th, table tfoot tr td { padding: 0.5em 0.625em 0.625em; font-size: inherit; color: #222222; text-align: left; } +table.tableblock tr th, table.tableblock tr td { padding: 0.5625em 0.625em; font-size: inherit; color: #222222; } +table.tableblock tr.even, table.tableblock tr.alt, table.tableblock tr:nth-of-type(even) { background: #f9f9f9; } +table.tableblock thead tr th, table.tableblock tfoot tr th, table.tableblock tbody tr td, table.tableblock tr td, table.tableblock tfoot tr td { display: table-cell; line-height: 1.6; } + +table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p { font-size: inherit; } + +table.tableblock.grid-all { border-collapse: separate; border-spacing: 1px; -webkit-border-radius: 4px; border-radius: 4px; border-top: 1px solid #dddddd; border-bottom: 1px solid #dddddd; } + +table.tableblock.frame-topbot, table.tableblock.frame-none { border-left: 0; border-right: 0; } + +table.tableblock.frame-sides, table.tableblock.frame-none { border-top: 0; border-bottom: 0; } + +table.tableblock td .paragraph:last-child p, table.tableblock td > p:last-child { margin-bottom: 0; } + +th.tableblock.halign-left, td.tableblock.halign-left { text-align: left; } + +th.tableblock.halign-right, td.tableblock.halign-right { text-align: right; } + +th.tableblock.halign-center, td.tableblock.halign-center { text-align: center; } + +th.tableblock.valign-top, td.tableblock.valign-top { vertical-align: top; } + +th.tableblock.valign-bottom, td.tableblock.valign-bottom { vertical-align: bottom; } + +th.tableblock.valign-middle, td.tableblock.valign-middle { vertical-align: middle; } + +p.tableblock.header { color: #222222; font-weight: bold; } + + + +/*************** KBD Macro definitions *******************/ + +kbd.keyseq { color: #555555; } + +kbd:not(.keyseq) { display: inline-block; color: #222222; font-size: 0.75em; line-height: 1.4; background-color: #F7F7F7; border: 1px solid #ccc; -webkit-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; margin: -0.15em 0.15em 0 0.15em; padding: 0.2em 0.6em 0.2em 0.5em; vertical-align: middle; white-space: nowrap; } + +kbd kbd:first-child { margin-left: 0; } + +kbd kbd:last-child { margin-right: 0; } + + +/*************** Admontion Blocks definitions *******************/ +.admonitionblock td.content > .title, .exampleblock > .title, .imageblock > .title, .videoblock > .title, .listingblock > .title, .literalblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, .sidebarblock > .title, .tableblock > .title, .verseblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title { text-align: left; font-weight: bold; } + +.admonitionblock > table { border: 0; background: none; width: 100%; margin-top: 1em; margin-bottom: 1em;} +.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; text-transform: uppercase; } +.admonitionblock > table td.content { padding-left: 1.125em; padding-right: 1.25em; border-left: 1px solid #dddddd; color: #6f6f6f; } +.admonitionblock > table td.content > :last-child > :last-child { margin-bottom: 0; } + +.admonitionblock td.icon [class^="fa icon-"]:before {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: #005498; color: #003f72; } +.admonitionblock td.icon .icon-tip:before { content: "\f0eb"; text-shadow: 1px 1px 2px rgba(155, 155, 0, 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; } + + + +/*************** Misc definitions *******************/ + +*:not(pre) > code { font-size: 0.9375em; padding: 1px 3px 0; white-space: nowrap; background-color: #f2f2f2; border: 1px solid #cccccc; -webkit-border-radius: 4px; border-radius: 4px; text-shadow: none; } + +pre, pre > code { line-height: 1.4; color: inherit; font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; } + +code { font-family: Consolas, "Liberation Mono", Courier, monospace; font-weight: normal; color: #6d180b; } + diff --git a/plugins/plugins-event/plugins-event-protocol/src/site/images/logos.png b/plugins/plugins-event/plugins-event-protocol/src/site/images/logos.png Binary files differnew file mode 100644 index 000000000..915d6e59d --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/src/site/images/logos.png diff --git a/plugins/plugins-event/plugins-event-protocol/src/site/site.xml b/plugins/plugins-event/plugins-event-protocol/src/site/site.xml new file mode 100644 index 000000000..82afb502f --- /dev/null +++ b/plugins/plugins-event/plugins-event-protocol/src/site/site.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2016-2018 Ericsson. All rights reserved. + ================================================================================ + This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE + Full license text at https://creativecommons.org/licenses/by/4.0/legalcode + + SPDX-License-Identifier: CC-BY-4.0 + ============LICENSE_END========================================================= + + @author Sven van der Meer (sven.van.der.meer@ericsson.com) + +--> + +<project name="APEX Plugins Event Protocol"> + <body> + <menu name="APEX Plugins Event Protocol"> + <item href="event-protocols.html" name="Event Protocols" /> + </menu> + <menu ref="reports" inherit="top" /> + <menu ref="modules" /> + + <breadcrumbs> + <item name="Protocol" href="index.html" /> + </breadcrumbs> + </body> +</project>
\ No newline at end of file diff --git a/plugins/plugins-executor/plugins-executor-java/pom.xml b/plugins/plugins-executor/plugins-executor-java/pom.xml index cf1d495eb..503219f95 100644 --- a/plugins/plugins-executor/plugins-executor-java/pom.xml +++ b/plugins/plugins-executor/plugins-executor-java/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for execution of Java logic in Apex</description> - <properties> - <apex-plugins-executor-java-dir>${project.basedir}/src</apex-plugins-executor-java-dir> - </properties> - <profiles> <profile> <id>apexSite</id> diff --git a/plugins/plugins-executor/plugins-executor-javascript/pom.xml b/plugins/plugins-executor/plugins-executor-javascript/pom.xml index 8cc876ef2..df98c206b 100644 --- a/plugins/plugins-executor/plugins-executor-javascript/pom.xml +++ b/plugins/plugins-executor/plugins-executor-javascript/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for execution of Javascript logic in Apex</description> - <properties> - <apex-plugins-executor-javascript-dir>${project.basedir}/src</apex-plugins-executor-javascript-dir> - </properties> - <profiles> <profile> <id>apexSite</id> diff --git a/plugins/plugins-executor/plugins-executor-jruby/pom.xml b/plugins/plugins-executor/plugins-executor-jruby/pom.xml index 09cca78d5..9137a5f4b 100644 --- a/plugins/plugins-executor/plugins-executor-jruby/pom.xml +++ b/plugins/plugins-executor/plugins-executor-jruby/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for execution of JRuby logic in Apex</description> - <properties> - <apex-plugins-executor-jruby-dir>${project.basedir}/src</apex-plugins-executor-jruby-dir> - </properties> - <dependencies> <dependency> <groupId>org.jruby</groupId> diff --git a/plugins/plugins-executor/plugins-executor-jython/pom.xml b/plugins/plugins-executor/plugins-executor-jython/pom.xml index f77890be3..3985b5e15 100644 --- a/plugins/plugins-executor/plugins-executor-jython/pom.xml +++ b/plugins/plugins-executor/plugins-executor-jython/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for execution of Jython logic in Apex</description> - <properties> - <apex-plugins-executor-jython-dir>${project.basedir}/src</apex-plugins-executor-jython-dir> - </properties> - <dependencies> <dependency> <groupId>org.python</groupId> diff --git a/plugins/plugins-executor/plugins-executor-mvel/pom.xml b/plugins/plugins-executor/plugins-executor-mvel/pom.xml index db268c57c..ba913f672 100644 --- a/plugins/plugins-executor/plugins-executor-mvel/pom.xml +++ b/plugins/plugins-executor/plugins-executor-mvel/pom.xml @@ -30,10 +30,6 @@ <name>${project.artifactId}</name> <description>[${project.parent.artifactId}] Plugin for execution of Mvel logic in Apex</description> - <properties> - <apex-plugins-executor-mvel-dir>${project.basedir}/src</apex-plugins-executor-mvel-dir> - </properties> - <dependencies> <dependency> <groupId>org.mvel</groupId> diff --git a/plugins/plugins-executor/pom.xml b/plugins/plugins-executor/pom.xml index dd585e6a2..27f2d7d29 100644 --- a/plugins/plugins-executor/pom.xml +++ b/plugins/plugins-executor/pom.xml @@ -33,10 +33,6 @@ <name>${project.artifactId}</name> <description>Plugins for logic execution in Apex</description> - <properties> - <apex-plugins-executor-dir>${project.basedir}/src</apex-plugins-executor-dir> - </properties> - <dependencies> <dependency> <groupId>org.onap.policy.apex-pdp.core</groupId> |