Package com.sparc.knappsack.components.entities

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


    }

    private String createIOSIconUrl(ApplicationVersion version) {
        // Attempt to create icon URL if Version is not null
        if (version != null) {
            Application application = version.getApplication();
            // If application is not null then search for application icon
            if (application != null) {
                // If Application icon is not null then build url
                if (application.getIcon() != null) {

                    // Create Application icon URL based on icon StorageType
                    StorageService storageService = storageServiceFactory.getStorageService(application.getIcon().getStorageType());
                    if (storageService instanceof RemoteStorageService) {
                        return ((RemoteStorageService) storageService).getUrl(application.getIcon(), 120);
                    } else if (storageService instanceof LocalStorageService) {
                        return WebRequest.getInstance().generateURL("/image/" + application.getIcon().getId());
                    }
                } else {
                    // Create default icon URL since no icon is set on the application
                    return createDefaultIOSIconUrl(application.getStorageConfiguration().getStorageType());
                }
            } else {
                // Create default icon URL since the application for the version is null
                return createDefaultIOSIconUrl(version.getStorageConfiguration().getStorageType());
            }
View Full Code Here

TOP

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

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.