KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snmp4j > agent > mo > MOMutableTableModel


1 /*_############################################################################
2   _##
3   _## SNMP4J-Agent - MOMutableTableModel.java
4   _##
5   _## Copyright (C) 2005-2007 Frank Fock (SNMP4J.org)
6   _##
7   _## Licensed under the Apache License, Version 2.0 (the "License");
8   _## you may not use this file except in compliance with the License.
9   _## You may obtain a copy of the License at
10   _##
11   _## http://www.apache.org/licenses/LICENSE-2.0
12   _##
13   _## Unless required by applicable law or agreed to in writing, software
14   _## distributed under the License is distributed on an "AS IS" BASIS,
15   _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   _## See the License for the specific language governing permissions and
17   _## limitations under the License.
18   _##
19   _##########################################################################*/

20
21
22 package org.snmp4j.agent.mo;
23
24 import org.snmp4j.smi.OID;
25
26 /**
27  * The <code>MOMutableTableModel</code> defines the interface for mutable
28  * table models. Mutable table models support row creation and deletion through
29  * SNMP SET operations.
30  *
31  * @author Frank Fock
32  * @version 1.0
33  */

34 public interface MOMutableTableModel extends MOTableModel, MOTableRowFactory {
35
36   /**
37    * Adds a row to the table. If a row with the same index already exists
38    * it will be replaced and returned.
39    *
40    * @param row
41    * the <code>MOTableRow</code> instance to add.
42    * @return
43    * the previous row with the specified index or <code>null</code> if it
44    * did not have one.
45    */

46   MOTableRow addRow(MOTableRow row);
47
48   /**
49    * Removes the row with the specified index from the table and returns it.
50    * @param index
51    * the row index of the row to remove.
52    * @return
53    * the removed row or <code>null</code> if the table did not contain such
54    * a row.
55    */

56   MOTableRow removeRow(OID index);
57
58   /**
59    * Removes all rows.
60    */

61   void clear();
62
63   /**
64    * Remove all rows that do not match the given filter criteria
65    * from the model.
66    * @param filter
67    * the <code>MOTableRowFilter</code> that filters out the rows to
68    * delete.
69    */

70   void clear(MOTableRowFilter filter);
71
72   /**
73    * Sets the factory instance to be used for creating rows for this model.
74    *
75    * @param rowFactory
76    * a <code>MOTableRowFactory</code> instance or <code>null</code> to
77    * disable row creation.
78    */

79   void setRowFactory(MOTableRowFactory rowFactory);
80 }
81
Popular Tags