blob: bafe9261c2f787c76a4bfcfcadc140eea1baec5b [file] [log] [blame]
Toshio Koidea03915e2014-07-01 18:39:52 -07001package net.onrc.onos.api.batchoperation;
2
3/**
4 * A remove-operation entry of a batch operation.
5 */
6public class RemoveOperation implements BatchOperationEntry {
Toshio Koide025a9152014-07-21 11:00:34 -07007 private final BatchOperationTargetId targetId;
Toshio Koidea03915e2014-07-01 18:39:52 -07008
9 /**
10 * Creates a remove-operation with specified target.
11 *
Toshio Koide025a9152014-07-21 11:00:34 -070012 * @param id The target object ID to be assigned to this
Toshio Koidea03915e2014-07-01 18:39:52 -070013 * remove-operation.
14 */
Toshio Koide025a9152014-07-21 11:00:34 -070015 public RemoveOperation(BatchOperationTargetId id) {
16 this.targetId = id;
Toshio Koidea03915e2014-07-01 18:39:52 -070017 }
18
19 @Override
20 public BatchOperator getOperator() {
21 return BatchOperator.REMOVE;
22 }
23
24 /**
25 * Gets the target ID to be removed.
26 *
27 * @return The target ID to be removed.
28 */
Toshio Koide025a9152014-07-21 11:00:34 -070029 public BatchOperationTargetId getTargetId() {
Toshio Koidea03915e2014-07-01 18:39:52 -070030 return targetId;
31 }
32}