Examples of StorageConfiguration


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

        assertTrue(storageConfiguration.getBaseLocation().equals("/base/location"));
        assertTrue(storageConfiguration.getStorageType().equals(StorageType.LOCAL));
    }

    private StorageConfiguration getStorageConfiguration() {
        StorageConfiguration storageConfiguration = new LocalStorageConfiguration();
        storageConfiguration.setBaseLocation("/test");
        storageConfiguration.setName(STORAGE_CONFIG_NAME);
        storageConfiguration.setStorageType(StorageType.LOCAL);

        return storageConfiguration;
    }
View Full Code Here

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

    }

    public List<Category> createDefaultCategories(Long organizationId) {
        List<Category> defaultCategories = new ArrayList<Category>();
        Organization organization = organizationService.get(organizationId);
        StorageConfiguration storageConfiguration = organization.getOrgStorageConfig().getStorageConfigurations().get(0);
        Long storageConfigId = storageConfiguration.getId();
        Long orgStorageConfigId = organization.getOrgStorageConfig().getId();

        /**
         * Create entertainment category
         */
 
View Full Code Here

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

    @Override
    @PreAuthorize("hasRole('ROLE_ADMIN')")
    public void add(StorageConfiguration storageConfiguration) {
        if (storageConfiguration != null) {
            if (storageConfiguration.isRegistrationDefault()) {
                StorageConfiguration currentDefault = storageConfigurationDao.getRegistrationDefault();
                if (currentDefault != null) {
                    currentDefault.setRegistrationDefault(false);
                    update(currentDefault);
                }
            }

            storageConfigurationDao.add(storageConfiguration);
View Full Code Here

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

        }
    }

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

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

        return storageConfigurationDao.getRegistrationDefault();
    }

    @Override
    public StorageConfiguration getByName(String name) {
        StorageConfiguration storageConfiguration = null;
        if (name != null && !"".equals(name.trim())) {
            storageConfiguration = storageConfigurationDao.get(name);
        }
        return storageConfiguration;
    }
View Full Code Here

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

    }

    @Override
    @PreAuthorize("hasRole('ROLE_ADMIN')")
    public void delete(Long id) {
        StorageConfiguration storageConfiguration = get(id);

        if (storageConfiguration != null) {
            List<Organization> organizations = organizationService.getAll();
            for (Organization organization : organizations) {
                List<StorageConfiguration> storageConfigurations = organization.getOrgStorageConfig().getStorageConfigurations();
View Full Code Here

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

    @Override
    @PreAuthorize("hasRole('ROLE_ADMIN')")
    public void update(StorageForm storageForm) {
        if (storageForm != null) {
            StorageConfiguration storageConfiguration = get(storageForm.getId());

            if (storageConfiguration != null) {
                if (storageForm.isRegistrationDefault()) {
                    StorageConfiguration currentDefault = storageConfigurationDao.getRegistrationDefault();
                    if (currentDefault != null && !currentDefault.equals(storageConfiguration)) {
                        currentDefault.setRegistrationDefault(false);
                        update(currentDefault);
                    }
                }

                StorageService storageService = storageServiceFactory.getStorageService(storageConfiguration.getStorageType());
View Full Code Here

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

    }

    @Override
    @PreAuthorize("hasRole('ROLE_ADMIN')")
    public StorageConfiguration createStorageConfiguration(StorageForm storageForm) {
        StorageConfiguration storageConfiguration = null;
        if (storageForm != null) {
            storageConfiguration = toStorageConfiguration(storageForm);
            add(storageConfiguration);
        }
        return storageConfiguration;
View Full Code Here

Examples of org.platformlayer.ops.machines.StorageConfiguration

  public StorageConfiguration getStorageConfiguration() throws OpsException {
    String authUrl = model.endpoint;

    OpenstackCredentials credentials = new OpenstackCredentials(authUrl, model.username,
        model.password.plaintext(), model.tenant);
    StorageConfiguration config = new OpenstackStorageConfiguration(credentials);
    return config;
  }
View Full Code Here

Examples of org.platformlayer.ops.machines.StorageConfiguration

  public OpenstackBackupContext build(ItemBase item) throws OpsException {
    Machine machine = instances.findMachine(item);
    if (machine == null) {
      throw new OpsException("Cannot determine machine for: " + item);
    }
    StorageConfiguration storageConfiguration = cloud.getStorageConfiguration(machine);
    return build(storageConfiguration);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.