Search in sources :

Example 21 with ServiceException

use of org.nhindirect.common.rest.exceptions.ServiceException in project nhin-d by DirectProject.

the class BundlesController method addMoreBundlesForm.

@PreAuthorize("hasRole('ROLE_ADMIN')")
@RequestMapping(value = "/addMoreBundlesForm", method = RequestMethod.GET)
public ModelAndView addMoreBundlesForm(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, HttpSession session, @ModelAttribute BundleForm simpleForm, @RequestParam(value = "domainName") String domainName, Model model) {
    ModelAndView mav = new ModelAndView();
    if (log.isDebugEnabled()) {
        log.debug("Enter bundles/addMoreBundlesForm");
    }
    // Process data for Trust Bundle View
    try {
        // Get Trust Bundles
        final Collection<TrustBundle> trustBundles = new ArrayList<TrustBundle>();
        Collection<TrustBundle> newBundles = new ArrayList<TrustBundle>();
        final Collection<TrustBundleDomainReltn> bundleRelationships = bundleService.getTrustBundlesByDomain(domainName, false);
        final Collection<TrustBundle> allBundles = bundleService.getTrustBundles(false);
        boolean bundleMatch = false;
        if (bundleRelationships != null && !bundleRelationships.isEmpty()) {
            for (TrustBundleDomainReltn relationship : bundleRelationships) {
                trustBundles.add(relationship.getTrustBundle());
            }
            for (TrustBundle bundle : allBundles) {
                bundleMatch = false;
                for (TrustBundle subBundle : trustBundles) {
                    if (subBundle.getId() == bundle.getId()) {
                        bundleMatch = true;
                    }
                }
                if (!bundleMatch) {
                    newBundles.add(bundle);
                }
            }
        } else {
            newBundles = bundleService.getTrustBundles(false);
        }
        //if(trustBundles != null) {
        model.addAttribute("trustBundles", newBundles);
    //}
    } catch (ServiceException e1) {
    }
    model.addAttribute("domainName", domainName);
    BundleForm bform = new BundleForm();
    bform.setId(0);
    bform.setDomainName((String) session.getAttribute("currentDomainName"));
    model.addAttribute("bundleForm", bform);
    mav.setViewName("addMoreBundlesForm");
    return mav;
}
Also used : ServiceException(org.nhindirect.common.rest.exceptions.ServiceException) BundleForm(org.nhindirect.config.ui.form.BundleForm) ModelAndView(org.springframework.web.servlet.ModelAndView) ArrayList(java.util.ArrayList) TrustBundle(org.nhindirect.config.model.TrustBundle) TrustBundleDomainReltn(org.nhindirect.config.model.TrustBundleDomainReltn) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 22 with ServiceException

use of org.nhindirect.common.rest.exceptions.ServiceException in project nhin-d by DirectProject.

the class BundlesController method refreshBundles.

@PreAuthorize("hasRole('ROLE_ADMIN')")
@RequestMapping(value = "/refreshBundles", method = RequestMethod.POST)
public ModelAndView refreshBundles(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, HttpSession session, @ModelAttribute BundleForm simpleForm, Model model) {
    final ModelAndView mav = new ModelAndView();
    if (log.isDebugEnabled()) {
        log.debug("Enter bundles/refreshbundles");
    }
    if (simpleForm.getBundlesSelected() != null) {
        if (log.isDebugEnabled()) {
            log.debug("Bundles marked for refresh: " + simpleForm.getBundlesSelected().toString());
        }
    }
    if (bundleService != null && simpleForm != null && simpleForm.getBundlesSelected() != null) {
        int bundleCount = simpleForm.getBundlesSelected().size();
        if (log.isDebugEnabled()) {
            log.debug("Refreshing Bundles");
        }
        for (int i = 0; i < bundleCount; i++) {
            final String bundleName = simpleForm.getBundlesSelected().get(i);
            log.debug("Refreshing Bundle #" + bundleName);
            // Refresh Trust Bundle(s)
            try {
                bundleService.refreshTrustBundle(bundleName);
            } catch (ServiceException cse) {
                log.error("Could not refresh bundle: #" + bundleName);
            }
        }
    }
    model.addAttribute("ajaxRequest", AjaxUtils.isAjaxRequest(requestedWith));
    final BundleForm bform = new BundleForm();
    bform.setId(0);
    model.addAttribute("bundleForm", bform);
    mav.setViewName("bundles");
    // Process data for Trust Bundle View
    try {
        // Get Trust Bundles
        final Collection<TrustBundle> trustBundles = bundleService.getTrustBundles(false);
        if (trustBundles != null) {
            model.addAttribute("trustBundles", trustBundles);
        }
    } catch (ServiceException e1) {
    }
    return new ModelAndView("redirect:/config/main/search?domainName=&submitType=ManageTrustBundles");
}
Also used : ServiceException(org.nhindirect.common.rest.exceptions.ServiceException) BundleForm(org.nhindirect.config.ui.form.BundleForm) ModelAndView(org.springframework.web.servlet.ModelAndView) TrustBundle(org.nhindirect.config.model.TrustBundle) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 23 with ServiceException

