2 * Copyright © 2017 Orange, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.transportpce.common;
10 public class OperationResult {
12 private final boolean success;
13 private final String resultMessage;
15 protected OperationResult(boolean success, String resultMessage) {
16 this.success = success;
17 this.resultMessage = resultMessage;
20 public boolean isSuccess() {
24 public String getResultMessage() {
28 public static OperationResult failed(String message) {
29 return new OperationResult(false, message);
32 public static OperationResult ok(String message) {
33 return new OperationResult(true, message);