Search in sources :

Example 16 with Configuration

use of org.apache.openmeetings.db.entity.basic.Configuration in project openmeetings by apache.

the class ConfigForm method update.

private void update(AjaxRequestTarget target) {
    Configuration c = getModelObject();
    valueS.setVisible(Type.string == c.getType());
    valueN.setVisible(Type.number == c.getType());
    valueB.setVisible(Type.bool == c.getType());
    if (target != null) {
        target.add(valueS, valueN, valueB);
    }
}
Also used : Configuration(org.apache.openmeetings.db.entity.basic.Configuration)

Example 17 with Configuration

use of org.apache.openmeetings.db.entity.basic.Configuration in project openmeetings by apache.

the class TestJob method testRss.

private void testRss(boolean enabled, Runnable r) {
    boolean prevRss = cfgDao.getBool(CONFIG_DASHBOARD_SHOW_RSS, false);
    Configuration cfg = cfgDao.get(CONFIG_DASHBOARD_SHOW_RSS);
    try {
        cfg.setValueB(enabled);
        cfgDao.update(cfg, null);
        r.run();
    } finally {
        cfg.setValueB(prevRss);
        cfgDao.update(cfg, null);
    }
}
Also used : Configuration(org.apache.openmeetings.db.entity.basic.Configuration)

Aggregations

Configuration (org.apache.openmeetings.db.entity.basic.Configuration)17 Test (org.junit.Test)3 Serializer (org.simpleframework.xml.Serializer)3 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 File (java.io.File)1 IOException (java.io.IOException)1 UnknownHostException (java.net.UnknownHostException)1 List (java.util.List)1 Locale (java.util.Locale)1 OpenJPAConfiguration (org.apache.openjpa.conf.OpenJPAConfiguration)1 UserConverter (org.apache.openmeetings.backup.converter.UserConverter)1 ConfigurationDao (org.apache.openmeetings.db.dao.basic.ConfigurationDao)1 Type (org.apache.openmeetings.db.entity.basic.Configuration.Type)1 User (org.apache.openmeetings.db.entity.user.User)1 InstallationConfig (org.apache.openmeetings.installation.InstallationConfig)1 SearchableDataView (org.apache.openmeetings.web.admin.SearchableDataView)1 PagedEntityListPanel (org.apache.openmeetings.web.common.PagedEntityListPanel)1 DataViewContainer (org.apache.openmeetings.web.data.DataViewContainer)1 OmOrderByBorder (org.apache.openmeetings.web.data.OmOrderByBorder)1