2 * Copyright 2015 Open Networking Laboratory
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onosproject.incubator.net.domain;
18 import com.google.common.annotations.Beta;
21 * The abstract base class for the resource that satisfies an intent primitive.
24 public class IntentResource {
26 private final IntentPrimitive primitive;
27 private final long tunnelId;
28 private final IntentDomainId domainId;
30 // TODO add other common fields
35 public IntentResource(IntentPrimitive primitive, long tunnelId, IntentDomainId domainId) {
36 this.primitive = primitive;
37 this.tunnelId = tunnelId;
38 this.domainId = domainId;
42 * Returns the intent primitive associated with this resource as creation.
44 * @return this resource's intent primitive
46 public IntentPrimitive primitive() {
51 * Returns the tunnel ID associated with this resource as creation.
53 * @return this resource's tunnel ID
55 public long tunnelId() {
60 * Returns the domain ID associated with this resource as creation.
62 * @return this resource's domain ID
64 public IntentDomainId domainId() {