blob: 8bae2afdd7e87dc9aebcb248a8794d7a7874cd72 [file] [log] [blame]
Sho SHIMIZU8d9d1362015-02-04 12:28:15 -08001/*
2 * Copyright 2015 Open Networking Laboratory
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 */
16package org.onosproject.net.intent.impl;
17
18import com.google.common.collect.ImmutableList;
19import org.onosproject.net.flow.FlowRuleBatchOperation;
20import org.onosproject.net.intent.IntentException;
21
22import java.util.List;
23
24import static com.google.common.base.Preconditions.checkNotNull;
25
26// TODO: Reconsider error handling and intent exception design. Otherwise, write Javadoc.
Brian O'Connor098da072015-02-04 14:07:59 -080027public class FlowRuleBatchOperationConversionException extends IntentException {
Sho SHIMIZU8d9d1362015-02-04 12:28:15 -080028
29 private final List<FlowRuleBatchOperation> converted;
30
Brian O'Connor098da072015-02-04 14:07:59 -080031 public FlowRuleBatchOperationConversionException(List<FlowRuleBatchOperation> converted, Throwable cause) {
Sho SHIMIZU8d9d1362015-02-04 12:28:15 -080032 super("exception occurred during IntentInstaller.install()", cause);
33 this.converted = ImmutableList.copyOf((checkNotNull(converted)));
34 }
35
36 public List<FlowRuleBatchOperation> converted() {
37 return converted;
38 }
39}