01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18:
19: /* $Id: IPRangeManager.java 473861 2006-11-12 03:51:14Z gregor $ */
20:
21: package org.apache.lenya.ac;
22:
23: /**
24: * An IP range manager.
25: */
26: public interface IPRangeManager extends ItemManager {
27:
28: /**
29: * Get all IP ranges.
30: *
31: * @return an array of IP ranges.
32: */
33: IPRange[] getIPRanges();
34:
35: /**
36: * Add the given IP range
37: *
38: * @param id IP range that is to be added
39: * @return An IP range.
40: * @throws AccessControlException when the IP range is already contained.
41: */
42: IPRange add(String id) throws AccessControlException;
43:
44: /**
45: * Remove the given IP range
46: *
47: * @param range IP range that is to be removed
48: * @throws AccessControlException when the IP range is not contained.
49: */
50: void remove(IPRange range) throws AccessControlException;
51:
52: /**
53: * Get the IPRange with the given id.
54: *
55: * @param rangeId user id of requested IP range
56: * @return the requested IP range or null if there is
57: * no IP range with the given id
58: */
59: IPRange getIPRange(String rangeId);
60:
61: }
|