use of org.nhindirect.common.rest.exceptions.ServiceException in project nhin-d by DirectProject.

the class CertificatesController method addCertificate.

@PreAuthorize("hasRole('ROLE_ADMIN')")
@RequestMapping(value = "/addcertificate", method = RequestMethod.POST)
public ModelAndView addCertificate(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, HttpSession session, @ModelAttribute CertificateForm certificateForm, Model model, @RequestParam(value = "submitType") String actionPath) {
    final ModelAndView mav = new ModelAndView();
    String strid = "";
    //if (log.isDebugEnabled()) 
    log.error("Enter domain/addcertificate");
    if (actionPath.equalsIgnoreCase("cancel")) {
        if (log.isDebugEnabled())
            log.debug("trying to cancel from saveupdate");
        final SearchDomainForm form2 = (SearchDomainForm) session.getAttribute("searchDomainForm");
        model.addAttribute(form2 != null ? form2 : new SearchDomainForm());
        model.addAttribute("ajaxRequest", AjaxUtils.isAjaxRequest(requestedWith));
        mav.setViewName("main");
        mav.addObject("privKeyTypeList", PrivateKeyType.getPrivKeyTypeList());
        mav.addObject("statusList", EntityStatus.getEntityStatusList());
        return mav;
    }
    if (actionPath.equalsIgnoreCase("newcertificate") || actionPath.equalsIgnoreCase("add certificate")) {
        log.debug("Attempting to add certificate");
        if (this.keyManager == null)
            log.debug("Key manager is null");
        else
            log.debug("Key manager is non-null");
        strid = "" + certificateForm.getId();
        // insert the new address into the Domain list of Addresses
        final EntityStatus estatus = certificateForm.getStatus();
        if (log.isDebugEnabled())
            log.debug("beginning to evaluate filedata");
        try {
            model.addAttribute("certerror", false);
            model.addAttribute("passphraseError", false);
            if (!certificateForm.getFileData().isEmpty()) {
                final String passphrase = (certificateForm.getKeyPassphrase() == null) ? "" : certificateForm.getKeyPassphrase();
                PrivateKeyType privKeyType = PrivateKeyType.fromString(certificateForm.getPrivKeyType());
                if ((privKeyType == PrivateKeyType.PKCS8_PASSPHRASE || privKeyType == PrivateKeyType.PKCS_12_PASSPHRASE) && StringUtils.isEmpty(passphrase)) {
                    // can't move on if a passphrase is required and one is not supplied
                    model.addAttribute("passphraseError", true);
                } else {
                    byte[] certOrP12Bytes = certificateForm.getFileData().getBytes();
                    byte[] privateKeyBytes = null;
                    if (privKeyType == PrivateKeyType.PKCS_12_PASSPHRASE || privKeyType == PrivateKeyType.PKCS_12_UNPROTECTED) {
                        log.debug("Converting byte stream to cert container");
                        // there is a private key present.. normalized it to an unproted format
                        //if (cont.getKey() != null)
                        //{
                        log.debug("Private key exists; normalizing to non-protected p12 format.");
                        certOrP12Bytes = CertUtils.changePkcs12Protection(certOrP12Bytes, passphrase.toCharArray(), passphrase.toCharArray(), "".toCharArray(), "".toCharArray());
                    //}
                    } else if (privKeyType != PrivateKeyType.NONE) {
                        // there is a private key file associated with this request
                        privateKeyBytes = certificateForm.getPrivKeyData().getBytes();
                        // get the private key... it may be different formats, so be on the watch
                        if (privKeyType == PrivateKeyType.PKCS8_PASSPHRASE) {
                            // key
                            try {
                                final EncryptedPrivateKeyInfo encryptPKInfo = new EncryptedPrivateKeyInfo(privateKeyBytes);
                                final Cipher cipher = Cipher.getInstance(encryptPKInfo.getAlgName());
                                final PBEKeySpec pbeKeySpec = new PBEKeySpec(passphrase.toCharArray());
                                final SecretKeyFactory secFac = SecretKeyFactory.getInstance(encryptPKInfo.getAlgName());
                                final Key pbeKey = secFac.generateSecret(pbeKeySpec);
                                final AlgorithmParameters algParams = encryptPKInfo.getAlgParameters();
                                cipher.init(Cipher.DECRYPT_MODE, pbeKey, algParams);
                                final KeySpec pkcs8KeySpec = encryptPKInfo.getKeySpec(cipher);
                                final KeyFactory kf = KeyFactory.getInstance("RSA");
                                privateKeyBytes = kf.generatePrivate(pkcs8KeySpec).getEncoded();
                            } catch (Exception e) {
                                return mav;
                            }
                        }
                    }
                    String owner = "";
                    final String fileType = certificateForm.getFileData().getContentType();
                    if (!fileType.matches("application/x-x509-ca-cert") && !fileType.matches("application/octet-stream") && !fileType.matches("application/x-pkcs12")) {
                        model.addAttribute("certerror", true);
                    } else {
                        final Certificate cert = new Certificate();
                        // convert the cert and key to the proper storage format
                        cert.setData(toCertDataFormat(certOrP12Bytes, privateKeyBytes, privKeyType));
                        cert.setOwner(owner);
                        cert.setStatus(org.nhindirect.config.model.EntityStatus.valueOf(estatus.toString()));
                        final ArrayList<Certificate> certlist = new ArrayList<Certificate>();
                        certlist.add(cert);
                        log.debug("Adding certificate to config store.");
                        certService.addCertificate(cert);
                        log.debug("Certificate add SUCCESSFUL");
                    }
                }
            } else {
                if (log.isDebugEnabled())
                    log.debug("DO NOT store the certificate into database BECAUSE THERE IS NO FILE");
            }
        } catch (ServiceException ed) {
            log.error(ed);
        } catch (Exception e) {
            log.error(e);
            e.printStackTrace();
        }
        // certificate form and result
        try {
            final Collection<Certificate> certs = certService.getAllCertificates();
            if (this.keyManager != null && this.keyManager instanceof MutableKeyStoreProtectionManager) {
                final KeyStore keyStore = ((MutableKeyStoreProtectionManager) keyManager).getKS();
                // the key store manager to see if they have private keys
                for (Certificate cert : certs) {
                    if (!cert.isPrivateKey()) {
                        try {
                            final X509Certificate checkCert = CertUtils.toX509Certificate(cert.getData());
                            final String alias = keyStore.getCertificateAlias(checkCert);
                            if (!StringUtils.isEmpty(alias)) {
                                // check if this entry has a private key associated with
                                // it
                                final PrivateKey privKey = (PrivateKey) keyStore.getKey(alias, "".toCharArray());
                                if (privKey != null)
                                    cert.setPrivateKey(true);
                            }
                        } catch (Exception e) {
                        }
                    }
                }
            }
            model.addAttribute("certificatesResults", certs);
            final CertificateForm cform = new CertificateForm();
            cform.setId(0);
            model.addAttribute("certificateForm", cform);
        } catch (ServiceException e1) {
            e1.printStackTrace();
        }
        model.addAttribute("ajaxRequest", AjaxUtils.isAjaxRequest(requestedWith));
        final SimpleForm simple = new SimpleForm();
        simple.setId(Long.parseLong(strid));
        model.addAttribute("simpleForm", simple);
        mav.setViewName("certificates");
        // the Form's default button action
        final String action = "Update";
        model.addAttribute("action", action);
        model.addAttribute("ajaxRequest", AjaxUtils.isAjaxRequest(requestedWith));
        mav.addObject("privKeyTypeList", PrivateKeyType.getPrivKeyTypeList());
        mav.addObject("statusList", EntityStatus.getEntityStatusList());
    }
    return mav;
}
Also used : PBEKeySpec(javax.crypto.spec.PBEKeySpec) CertificateForm(org.nhindirect.config.ui.form.CertificateForm) SimpleForm(org.nhindirect.config.ui.form.SimpleForm) PrivateKey(java.security.PrivateKey) KeySpec(java.security.spec.KeySpec) PBEKeySpec(javax.crypto.spec.PBEKeySpec) PKCS8EncodedKeySpec(java.security.spec.PKCS8EncodedKeySpec) ModelAndView(org.springframework.web.servlet.ModelAndView) ArrayList(java.util.ArrayList) SearchDomainForm(org.nhindirect.config.ui.form.SearchDomainForm) MutableKeyStoreProtectionManager(org.nhindirect.common.crypto.MutableKeyStoreProtectionManager) EntityStatus(org.nhindirect.config.model.EntityStatus) SecretKeyFactory(javax.crypto.SecretKeyFactory) KeyFactory(java.security.KeyFactory) SecretKeyFactory(javax.crypto.SecretKeyFactory) KeyStore(java.security.KeyStore) ServiceException(org.nhindirect.common.rest.exceptions.ServiceException) IOException(java.io.IOException) CryptoException(org.nhindirect.common.crypto.exceptions.CryptoException) X509Certificate(java.security.cert.X509Certificate) PrivateKeyType(org.nhindirect.config.ui.util.PrivateKeyType) ServiceException(org.nhindirect.common.rest.exceptions.ServiceException) EncryptedPrivateKeyInfo(javax.crypto.EncryptedPrivateKeyInfo) Cipher(javax.crypto.Cipher) Key(java.security.Key) PrivateKey(java.security.PrivateKey) SecretKey(javax.crypto.SecretKey) AlgorithmParameters(java.security.AlgorithmParameters) X509Certificate(java.security.cert.X509Certificate) Certificate(org.nhindirect.config.model.Certificate) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 24 with ServiceException

