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<String> getNames()
40 throws RemoteException, SystemException {
41
42 CounterService counterService = CounterServiceFactory.getService();
43
44 return counterService.getNames();
45 }
46
47 public static long increment() throws RemoteException, SystemException {
48 CounterService counterService = CounterServiceFactory.getService();
49
50 return counterService.increment();
51 }
52
53 public static long increment(String name)
54 throws RemoteException, SystemException {
55
56 CounterService counterService = CounterServiceFactory.getService();
57
58 return counterService.increment(name);
59 }
60
61 public static long increment(String name, int size)
62 throws RemoteException, SystemException {
63
64 CounterService counterService = CounterServiceFactory.getService();
65
66 return counterService.increment(name, size);
67 }
68
69 public static void rename(String oldName, String newName)
70 throws RemoteException, SystemException {
71
72 CounterService counterService = CounterServiceFactory.getService();
73
74 counterService.rename(oldName, newName);
75 }
76
77 public static void reset(String name)
78 throws RemoteException, SystemException {
79
80 CounterService counterService = CounterServiceFactory.getService();
81
82 counterService.reset(name);
83 }
84
85 public static void reset(String name, long size)
86 throws RemoteException, SystemException {
87
88 CounterService counterService = CounterServiceFactory.getService();
89
90 counterService.reset(name, size);
91 }
92
93 }