1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.services.idgenerator;
18
19
20 import org.apache.jetspeed.services.idgenerator.IdGeneratorService;
21
22
23 import org.apache.turbine.services.TurbineServices;
24
25 /***
26 * Static accessor for the IdGeneatorService
27 *
28 * @author <a href="mailto:paulsp@apache.org">Paul Spencer</a>
29 * @version $Id: JetspeedIdGenerator.java,v 1.2 2004/02/23 03:28:57 jford Exp $
30 */
31 public abstract class JetspeedIdGenerator {
32
33 /*** Creates new JetspeedIdGenerator */
34 public JetspeedIdGenerator() {
35 }
36
37
38
39
40
41
42
43 protected static IdGeneratorService getService()
44 {
45 return (IdGeneratorService)TurbineServices
46 .getInstance().getService(IdGeneratorService.SERVICE_NAME);
47 }
48
49 /***
50 * Generate a Unique PEID
51 *
52 * @return Unique PEID
53 */
54 public static String getNextPeid()
55 {
56 return getService().getNextPeid();
57 }
58
59 }