use of org.nhindirect.common.rest.exceptions.ServiceException in project nhin-d by DirectProject.

the class DNSController method navigate.

@PreAuthorize("hasRole('ROLE_ADMIN')")
@RequestMapping(value = "/navigate", method = RequestMethod.GET)
public ModelAndView navigate(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, HttpSession session, @ModelAttribute DNSEntryForm entryForm, Model model, @RequestParam(value = "submitType") String actionPath) {
    if (log.isDebugEnabled())
        log.debug("Enter: " + actionPath);
    final ModelAndView mav = new ModelAndView();
    if ("gotodomains".equalsIgnoreCase(actionPath) || "domains".equalsIgnoreCase(actionPath)) {
        final SearchDomainForm form2 = (SearchDomainForm) session.getAttribute("searchDomainForm");
        model.addAttribute(form2 != null ? form2 : new SearchDomainForm());
        model.addAttribute("ajaxRequest", AjaxUtils.isAjaxRequest(requestedWith));
        mav.setViewName("main");
        mav.addObject("privKeyTypeList", PrivateKeyType.getPrivKeyTypeList());
        mav.addObject("statusList", EntityStatus.getEntityStatusList());
    } else if ("gotosettings".equalsIgnoreCase(actionPath) || "settings".equalsIgnoreCase(actionPath)) {
        final String action = "add";
        model.addAttribute("action", action);
        mav.setViewName("settings");
        mav.addObject("actionPath", actionPath);
        SettingsForm form = (SettingsForm) session.getAttribute("settingsForm");
        if (form == null) {
            form = new SettingsForm();
        }
        model.addAttribute("settingsForm", form);
        // retrieve list of settings for settingsResults
        List<Setting> results = null;
        if (settingsService != null) {
            try {
                final Collection<Setting> settings = settingsService.getSettings();
                if (settings != null)
                    results = new ArrayList<Setting>(settings);
                else
                    results = new ArrayList<Setting>();
            } catch (ServiceException e) {
                e.printStackTrace();
            }
        }
        model.addAttribute("simpleForm", new SimpleForm());
        model.addAttribute("settingsResults", results);
    } else if (actionPath.equalsIgnoreCase("gotocertificates") || actionPath.equalsIgnoreCase("certificates")) {
        final String action = "Update";
        model.addAttribute("action", action);
        mav.setViewName("certificates");
        mav.addObject("actionPath", actionPath);
        CertificateForm form = (CertificateForm) session.getAttribute("certificateForm");
        if (form == null) {
            form = new CertificateForm();
        }
        model.addAttribute("certificateForm", form);
        // retrieve list of settings for settingsResults
        List<Certificate> results = null;
        if (certService != null) {
            try {
                final Collection<Certificate> certs = certService.getAllCertificates();
                if (certs != null) {
                    if (this.keyManager != null && this.keyManager instanceof MutableKeyStoreProtectionManager) {
                        final KeyStore keyStore = ((MutableKeyStoreProtectionManager) keyManager).getKS();
                        // the key store manager to see if they have private keys
                        for (Certificate cert : certs) {
                            if (!cert.isPrivateKey()) {
                                try {
                                    final X509Certificate checkCert = CertUtils.toX509Certificate(cert.getData());
                                    final String alias = keyStore.getCertificateAlias(checkCert);
                                    if (!StringUtils.isEmpty(alias)) {
                                        // check if this entry has a private key associated with
                                        // it
                                        final PrivateKey privKey = (PrivateKey) keyStore.getKey(alias, "".toCharArray());
                                        if (privKey != null)
                                            cert.setPrivateKey(true);
                                    }
                                } catch (Exception e) {
                                }
                            }
                        }
                    }
                    results = new ArrayList<Certificate>(certs);
                } else
                    results = new ArrayList<Certificate>();
            } catch (ServiceException e) {
                e.printStackTrace();
            }
        }
        model.addAttribute("simpleForm", new SimpleForm());
        model.addAttribute("certificatesResults", results);
    }
    if (log.isDebugEnabled())
        log.debug("Exit");
    return mav;
}
Also used : SimpleForm(org.nhindirect.config.ui.form.SimpleForm) CertificateForm(org.nhindirect.config.ui.form.CertificateForm) PrivateKey(java.security.PrivateKey) Setting(org.nhindirect.config.model.Setting) ModelAndView(org.springframework.web.servlet.ModelAndView) ArrayList(java.util.ArrayList) KeyStore(java.security.KeyStore) X509Certificate(java.security.cert.X509Certificate) CertificateEncodingException(javax.security.cert.CertificateEncodingException) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) TextParseException(org.xbill.DNS.TextParseException) ServiceException(org.nhindirect.common.rest.exceptions.ServiceException) IOException(java.io.IOException) ConfigurationServiceException(org.nhindirect.config.service.ConfigurationServiceException) SearchDomainForm(org.nhindirect.config.ui.form.SearchDomainForm) ServiceException(org.nhindirect.common.rest.exceptions.ServiceException) ConfigurationServiceException(org.nhindirect.config.service.ConfigurationServiceException) MutableKeyStoreProtectionManager(org.nhindirect.common.crypto.MutableKeyStoreProtectionManager) SettingsForm(org.nhindirect.config.ui.form.SettingsForm) Collection(java.util.Collection) List(java.util.List) ArrayList(java.util.ArrayList) X509Certificate(java.security.cert.X509Certificate) Certificate(org.nhindirect.config.model.Certificate) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 25 with ServiceException

