Package de.innovationgate.wga.common.beans.csconfig.v1

Examples of de.innovationgate.wga.common.beans.csconfig.v1.PublisherOption


        String ph = pc.getPluginHomepage();
        if (ph != null && !ph.trim().equals("")) {
            return ph;
        }
       
        PublisherOption option = getCsConfig().findPublisherOption(WGACore.DBATTRIB_HOME_PAGE);
        if (option != null) {
            return option.getValue();
        }
        else {
            return null;
        }
       
View Full Code Here


    }
   
    public boolean isMultiLanguage() {
       
        if (_config != null) {
            PublisherOption multiLangOpt = _config.findPublisherOption(WGACore.DBATTRIB_MULTILANGUAGE_CONTENT);
            if (multiLangOpt != null) {
                return Boolean.parseBoolean(multiLangOpt.getValue());
            }
        }
       
        return true;
       
View Full Code Here

    }
   
    public String getOverlaySupport() {
       
        if (_config != null) {
            PublisherOption overlayOpt = _config.findPublisherOption(PublisherOption.OPTION_OVERLAY_SUPPORT);
            if (overlayOpt != null) {
                return overlayOpt.getValue();
            }
        }
       
        return OverlaySupport.NONE;
       
View Full Code Here

    }

    private void determineSyncDefaults() {

        if (_csconfig != null) {
            PublisherOption option = _csconfig.findPublisherOption(WGACore.DBATTRIB_DIRECTACCESSDEFAULT);
            if (option != null) {
                _directAccessDefault = Boolean.valueOf(option.getValue()).booleanValue();
            }
        }

    }
View Full Code Here

            _fileEncoding = System.getProperty("file.encoding");
            _log.debug("Design of " + _db.getDbReference() + " uses file encoding " + _fileEncoding + " to read design files (platform default)");
        }
        else if (_syncInfo.getFileEncoding().equals(DesignDefinition.FILEENCODING_CSCONFIG_DEFINED)) {
            if (_csconfig != null) {
                PublisherOption option = _csconfig.findPublisherOption(WGACore.DBATTRIB_DESIGN_ENCODING);
                if (option != null) {
                    _fileEncoding = option.getValue();
                    _log.debug("Design of " + _db.getDbReference() + " uses file encoding '" + _fileEncoding + "' to read design files (as specified in design configuration)");
                }
                else {
                    _fileEncoding = System.getProperty("file.encoding");
                    _log.debug("Design of " + _db.getDbReference() + " uses file encoding " + _fileEncoding + " to read design files (platform default)");
View Full Code Here

    public void setPublisherOption(String name, String value, boolean fireModelChanged) {
        if (value != null && value.equals(STRING_NOT_SET)) {
            removePublisherOption(name, fireModelChanged);
        }
        else {
            PublisherOption option = getPublisherOption(name);
            if (option != null) {
                option.setValue(value);
            }
            else {
                _csConfig.getPublisherOptions().add(new PublisherOption(name, value));
            }
            if (fireModelChanged) {
                fireModelChanged();
            }
        }
View Full Code Here

    }

    public PublisherOption getPublisherOption(String name) {
        Iterator options = _csConfig.getPublisherOptions().iterator();
        while (options.hasNext()) {
            PublisherOption option = (PublisherOption) options.next();
            if (option.getName().equals(name)) {
                return option;
            }
        }
        return null;
    }
View Full Code Here

    private void removePublisherOption(String name, boolean fireModelChanged) {
        Iterator options = _csConfig.getPublisherOptions().iterator();
        boolean removed = false;
        while (options.hasNext()) {
            PublisherOption option = (PublisherOption) options.next();
            if (option.getName().equals(name)) {
                options.remove();
                removed = true;
            }
        }
        if (fireModelChanged && removed) {
View Full Code Here

    private void removePublisherOption(String name) {
        removePublisherOption(name, true);
    }

    private String getPublisherOptionValue(String name) {
        PublisherOption option = findOption(name, false);
        if (option != null) {
            return option.getValue();
        }
        else {
            return getDefaultValue(name);
        }
    }
View Full Code Here

    }

    private PublisherOption findOption(String name, boolean create) {
        Iterator<PublisherOption> optionIt = _csConfig.getPublisherOptions().iterator();
        while (optionIt.hasNext()) {
            PublisherOption option = optionIt.next();
            if (option.getName().equals(name)) {
                return option;
            }
        }

        if (create) {
            PublisherOption option = new PublisherOption();
            option.setName(name);
            _csConfig.getPublisherOptions().add(option);
            return option;
        }
        else {
            return null;
View Full Code Here

TOP

Related Classes of de.innovationgate.wga.common.beans.csconfig.v1.PublisherOption

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.