Exemplo n.º 1
0
 @Override
 public Void call(ApiCaller ac, Deserializer parms) throws PerunException {
   ac.stateChangingCheck();
   ac.getExtSourcesManager()
       .deleteExtSource(ac.getSession(), ac.getExtSourceById(parms.readInt("id")));
   return null;
 }
Exemplo n.º 2
0
    @Override
    public Void call(ApiCaller ac, Deserializer parms) throws PerunException {
      ac.stateChangingCheck();

      if (parms.contains("vo")) {
        ac.getExtSourcesManager()
            .removeExtSource(
                ac.getSession(),
                ac.getVoById(parms.readInt("vo")),
                ac.getExtSourceById(parms.readInt("source")));
      } else if (parms.contains("group")) {
        ac.getExtSourcesManager()
            .removeExtSource(
                ac.getSession(),
                ac.getGroupById(parms.readInt("group")),
                ac.getExtSourceById(parms.readInt("source")));
      } else {
        throw new RpcException(RpcException.Type.MISSING_VALUE, "vo or group");
      }

      return null;
    }
Exemplo n.º 3
0
 @Override
 public List<ExtSource> call(ApiCaller ac, Deserializer parms) throws PerunException {
   return ac.getExtSourcesManager()
       .getGroupExtSources(ac.getSession(), ac.getGroupById(parms.readInt("group")));
 }
Exemplo n.º 4
0
 @Override
 public ExtSource call(ApiCaller ac, Deserializer parms) throws PerunException {
   return ac.getExtSourcesManager()
       .getExtSourceByName(ac.getSession(), parms.readString("name"));
 }
Exemplo n.º 5
0
 @Override
 public Void call(ApiCaller ac, Deserializer parms) throws PerunException {
   ac.getExtSourcesManager().loadExtSourcesDefinitions(ac.getSession());
   return null;
 }
Exemplo n.º 6
0
 @Override
 public ExtSource call(ApiCaller ac, Deserializer parms) throws PerunException {
   ac.stateChangingCheck();
   return ac.getExtSourcesManager()
       .createExtSource(ac.getSession(), parms.read("extSource", ExtSource.class));
 }
Exemplo n.º 7
0
 @Override
 public List<ExtSource> call(ApiCaller ac, Deserializer parms) throws PerunException {
   return ac.getExtSourcesManager().getExtSources(ac.getSession());
 }