Package com.alu.e3.data.model.sub

Examples of com.alu.e3.data.model.sub.QuotaRLBucket


  @Override
  public void removeBucket(String policyId, String bucketId) throws IllegalArgumentException {

    Policy policy = getPolicyById(policyId);

    QuotaRLBucket pAuthIds = getBucketWithIdForPolicy(policy, bucketId);
    if(pAuthIds == null) {
      throw new InvalidIDException("A Bucket with that ID [" + bucketId + "] doesn't exist for this Policy [" + policyId + "]");
    }

    // Iterating over Auth Ids in the bucket to remove policy from the auth
    for(String authId : pAuthIds.getAuthIds()) {

      String authToken = cachingTableAuthIdToAuthToken.get(authId);
      if (authToken == null)
        continue;
View Full Code Here


   * @param policy Policy to iterate on
   * @param bucketId Id of the bucket to get
   * @return The corresponding bucket (AuthIds object)
   */
  private QuotaRLBucket getBucketWithIdForPolicy(Policy policy, String bucketId) {
    QuotaRLBucket pAuthIds = null;
    for(QuotaRLBucket cAuthIds : policy.getAuthIds()) {
      if(cAuthIds.getId().equalsIgnoreCase(bucketId)) {
        pAuthIds = cAuthIds;
        break;
      }
View Full Code Here

    return t;
  }

  private static final SBAuthentication toDataModel(Authentication authentication) {
    if (authentication==null) return null; // throw new IllegalArgumentException("authentication must not be null");
    SBAuthentication s = new SBAuthentication();
    s.setType(authentication.getType());
    for (Key k : authentication.getData().getKey())
      s.getKeys().put(k.getName(), k.getValue());
    return s;
  }
View Full Code Here

  }

  private static final TargetHealthCheck toDataModel(com.alu.e3.prov.restapi.model.TargetHealthCheck targetHealthCheckType) {
    if (targetHealthCheckType==null) throw new IllegalArgumentException("targetHealthCheckType must not be null");

    TargetHealthCheck thc = new TargetHealthCheck();
    thc.setType(targetHealthCheckType.getType());

    return thc;
  }
View Full Code Here

    return apiContext;
  }

  private static final TargetHost toDataModel(com.alu.e3.prov.restapi.model.TargetHost targetHost) {
    if (targetHost==null) throw new IllegalArgumentException("targetHost must not be null");
    TargetHost t = new TargetHost();
    t.setUrl        (targetHost.getUrl());
    t.setSite        (targetHost.getSite());
    t.setAuthentication    (toDataModel(targetHost.getAuthentication()));
    if (targetHost.getConnectionParameters() != null)
      t.setConnectionParameters(toDataModel(targetHost.getConnectionParameters()));
   
    return t;
  }
View Full Code Here

    return s;
  }

  private static TdrDynamicRule toDataModel(DynamicTdr dynamicTdr) {
    if (dynamicTdr==null) throw new IllegalArgumentException("dynamicTdr must not be null");
    TdrDynamicRule t = new TdrDynamicRule();
    t.setHttpHeaderName  (dynamicTdr.getHttpHeaderName());
    t.setTdrPropName  (dynamicTdr.getTdrPropName());
    t.setExtractFrom  (dynamicTdr.getExtractFrom());

    if(dynamicTdr.getTypes() != nullt.getTypes().addAll(dynamicTdr.getTypes().getType());

    return t;
  }
View Full Code Here



  private static final TdrGenerationRule toDataModel(TdrData tdr) {
    if (tdr==null) return null;// throw new IllegalArgumentException("tdr must not be null");
    TdrGenerationRule t = new TdrGenerationRule();
    t.getStaticRules().addAll  (BeanConverterUtil.<TdrStaticRule,StaticTdr>toDataModels(tdr.getStatic()));
    t.getDynamicRules().addAll  (BeanConverterUtil.<TdrDynamicRule,DynamicTdr>toDataModels(tdr.getDynamic()));
    return t;
  }
View Full Code Here

    return t;
  }

  private static TdrStaticRule toDataModel(StaticTdr staticTdr) {
    if (staticTdr==null) throw new IllegalArgumentException("staticTdr must not be null");
    TdrStaticRule t = new TdrStaticRule();
    t.setTdrPropName  (staticTdr.getTdrPropName());
    t.setValue      (staticTdr.getValue());
    t.setPropertyName  (staticTdr.getPropertyName());

    if(staticTdr.getTypes() != nullt.getTypes().addAll  (staticTdr.getTypes().getType());

    return t;
  }
View Full Code Here

        }
      }
      speakersActive.add(inst);
    }
   
    fireInstanceAdded(new InstanceEvent(inst));
  }
View Full Code Here

   
    Iterator<Instance> itr = list.iterator();
    while (itr.hasNext()) {
      if (itr.next().getInternalIP().equals(inst.getInternalIP())) {
        itr.remove();
          fireInstanceRemoved(new InstanceEvent(inst));
        return true;
      }
    }
    return false;   
   
View Full Code Here

TOP

Related Classes of com.alu.e3.data.model.sub.QuotaRLBucket

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.