blob: 2853e1ff3f4ce6f25da729fd769196ff2de77e87 [file] [log] [blame]
lishuai91d986c2015-07-28 09:45:20 +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.ovsdb.rfc.operations;
17
18import static com.google.common.base.Preconditions.checkNotNull;
19
20import org.onosproject.ovsdb.rfc.schema.TableSchema;
21
22/**
23 * comment operation.Refer to RFC 7047 Section 5.2.
24 */
25public final class Comment implements Operation {
26
27 private final String op;
28 private final String comment;
29
30 /**
31 * Constructs a Comment object.
32 * @param comment the comment member of comment operation
33 */
34 public Comment(String comment) {
lishuai2f197432015-07-31 16:27:58 +080035 checkNotNull(comment, "comment cannot be null");
lishuai91d986c2015-07-28 09:45:20 +080036 this.op = Operations.COMMENT.op();
37 this.comment = comment;
38 }
39
40 /**
41 * Returns the comment member of comment operation.
42 * @return the comment member of comment operation
43 */
44 public String getComment() {
45 return comment;
46 }
47
48 @Override
49 public String getOp() {
50 return op;
51 }
52
53 @Override
54 public TableSchema getTableSchema() {
55 return null;
56 }
57}