Package de.innovationgate.wga.config

Examples of de.innovationgate.wga.config.Domain


      try {
        config = runtime.retrieveWGAConfig(false);
        if (config != null) {
          Iterator<Domain> domains = config.getDomains().iterator();
          while (domains.hasNext()) {
            Domain domain = domains.next();
            _domains.put(domain.getName(), domain);
          }
        }
      } catch (IncompatibleWGAConfigVersion e) {
      } catch (IOException e) {
      }
      List<String> domainItems = new ArrayList<String>();
      domainItems.addAll(_domains.keySet());
      Collections.sort(domainItems);
      String[] domainNames = domainItems.toArray(new String[0]);
      _comboDomain.setItems(domainNames);
      // compute index of default domain
      for (int i=0; i < domainNames.length; i++) {
        Domain domain = _domains.get(domainNames[i]);
        if (WGAConfiguration.UID_DEFAULT_DOMAIN.equals(domain.getUid())) {
          _comboDomain.select(i);
          break;
        }
      }
      _comboDomain.computeSize(SWT.DEFAULT,SWT.DEFAULT,true);
View Full Code Here


        // IPath relativeLucenePath =
        // _luceneRoot.getLocation().removeFirstSegments(segmentCount);
        // config.getLuceneManagerConfiguration().setPath(relativeLucenePath.toString());
        // config.getDesignConfiguration().getDesignSource(Constants.DESIGNCOL_FILESYSTEM).getOptions().put("path",
        // "../designs");
        Domain defaultDomain = config.getDefaultDomain();
        defaultDomain.setDefaultManager("managers");
        defaultDomain.createFileBasedAuthentication("auth.xml");

        config.getServerOptions().put(WGAConfiguration.SERVEROPTION_SERVER_NAME, getName());
        if (getRootURL() != null) {
          config.getServerOptions().put(WGAConfiguration.SERVEROPTION_ROOT_URL, getRootURL().toString());
        }
View Full Code Here

                try {
                    // retrieve local domain
                    WGAConfiguration localConfig = _runtime.retrieveWGAConfig(false);
                    ContentStore localCS = localConfig.getContentStore(_webApplication.toLowerCase());
                    String localDomainUID = localCS.getDomain();
                    Domain localDomain = localConfig.getDomain(localDomainUID);
                    boolean hasDomain = false;
                    for (Domain remoteDomain : _config.getDomains()) {
                        if (remoteDomain.getName().equals(localDomain.getName())) {
                            hasDomain = true;
                        }
                    }
                    if (hasDomain) {
                        taskStatus.setSeverity(TaskStatus.OK);
                        taskStatus.setMessage("OK");       
                        //taskStatus.setSeverityLabel("exists");
                    } else {
                        taskStatus.setSeverity(TaskStatus.ERROR);
                        taskStatus.setMessage("Domain '" + localDomain.getName() + "' does not exist on server.");
                        //taskStatus.setSeverityLabel("missing");
                        canFinish = false;
                    }
                }
                catch (Exception e) {
View Full Code Here

      return bean.getContentStore().getKey();
    } else if (column == 1) {
      return bean.getContentStore().getTitle();
    } else if (column == 2) {
      if (_config != null) {
        Domain domain = (Domain) _config.getByUid(bean.getContentStore().getDomain());     
        return domain.getName();
      } else {
        return bean.getContentStore().getDomain();
      }
    } else if (column == 3) {
      if (bean.getContentStore().getDesign() != null) {
View Full Code Here

    public List<String> getProvidedValues() {
        List<String> dbKeys = new ArrayList<String>();
        Iterator<Domain> domains = _config.getDomains().iterator();
        while (domains.hasNext()) {
            Domain domain = domains.next();
           
            if (_onlyPersonalized && domain.getPersonalisation() == null) {
                continue;
            }
           
            dbKeys.add(domain.getName());
        }
        return dbKeys;
    }
View Full Code Here

        public String getName() {
            return _config.getName();
        }

        public DomainConfiguration(String name) {
            _config = new Domain(name);
            _config.setName(name);
        }
View Full Code Here

        DomainConfiguration domainConfig = new DomainConfiguration();

        if (domainElement != null) {
            domainConfig = getDomainConfig(domainElement.getStringValue());
        }*/
        Domain domain = getWgaConfiguration().getDomain(config.getDomain());
        DomainConfiguration domainConfig = getDomainConfig(domain);

        // Collect db options from global, server, database
        HashMap<String, String> dbOptions = new HashMap<String, String>();
        dbOptions.put(WGDatabase.COPTION_USERCACHELATENCY, String.valueOf(_wgaConfiguration.getUserCacheLatencyMinutes()));
View Full Code Here

        // Map new and update existing databases
        Set<String> currentDBs = new HashSet<String>();

        Iterator<Domain> domains = _wgaConfiguration.getDomains().iterator();
        while (domains.hasNext()) {
          Domain domain = domains.next();
            PersonalisationDatabase persDBConfig = domain.getPersonalisation();
           
            // Ignore disabled pers databases
            if (persDBConfig == null) {
                continue;
            }
            if (!persDBConfig.isEnabled()) {
                continue;
            }
            DatabaseServer serverConfig = (DatabaseServer) _wgaConfiguration.getByUid(persDBConfig.getDbServer());
            if (serverConfig != null && !serverConfig.isEnabled()) {
                continue;
            }

            // Get or retrieve db
          WGDatabase db = null;
            if (this.personalisationdbs.containsKey(domain.getUid())) {
                db = this.personalisationdbs.get(domain.getUid());
            }
            else {
                db = retrievePersonalisationDB(domain);
                if (db == null) {
                    continue;
                }
                this.personalisationdbs.put(domain.getUid(), db);
            }

            currentDBs.add(domain.getUid());
           
        }

        // Unmap removed databases
        Set<String> removedDBs = new HashSet<String>(this.personalisationdbs.keySet());
View Full Code Here

        // Map new configs
        Map<String, DomainConfiguration> newDomainConfigs = new HashMap<String, DomainConfiguration>();
        Iterator<Domain> domains = _wgaConfiguration.getDomains().iterator();
        while (domains.hasNext()) {
            Domain domain = domains.next();
            DomainConfiguration domainConfig = new DomainConfiguration(domain);
           
            // TODO this check should be done in configuration
            if (domainConfig.getName().startsWith(PluginConfig.PLUGIN_DBKEY_PREFIX)) {
                this.log.error("Domain name '" + domainConfig.getName() + "' invalid. The prefix '" + PluginConfig.PLUGIN_DBKEY_PREFIX + "' is reserved for WGA plugin domains.");
View Full Code Here

TOP

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

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.