use of org.adempiere.webui.event.TokenEvent in project adempiere by adempiere.
the class TokenCommand method service.
public boolean service(AuRequest request, boolean everError) {
if (!TokenEvent.ON_USER_TOKEN.equals(request.getCommand()))
return false;
Map<?, ?> map = request.getData();
String sid = (String) map.get("sid");
String hash = (String) map.get("hash");
final String[] data = new String[] { sid, hash };
final Component comp = request.getComponent();
if (comp == null)
throw new UiException(MZk.ILLEGAL_REQUEST_COMPONENT_REQUIRED, this);
if (data == null || data.length < 2)
throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] { Objects.toString(data), this });
Events.postEvent(new TokenEvent(request.getCommand(), comp, data));
return true;
}
Aggregations