/** * {@inheritDoc} */ @Override public void removeReadabilityGate(IGate gate) { if (gate instanceof ISecurityHandlerAware) { ((ISecurityHandlerAware) gate).setSecurityHandler(null); } if (readabilityGates == null) { return; } readabilityGates.remove(gate); gate.removePropertyChangeListener(IGate.OPEN_PROPERTY, getReadabilityGatesListener()); readabilityChange(); }
/** * {@inheritDoc} */ @Override public void addReadabilityGate(IGate gate) { if (gate instanceof ISecurityHandlerAware) { ((ISecurityHandlerAware) gate).setSecurityHandler(getSecurityHandler()); } if (gate instanceof IContextAware) { ((IContextAware) gate).setContext(createGateContext()); } if (readabilityGates == null) { readabilityGates = new THashSet<>(4); } readabilityGates.add(gate); gate.addPropertyChangeListener(IGate.OPEN_PROPERTY, getReadabilityGatesListener()); readabilityChange(); }