01: /* Copyright 2001 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal;
07:
08: /**
09: * An interface for returning sequences derived from named counters.
10: *
11: * The following methods are devoted to creating and using these counters,
12: * which can be used as oids.
13: * <p>
14: * <code>createCounter(String name)</code>
15: * <code>getNextInt()</code>
16: * <code>getNextInt(String name)</code>
17: * <code>setCounter(String name)</code>
18: * <p>
19: * ISequenceGenerator inherits the following more general methods from
20: * IOIDGenerator, which return Strings:
21: * <p>
22: * <code>getNext()</code>
23: * <code>getNext(String name)</code>
24: * <p>
25: *
26: * @author Dan Ellentuck
27: * @version $Revision: 34810 $
28: */
29: public interface ISequenceGenerator extends IOIDGenerator {
30: /**
31: * @param name java.lang.String
32: * @exception java.lang.Exception
33: */
34: public void createCounter(String name) throws java.lang.Exception;
35:
36: /**
37: * @return int
38: * @exception java.lang.Exception The exception description.
39: */
40: public int getNextInt() throws java.lang.Exception;
41:
42: /**
43: * @return int
44: * @param name java.lang.String
45: * @exception java.lang.Exception The exception description.
46: */
47: public int getNextInt(String name) throws java.lang.Exception;
48:
49: /**
50: * @param name java.lang.String
51: * @param newValue int
52: * @exception java.lang.Exception
53: */
54: public void setCounter(String name, int newValue)
55: throws java.lang.Exception;
56: }
|