Package com.sparc.knappsack.models

Examples of com.sparc.knappsack.models.OrganizationModel


    @Override
    public GroupModel createGroupModelWithOrganization(Group group, boolean includeOrgStorageConfig, boolean includeExternalData) {
        GroupModel model = createGroupModel(group);

        if (model != null) {
            OrganizationModel organizationModel = null;

            if (includeOrgStorageConfig) {
                organizationModel = organizationService.createOrganizationModel(group.getOrganization(), includeExternalData);
            } else {
                organizationModel = organizationService.createOrganizationModelWithoutStorageConfiguration(group.getOrganization(), includeExternalData);
View Full Code Here


        return organizationModels;
    }

    @Override
    public OrganizationModel createOrganizationModelWithoutStorageConfiguration(Organization organization, boolean includeExternalData) {
        OrganizationModel model = null;
        if (organization != null) {
            model = new OrganizationModel();
            model.setId(organization.getId());
            model.setName(organization.getName());
            if (organization.getCreateDate() != null) {
                model.setCreateDate(new Date(organization.getCreateDate().getTime()));
            }
        }
        return model;
    }
View Full Code Here

        return createOrganizationModel(get(organizationId), includeExternalData);
    }

    @Override
    public OrganizationModel createOrganizationModel(Organization organization, boolean includeExternalData) {
        OrganizationModel model = createOrganizationModelWithoutStorageConfiguration(organization, includeExternalData);

        OrgStorageConfig orgStorageConfig = organization.getOrgStorageConfig();
        if (orgStorageConfig != null && orgStorageConfig.getStorageConfigurations() != null) {
            model.setStorageConfigurationId(orgStorageConfig.getStorageConfigurations().get(0).getId());
            model.setStoragePrefix(orgStorageConfig.getPrefix());
        }
        return model;
    }
View Full Code Here

        OrganizationForm organizationForm = getOrganizationForm();

        organizationService.createOrganization(organizationForm);
        Organization organization = organizationService.getByName("Test Organization");

        OrganizationModel newOrganizationModel = new OrganizationModel();

        organizationService.mapOrgToOrgModel(organization, newOrganizationModel);
        assertEquals(organization.getName(), newOrganizationModel.getName());
    }
View Full Code Here

TOP

Related Classes of com.sparc.knappsack.models.OrganizationModel

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.