Sho SHIMIZU | 8d9d136 | 2015-02-04 12:28:15 -0800 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.net.intent.impl; |
| 17 | |
| 18 | import com.google.common.collect.ImmutableList; |
| 19 | import org.onosproject.net.flow.FlowRuleBatchOperation; |
| 20 | import org.onosproject.net.intent.IntentException; |
| 21 | |
| 22 | import java.util.List; |
| 23 | |
| 24 | import static com.google.common.base.Preconditions.checkNotNull; |
| 25 | |
| 26 | // TODO: Reconsider error handling and intent exception design. Otherwise, write Javadoc. |
Brian O'Connor | 098da07 | 2015-02-04 14:07:59 -0800 | [diff] [blame] | 27 | public class FlowRuleBatchOperationConversionException extends IntentException { |
Sho SHIMIZU | 8d9d136 | 2015-02-04 12:28:15 -0800 | [diff] [blame] | 28 | |
| 29 | private final List<FlowRuleBatchOperation> converted; |
| 30 | |
Brian O'Connor | 098da07 | 2015-02-04 14:07:59 -0800 | [diff] [blame] | 31 | public FlowRuleBatchOperationConversionException(List<FlowRuleBatchOperation> converted, Throwable cause) { |
Sho SHIMIZU | 8d9d136 | 2015-02-04 12:28:15 -0800 | [diff] [blame] | 32 | 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 | } |