use of org.nhindirect.common.rest.exceptions.ServiceException in project nhin-d by DirectProject.

the class DomainController method addCertificate.

@PreAuthorize("hasRole('ROLE_ADMIN')")
@RequestMapping(value = "/addcertificate", method = RequestMethod.POST)
public ModelAndView addCertificate(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, HttpSession session, @ModelAttribute CertificateForm certificateForm, Model model, @RequestParam(value = "submitType") String actionPath) {
    final ModelAndView mav = new ModelAndView();
    String strid = "";
    if (log.isDebugEnabled())
        log.debug("Enter domain/addcertificate");
    if (actionPath.equalsIgnoreCase("newcertificate") || actionPath.equalsIgnoreCase("add certificate")) {
        strid = "" + certificateForm.getId();
        Domain dom = null;
        try {
            dom = domainService.getDomain(strid);
        } catch (ServiceException e) {
            e.printStackTrace();
        }
        String owner = "";
        // insert the new address into the Domain list of Addresses
        if (log.isDebugEnabled())
            log.debug("beginning to evaluate filedata");
        try {
            if (!certificateForm.getFileData().isEmpty()) {
                final byte[] bytes = certificateForm.getFileData().getBytes();
                owner = certificateForm.getOwner();
                final Certificate cert = new Certificate();
                cert.setData(bytes);
                cert.setOwner(owner);
                cert.setStatus(certificateForm.getStatus());
                certService.addCertificate(cert);
                // store the bytes somewhere
                if (log.isDebugEnabled())
                    log.debug("store the certificate into database");
            } else {
                if (log.isDebugEnabled())
                    log.debug("DO NOT store the certificate into database BECAUSE THERE IS NO FILE");
            }
        } catch (ServiceException ed) {
            if (log.isDebugEnabled())
                log.error(ed);
        } catch (Exception e) {
            if (log.isDebugEnabled())
                log.error(e);
            e.printStackTrace();
        }
        // certificate and anchor forms and results
        try {
            final Collection<Certificate> certs = certService.getCertificatesByOwner(owner);
            model.addAttribute("certificatesResults", certs);
            final Collection<Anchor> anchors = anchorService.getAnchorsForOwner(owner, false, false, "");
            final Collection<AnchorForm> convertedanchors = convertAnchors(anchors);
            // now set anchorsResults
            model.addAttribute("anchorsResults", convertedanchors);
            final CertificateForm cform = new CertificateForm();
            cform.setId(dom.getId());
            model.addAttribute("certificateForm", cform);
            final AnchorForm aform = new AnchorForm();
            aform.setId(dom.getId());
            model.addAttribute("anchorForm", aform);
        } catch (ServiceException e1) {
            e1.printStackTrace();
        }
        model.addAttribute("ajaxRequest", AjaxUtils.isAjaxRequest(requestedWith));
        final SimpleForm simple = new SimpleForm();
        simple.setId(Long.parseLong(strid));
        model.addAttribute("simpleForm", simple);
        model.addAttribute("addressesResults", dom.getAddresses());
        mav.setViewName("domain");
        // the Form's default button action
        final String action = "Update";
        DomainForm form = (DomainForm) session.getAttribute("domainForm");
        if (form == null) {
            form = new DomainForm();
            form.populate(dom);
        }
        model.addAttribute("domainForm", form);
        model.addAttribute("action", action);
        model.addAttribute("ajaxRequest", AjaxUtils.isAjaxRequest(requestedWith));
        mav.addObject("privKeyTypeList", PrivateKeyType.getPrivKeyTypeList());
        mav.addObject("statusList", EntityStatus.getEntityStatusList());
    }
    final AddressForm addressForm2 = new AddressForm();
    addressForm2.setDisplayName("");
    addressForm2.setEndpoint("");
    addressForm2.setEmailAddress("");
    addressForm2.setType("");
    addressForm2.setId(Long.parseLong(strid));
    model.addAttribute("addressForm", addressForm2);
    return mav;
}
Also used : CertificateForm(org.nhindirect.config.ui.form.CertificateForm) SimpleForm(org.nhindirect.config.ui.form.SimpleForm) AnchorForm(org.nhindirect.config.ui.form.AnchorForm) ModelAndView(org.springframework.web.servlet.ModelAndView) ServiceException(org.nhindirect.common.rest.exceptions.ServiceException) IOException(java.io.IOException) ConfigurationServiceException(org.nhindirect.config.service.ConfigurationServiceException) DomainForm(org.nhindirect.config.ui.form.DomainForm) SearchDomainForm(org.nhindirect.config.ui.form.SearchDomainForm) Anchor(org.nhindirect.config.model.Anchor) TrustBundleAnchor(org.nhindirect.config.model.TrustBundleAnchor) AddressForm(org.nhindirect.config.ui.form.AddressForm) ServiceException(org.nhindirect.common.rest.exceptions.ServiceException) ConfigurationServiceException(org.nhindirect.config.service.ConfigurationServiceException) Domain(org.nhindirect.config.model.Domain) X509Certificate(java.security.cert.X509Certificate) Certificate(org.nhindirect.config.model.Certificate) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

