blob: 9bf7f95e692c9c87e9677a770511dc22caa39555 [file] [log] [blame]
hirokif4ed5212018-05-26 22:39:38 -07001/*
2 * Copyright 2018-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.odtn.utils.tapi;
18
hiroki96ab3c22018-12-11 14:10:52 -080019import org.onosproject.yang.gen.v1.tapicommon.rev20181210.tapicommon.Uuid;
hirokif4ed5212018-05-26 22:39:38 -070020import org.onosproject.yang.model.ModelObject;
21import org.onosproject.yang.model.ModelObjectId;
22
23/**
24 * Utility abstract class to deal with TAPI RPC output with DCS.
25 *
26 * @param <T> RpcOutput modelObject to be dealt with
27 */
28public abstract class TapiRpcOutputHandler<T extends ModelObject> extends TapiObjectHandler<T> {
29
30 // Uuid getter is not needed for RPC output
31 @Override
32 protected Uuid getIdDetail() {
33 return null;
34 }
35
36 // Uuid setter is not needed for RPC output
37 @Override
38 protected void setIdDetail(Uuid uuid) {
39 }
40
41 // Root modelObjectId must be used
42 @Override
43 public ModelObjectId getParentModelObjectId() {
44 return ModelObjectId.builder().build();
45 }
46
47
48 // Cannot add OutputRpc modelObject into DCS.
49 @Override
50 public final void add() {
51 }
52
53 // Cannot delete OutputRpc modelObject into DCS.
54 @Override
55 public final void remove() {
56 }
57
58}