Package com.sparc.knappsack.components.entities

Examples of com.sparc.knappsack.components.entities.KeyVaultEntry


        if (bindingResult.hasErrors()) {
            redirectAttributes.addFlashAttribute("org.springframework.validation.BindingResult.keyVaultEntryForm", bindingResult);
            redirectAttributes.addFlashAttribute("keyVaultEntryForm", keyVaultEntryForm);
        } else {

            KeyVaultEntry keyVaultEntry;
            if (keyVaultEntryForm.getId() == null || keyVaultEntryForm.getId() <= 0) {
                keyVaultEntry = keyVaultEntryService.createKeyVaultEntry(keyVaultEntryForm);
            } else {
                keyVaultEntry = keyVaultEntryService.editKeyVaultEntry(keyVaultEntryForm);
            }

            if (keyVaultEntry != null && keyVaultEntry.getId() != null && keyVaultEntry.getId() > 0) {
                redirectAttributes.addFlashAttribute("success", true);
            } else {
                log.info(String.format("Unable to save KeyVaultEntry for domain: %s", userService.getUserFromSecurityContext().getActiveOrganization().getId()));
                String[] codes = {"desktop.manager.keyVault.generic.error"};
                ObjectError error = new ObjectError("keyVaultEntryForm", codes, null, null);
View Full Code Here


                        applicationVersionForm.setEditing(true);

                        // Resign the application if it was requested to be resigned and is not already being resigned
                        if (AppState.RESIGNING.equals(savedApplicationVersion.getAppState()) && !AppState.RESIGNING.equals(requestedAppState)) {
                            boolean resignSuccess = false;
                            KeyVaultEntry keyVaultEntry = keyVaultEntryService.get(applicationVersionForm.getKeyVaultEntryId());

                            resignSuccess = applicationVersionService.resign(savedApplicationVersion, requestedAppState, keyVaultEntry);

                            // Check if application version was successfully staged to be resigned and if not the the application version in an error state.
                            if (!resignSuccess) {
View Full Code Here

        }
    }

    @Override
    public KeyVaultEntry get(Long id) {
        KeyVaultEntry keyVaultEntry = null;
        if (id != null && id > 0) {
            keyVaultEntry = keyVaultEntryDao.get(id);
        }
        return keyVaultEntry;
    }
View Full Code Here

        return getAllForDomain(domainService.get(domainId));
    }

    @Override
    public void delete(Long id) {
        KeyVaultEntry keyVaultEntry = get(id);
        if (keyVaultEntry != null) {
            deleteFiles(keyVaultEntry);
            keyVaultEntryDao.delete(keyVaultEntry);
        }
    }
View Full Code Here

        save(keyVaultEntry);
    }

    @Override
    public KeyVaultEntry createKeyVaultEntry(KeyVaultEntryForm keyVaultEntryForm) {
        KeyVaultEntry keyVaultEntry = null;

        if (keyVaultEntryForm != null) {
            KeyVaultService keyVaultService = keyVaultServiceFactory.getKeyVaultService(keyVaultEntryForm.getApplicationType());

            if (keyVaultService != null) {
View Full Code Here

        return keyVaultEntry;
    }

    @Override
    public KeyVaultEntry editKeyVaultEntry(KeyVaultEntryForm keyVaultEntryForm) {
        KeyVaultEntry keyVaultEntry = get(keyVaultEntryForm.getId());
        if (keyVaultEntry != null) {
            List<Long> childDomainIds = keyVaultEntryForm.getChildDomainIds();
            List<Domain> childDomains =  domainService.get(childDomainIds.toArray(new Long[childDomainIds.size()]));

            keyVaultEntry.setChildDomains(childDomains);

            keyVaultEntry.setName(StringUtils.trimTrailingWhitespace(keyVaultEntryForm.getName()));

            update(keyVaultEntry);
        }
        return keyVaultEntry;
    }
View Full Code Here

TOP

Related Classes of com.sparc.knappsack.components.entities.KeyVaultEntry

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.