예제 #1
0
  @Override
  public void mapAccessStrategy(
      final RegisteredServiceAccessStrategy accessStrategy, final ServiceData bean) {
    final RegisteredServiceSupportAccessEditBean accessBean = bean.getSupportAccess();
    accessBean.setCasEnabled(accessStrategy.isServiceAccessAllowed());
    accessBean.setSsoEnabled(accessStrategy.isServiceAccessAllowedForSso());

    if (accessStrategy instanceof DefaultRegisteredServiceAccessStrategy) {
      final DefaultRegisteredServiceAccessStrategy def =
          (DefaultRegisteredServiceAccessStrategy) accessStrategy;
      accessBean.setRequireAll(def.isRequireAllAttributes());
      accessBean.setRequiredAttr(def.getRequiredAttributes());
    }

    if (accessStrategy instanceof TimeBasedRegisteredServiceAccessStrategy) {
      final TimeBasedRegisteredServiceAccessStrategy def =
          (TimeBasedRegisteredServiceAccessStrategy) accessStrategy;
      accessBean.setStartingTime(def.getStartingDateTime());
      accessBean.setEndingTime(def.getEndingDateTime());
    }
  }
예제 #2
0
 @Override
 public void mapAccessStrategy(
     final RegisteredServiceAccessStrategy accessStrategy, final RegisteredServiceViewBean bean) {
   bean.setSasCASEnabled(accessStrategy.isServiceAccessAllowed());
 }