blob: 0af27899362b13257f7b7ec8d4b8ef1ebb1abde6 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
package org.eclipse.osbp.vaaclipse.addons.login;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.services.events.IEventBroker;
import org.eclipse.osbp.vaaclipse.publicapi.authentication.AuthenticationConstants;
public class LogoutHandler {
@Inject
private IEventBroker eventBroker;
@Execute
public void execute() {
eventBroker.send(
AuthenticationConstants.Events.Authentication.PRE_LOGOUT,
new Object());
eventBroker.send(AuthenticationConstants.Events.Authentication.LOGOUT,
new Object());
}
@CanExecute
public boolean canExecute() {
return true;
}
}