示例#1
0
 public void testGetConfig() {
   ConfigEntity config = getDao().getConfigDao().getConfig();
   assertNull(config.getId());
   config.setEditExt("gif");
   getDao().getConfigDao().save(config);
   config = getDao().getConfigDao().getConfig();
   assertEquals("gif", config.getEditExt());
 }
 private void createConfigXML(Element configElement) {
   ConfigEntity config = getBusiness().getConfigBusiness().getConfig();
   configElement.addElement("google-analytics").setText(notNull(config.getGoogleAnalyticsId()));
   configElement.addElement("email").setText(notNull(config.getSiteEmail()));
   configElement.addElement("domain").setText(notNull(config.getSiteDomain()));
   configElement.addElement("edit-ext").setText(notNull(config.getEditExt()));
   configElement
       .addElement("recaptchaPrivateKey")
       .setText(notNull(config.getRecaptchaPrivateKey()));
   configElement.addElement("recaptchaPublicKey").setText(notNull(config.getRecaptchaPublicKey()));
   configElement.addElement("commentsEmail").setText(notNull(config.getCommentsEmail()));
   configElement.addElement("commentsTemplate").setText(notNull(config.getCommentsTemplate()));
   configElement.addElement("enableRecaptcha").setText(String.valueOf(config.isEnableRecaptcha()));
   configElement.addElement("version").setText(notNull(config.getVersion()));
   configElement.addElement("siteUserLoginUrl").setText(notNull(config.getSiteUserLoginUrl()));
   createLanguagesXML(configElement);
 }