You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by hu...@apache.org on 2021/01/16 11:59:48 UTC
[plc4x] 01/01: Updated Notice and License files.
This is an automated email from the ASF dual-hosted git repository.
hutcheb pushed a commit to branch update_notice_file
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit eead488cc4f40ca7cff6998f0c398a868986faef
Author: hutcheb <be...@gmail.com>
AuthorDate: Sat Jan 16 06:58:26 2021 -0500
Updated Notice and License files.
To take into account for derivative works licenses under EPL 2.0
---
LICENSE | 6 ++
NOTICE | 7 ++-
.../java/opcuaserver/AttributeLoggingFilter.java | 73 ----------------------
.../plc4x/java/opcuaserver/KeyStoreLoader.java | 19 ++----
.../apache/plc4x/java/opcuaserver/OPCUAServer.java | 19 ++----
.../java/opcuaserver/backend/Plc4xNamespace.java | 23 ++-----
pom.xml | 7 ++-
7 files changed, 32 insertions(+), 122 deletions(-)
diff --git a/LICENSE b/LICENSE
index 033d5d4..564d762 100644
--- a/LICENSE
+++ b/LICENSE
@@ -220,3 +220,9 @@ The file:
build-utils/protocol-base-mspec/src/main/antlr4/org/apache/plc4x/plugins/codegenerator/language/mspec/expression/Expression.g4
is licensed under the Category A: "UNLICENSE" which is available here:
UNLICENSE file in the licenses directory.
+
+The files:
+plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/OPCUAServer.java
+plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/KeyStoreLoader.java
+plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/backend/Plc4xNamespace.java
+are derivative works of the Eclipse Milo project and are licensed under the EPL 2.0 license.
diff --git a/NOTICE b/NOTICE
index 5dd07e7..91529ec 100644
--- a/NOTICE
+++ b/NOTICE
@@ -7,4 +7,9 @@ The Apache Software Foundation (http://www.apache.org/).
----------------------------------------------
This product includes software developed at
-The Netty project (https://netty.io/).
+The Netty project (https://netty.io/).
+
+----------------------------------------------
+
+This product includes software developed at
+The Eclipse Milo project (https://projects.eclipse.org/projects/iot.milo/)
diff --git a/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/AttributeLoggingFilter.java b/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/AttributeLoggingFilter.java
deleted file mode 100644
index b8eff3e..0000000
--- a/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/AttributeLoggingFilter.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-
-package org.apache.plc4x.java.opcuaserver;
-
-import java.util.function.Predicate;
-
-import org.eclipse.milo.opcua.sdk.server.nodes.filters.AttributeFilter;
-import org.eclipse.milo.opcua.sdk.server.nodes.filters.AttributeFilterContext.GetAttributeContext;
-import org.eclipse.milo.opcua.sdk.server.nodes.filters.AttributeFilterContext.SetAttributeContext;
-import org.eclipse.milo.opcua.stack.core.AttributeId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class AttributeLoggingFilter implements AttributeFilter {
-
- private final Logger logger = LoggerFactory.getLogger(getClass());
-
- private final Predicate<AttributeId> attributePredicate;
-
- public AttributeLoggingFilter() {
- this(attributeId -> true);
- }
-
- public AttributeLoggingFilter(Predicate<AttributeId> attributePredicate) {
- this.attributePredicate = attributePredicate;
- }
-
- @Override
- public Object getAttribute(GetAttributeContext ctx, AttributeId attributeId) {
- Object value = ctx.getAttribute(attributeId);
-
- // only log external reads
- if (attributePredicate.test(attributeId) && ctx.getSession().isPresent()) {
- logger.debug(
- "get nodeId={} attributeId={} value={}",
- ctx.getNode().getNodeId(), attributeId, value
- );
- }
-
- return value;
- }
-
- @Override
- public void setAttribute(SetAttributeContext ctx, AttributeId attributeId, Object value) {
- // only log external writes
- if (attributePredicate.test(attributeId) && ctx.getSession().isPresent()) {
- logger.debug(
- "set nodeId={} attributeId={} value={}",
- ctx.getNode().getNodeId(), attributeId, value
- );
- }
-
- ctx.setAttribute(attributeId, value);
- }
-
-}
diff --git a/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/KeyStoreLoader.java b/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/KeyStoreLoader.java
index 985e58c..4e4d4a7 100644
--- a/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/KeyStoreLoader.java
+++ b/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/KeyStoreLoader.java
@@ -1,20 +1,11 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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
+ * Copyright (c) 2019 the Eclipse Milo Authors
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-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: EPL-2.0
*/
package org.apache.plc4x.java.opcuaserver;
diff --git a/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/OPCUAServer.java b/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/OPCUAServer.java
index 49e91eb..e8c66d1 100644
--- a/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/OPCUAServer.java
+++ b/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/OPCUAServer.java
@@ -1,20 +1,11 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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
+ * Copyright (c) 2019 the Eclipse Milo Authors
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-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: EPL-2.0
*/
package org.apache.plc4x.java.opcuaserver;
diff --git a/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/backend/Plc4xNamespace.java b/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/backend/Plc4xNamespace.java
index 415d469..5360229 100644
--- a/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/backend/Plc4xNamespace.java
+++ b/plc4j/integrations/opcua-server/src/main/java/org/apache/plc4x/java/opcuaserver/backend/Plc4xNamespace.java
@@ -1,20 +1,11 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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
+ * Copyright (c) 2019 the Eclipse Milo Authors
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-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: EPL-2.0
*/
package org.apache.plc4x.java.opcuaserver.backend;
@@ -204,17 +195,13 @@ public class Plc4xNamespace extends ManagedNamespaceWithLifecycle {
node.setValue(new DataValue(variant));
- AttributeLoggingFilter filter = new AttributeLoggingFilter();
-
node.getFilterChain().addLast(
- filter,
AttributeFilters.getValue(
ctx -> plc4xServer.getValue(ctx, tag, connectionString)
)
);
node.getFilterChain().addLast(
- filter,
AttributeFilters.setValue(
(ctx, value) -> {
if (length > 1) {
diff --git a/pom.xml b/pom.xml
index 1440907..b6d74f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -679,10 +679,13 @@
<!-- License Files for other licenses -->
<exclude>**/UNLICENSE</exclude>
<!--
- Explicitly exclude this file as I was unable
- to add a new license to the configuration.
+ Explicitly exclude these files as I was unable
+ to add a new licenses to the configuration.
-->
<exclude>**/Expression.g4</exclude>
+ <exclude>**/KeyStoreLoader.java</exclude>
+ <exclude>**/OPCUAServer.java</exclude>
+ <exclude>**/Plc4xNamespace.java</exclude>
<!-- Maven related files -->
<exclude>**/target/**</exclude>