diff options
Diffstat (limited to 'sdnr/wt/websocketmanager/model/src/main/java')
3 files changed, 117 insertions, 1 deletions
diff --git a/sdnr/wt/websocketmanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/model/data/DOMNotificationOutput.java b/sdnr/wt/websocketmanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/model/data/DOMNotificationOutput.java new file mode 100644 index 000000000..62229b33c --- /dev/null +++ b/sdnr/wt/websocketmanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/model/data/DOMNotificationOutput.java @@ -0,0 +1,82 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk features + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * 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. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.data; + +import org.opendaylight.mdsal.dom.api.DOMNotification; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; +import org.opendaylight.yangtools.yang.common.QName; + +public class DOMNotificationOutput implements INotificationOutput{ + + private DateAndTime eventTime; + private DOMNotification data; + private String nodeId; + private ReducedSchemaInfo type; + + + public DOMNotificationOutput() { + + } + + @Override + public DateAndTime getEventTime() { + return eventTime; + } + + public void setEventTime(DateAndTime eventTime) { + this.eventTime = eventTime; + } + + public DOMNotification getData() { + return data; + } + + @Override + public String getNodeId() { + return this.nodeId; + } + + @Override + public ReducedSchemaInfo getType() { + return this.type; + } + + public void setData(DOMNotification data) { + this.data = data; + } + + public void setNodeId(String nodeId) { + this.nodeId = nodeId; + } + + public void setType(ReducedSchemaInfo type) { + this.type = type; + } + + public DOMNotificationOutput(DOMNotification notification, String nodeId, QName type, DateAndTime eventTime) { + this.data = notification; + this.nodeId = nodeId; + this.eventTime = eventTime; + this.type = new ReducedSchemaInfo(type); + } + +} diff --git a/sdnr/wt/websocketmanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/model/data/INotificationOutput.java b/sdnr/wt/websocketmanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/model/data/INotificationOutput.java new file mode 100644 index 000000000..c16b4205d --- /dev/null +++ b/sdnr/wt/websocketmanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/model/data/INotificationOutput.java @@ -0,0 +1,31 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk features + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * 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. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.data; + +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; + +public interface INotificationOutput { + + public DateAndTime getEventTime(); + public String getNodeId(); + public ReducedSchemaInfo getType(); +} diff --git a/sdnr/wt/websocketmanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/model/data/NotificationOutput.java b/sdnr/wt/websocketmanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/model/data/NotificationOutput.java index 5b966ef1e..7e0ba728c 100644 --- a/sdnr/wt/websocketmanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/model/data/NotificationOutput.java +++ b/sdnr/wt/websocketmanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager/model/data/NotificationOutput.java @@ -25,7 +25,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types. import org.opendaylight.yangtools.yang.binding.Notification; import org.opendaylight.yangtools.yang.common.QName; -public class NotificationOutput { +public class NotificationOutput implements INotificationOutput{ private DateAndTime eventTime; private Notification data; @@ -37,6 +37,7 @@ public class NotificationOutput { } + @Override public DateAndTime getEventTime() { return eventTime; } @@ -49,10 +50,12 @@ public class NotificationOutput { return data; } + @Override public String getNodeId() { return this.nodeId; } + @Override public ReducedSchemaInfo getType() { return this.type; } |