29 lines
829 B
Java
29 lines
829 B
Java
package org.gcube.portal.event.publisher.lr62.action;
|
|
|
|
import org.gcube.event.publisher.EventPublisher;
|
|
|
|
import com.liferay.portal.kernel.events.ActionException;
|
|
import com.liferay.portal.kernel.events.SimpleAction;
|
|
import com.liferay.portal.kernel.log.Log;
|
|
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
|
|
|
public class ShutdownAction extends SimpleAction {
|
|
|
|
protected static final Log log = LogFactoryUtil.getLog(ShutdownAction.class);
|
|
|
|
private EventPublisher eventPublisher;
|
|
|
|
public ShutdownAction() {
|
|
eventPublisher = new ActionEventPublisher();
|
|
}
|
|
|
|
@Override
|
|
public void run(String[] ids) throws ActionException {
|
|
if (log.isInfoEnabled()) {
|
|
log.info("Sending shutdown event");
|
|
}
|
|
eventPublisher.publish(SimpleActionEvent.newShutdownEvent(ids));
|
|
}
|
|
|
|
}
|