Package com.alu.e3.data.model

Examples of com.alu.e3.data.model.Certificate


        else if(cert.getId().equals(certId) == false)
          throw new InvalidParameterException("SSLCert ID mismatch");

        cert.setKeyId(keyId);
       
        Certificate certificate = BeanConverterUtil.toDataModel(cert);
        dataManager.updateCert(certificate);
       
        SSLCertResponse response = new SSLCertResponse(SSLCertResponse.SUCCESS);
        response.setId(cert.getId());
        return response;
View Full Code Here


        String id = (String) params[1];
       
        if(LOG.isDebugEnabled())
          LOG.debug("Getting Cert ID: {}", id);
       
        Certificate c = dataManager.getCertById(id, true);
        SSLCert cert = BeanConverterUtil.fromDataModel(c);
       
        SSLCertResponse response = new SSLCertResponse(SSLCertResponse.SUCCESS);
        response.setCert(cert);
        return response;
View Full Code Here

   

    if(logger.isDebugEnabled()) {
      logger.debug("Installing default 1Way Cert ...");
    }
    Certificate defaultCert = new Certificate();
    CertificateDetail defaultCertDetail = new CertificateDetail();
   
    defaultCert.setId(DEFAULT_CERT_ID);
    defaultCert.setCertDetail(defaultCertDetail);
    defaultCert.setData(certData);
    defaultCert.setPassword(DEFAULT_CERT_ID);
   
    defaultCertDetail.setId(DEFAULT_CERT_ID);
    defaultCertDetail.setKeyId(DEFAULT_KEY_ID);
    defaultCertDetail.setName(DEFAULT_CERT_NAME);
   
View Full Code Here

  @Override
  public Certificate getCertById(String id, boolean getFullDetails) throws InvalidIDException {
    if(!cachingTableCertificate.containsKey(id))
      throw new InvalidIDException("A Certificate with that ID [" + id + "] doesn't exist");
    Certificate cert = cachingTableCertificate.get(id)

    if(getFullDetails)
      cert.setCertDetail(cachingTableCertificateDetails.get(id));
    else
      cert.setCertDetail(null);

    return cert;
  }
View Full Code Here

    if( cert.getData() != null && !cert.getData().isEmpty() )
      throw new IllegalArgumentException("Certificate data cannot be changed with an update");


    Certificate knownCert = getCertById(cert.getId(), true);
    CertificateDetail knownCertDetail = knownCert.getCertDetail();

    if(cert.getCertDetail().getName() != null){
      knownCertDetail.setName(cert.getCertDetail().getName());
    }
View Full Code Here

  @Override
  public Certificate getCAById(String id) throws InvalidIDException {
    if(!cachingTableCA.containsKey(id))
      throw new InvalidIDException("A CA with that ID [" + id + "] doesn't exist");
    Certificate cert = cachingTableCA.get(id)
    cert.setCertDetail(cachingTableCADetails.get(id));

    return cert;
  }
View Full Code Here

    if( cert.getData() != null && !cert.getData().isEmpty() )
      throw new IllegalArgumentException("CA data cannot be changed with an update");


    Certificate knownCert = getCAById(cert.getId());
    CertificateDetail knownCertDetail = knownCert.getCertDetail();

    if(cert.getCertDetail().getName() != null){
      knownCertDetail.setName(cert.getCertDetail().getName());
    }
View Full Code Here

    props.putAll(identity.getApi().getProperties());
    Iterator<CallDescriptor> it = identity.getCallDescriptors().iterator();
    while(it.hasNext()){
      CallDescriptor cd = it.next();
      Policy policy = cd.getPolicy();
      if(policy != null){
        props.putAll(policy.getProperties());
      }
    }

    if(identity.getAuth() != null)
      props.putAll(identity.getAuth().getProperties());
View Full Code Here

    // Next add all of the tdr values for the Policies
    Iterator<CallDescriptor> it = identity.getCallDescriptors().iterator();
    while(it.hasNext()){
      CallDescriptor cd = it.next();
      Policy policy = cd.getPolicy();
      if(policy != null){
        if(doStatic)
          processTdrGenerationRuleStatic(policy.getTdrGenerationRule(), exchange, properties);
        else
          processTdrGenerationRuleDynamic(policy.getTdrGenerationRule(), exchange, properties, efType);
      }
    }

    // Finally add the values from the Auth
    Auth auth = identity.getAuth();
View Full Code Here

  }

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

    LoadBalancing lb = new LoadBalancing();
    lb.setLoadBalancingType(toDataModel(loadBalancing.getLoadBalancingType()));

    if(loadBalancing.getTargetHealthCheck() != null)
      lb.setTargetHealthCheck(toDataModel(loadBalancing.getTargetHealthCheck()));

    if(loadBalancing.getFailOver() != null)
      lb.setFailOver(toDataModel(loadBalancing.getFailOver()));

    return lb;
  }
View Full Code Here

TOP

Related Classes of com.alu.e3.data.model.Certificate

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.