1
22
23 package com.liferay.counter.service;
24
25 import com.liferay.portal.SystemException;
26
27 import java.rmi.RemoteException;
28
29 import java.util.List;
30
31
37 public class CounterServiceUtil {
38
39 public static List getNames() throws RemoteException, SystemException {
40 CounterService counterService = CounterServiceFactory.getService();
41
42 return counterService.getNames();
43 }
44
45 public static long increment() throws RemoteException, SystemException {
46 CounterService counterService = CounterServiceFactory.getService();
47
48 return counterService.increment();
49 }
50
51 public static long increment(String name)
52 throws RemoteException, SystemException {
53
54 CounterService counterService = CounterServiceFactory.getService();
55
56 return counterService.increment(name);
57 }
58
59 public static long increment(String name, int size)
60 throws RemoteException, SystemException {
61
62 CounterService counterService = CounterServiceFactory.getService();
63
64 return counterService.increment(name, size);
65 }
66
67 public static void rename(String oldName, String newName)
68 throws RemoteException, SystemException {
69
70 CounterService counterService = CounterServiceFactory.getService();
71
72 counterService.rename(oldName, newName);
73 }
74
75 public static void reset(String name)
76 throws RemoteException, SystemException {
77
78 CounterService counterService = CounterServiceFactory.getService();
79
80 counterService.reset(name);
81 }
82
83 public static void reset(String name, long size)
84 throws RemoteException, SystemException {
85
86 CounterService counterService = CounterServiceFactory.getService();
87
88 counterService.reset(name, size);
89 }
90
91 }