Skip to content

Instantly share code, notes, and snippets.

@SinTeZWh1te
Created September 13, 2023 08:19
Show Gist options
  • Save SinTeZWh1te/0650ba661ddcee479c335382d97c4710 to your computer and use it in GitHub Desktop.
Save SinTeZWh1te/0650ba661ddcee479c335382d97c4710 to your computer and use it in GitHub Desktop.
package ru.test.bgbilling.kernel.scripts.events;
import ru.bitel.bgbilling.kernel.container.managed.ServerContext;
import ru.bitel.bgbilling.kernel.script.server.dev.EventScriptBase;
import ru.bitel.bgbilling.modules.inet.common.bean.InetServ;
import ru.bitel.bgbilling.modules.inet.server.event.InetServChangingEvent;
import ru.bitel.bgbilling.server.util.Setup;
import ru.bitel.common.Utils;
import ru.bitel.common.sql.ConnectionSet;
public class CheckEmptyIdentifier extends EventScriptBase<InetServChangingEvent> {
@Override
public void onEvent(InetServChangingEvent event, Setup setup, ConnectionSet connectionSet) throws Exception {
ServerContext serverContext = ServerContext.get();
InetServ inetServ = event.getInetServ();
if (Utils.isEmptyCollection(inetServ.getIdentifierList())) {
event.setError("Hello from Hell!");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment