--- /dev/null
+package ${packagePath}.hook.events;
+
+import com.liferay.portal.kernel.events.ActionException;
+import com.liferay.portal.kernel.events.SimpleAction;
+
+<#list entities as entity>
+ <#if entity.hasLocalService()>
+ import ${packagePath}.service.${entity.name}LocalServiceUtil;
+ </#if>
+
+ <#if entity.hasRemoteService()>
+ import ${packagePath}.service.${entity.name}ServiceUtil;
+ </#if>
+</#list>
+
+/**
+ * @author Barma Igor & Amblard Mathieu
+ * This file is auto-generated by service builder.
+ * DO NOT MODIFY
+ * Must be call in portal.properties as application.startup.events=${packagePath}.hook.events.SpringClearServiceAction
+ */
+public class SpringClearServiceAction extends SimpleAction {
+
+ @Override
+ public void run(String[] ids) throws ActionException {
+ try {
+ launchClearServiceAction();
+ }
+ catch (Exception e) {
+ throw new ActionException(e);
+ }
+ }
+
+ protected void launchClearServiceAction()
+ throws Exception {
+ <#list entities as entity>
+ <#if entity.hasLocalService()>
+ ${entity.name}LocalServiceUtil.clearService();
+ </#if>
+
+ <#if entity.hasRemoteService()>
+ ${entity.name}ServiceUtil.clearService();
+ </#if>
+ </#list>
+ }
+
+}
\ No newline at end of file