public List<RichDestination> call(ApiCaller ac, Deserializer parms) throws PerunException { if (parms.contains("facility")) { return ac.getServicesManager() .getAllRichDestinations(ac.getSession(), ac.getFacilityById(parms.readInt("facility"))); } else { return ac.getServicesManager() .getAllRichDestinations(ac.getSession(), ac.getServiceById(parms.readInt("service"))); } }
@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; }