Пример #1
0
    @Override
    public List<Member> call(ApiCaller ac, Deserializer parms) throws PerunException {
      ac.stateChangingCheck();

      return ac.getSearcher()
          .getMembersByUserAttributes(
              ac.getSession(),
              ac.getVoById(parms.readInt("vo")),
              parms.read("userAttributesWithSearchingValues", LinkedHashMap.class));
    }
Пример #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;
    }
Пример #3
0
 @Override
 public List<ExtSource> call(ApiCaller ac, Deserializer parms) throws PerunException {
   return ac.getExtSourcesManager()
       .getVoExtSources(ac.getSession(), ac.getVoById(parms.readInt("vo")));
 }
Пример #4
0
    @Override
    public List<Destination> call(ApiCaller ac, Deserializer parms) throws PerunException {

      return ac.getServicesManager()
          .getFacilitiesDestinations(ac.getSession(), ac.getVoById(parms.readInt("vo")));
    }