ServiceException (org.nhindirect.common.rest.exceptions.ServiceException)42 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)32 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)31 ModelAndView (org.springframework.web.servlet.ModelAndView)31 ConfigurationServiceException (org.nhindirect.config.service.ConfigurationServiceException)19 IOException (java.io.IOException)18 SearchDomainForm (org.nhindirect.config.ui.form.SearchDomainForm)15 X509Certificate (java.security.cert.X509Certificate)12 Certificate (org.nhindirect.config.model.Certificate)12 CertificateForm (org.nhindirect.config.ui.form.CertificateForm)12 ArrayList (java.util.ArrayList)11 Domain (org.nhindirect.config.model.Domain)10 TrustBundleAnchor (org.nhindirect.config.model.TrustBundleAnchor)9 AddressForm (org.nhindirect.config.ui.form.AddressForm)9 AnchorForm (org.nhindirect.config.ui.form.AnchorForm)9 Anchor (org.nhindirect.config.model.Anchor)8 DomainForm (org.nhindirect.config.ui.form.DomainForm)8 SimpleForm (org.nhindirect.config.ui.form.SimpleForm)8 DNSEntryForm (org.nhindirect.config.ui.form.DNSEntryForm)7 TrustBundle (org.nhindirect.config.model.TrustBundle)6