/** Create a new ramp meter dispatcher */ public MeterDispatcher(Session s, MeterManager m) { session = s; manager = m; sel_model = manager.getSelectionModel(); TypeCache<RampMeter> cache = session.getSonarState().getRampMeters(); watcher = new ProxyWatcher<RampMeter>(cache, this, true); }
/** Create a new comm link table model */ public CommLinkModel(Session s) { super( s, s.getSonarState().getConCache().getCommLinks(), false, /* has_properties */ true, /* has_create_delete */ true); /* has_name */ }
/** Check if the user is permitted to use the form */ public static boolean isPermitted(Session s) { return s.canRead(LaneUseMulti.SONAR_TYPE); }
/** Check if the user is permitted to update the given ramp meter */ private boolean isUpdatePermitted(RampMeter rm) { return session.isUpdatePermitted(rm, "rateNext") && session.isUpdatePermitted(rm, "mLock"); }
/** Check if the user is permitted to use the form */ public static boolean isPermitted(Session s) { return s.isUpdatePermitted(User.SONAR_TYPE) || s.isUpdatePermitted(Role.SONAR_TYPE) || s.isUpdatePermitted(Capability.SONAR_TYPE) || s.isUpdatePermitted(Privilege.SONAR_TYPE); }