Package de.innovationgate.wga.config

Examples of de.innovationgate.wga.config.Share


       
        // Add all shares from configuration
        Iterator<Share> shareConfigs = getWgaConfiguration().getShares().iterator();
        Map<String, ShareDefinition> newShares = new HashMap<String, ShareDefinition>();
        while (shareConfigs.hasNext()) {
            Share shareConfig = shareConfigs.next();
            if (!shareConfig.isEnabled()) {
                continue;
            }
           
            ModuleDefinition shareModDefinition = getModuleRegistry().getModuleDefinition(ShareModuleType.class, shareConfig.getImplClassName());
            if (shareModDefinition == null) {
                getLog().error("Unknown content share type '" + shareConfig.getImplClassName() + "'");
                continue;
            }
           
            ShareProperties props = (ShareProperties) shareModDefinition.getProperties();
            try {
                ShareDefinition shareDefinition = props.createShareDefinition(shareConfig);
                shareDefinition.setOrigin(ShareDefinition.ORIGIN_WGACONFIG);
                getLog().info("Initializing content share '" + shareConfig.getName() + "'");
                shareDefinition.init(this);
                newShares.put(shareConfig.getName(), shareDefinition);
            }
            catch (ShareInitException e) {
                getLog().error("Unable to initialize content share '" + shareConfig.getName() + "' because of the following errors:");
                Iterator msgs = e.getDetailMessages().iterator();
                while (msgs.hasNext()) {
                    getLog().error("- " + msgs.next());
                }
            }
            catch (Exception e) {
                getLog().error("Exception initializing content share '" + shareConfig.getName() + "'", e);
            }
        }
       
        // Add custom shares that were added to the previous share configs
        if (_shares != null) {
View Full Code Here

TOP

Related Classes of de.innovationgate.wga.config.Share

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.