Pollen-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
January 2012
- 4 participants
- 33 discussions
r3106 - branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions
by tchemit@users.chorem.org 23 Jan '12
by tchemit@users.chorem.org 23 Jan '12
23 Jan '12
Author: tchemit
Date: 2012-01-23 18:22:39 +0100 (Mon, 23 Jan 2012)
New Revision: 3106
Url: http://chorem.org/repositories/revision/pollen/3106
Log:
fix build
Modified:
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-23 17:15:11 UTC (rev 3105)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-23 17:22:39 UTC (rev 3106)
@@ -68,7 +68,7 @@
UserService service = newService(UserService.class);
try {
- UserAccount createdUser = service.createUser(user, getApplicationUrl());
+ UserAccount createdUser = service.createUser(user, false, getApplicationUrl());
getTransaction().commitTransaction();
getPollenSession().setUserAccount(createdUser);
1
0
Author: tchemit
Date: 2012-01-23 18:15:11 +0100 (Mon, 23 Jan 2012)
New Revision: 3105
Url: http://chorem.org/repositories/revision/pollen/3105
Log:
- Introduce admin package
- finalize user management
Added:
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/CreateUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/DeleteUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManagePolls.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManageUsers.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/UpdateUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/admin/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/admin/CreateUser-validation.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/admin/UpdateUser-validation.xml
Removed:
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManagePolls.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManageUsers.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/AbstractCheckInterceptor.java
Modified:
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsAdmin.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-admin.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-json.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/usersList.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/js/gridHelper.js
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -25,6 +25,7 @@
import com.google.common.collect.Maps;
import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.PollenBinderHelper;
@@ -80,6 +81,7 @@
}
public UserAccount createUser(UserAccount user,
+ boolean byAdmin,
URL url) throws UserLoginAlreadyUsedException, UserEmailAlreadyUsedException {
String password = user.getPassword(); // le mot de passe en clair
@@ -97,6 +99,12 @@
if (userByEmail != null) {
throw new UserEmailAlreadyUsedException();
}
+ if (byAdmin) {
+
+ // let's generate the new password
+ password = RandomStringUtils.randomAlphanumeric(8);
+ }
+
String encodedPassword = encodePassword(password);
userAccount = dao.create(
UserAccount.PROPERTY_LOGIN, user.getLogin(),
@@ -246,7 +254,7 @@
user.setEmail(getConfiguration().getAdminEmail());
user.setNewPassword(getConfiguration().getAdminPassword());
try {
- createUser(user, null);
+ createUser(user,false, null);
if (log.isInfoEnabled()) {
log.info(_("pollen.info.admin.created", login));
}
Deleted: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManagePolls.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManagePolls.java 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManagePolls.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -1,34 +0,0 @@
-/*
- * #%L
- * Pollen :: UI (strust2)
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2012 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package org.chorem.pollen.ui.actions;
-
-/**
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.0
- */
-public class ManagePolls extends PollenActionSupport{
-
- private static final long serialVersionUID = 1L;
-}
Deleted: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManageUsers.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManageUsers.java 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManageUsers.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -1,34 +0,0 @@
-/*
- * #%L
- * Pollen :: UI (strust2)
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2012 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package org.chorem.pollen.ui.actions;
-
-/**
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.0
- */
-public class ManageUsers extends PollenActionSupport{
-
- private static final long serialVersionUID = 1L;
-}
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -72,6 +72,7 @@
getTransaction().commitTransaction();
getPollenSession().setUserAccount(createdUser);
+ addActionMessage(_("pollen.information.your.are.loggued"));
return SUCCESS;
} catch (UserLoginAlreadyUsedException e) {
addFieldError("user.login", _("pollen.error.user.login.already.used"));
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/CreateUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/CreateUser.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/CreateUser.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -0,0 +1,53 @@
+package org.chorem.pollen.ui.actions.admin;
+
+import com.google.common.base.Preconditions;
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.entity.UserAccountImpl;
+import org.chorem.pollen.services.UserEmailAlreadyUsedException;
+import org.chorem.pollen.services.UserLoginAlreadyUsedException;
+import org.chorem.pollen.services.UserService;
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+
+/**
+ * Create a user informations from users admin screen.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class CreateUser extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ protected UserAccount createUser;
+
+ public UserAccount getCreateUser() {
+ if (createUser == null) {
+ createUser = new UserAccountImpl();
+ }
+ return createUser;
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ Preconditions.checkNotNull(createUser);
+
+ UserService service = newService(UserService.class);
+
+ try {
+ service.createUser(createUser, true, getApplicationUrl());
+ getTransaction().commitTransaction();
+ addActionMessage(
+ _("pollen.information.user.created", createUser.getDisplayName()));
+ // remove this user, otherwise it will be reused in the user lists
+ createUser = null;
+ return SUCCESS;
+ } catch (UserLoginAlreadyUsedException e) {
+ addFieldError("createUser.login", _("pollen.error.user.login.already.used"));
+ } catch (UserEmailAlreadyUsedException e) {
+ addFieldError("createUser.email", _("pollen.error.user.email.already.used"));
+ }
+
+ return INPUT;
+ }
+}
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/DeleteUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/DeleteUser.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/DeleteUser.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -0,0 +1,45 @@
+package org.chorem.pollen.ui.actions.admin;
+
+import com.google.common.base.Preconditions;
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.entity.UserAccountImpl;
+import org.chorem.pollen.services.UserService;
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+
+/**
+ * Delete a user.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class DeleteUser extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ protected UserAccount deleteUser;
+
+ public UserAccount getDeleteUser() {
+ if (deleteUser == null) {
+ deleteUser = new UserAccountImpl();
+ }
+ return deleteUser;
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ Preconditions.checkNotNull(deleteUser);
+
+ UserService service = newService(UserService.class);
+
+ service.deleteUser(deleteUser.getLogin());
+ getTransaction().commitTransaction();
+
+ addActionMessage(
+ _("pollen.information.user.deleted", deleteUser.getDisplayName()));
+
+ // remove this user, otherwise it will be reused in the user lists
+ deleteUser = null;
+ return SUCCESS;
+ }
+}
Copied: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManagePolls.java (from rev 3101, branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManagePolls.java)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManagePolls.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManagePolls.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -0,0 +1,36 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions.admin;
+
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+
+/**
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class ManagePolls extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManagePolls.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManageUsers.java (from rev 3101, branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManageUsers.java)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManageUsers.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManageUsers.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -0,0 +1,36 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions.admin;
+
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+
+/**
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class ManageUsers extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/ManageUsers.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/UpdateUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/UpdateUser.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/admin/UpdateUser.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -0,0 +1,54 @@
+package org.chorem.pollen.ui.actions.admin;
+
+import com.google.common.base.Preconditions;
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.entity.UserAccountImpl;
+import org.chorem.pollen.services.UserEmailAlreadyUsedException;
+import org.chorem.pollen.services.UserInvalidPasswordException;
+import org.chorem.pollen.services.UserService;
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+
+/**
+ * Update a user informations from users admin screen.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class UpdateUser extends PollenActionSupport {
+
+ private static final long serialVersionUID = 7738596310901970593L;
+
+ protected UserAccount updateUser;
+
+ public UserAccount getUpdateUser() {
+ if (updateUser == null) {
+ updateUser = new UserAccountImpl();
+ }
+ return updateUser;
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ Preconditions.checkNotNull(updateUser);
+
+ UserService service = newService(UserService.class);
+
+ try {
+ service.updateUser(updateUser, null, true);
+ getTransaction().commitTransaction();
+ addActionMessage(
+ _("pollen.information.user.updated", updateUser.getDisplayName()));
+
+ // remove this user, otherwise it will be reused in the user lists
+ updateUser = null;
+ return SUCCESS;
+ } catch (UserEmailAlreadyUsedException e) {
+ addFieldError("updateUser.email", _("pollen.error.user.email.already.used"));
+ } catch (UserInvalidPasswordException e) {
+ addFieldError("updateUser.password", _("pollen.error.user.invalid.password"));
+ }
+
+ return INPUT;
+ }
+}
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetUser.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetUser.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -0,0 +1,53 @@
+package org.chorem.pollen.ui.actions.json;
+
+import com.google.common.collect.Maps;
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.services.UserService;
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+import org.nuiton.util.beans.Binder;
+import org.nuiton.util.beans.BinderFactory;
+
+import java.util.Map;
+
+/**
+ * Get user datas (for json purpose).
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class GetUser extends PollenActionSupport {
+ private static final long serialVersionUID = 1L;
+
+ private String userId;
+
+ private transient Map<String, Object> user;
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ public Map<String, Object> getUser() {
+ return user;
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ UserService userService = newService(UserService.class);
+
+ UserAccount userAccount = userService.getEntityById(UserAccount.class, userId);
+
+ user = Maps.newHashMap();
+
+ Binder<UserAccount, UserAccount> binder =
+ BinderFactory.newBinder(UserAccount.class);
+ user = binder.obtainProperties(userAccount);
+ user.put("id", userAccount.getTopiaId());
+
+ return SUCCESS;
+ }
+}
Deleted: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/AbstractCheckInterceptor.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/AbstractCheckInterceptor.java 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/AbstractCheckInterceptor.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -1,94 +0,0 @@
-/*
- * #%L
- * Pollen :: UI (strust2)
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2012 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package org.chorem.pollen.ui.interceptors;
-
-import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.struts2.ServletActionContext;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Abstract check interceptor.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.0
- */
-public abstract class AbstractCheckInterceptor extends AbstractInterceptor {
-
- private static final long serialVersionUID = -7169251953113201351L;
-
- /** Logger. */
- private static final Log log =
- LogFactory.getLog(AbstractCheckInterceptor.class);
-
- /** Where to redirect where user is loggued */
- protected String redirectAction;
-
- public void setRedirectAction(String redirectAction) {
- this.redirectAction = redirectAction;
- }
-
- protected abstract boolean doCheck(ActionInvocation invocation);
-
- @Override
- public String intercept(ActionInvocation invocation) throws Exception {
-
- boolean check = doCheck(invocation);
-
- if (!check) {
-
- String redirectUrl = getRedirectUrl();
- if (log.isInfoEnabled()) {
- log.info("Will redirect to " + redirectUrl);
- }
- redirect(redirectUrl);
-
- return null;
- }
-
- String result = invocation.invoke();
- return result;
- }
-
- protected String getRedirectUrl() {
- return redirectAction;
- }
-
- protected void redirect(String url) throws Exception {
-
- HttpServletResponse response = ServletActionContext.getResponse();
- HttpServletRequest request = ServletActionContext.getRequest();
-
- String path = request.getContextPath();
- if (!url.startsWith("/")) {
- path += "/";
- }
- response.sendRedirect(path + url);
- }
-
-}
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsAdmin.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsAdmin.java 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsAdmin.java 2012-01-23 17:15:11 UTC (rev 3105)
@@ -25,8 +25,12 @@
import com.google.common.base.Preconditions;
import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.entity.UserAccount;
import org.chorem.pollen.ui.PollenSession;
+import org.chorem.pollen.ui.PollenUIUtils;
import org.chorem.pollen.ui.actions.PollenActionSupport;
/**
@@ -35,12 +39,23 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 2.0
*/
-public class CheckUserIsAdmin extends AbstractCheckInterceptor {
+public class CheckUserIsAdmin extends AbstractInterceptor {
private static final long serialVersionUID = 1L;
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(CheckUserIsAdmin.class);
+
+ /** Where to redirect where user is loggued */
+ protected String redirectAction;
+
+ public void setRedirectAction(String redirectAction) {
+ this.redirectAction = redirectAction;
+ }
+
@Override
- protected boolean doCheck(ActionInvocation invocation) {
+ public String intercept(ActionInvocation invocation) throws Exception {
+
PollenActionSupport action = (PollenActionSupport) invocation.getAction();
PollenSession echoBaseSession = action.getPollenSession();
@@ -48,6 +63,23 @@
UserAccount user = echoBaseSession.getUserAccount();
Preconditions.checkNotNull(user, "No user found is session");
- return user.isAdmin();
+ boolean check = user.isAdmin();
+
+ if (!check) {
+
+ if (log.isInfoEnabled()) {
+ log.info("User not admin try to acces admin section...");
+ }
+
+ if (log.isInfoEnabled()) {
+ log.info("Will redirect to " + redirectAction);
+ }
+ PollenUIUtils.redirect(redirectAction);
+
+ return null;
+ }
+
+ String result = invocation.invoke();
+ return result;
}
}
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-admin.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-admin.xml 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-admin.xml 2012-01-23 17:15:11 UTC (rev 3105)
@@ -34,19 +34,40 @@
<default-interceptor-ref name="pollenBasicAdminStack"/>
- <!-- add interceptor to be connected -->
- <!-- add interceptor to be admin -->
-
<!-- manage users -->
<action name="usersList" method="input"
- class="org.chorem.pollen.ui.actions.ManageUsers">
+ class="org.chorem.pollen.ui.actions.admin.ManageUsers">
<interceptor-ref name="pollenBasicAdminStack"/>
<result name="input">/WEB-INF/jsp/usersList.jsp</result>
</action>
+ <!-- create user -->
+ <action name="createUser"
+ class="org.chorem.pollen.ui.actions.admin.CreateUser">
+ <interceptor-ref name="pollenParamsPrepareParamsAdminStack"/>
+ <result name="input">/WEB-INF/jsp/usersList.jsp</result>
+ <result>/WEB-INF/jsp/usersList.jsp</result>
+ </action>
+
+ <!-- save user -->
+ <action name="updateUser"
+ class="org.chorem.pollen.ui.actions.admin.UpdateUser">
+ <interceptor-ref name="pollenParamsPrepareParamsAdminStack"/>
+ <result name="input">/WEB-INF/jsp/usersList.jsp</result>
+ <result>/WEB-INF/jsp/usersList.jsp</result>
+ </action>
+
+ <!-- delete user -->
+ <action name="deleteUser"
+ class="org.chorem.pollen.ui.actions.admin.DeleteUser">
+ <interceptor-ref name="pollenParamsPrepareParamsAdminStack"/>
+ <result name="input">/WEB-INF/jsp/usersList.jsp</result>
+ <result>/WEB-INF/jsp/usersList.jsp</result>
+ </action>
+
<!-- manage polls -->
<action name="pollsList" method="input"
- class="org.chorem.pollen.ui.actions.ManagePolls">
+ class="org.chorem.pollen.ui.actions.admin.ManagePolls">
<interceptor-ref name="pollenBasicAdminStack"/>
<result name="input">/WEB-INF/jsp/pollsList.jsp</result>
</action>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-json.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-json.xml 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-json.xml 2012-01-23 17:15:11 UTC (rev 3105)
@@ -23,7 +23,6 @@
#L%
-->
-
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.1.7.dtd">
@@ -35,14 +34,21 @@
<!-- get pagined users -->
<action name="getUsers"
class="org.chorem.pollen.ui.actions.json.GetUsers">
- <interceptor-ref name="pollenBasicLogguedStack"/>
+ <interceptor-ref name="pollenBasicAdminStack"/>
<result type="json"/>
</action>
+ <!-- get user detail -->
+ <action name="getUser"
+ class="org.chorem.pollen.ui.actions.json.GetUser">
+ <interceptor-ref name="pollenBasicAdminStack"/>
+ <result type="json"/>
+ </action>
+
<!-- get pagined polls -->
<action name="getPolls"
class="org.chorem.pollen.ui.actions.json.GetPolls">
- <interceptor-ref name="pollenBasicLogguedStack"/>
+ <interceptor-ref name="pollenBasicAdminStack"/>
<result type="json"/>
</action>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-01-23 17:15:11 UTC (rev 3105)
@@ -1,3 +1,8 @@
+pollen.action.create=Create
+pollen.action.createUser=Create a new user
+pollen.action.delete=Delete
+pollen.action.deleteUser=Delete selected user
+pollen.action.editUser=Edit selected user
pollen.action.login=Log me In
pollen.action.modify=Modify
pollen.action.register=Register
@@ -27,7 +32,12 @@
pollen.fieldset.connexionInformation=Information de connexion
pollen.fieldset.login=Login
pollen.fieldset.userInformation=Informations de l'utilisateur
+pollen.fieldset.userInformation.toCreate=User informations to create
+pollen.fieldset.userInformation.toDelete=User informations to delete
pollen.information.need.login=You must be logged to access this page. Please fill the form below.
+pollen.information.user.created=User %s created.
+pollen.information.user.deleted=User %s deleted.
+pollen.information.user.updated=User %s updated.
pollen.information.your.are.loggued=You are logged.
pollen.label.contact.administrator=Send an email to an administrator
pollen.legend.login=Login
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-01-23 17:15:11 UTC (rev 3105)
@@ -1,3 +1,8 @@
+pollen.action.create=Créer
+pollen.action.createUser=Créer un nouvel utilisateur
+pollen.action.delete=Supprimer
+pollen.action.deleteUser=Supprimer un utilisateur sélectionné
+pollen.action.editUser=Editer un utilisateur sélectionné
pollen.action.login=M'identifier
pollen.action.modify=Modifier
pollen.action.register=S'enregistrer
@@ -27,7 +32,12 @@
pollen.fieldset.connexionInformation=Information de connexion
pollen.fieldset.login=Connexion
pollen.fieldset.userInformation=Informations de l'utilisateur
+pollen.fieldset.userInformation.toCreate=Informations de l'utilisateur à créer
+pollen.fieldset.userInformation.toDelete=Informations de l'utilisateur à supprimer
pollen.information.need.login=Vous devez être identifié pour pouvoir accéder à cette page. Veuillez remplir le formulaire ci-dessous.
+pollen.information.user.created=L'utilisateur %s a été créé.
+pollen.information.user.deleted=L'utilisateur %s a été supprimé.
+pollen.information.user.updated=L'utilisateur %s a été mis à jour.
pollen.information.your.are.loggued=Vous êtes connecté.
pollen.label.contact.administrator=Contacter un administrateur
pollen.legend.login=Login
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/admin/CreateUser-validation.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/admin/CreateUser-validation.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/admin/CreateUser-validation.xml 2012-01-23 17:15:11 UTC (rev 3105)
@@ -0,0 +1,22 @@
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+
+ <field name="createUser.login">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.login.required"/>
+ </field-validator>
+
+ </field>
+
+ <field name="createUser.email">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.email.required"/>
+ </field-validator>
+
+ </field>
+
+</validators>
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/admin/UpdateUser-validation.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/admin/UpdateUser-validation.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/admin/UpdateUser-validation.xml 2012-01-23 17:15:11 UTC (rev 3105)
@@ -0,0 +1,22 @@
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+
+ <field name="updateUser.login">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.login.required"/>
+ </field-validator>
+
+ </field>
+
+ <field name="updateUser.email">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.email.required"/>
+ </field-validator>
+
+ </field>
+
+</validators>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml 2012-01-23 17:15:11 UTC (rev 3105)
@@ -71,8 +71,7 @@
<interceptor name="checkUserAdmin"
class="org.chorem.pollen.ui.interceptors.CheckUserIsAdmin">
- <param name="loginAction">/notAdmin</param>
- <param name="redirectAction">/home</param>
+ <param name="redirectAction">/notAdmin</param>
</interceptor>
<!-- basic stack -->
@@ -99,6 +98,9 @@
<interceptor-stack name="pollenParamsPrepareParamsStack">
<interceptor-ref name="i18n"/>
<interceptor-ref name="paramsPrepareParamsStack"/>
+ <interceptor-ref name="store">
+ <param name="operationMode">STORE</param>
+ </interceptor-ref>
</interceptor-stack>
<interceptor-stack name="pollenParamsPrepareParamsLogguedStack">
@@ -114,7 +116,6 @@
</interceptors>
-
<!-- must be authenticated to perform any actions -->
<default-interceptor-ref name="pollenParamsPrepareParamsStack"/>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-23 17:15:11 UTC (rev 3105)
@@ -84,12 +84,14 @@
<div class="top_left${pageLogo}"></div>
<ul class="top_middle${pageLogo}">
<li>
- <s:a action="showUser">
+ <s:a action="showUser" namespace="/user">
<s:text name="pollen.menu.preferences"/>
</s:a>
</li>
<li>
- <s:a action="logout" namespace="/user"><s:text name="pollen.menu.logout"/></s:a>
+ <s:a action="logout" namespace="/user">
+ <s:text name="pollen.menu.logout"/>
+ </s:a>
</li>
</ul>
</div>
@@ -102,7 +104,7 @@
<div class="dropdown_menu" id="login_menu" style="display: none;">
<div class="top_right${pageLogo}"></div>
<div class="top_left${pageLogo}"></div>
- <s:form id="connection" action="login" method="POST" namespace="/user">
+ <s:form id="connection" method="POST" namespace="/user" action="login">
<ul class="top_middle${pageLogo}">
<li>
<label for="connection_login">
@@ -228,7 +230,7 @@
<%--<div t:type="nuiton/feedback" t:id="borderFeedback" t:autoClear="false"/>--%>
<s:if test="hasActionMessages()">
- <div class="fb-message">
+ <div class="fb-info">
<s:actionmessage/>
</div>
</s:if>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/usersList.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/usersList.jsp 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/usersList.jsp 2012-01-23 17:15:11 UTC (rev 3105)
@@ -30,32 +30,165 @@
<h1 class="title${pageLogo}"><s:text name="pollen.title.usersList"/></h1>
-<s:url id="loadUrl" action="getUsers" namespace="/json" escapeAmp="false"/>
+<s:url id="loadUSers" action="getUsers" namespace="/json" escapeAmp="false"/>
-<%--script type="text/javascript">
+<s:url id="loadUser" action="getUser" namespace="/json"/>
+<script type="text/javascript">
+
jQuery(document).ready(function () {
+ if ('${createUser}' != '') {
+ $('#createForm').show();
+ }
+ if ('${updateUser}' != '') {
+ $('#editForm').show();
+ }
+ if ('${deleteUser}' != '') {
+ $('#deleteForm').show();
+ }
+
+ // listen row selection
$.addRowSelectTopic('users');
- $.addClearSelectTopic('users');
- $.addAddRowTopic('users', '${addUrl}');
- $.addSingleRowTopic('users', 'Update', '${editUrl}', 'user.id');
- $.addSingleRowTopic('users', 'Delete', '${delUrl}', 'user.id');
+
+ // to edit a selected row
+ $.listenRowTopic('users-editRow', function (event) {
+ if(!jQuery.struts2_jquery['users']) {
+ return;
+ }
+ var id = jQuery.struts2_jquery['users']['selectedRow'];
+ jQuery.getJSON("${loadUser}", { "userId":id }, function (result) {
+
+ var user = result.user;
+ $('#editForm [name="updateUser.topiaId"]').val(user.id);
+ $('#editForm [name="updateUser.login"]').val(user.login);
+ $('#editForm [name="updateUser.email"]').val(user.email);
+ $('#editForm [name="updateUser.firstName"]').val(user.firstName);
+ $('#editForm [name="updateUser.lastName"]').val(user.lastName);
+ $('#editForm [name="updateUser.admin"]').prop('checked',false);
+ $('#editForm [name="updateUser.admin"]').prop('checked',user.admin);
+ $('#editForm').show();
+ $('#createForm').hide();
+ $('#deleteForm').hide();
+ }
+ );
+ });
+
+ // to create a new row
+ $.listenRowTopic('users-addRow', function(event) {
+ $('#createForm [name="createUser.login"]').val("");
+ $('#createForm [name="createUser.email"]').val("");
+ $('#createForm [name="createUser.firstName"]').val("");
+ $('#createForm [name="createUser.lastName"]').val("");
+ $('#createForm [name="createUser.admin"]').prop('checked',false);
+ $('#editForm').hide();
+ $('#deleteForm').hide();
+ $('#createForm').show();
+ });
+
+ // to delete the selected row
+ $.listenRowTopic('users-deleteRow', function(event) {
+ if(!jQuery.struts2_jquery['users']) {
+ return;
+ }
+ var id = jQuery.struts2_jquery['users']['selectedRow'];
+ jQuery.getJSON("${loadUser}", { "userId":id }, function (result) {
+
+ var user = result.user;
+ $('#deleteForm [name="deleteUser.topiaId"]').val(user.id);
+ $('#deleteForm [name="deleteUser.login"]').val(user.login);
+ $('#deleteForm [name="deleteUser.email"]').val(user.email);
+ $('#deleteForm [name="deleteUser.firstName"]').val(user.firstName);
+ $('#deleteForm [name="deleteUser.lastName"]').val(user.lastName);
+ $('#deleteForm [name="deleteUser.admin"]').prop('checked',false);
+ $('#deleteForm [name="deleteUser.admin"]').prop('checked',user.admin);
+ $('#editForm').hide();
+ $('#createForm').hide();
+ $('#deleteForm').show();
+ }
+ );
+ });
});
-</script--%>
+</script>
-<sjg:grid id="users" dataType="json" href="%{loadUrl}" gridModel="users"
+<sjg:grid id="users" dataType="json" href="%{loadUSers}" gridModel="users"
pager="true" pagerButtons="true" pagerInput="true"
navigator="true" rownumbers="false" autowidth="true"
- onSelectRowTopics='users-rowSelect' editinline="true" editurl="%{loadUrl}"
+ onSelectRowTopics='users-rowSelect' editinline="false"
onCompleteTopics='users-cleanSelect'
navigatorEdit="false" navigatorDelete="false"
navigatorSearch="false" navigatorRefresh="false"
navigatorAdd="false" viewrecords="true"
- rowList="10,15,20,50,100" rowNum="10">
+ rowList="10,15,20,50,100" rowNum="10"
+ navigatorExtraButtons="{
+ add: { title: '%{getText(\"pollen.action.createUser\")}', icon: 'ui-icon-plus', topic: 'users-addRow' },
+ edit: { title: '%{getText(\"pollen.action.editUser\")}', icon: 'ui-icon-pencil', topic: 'users-editRow' },
+ delete:{ title: '%{getText(\"pollen.action.deleteUser\")}', icon: 'ui-icon-trash', topic: 'users-deleteRow' }}">
+
<sjg:gridColumn name="id" title="id" hidden="true"/>
- <sjg:gridColumn name="login" title='%{getText("pollen.common.login")}' sortable="false" editable="true"/>
- <sjg:gridColumn name="firstName" title='%{getText("pollen.common.firstName")}' sortable="false" editable="true"/>
- <sjg:gridColumn name="lastName" title='%{getText("pollen.common.lastName")}' sortable="false" editable="true"/>
- <sjg:gridColumn name="email" title='%{getText("pollen.common.email")}' sortable="false" editable="true"/>
- <sjg:gridColumn name="admin" title='%{getText("pollen.common.admin")}' sortable="false" width="100" formatter="checkbox" editable="true" edittype="checkbox"/>
+ <sjg:gridColumn name="login" title='%{getText("pollen.common.login")}'
+ sortable="false"/>
+ <sjg:gridColumn name="firstName" title='%{getText("pollen.common.firstName")}'
+ sortable="false"/>
+ <sjg:gridColumn name="lastName" title='%{getText("pollen.common.lastName")}'
+ sortable="false"/>
+ <sjg:gridColumn name="email" title='%{getText("pollen.common.email")}'
+ sortable="false"/>
+ <sjg:gridColumn name="admin" title='%{getText("pollen.common.admin")}'
+ sortable="false" width="100" formatter="checkbox"
+ editable="true" />
</sjg:grid>
+
+<br/>
+
+<s:form id='editForm' method="POST" namespace="/admin" cssClass="hidden">
+
+ <s:hidden key="updateUser.topiaId" label=""/>
+ <s:hidden key="updateUser.login" label=""/>
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.userInformation"/></legend>
+ <s:textfield key="updateUser.email" label="%{getText('pollen.common.email')}"
+ required="true"/>
+ <s:textfield key="updateUser.firstName"
+ label="%{getText('pollen.common.firstName')}"/>
+ <s:textfield key="updateUser.lastName"
+ label="%{getText('pollen.common.lastName')}"/>
+ <s:checkbox key="updateUser.admin" label="%{getText('pollen.common.admin')}"/>
+ </fieldset>
+ <br/>
+ <s:submit action="updateUser" key="pollen.action.validate" align="center"/>
+
+</s:form>
+
+<s:form id='createForm' method="POST" namespace="/admin" cssClass="hidden">
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.userInformation.toCreate"/></legend>
+ <s:textfield key="createUser.login" label="%{getText('pollen.common.login')}" required="true"/>
+ <s:textfield key="createUser.email" label="%{getText('pollen.common.email')}" required="true"/>
+ <s:textfield key="createUser.firstName" label="%{getText('pollen.common.firstName')}"/>
+ <s:textfield key="createUser.lastName" label="%{getText('pollen.common.lastName')}"/>
+ <s:checkbox key="createUser.admin" label="%{getText('pollen.common.admin')}"/>
+ </fieldset>
+ <br/>
+ <s:submit action="createUser" key="pollen.action.create" align="center"/>
+</s:form>
+
+<s:form id='deleteForm' method="POST" namespace="/admin" cssClass="hidden">
+
+ <s:hidden key="deleteUser.topiaId" label=""/>
+ <s:hidden key="deleteUser.login" label=""/>
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.userInformation.toDelete"/></legend>
+ <s:textfield key="deleteUser.login" label="%{getText('pollen.common.login')}" required="true" disabled="true"/>
+ <s:textfield key="deleteUser.email" label="%{getText('pollen.common.email')}" required="true" disabled="true"/>
+ <s:textfield key="deleteUser.firstName" label="%{getText('pollen.common.firstName')}" disabled="true"/>
+ <s:textfield key="deleteUser.lastName" label="%{getText('pollen.common.lastName')}" disabled="true"/>
+ <s:checkbox key="deleteUser.admin" label="%{getText('pollen.common.admin')}" disabled="true"/>
+ </fieldset>
+ <br/>
+ <s:submit action="deleteUser" key="pollen.action.delete" align="center"/>
+</s:form>
+
+
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/js/gridHelper.js
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/js/gridHelper.js 2012-01-23 17:09:06 UTC (rev 3104)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/js/gridHelper.js 2012-01-23 17:15:11 UTC (rev 3105)
@@ -55,13 +55,40 @@
}, {id:gridId, callback:callback});
},
- addAddRowTopic:function (gridId, url) {
+ listenRowTopic:function (topic, callback) {
+ $.subscribe(topic, function (event) {
+ var callback = event.data.callback;
+ if (callback) {
+ callback(event);
+ }
+ }, {callback:callback});
+ },
+
+ addAddRowTopic:function (gridId, callback) {
$.subscribe(gridId + '-rowAdd', function (event) {
- var url = event.data.url;
- window.location = url;
- }, {id:gridId, url:url});
+ var callback = event.data.callback;
+ if (callback) {
+ callback(event);
+ }
+ }, {id:gridId, callback:callback});
},
+ addDeleteRowTopic:function (gridId, callback) {
+ $.subscribe(gridId + '-rowDelete', function (event) {
+ var callback = event.data.callback;
+ if (callback) {
+ callback(event);
+ }
+ }, {id:gridId, callback:callback});
+ },
+
+// addAddRowTopic:function (gridId, url) {
+// $.subscribe(gridId + '-rowAdd', function (event) {
+// var url = event.data.url;
+// window.location = url;
+// }, {id:gridId, url:url});
+// },
+
addSingleRowTopic:function (gridId, action, url, parameterName) {
$.subscribe(gridId + '-row' + action, function (event) {
var gridId = event.data.id;
@@ -145,10 +172,18 @@
return $(document).addClearSelectTopic(gridId, callback);
},
- addAddRowTopic:function (gridId, url) {
- return $(document).addAddRowTopic(gridId, url);
+ addAddRowTopic:function (gridId, callback) {
+ return $(document).addAddRowTopic(gridId, callback);
},
+ listenRowTopic:function (topic, callback) {
+ return $(document).listenRowTopic(topic, callback);
+ },
+
+ addDeleteRowTopic:function (gridId, callback) {
+ return $(document).addDeleteRowTopic(gridId, callback);
+ },
+
addSingleRowTopic:function (gridId, action, url, parameterName) {
return $(document).addSingleRowTopic(gridId, action, url, parameterName);
},
1
0
Author: bleny
Date: 2012-01-23 18:09:06 +0100 (Mon, 23 Jan 2012)
New Revision: 3104
Url: http://chorem.org/repositories/revision/pollen/3104
Log:
type binaire pour le fichier pencil
Modified:
branches/pollen-2.0-beta-1/doc/new-poll-2.0-beta-1.ep
Property changes on: branches/pollen-2.0-beta-1/doc/new-poll-2.0-beta-1.ep
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
Author: athimel
Date: 2012-01-23 17:57:23 +0100 (Mon, 23 Jan 2012)
New Revision: 3103
Url: http://chorem.org/repositories/revision/pollen/3103
Log:
First version of screens model
Added:
branches/pollen-2.0-beta-1/doc/new-poll-2.0-beta-1.ep
Added: branches/pollen-2.0-beta-1/doc/new-poll-2.0-beta-1.ep
===================================================================
--- branches/pollen-2.0-beta-1/doc/new-poll-2.0-beta-1.ep (rev 0)
+++ branches/pollen-2.0-beta-1/doc/new-poll-2.0-beta-1.ep 2012-01-23 16:57:23 UTC (rev 3103)
@@ -0,0 +1,349 @@
+<?xml version="1.0"?>
+<Document xmlns="http://www.evolus.vn/Namespace/Pencil"><Properties/><Pages><Page><Properties><Property name="name">Untitled Page</Property><Property name="id">1327336113049_5869</Property><Property name="width">879.5</Property><Property name="height">1292.34375</Property><Property name="dimBackground">false</Property><Property name="backgroundColor">#ffffff</Property></Properties><Content><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:pane" id="bfc281259a3245a8b1de314c0cbd5bf3" transform="matrix(1, 0, 0, 1, 29, 886)"><p:metadata><p:property name="box"><![CDATA[588,335]]></p:property><p:property name="cornerStyle"><![CDATA[none]]></p:property><p:property name="radius"><![CDATA[29.399999999999995,0]]></p:property><p:property name="textPadding"><![CDATA[0,11.166666666666664]]></p:property><p:property name="fillColor"><![CDATA[#EEEEEEFF]]></p:property><p:property name="shadowStyle"><![CDATA[0|0|3]]></p:property><p:property name="shadowColor"><![CDATA[#00000000]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[0|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|normal|normal|13px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[1,1]]></p:property></p:metadata>
+ <foreignObject x="-3" y="-3" width="594" height="341" p:name="htmlObject" id="b0fe07a9785148f4a86d3d5e009fab35" style="font-family: "Liberation Sans",Arial,sans-serif; font-size: 13px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; color: rgb(0, 0, 0); opacity: 1;">
+ <div xmlns="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; -moz-box-shadow: none; width: 588px; height: 335px; padding: 11.1667px; background-color: rgb(238, 238, 238); -moz-border-radius: 0px 0px 0px 0px; border: medium none; margin-left: 3px; margin-top: 3px;" p:name="div" id="1c943e75bc074b9f971996963875e411"><div xmlns="http://www.w3.org/1999/xhtml"></div></div>
+ </foreignObject><path id="b0fe07a9785148f4a86d3d5e009fab35_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="c8dbe314b639443d89f4e36fd49c36a6" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="f99b3d5619e64abe950dbf50a331a068" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="c901809e62b24627b1468632a7e4ae33" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:box" id="2375e7b022bf4e50be445386bef6beee" transform="matrix(1, 0, 0, 1, 110, 1030)"><p:metadata><p:property name="box"><![CDATA[430,163]]></p:property><p:property name="textPadding"><![CDATA[21.500000000000004,10.866666666666664]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[1,1]]></p:property></p:metadata>
+ <g p:name="rect" id="779ac1906ef44577801e1f3e67881934" transform="translate(0.5, 0.5)" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round;" p:name="line1" id="e341e8ce85e84e07a4e9c6a2027f7e6a" transform="translate(0.5, 0.5)" d="M 0 0 L 19.26201144048032 -0.2767958005603488 L 41.727848450312166 0.020290757628988465 L 64.42861051245198 0.37875138131095165 L 81.52636965293206 -0.09977642739910464 L 99.67803309778888 -0.06092435398703111 L 120.64508937588252 0.30060110851953203 L 142.1981918385379 -0.493445684408486 L 165.46984176579647 -0.03341096273722466 L 182.18136998596296 0.1136266029047347 L 201.50976891472402 0.030939839637127875 L 220.29759591684544 0.33083524917704243 L 241.11599888234386 -0.16026838607551064 L 257.51200931954287 -0.2945822890702515 L 275.30376779814816 -0.19989608942706116 L 295.16093774392414 0.2574970664524422 L 312.9463370074663 -0.09375103123449446 L 334.708517635541 -0.27917451018139483 L 354.2858188431926 0.1696529607546612 L 371.28242460257957 -0.2965589996223261 L 391.07046795537286 0.424795013396035 L 430 0 L 429.8252272574333 16.578672444811467 L 430.43891349439235 34.07505105664547 L 430.18552282225585 54.488708883896024 L 430.1098592084153 74.7551450206056 L 430.4457037923345 96.06335150300703 L 430.3535080854282 117.63273899061184 L 430.27316804242184 139.20937726340958 L 430 163 L 407.3927852249749 162.96613728176843 L 387.6681230054627 162.91682910176033 L 365.25462899326726 163.43794528377427 L 344.5398234770562 163.43504500706578 L 326.03235940543544 162.8531006394508 L 305.49697495098576 163.29276339269646 L 282.06945267388403 162.72808372030525 L 263.8068543041105 162.5444827848964 L 246.69486677479898 162.6072910468665 L 227.92805231465135 162.81257479480783 L 206.96416322819636 163.17037342893218 L 188.4171012516235 163.3264885954572 L 168.9447198690848 163.18552440285762 L 147.459968332619 163.32365852376492 L 124.65486615773276 162.50985734318337 L 105.19269969703069 163.13022113615196 L 81.97521102714083 162.82760688470978 L 63.30548982152783 162.66402943393436 L 43.01706441792353 162.88528358826827 L 23.922104939581615 163.3502583726809 L 0 163 L 0.3008363595234459 146.16232837288288 L 0.20975870412408504 125.78554191723097 L 0.08167852922947294 107.28535327071282 L -0.3020514146534874 90.37635595683233 L -0.4026818156803228 70.9296981544583 L -0.4899843335868612 52.479428445473424 L 0.41281974515180375 30.376627748912597 L 0 0 z"/>
+ </g>
+ <foreignObject x="21.5" y="82" width="387" height="0" p:name="text" id="07a4c377b1f5431795ec121697cff204" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; color: rgb(0, 0, 0); opacity: 1; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject><path id="07a4c377b1f5431795ec121697cff204_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:heading" id="5bf3be6a669c45dd9992eb6a7e09adc3" transform="matrix(1, 0, 0, 1, 214, 20)"><p:metadata><p:property name="textContent"><![CDATA[Nouveau sondage<br />]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|bold|normal|24px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="customStyle"><![CDATA[]]></p:property></p:metadata>
+
+ <foreignObject x="0" y="0" width="207" height="28" p:name="htmlObject" id="91bda5f0bc194912a33f80fe6b23ebac" style="color: rgb(0, 0, 0); opacity: 1; font-family: "Liberation Sans",Arial,sans-serif; font-size: 24px; font-weight: bold; font-style: normal; text-decoration: none;">
+ <div xmlns="http://www.w3.org/1999/xhtml" p:name="textDiv" id="0c6988e564e24efeacd46b61c30e069e" style="white-space: nowrap; display: inline-block ! important;"><div xmlns="http://www.w3.org/1999/xhtml">Nouveau sondage<br /></div></div>
+ </foreignObject><path id="91bda5f0bc194912a33f80fe6b23ebac_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:pane" id="be839d21a6994adda704f71190626222" transform="matrix(1, 0, 0, 1, 23, 76)"><p:metadata><p:property name="box"><![CDATA[589,108]]></p:property><p:property name="cornerStyle"><![CDATA[none]]></p:property><p:property name="radius"><![CDATA[29.450000000000003,0]]></p:property><p:property name="textPadding"><![CDATA[0,3.6]]></p:property><p:property name="fillColor"><![CDATA[#EEEEEEFF]]></p:property><p:property name="shadowStyle"><![CDATA[0|0|3]]></p:property><p:property name="shadowColor"><![CDATA[#00000000]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[0|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|normal|normal|13px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[1,1]]></p:property></p:metadata>
+ <foreignObject x="-3" y="-3" width="595" height="114" p:name="htmlObject" id="0ea12b3a9e0c4ea3bb3f6de98809f5e6" style="font-family: "Liberation Sans",Arial,sans-serif; font-size: 13px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; color: rgb(0, 0, 0); opacity: 1;">
+ <div xmlns="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; -moz-box-shadow: none; width: 589px; height: 108px; padding: 3.6px; background-color: rgb(238, 238, 238); -moz-border-radius: 0px 0px 0px 0px; border: medium none; margin-left: 3px; margin-top: 3px;" p:name="div" id="30abdab52c9546508d00933156ae144d"><div xmlns="http://www.w3.org/1999/xhtml"></div></div>
+ </foreignObject><path id="0ea12b3a9e0c4ea3bb3f6de98809f5e6_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:heading" id="d5439727c34a4d7eb09298ddd551cc42" transform="matrix(1, 0, 0, 1, 40, 67)"><p:metadata><p:property name="textContent"><![CDATA[Vous]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|bold|normal|17px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="customStyle"><![CDATA[]]></p:property></p:metadata>
+
+ <foreignObject x="0" y="0" width="39" height="20" p:name="htmlObject" id="e6ba2c897b1c4c08a8916b790c6ec59d" style="color: rgb(0, 0, 0); opacity: 1; font-family: "Liberation Sans",Arial,sans-serif; font-size: 17px; font-weight: bold; font-style: normal; text-decoration: none;">
+ <div xmlns="http://www.w3.org/1999/xhtml" p:name="textDiv" id="d03eb95c93314b9c8a82a36a712b7a2e" style="white-space: nowrap; display: inline-block ! important;"><div xmlns="http://www.w3.org/1999/xhtml">Vous</div></div>
+ </foreignObject><path id="e6ba2c897b1c4c08a8916b790c6ec59d_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:textbox" id="fe558466ed7a4c77acab4aff4e15df65" transform="matrix(1, 0, 0, 1, 187, 99)"><p:metadata><p:property name="box"><![CDATA[280,25]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[pré-rempli si loggué]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[0,1]]></p:property></p:metadata>
+ <g p:name="rect" id="d5f5d7951de84e588b36ab2721e03030" transform="translate(0.5, 0.5)" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;" p:name="line1" id="4c754e2bfa384bd9bea451c1eabc97a2" transform="translate(0.5, 0.5)" d="M 0 0 L 18.986998007809454 0.2144137176977351 L 39.40803604192106 -0.45498304330150197 L 55.78281155600413 0.017399216472204104 L 74.4199832779255 -0.2950045551530015 L 97.23659408406536 -0.05044486274165194 L 118.81369471166263 -0.06321568426147772 L 139.4106950106684 -0.3030282378060464 L 156.66278862661127 -0.4130911894008654 L 179.49648236485913 0.382324388784838 L 201.2095480030994 0.02975649717822082 L 218.74258422389696 -0.2792050157101357 L 239.94669653722724 -0.1473412450222975 L 261.3691641921724 -0.1995114099594304 L 280 0 L 280.0097353969185 11.779036240052582 L 280 25 L 260.8811782170675 25.49220916855912 L 238.32856417756577 24.677881246665233 L 217.26405998962224 25.374413727348674 L 197.78267641647034 25.19272942216633 L 177.95287765907108 25.304071481360094 L 160.91510585515226 25.035484149426768 L 138.14136401351325 24.592741357160886 L 116.07185783278956 25.29191283527765 L 97.54287855511868 24.926048067750173 L 78.92801588097598 24.8101262675618 L 59.655733969148606 25.257361946854378 L 39.56816872514811 24.94654154610845 L 22.61669434039605 24.523221513463795 L 0 25 L -0.2667660420363508 13.353256567787584 L 0 0 z"/>
+ </g>
+ <text p:name="text" id="07fd2a5aa70540b6ac71c37d68c39234" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="5" y="17">pré-rempli si loggué</text><path id="07fd2a5aa70540b6ac71c37d68c39234_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="0d3faf7964074c57868783f63b6e00bc" transform="matrix(1, 0, 0, 1, 61, 105)"><p:metadata><p:property name="box"><![CDATA[80,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[Nom]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="80" height="20" p:name="htmlObject" id="7a706a94a5e844d29f45333fa12b39c0">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 80px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="6aee05b9fdc646428f01c1ba8b8f0dfb">
+ <hbox align="center" p:name="xulBox" id="dcb85c6bc9b143dfb92130b006604467" width="80" style="width: 80px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; color: rgb(0, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="d23fc0c2e60d4d4998695676550c349d" value="Nom" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="d23fc0c2e60d4d4998695676550c349d_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="913ce64611f745e38986c0cbc78884be" transform="matrix(1, 0, 0, 1, 61, 148)"><p:metadata><p:property name="box"><![CDATA[80,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[Em@il]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="80" height="20" p:name="htmlObject" id="c375804ab69a429e836a7391152655fa">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 80px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="797926dd10c64e4d9b9dffc0c63d0592">
+ <hbox align="center" p:name="xulBox" id="67abfb673dbe4201b703d45d8bee66f8" width="80" style="width: 80px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; color: rgb(0, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="6f0f30f5dbd8404196c04f6a8b03d442" value="Em@il" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="6f0f30f5dbd8404196c04f6a8b03d442_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="d177b26710e946d3b44a084157aadc9a" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:textbox" id="a2fd9f09522a4a5dafa781810c9ee372" transform="matrix(1, 0, 0, 1, 187, 142)"><p:metadata><p:property name="box"><![CDATA[280,25]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[pré-rempli si loggué]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[0,1]]></p:property></p:metadata>
+ <g p:name="rect" id="ea382ea25cc446eb95ef4c1387c41db1" transform="translate(0.5, 0.5)" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;" p:name="line1" id="ee135881c9bf431898828a8af29327a3" transform="translate(0.5, 0.5)" d="M 0 0 L 18.986998007809454 0.2144137176977351 L 39.40803604192106 -0.45498304330150197 L 55.78281155600413 0.017399216472204104 L 74.4199832779255 -0.2950045551530015 L 97.23659408406536 -0.05044486274165194 L 118.81369471166263 -0.06321568426147772 L 139.4106950106684 -0.3030282378060464 L 156.66278862661127 -0.4130911894008654 L 179.49648236485913 0.382324388784838 L 201.2095480030994 0.02975649717822082 L 218.74258422389696 -0.2792050157101357 L 239.94669653722724 -0.1473412450222975 L 261.3691641921724 -0.1995114099594304 L 280 0 L 280.0097353969185 11.779036240052582 L 280 25 L 260.8811782170675 25.49220916855912 L 238.32856417756577 24.677881246665233 L 217.26405998962224 25.374413727348674 L 197.78267641647034 25.19272942216633 L 177.95287765907108 25.304071481360094 L 160.91510585515226 25.035484149426768 L 138.14136401351325 24.592741357160886 L 116.07185783278956 25.29191283527765 L 97.54287855511868 24.926048067750173 L 78.92801588097598 24.8101262675618 L 59.655733969148606 25.257361946854378 L 39.56816872514811 24.94654154610845 L 22.61669434039605 24.523221513463795 L 0 25 L -0.2667660420363508 13.353256567787584 L 0 0 z"/>
+ </g>
+ <text p:name="text" id="e7413f7a36c44a129abb2fd8a714a19d" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="5" y="17">pré-rempli si loggué</text><path id="0e7a5efd18c7476fbfd0852e59cf59c6" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:pane" id="b6be3dbf8d324e919e1035ee4ebf8211" transform="matrix(1, 0, 0, 1, 24, 207)"><p:metadata><p:property name="box"><![CDATA[588,330]]></p:property><p:property name="cornerStyle"><![CDATA[none]]></p:property><p:property name="radius"><![CDATA[29.399999999999995,0]]></p:property><p:property name="textPadding"><![CDATA[0,11]]></p:property><p:property name="fillColor"><![CDATA[#EEEEEEFF]]></p:property><p:property name="shadowStyle"><![CDATA[0|0|3]]></p:property><p:property name="shadowColor"><![CDATA[#00000000]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[0|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|normal|normal|13px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[1,1]]></p:property></p:metadata>
+ <foreignObject x="-3" y="-3" width="594" height="336" p:name="htmlObject" id="287e6ec843b74203893b4ab5ec323efd" style="font-family: "Liberation Sans",Arial,sans-serif; font-size: 13px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; color: rgb(0, 0, 0); opacity: 1;">
+ <div xmlns="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; -moz-box-shadow: none; width: 588px; height: 330px; padding: 11px; background-color: rgb(238, 238, 238); -moz-border-radius: 0px 0px 0px 0px; border: medium none; margin-left: 3px; margin-top: 3px;" p:name="div" id="2c6000f1f0044ed89226b1c4a53b375a"><div xmlns="http://www.w3.org/1999/xhtml"></div></div>
+ </foreignObject><path id="287e6ec843b74203893b4ab5ec323efd_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="94eb6ab312f84120ab937bca0640a360" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:heading" id="60328e4eea52414fbbe8aa8b538580db" transform="matrix(1, 0, 0, 1, 41, 198)"><p:metadata><p:property name="textContent"><![CDATA[Votre sondage]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|bold|normal|17px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="customStyle"><![CDATA[]]></p:property></p:metadata>
+
+ <foreignObject x="0" y="0" width="114" height="20" p:name="htmlObject" id="127f53243ec34892aeb5019e22f82ce0" style="color: rgb(0, 0, 0); opacity: 1; font-family: "Liberation Sans",Arial,sans-serif; font-size: 17px; font-weight: bold; font-style: normal; text-decoration: none;">
+ <div xmlns="http://www.w3.org/1999/xhtml" p:name="textDiv" id="eac339c6ab664f09b5c95b8c26b160f5" style="white-space: nowrap; display: inline-block ! important;"><div xmlns="http://www.w3.org/1999/xhtml">Votre sondage</div></div>
+ </foreignObject><path id="127f53243ec34892aeb5019e22f82ce0_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="17709bc7c0b24621a39f7a033e6385c7" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="f1875df970cd4a5bad1adff284493b61" transform="matrix(1, 0, 0, 1, 62, 236)"><p:metadata><p:property name="box"><![CDATA[80,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[Titre]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="80" height="20" p:name="htmlObject" id="d25ecf7a6dd74cc1bbc9605abb82f914">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 80px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="df3c06a578d54527ba37dfaa94d71649">
+ <hbox align="center" p:name="xulBox" id="5b9c7717da1144349220c6d1246d665a" width="80" style="width: 80px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; color: rgb(0, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="eb454816d7084771b437cea88b83daaf" value="Titre" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="eb454816d7084771b437cea88b83daaf_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="84438ffe61e148a0aa5a4af19ec05424" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="194244bbb39049f7937d917de2f00db2" transform="matrix(1, 0, 0, 1, 62, 279)"><p:metadata><p:property name="box"><![CDATA[80,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[Description]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="80" height="20" p:name="htmlObject" id="8739639149f7429186b8f833bed6f425">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 80px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="d65b8602914d4b80b6367a2ef61363a5">
+ <hbox align="center" p:name="xulBox" id="0c621f90a85c4190b4017756442a511b" width="80" style="width: 80px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; color: rgb(0, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="42d031b194ba46a0b051baba9c04863e" value="Description" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="42d031b194ba46a0b051baba9c04863e_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="58e08c76c8494757b96d3674d5da453a" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="6601631f7f3e4fc190b065071f37b380" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:textbox" id="21243fd50ebd445697562b1b57373d4c" transform="matrix(1, 0, 0, 1, 188, 273)"><p:metadata><p:property name="box"><![CDATA[405,91]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[0,1]]></p:property></p:metadata>
+ <g p:name="rect" id="e77883fb9f564459a28be5ace8cdf59d" transform="translate(0.5, 0.5)" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;" p:name="line1" id="99bbcaa7c5ff48df8847912cebb9807c" transform="translate(0.5, 0.5)" d="M 0 0 L 17.37762636439588 -0.3773946699028835 L 37.77449627735303 -0.1574714451861614 L 56.83717276792445 -0.005288184465922052 L 75.45941528814329 -0.1058890899334709 L 92.09320893397911 -0.3045303514803068 L 109.40588393554421 -0.12201713808025572 L 129.98767014980083 -0.32440916187110735 L 150.07703250426653 -0.3627464117056858 L 166.67611405982063 -0.38151709334702466 L 187.5609430413469 -0.2421434215855922 L 211.05689705179563 -0.2090599292086026 L 232.4065466219378 -0.43514855566386346 L 250.3006897736507 -0.10847659345430594 L 267.4194081291547 0.0630327062123277 L 287.5874454938524 -0.1456262697276891 L 308.5811780559015 -0.20706494197795122 L 327.5093484997407 0.0837822070483788 L 350.648155952699 0.36431250915042857 L 370.89566768729406 0.15948431713445532 L 405 0 L 404.6291908689998 21.76575248079107 L 405.2160480588966 38.67312979974672 L 405.1404492766727 58.36973629674702 L 405 91 L 382.926693396938 90.9633793796293 L 362.6557028382616 90.84253221636236 L 341.64010191996226 91.21312825388557 L 319.40889118967493 91.21002781735258 L 296.37136514814625 90.68186937679566 L 276.32583494531906 90.95307951023055 L 257.1872562245808 90.96547538124344 L 237.95102884802355 90.83515406728513 L 216.75001730546037 90.7228631704107 L 197.15222112488294 90.87381134605299 L 175.6943844736417 90.57414460504152 L 153.11064750614116 91.42565650339361 L 130.73931318467905 91.06987858828263 L 110.09087621298406 91.27837416509566 L 89.44731570186082 91.13971032890055 L 66.00564744120214 91.2468239274607 L 48.683393988821486 91.05667814230195 L 30.294146466199752 91.41327788503656 L 12.968225157327678 91.1783255552374 L 0 91 L -0.015002733024199522 69.49194084257533 L -0.010617412069648613 50.94689065817727 L -0.4420564063109854 30.039018568054907 L 0 0 z"/>
+ </g>
+ <text p:name="text" id="61f21885614646d496dd2f6bce7cd5a9" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="5" y="142"> </text><path id="61f21885614646d496dd2f6bce7cd5a9_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="edf23817d6df400f9bd837c39d45de2e" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:textbox" id="72890e580285444f9dae32e0c8b01da6" transform="matrix(1, 0, 0, 1, 188, 230)"><p:metadata><p:property name="box"><![CDATA[405,25]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[0,1]]></p:property></p:metadata>
+ <g p:name="rect" id="c39a6afb9634428dba54fffc4f1a4376" transform="translate(0.5, 0.5)" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;" p:name="line1" id="f6b0bdf1fee4400fb6d036f93d762bfa" transform="translate(0.5, 0.5)" d="M 0 0 L 17.931956896241267 -0.3515240557187097 L 38.80131341298456 -0.4092757447933256 L 57.449952453555134 -0.3899564314251537 L 80.3558356638742 -0.19629856139397894 L 98.09549347792701 -0.32040891664338245 L 116.67264871951164 0.24996523704023843 L 139.6737833661226 -0.44134125507430444 L 162.99729275438494 0.4070853366620889 L 180.70505551246828 0.20586461449989213 L 204.3444248683958 0.2817881809846522 L 224.6556866975857 -0.024547551039149407 L 245.04425218337582 0.10891293739888419 L 266.9752860869929 0.27353389588434507 L 288.36604081166394 0.301903358542172 L 310.1244332651053 0.3883006615752649 L 330.55830715444904 0.20495037521728676 L 347.78955375512663 -0.3648951496738132 L 364.9141608161869 -0.28139870949883106 L 386.13843668947175 -0.09304386203851556 L 405 0 L 405.09771464618115 11.012165846699846 L 405 25 L 384.99184571916004 25.206949435853733 L 365.91541712846055 24.79855150700914 L 346.4401506220532 25.25458291190816 L 329.1183886830427 24.578102760137245 L 308.78239109012145 24.96789089945176 L 290.2340173498083 24.702328972927784 L 268.81902746017425 24.614713822876023 L 250.07473120862363 25.45768223911573 L 230.89606105452714 24.958047737583534 L 209.60842920768073 24.81226925735547 L 188.63132273554152 25.472921825166225 L 170.61980621270757 25.239900055185498 L 149.70450646429697 25.038184305664505 L 126.78791853673789 24.668417942677767 L 105.25881980242364 24.68034748616822 L 82.86783945914365 25.171921068987498 L 62.43865783960948 25.414542537578697 L 44.93006672873542 25.415253689052744 L 26.016087453860163 24.857826295747575 L 0 25 L -0.41074765769095045 10.986864427501636 L 0 0 z"/>
+ </g>
+ <text p:name="text" id="c2c7b44c1d8e405b98207b5e9fbe8829" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="5" y="56"> </text><path id="c2c7b44c1d8e405b98207b5e9fbe8829_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="b63b1cc97af64d1684d9fc968f2e3eb3" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="b07507d9ce8d492fb725ffdc56990fe5" transform="matrix(1, 0, 0, 1, 93, 233)"><p:metadata><p:property name="box"><![CDATA[19,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[*]]></p:property><p:property name="textColor"><![CDATA[#FF0000FF]]></p:property><p:property name="textFont"><![CDATA[Bitstream Charter|bold|normal|13px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="19" height="20" p:name="htmlObject" id="bd63de5a872b42c3ad80368914144b59">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 19px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="12cc3f6e6a084cea96207da59d5e83cf">
+ <hbox align="center" p:name="xulBox" id="9ec1d5218ce54ea5851812ddae9c4c4b" width="19" style="width: 19px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: Bitstream Charter; font-size: 13px; font-weight: bold; font-style: normal; text-decoration: none; color: rgb(255, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="b923c54c433d403e9e430788200fd252" value="*" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="b923c54c433d403e9e430788200fd252_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:textbox" id="8daa1ae8919a4830946d50b36ed27200" transform="matrix(1, 0, 0, 1, 190, 382)"><p:metadata><p:property name="box"><![CDATA[113,25]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[0,1]]></p:property></p:metadata>
+ <g p:name="rect" id="c1d1df3d606440b39689cb43e7f3a24b" transform="translate(0.5, 0.5)" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;" p:name="line1" id="6c68a2dceacf45db9cfbfefee37c47ad" transform="translate(0.5, 0.5)" d="M 0 0 L 20.7850547318384 0.2600383396239472 L 42.31108373880083 0.2904329461606292 L 64.23361277768107 -0.2612482685383454 L 81.87348951008926 0.1133695407639812 L 113 0 L 113.26226504140094 11.557036860285994 L 113 25 L 96.42229575003493 24.80087665527743 L 78.61331399716073 25.021130743335615 L 61.34673517462926 24.87120066774246 L 38.51440625384361 25.396136595558733 L 0 25 L -0.24199676750880061 14.004391028741116 L 0 0 z"/>
+ </g>
+ <text p:name="text" id="35e54721f8cc46baa4bd85ceb131f5c3" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="5" y="30"> </text><path id="35e54721f8cc46baa4bd85ceb131f5c3_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="5cd0485e321048be93caf0369dd29e35" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="856e623b48ed4cc2926b9a02f23dfc30" transform="matrix(1, 0, 0, 1, 64, 388)"><p:metadata><p:property name="box"><![CDATA[80,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[Début]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="80" height="20" p:name="htmlObject" id="2f9ccb6cce1d43f2a51f5c73b8e811d9">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 80px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="95abe46a7a8b4746b3451a48908a7929">
+ <hbox align="center" p:name="xulBox" id="b13391f25ed1405eb3adc8176f572d0f" width="80" style="width: 80px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; color: rgb(0, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="cd4ba770fd9f426b9a2f005f97903408" value="Début" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="cd4ba770fd9f426b9a2f005f97903408_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="d31f7264a2f2428e82267f713e8da580" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="aa365e5742584db08c49a25bcab4b568" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Common:Bitmap" id="d2b879a0c63647d085db5a5ab59660ef" transform="matrix(1, 0, 0, 1, 307, 382)"><p:metadata><p:property name="box"><![CDATA[17,20]]></p:property><p:property name="imageData"><![CDATA[17,20,data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAUCAYAAABroNZJAAAA5klEQVQ4je2UMY6DMBBFh2PkHHRcYV2CRENa0rqLm8kRUMqx2YNwCu6RFIkUaBDip4oVL7tE2WyxRUZ60jyNPJrfmOhds9rtBUnV/prdXkBJ1UI3PXTTY5om3y8BwPdJ1YJW2wavQsyM4+HgERF03cXzyJl5eQmAh87MIGMMRMQz5tGM+/lXjDEgrTXua8wjoP3wjHkUzEUkcK01qNyUTy2x1gZebkrQuiieilM7F/i6KEBZlmIYBo+I+L7rLvis60XPshSklPpxyak/B4++c6XUPM4NZy1q52bn//M4cRzjVf7kO7kCXWn/zXwBi4QAAAAASUVORK5CYII=]]></p:property><p:property name="withBlur"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFF00]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[0|]]></p:property></p:metadata>
+ <defs>
+ <filter height="1.2558399" y="-0.12792" width="1.06396" x="-0.03198" p:name="imageShading" id="a1d077ec4f6d4971a50119f6b20eda63">
+ <feGaussianBlur stdDeviation="1.3325" in="SourceAlpha"/>
+ </filter>
+ <g p:name="container" id="b59249855175413aa1e35f9a1f681b12">
+ <rect style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 0pt; fill-opacity: 0;" p:name="bgRect" id="7eeedcb126a0427d8976192b55b3395d" width="17" height="20" transform="translate(0)"/>
+ <g p:name="imageContainer" id="e8ff5eb5c6a44d57acc30b74abaec203" transform="scale(1)">
+ <image x="0" y="0" p:name="image" id="1512807faacf4240991ad5bb605c6dc8" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAUCAYAAABroNZJAAAA5klEQVQ4je2UMY6DMBBFh2PkHHRcYV2CRENa0rqLm8kRUMqx2YNwCu6RFIkUaBDip4oVL7tE2WyxRUZ60jyNPJrfmOhds9rtBUnV/prdXkBJ1UI3PXTTY5om3y8BwPdJ1YJW2wavQsyM4+HgERF03cXzyJl5eQmAh87MIGMMRMQz5tGM+/lXjDEgrTXua8wjoP3wjHkUzEUkcK01qNyUTy2x1gZebkrQuiieilM7F/i6KEBZlmIYBo+I+L7rLvis60XPshSklPpxyak/B4++c6XUPM4NZy1q52bn//M4cRzjVf7kO7kCXWn/zXwBi4QAAAAASUVORK5CYII=" xmlns:xlink="http://www.w3.org/1999/xlink" width="17" height="20"/>
+ </g>
+ </g>
+ </defs>
+ <use xlink:href="#b59249855175413aa1e35f9a1f681b12" xmlns:xlink="http://www.w3.org/1999/xlink" transform="translate(1, 1)" p:filter="url(#a1d077ec4f6d4971a50119f6b20eda63)" style="opacity: 0.6; visibility: hidden;" p:name="bgCopy" id="4c4740cc3dd443699a3d0aad4ded331b"/>
+ <use xlink:href="#b59249855175413aa1e35f9a1f681b12" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="60e9bcd98d364797adf1a3caf31b268e" transform="matrix(1, 0, 0, 1, 63, 425)"><p:metadata><p:property name="box"><![CDATA[80,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[Fin]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="80" height="20" p:name="htmlObject" id="a2df7857f3634126879083ba22834699">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 80px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="91f6257e3ae24cfaa8d23a816d22f7c5">
+ <hbox align="center" p:name="xulBox" id="0d86dd04b4f6445895c86a0657023b0a" width="80" style="width: 80px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; color: rgb(0, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="f873efe14bf549deb1cfece105a09214" value="Fin" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="f873efe14bf549deb1cfece105a09214_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="de0c36ac7c5c44748d430e3ad0004767" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="27187dd12679440aa6f8fe5fb7fce02c" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="356aec91d72249bda88be953085d582a" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:textbox" id="0c7ebb50df3a423794a88f94d4a4e58f" transform="matrix(1, 0, 0, 1, 189, 419)"><p:metadata><p:property name="box"><![CDATA[113,25]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[0,1]]></p:property></p:metadata>
+ <g p:name="rect" id="b52b11b259944a879b908bdc85813b8d" transform="translate(0.5, 0.5)" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;" p:name="line1" id="31dca9a447b8476baa18fe6974c6813b" transform="translate(0.5, 0.5)" d="M 0 0 L 20.7850547318384 0.2600383396239472 L 42.31108373880083 0.2904329461606292 L 64.23361277768107 -0.2612482685383454 L 81.87348951008926 0.1133695407639812 L 113 0 L 113.26226504140094 11.557036860285994 L 113 25 L 96.42229575003493 24.80087665527743 L 78.61331399716073 25.021130743335615 L 61.34673517462926 24.87120066774246 L 38.51440625384361 25.396136595558733 L 0 25 L -0.24199676750880061 14.004391028741116 L 0 0 z"/>
+ </g>
+ <text p:name="text" id="451d6e809a444163978a42c43d43fa1a" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="5" y="30"> </text><path id="cfb199b6652f40508f73d3d95a19b958" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="abf92f9d37d4476487d581cd5364cc38" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Common:Bitmap" id="06dcd664f77640ed86eb20389601d472" transform="matrix(1, 0, 0, 1, 306, 419)"><p:metadata><p:property name="box"><![CDATA[17,20]]></p:property><p:property name="imageData"><![CDATA[17,20,data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAUCAYAAABroNZJAAAA5klEQVQ4je2UMY6DMBBFh2PkHHRcYV2CRENa0rqLm8kRUMqx2YNwCu6RFIkUaBDip4oVL7tE2WyxRUZ60jyNPJrfmOhds9rtBUnV/prdXkBJ1UI3PXTTY5om3y8BwPdJ1YJW2wavQsyM4+HgERF03cXzyJl5eQmAh87MIGMMRMQz5tGM+/lXjDEgrTXua8wjoP3wjHkUzEUkcK01qNyUTy2x1gZebkrQuiieilM7F/i6KEBZlmIYBo+I+L7rLvis60XPshSklPpxyak/B4++c6XUPM4NZy1q52bn//M4cRzjVf7kO7kCXWn/zXwBi4QAAAAASUVORK5CYII=]]></p:property><p:property name="withBlur"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFF00]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[0|]]></p:property></p:metadata>
+ <defs>
+ <filter height="1.2558399" y="-0.12792" width="1.06396" x="-0.03198" p:name="imageShading" id="3b260b78b0ab4aa389e4529053a91a17">
+ <feGaussianBlur stdDeviation="1.3325" in="SourceAlpha"/>
+ </filter>
+ <g p:name="container" id="d3419b1f3817455da5825c195d5afc9a">
+ <rect style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 0pt; fill-opacity: 0;" p:name="bgRect" id="13d21a9dadf4486985edfa6186c787c4" width="17" height="20" transform="translate(0)"/>
+ <g p:name="imageContainer" id="244a384580f7466fb6a9af11f9784ec2" transform="scale(1)">
+ <image x="0" y="0" p:name="image" id="5dbecbe12b4f40c8bace7cc54870635f" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAUCAYAAABroNZJAAAA5klEQVQ4je2UMY6DMBBFh2PkHHRcYV2CRENa0rqLm8kRUMqx2YNwCu6RFIkUaBDip4oVL7tE2WyxRUZ60jyNPJrfmOhds9rtBUnV/prdXkBJ1UI3PXTTY5om3y8BwPdJ1YJW2wavQsyM4+HgERF03cXzyJl5eQmAh87MIGMMRMQz5tGM+/lXjDEgrTXua8wjoP3wjHkUzEUkcK01qNyUTy2x1gZebkrQuiieilM7F/i6KEBZlmIYBo+I+L7rLvis60XPshSklPpxyak/B4++c6XUPM4NZy1q52bn//M4cRzjVf7kO7kCXWn/zXwBi4QAAAAASUVORK5CYII=" xmlns:xlink="http://www.w3.org/1999/xlink" width="17" height="20"/>
+ </g>
+ </g>
+ </defs>
+ <use xlink:href="#d3419b1f3817455da5825c195d5afc9a" xmlns:xlink="http://www.w3.org/1999/xlink" transform="translate(1, 1)" p:filter="url(#3b260b78b0ab4aa389e4529053a91a17)" style="opacity: 0.6; visibility: hidden;" p:name="bgCopy" id="c107af41897b4d9abee49991a5ce19ed"/>
+ <use xlink:href="#d3419b1f3817455da5825c195d5afc9a" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="97273eb051cb4aafaffb26575ad06735" transform="matrix(1, 0, 0, 1, 61, 469)"><p:metadata><p:property name="box"><![CDATA[115,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[Type de sondage]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="115" height="20" p:name="htmlObject" id="c9391cf1f1b24452b756a6a2b1ff7e4a">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 115px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="c2028620fcbc47eb8f3e5d19db4c903a">
+ <hbox align="center" p:name="xulBox" id="32a4520227504b33b05a3a1f02e6d725" width="115" style="width: 115px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; color: rgb(0, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="1c930030b1d14e1e9b9295db46301978" value="Type de sondage" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="1c930030b1d14e1e9b9295db46301978_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="f7e52657406e4c0f860601d5f2959769" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="e4a2223bd0b24f339f8d96d93a5973e4" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="5a6ae4d875df4ba69bc3ecb9993c8f81" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="7f5068a7898f4c57993decdab774a05a" transform="matrix(1, 0, 0, 1, 61, 503)"><p:metadata><p:property name="box"><![CDATA[115,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[Dépouillement]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="115" height="20" p:name="htmlObject" id="efeb8446700d4b208c65e11fb9eeda1d">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 115px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="02604fe81052426eaac58032c0f8b627">
+ <hbox align="center" p:name="xulBox" id="cc9f52bac9d947ccb20731f4f6018e3a" width="115" style="width: 115px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; color: rgb(0, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="1569987cc8e344a58d8e9d9e0e398efa" value="Dépouillement" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="1569987cc8e344a58d8e9d9e0e398efa_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="b6b694a5dea14d7999fc5050f38db931" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="39e84857a5124020aa77a3f49ef3c4d9" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="87690894254340db95021b134cc4579c" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="07a74029f717436896f577d90e48eb5e" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:radio" id="e67d36759f7846c08300e19f36140bdf" transform="matrix(1, 0, 0, 1, 190, 474)"><p:metadata><p:property name="selected"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Libre]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="49b7d4ebfab345deb154e8cd3e2bd4ec">
+ <path d="m 14.854643,7.698003 c 0,3.85476 -2.200949,6.63069 -7.000875,6.97968 C 3.997527,14.958043 0.50284396,11.669103 0.85288796,7.698003 1.191377,3.858033 4.003037,0.37077296 7.853768,0.71833296 11.720246,1.067323 14.854643,3.843233 14.854643,7.698003 z" p:name="rdCircle" id="6e71fdb2cac44e77b126f6de44d28e90" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;"/>
+ <path style="stroke: none; visibility: hidden; fill: rgb(0, 0, 0); fill-opacity: 1;" d="m 11.354207,7.349023 c 0,1.79888 -0.295905,3.60616 -3.500439,3.60616 -1.804357,0 -3.500439,-1.57462 -3.500439,-3.37351 0,-1.79889 1.696082,-3.14085 3.500439,-3.14085 1.804357,0 3.500439,1.10931 3.500439,2.9082 z" p:name="rdTick" id="14da27a962ce4f4e8fe1fab35d47d009"/>
+ </g>
+ <text p:name="text" id="d8475c0d77b24f1aac72cf7f721ec9a3" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Libre</text><path id="d8475c0d77b24f1aac72cf7f721ec9a3_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:radio" id="f73f7ea9bbec4d2da2f8bd8ed9e76f8b" transform="matrix(1, 0, 0, 1, 285, 474)"><p:metadata><p:property name="selected"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Restreint]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="e6d86101b7434763aa1bb004581337d5">
+ <path d="m 14.854643,7.698003 c 0,3.85476 -2.200949,6.63069 -7.000875,6.97968 C 3.997527,14.958043 0.50284396,11.669103 0.85288796,7.698003 1.191377,3.858033 4.003037,0.37077296 7.853768,0.71833296 11.720246,1.067323 14.854643,3.843233 14.854643,7.698003 z" p:name="rdCircle" id="cd084ebeb4494ebc937e454ccd2a54f2" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;"/>
+ <path style="stroke: none; visibility: hidden; fill: rgb(0, 0, 0); fill-opacity: 1;" d="m 11.354207,7.349023 c 0,1.79888 -0.295905,3.60616 -3.500439,3.60616 -1.804357,0 -3.500439,-1.57462 -3.500439,-3.37351 0,-1.79889 1.696082,-3.14085 3.500439,-3.14085 1.804357,0 3.500439,1.10931 3.500439,2.9082 z" p:name="rdTick" id="a4e3af5e6e7a4c13a186cc755950fa89"/>
+ </g>
+ <text p:name="text" id="fbdc14ede2f34cb1b4c3210d14467dff" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Restreint</text><path id="fbdc14ede2f34cb1b4c3210d14467dff_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="bdcd00dcbcc44ef7920aaeefb5824bd0" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:radio" id="6d32a17b60d74d4da78fddd3f3a3d6a7" transform="matrix(1, 0, 0, 1, 391, 474)"><p:metadata><p:property name="selected"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Groupe]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="e105eb18b2b841a285c9c73aa4dabfb6">
+ <path d="m 14.854643,7.698003 c 0,3.85476 -2.200949,6.63069 -7.000875,6.97968 C 3.997527,14.958043 0.50284396,11.669103 0.85288796,7.698003 1.191377,3.858033 4.003037,0.37077296 7.853768,0.71833296 11.720246,1.067323 14.854643,3.843233 14.854643,7.698003 z" p:name="rdCircle" id="805169c88cdb4c73bfbff8238a897c29" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;"/>
+ <path style="stroke: none; visibility: hidden; fill: rgb(0, 0, 0); fill-opacity: 1;" d="m 11.354207,7.349023 c 0,1.79888 -0.295905,3.60616 -3.500439,3.60616 -1.804357,0 -3.500439,-1.57462 -3.500439,-3.37351 0,-1.79889 1.696082,-3.14085 3.500439,-3.14085 1.804357,0 3.500439,1.10931 3.500439,2.9082 z" p:name="rdTick" id="1f666f8f5f2c42dfae452a601776acb1"/>
+ </g>
+ <text p:name="text" id="e590f8532d854942872f10766ed48151" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Groupe</text><path id="e590f8532d854942872f10766ed48151_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="eaaf52d8b47548bea5251057795388b1" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="91f91dcc8e3e4592af6e1f7e5a06c936" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Annotation:Balloon" id="57f137d8dc2740df991438132b75b50e" transform="matrix(1, 0, 0, 1, 636, 389)"><p:metadata><p:property name="box"><![CDATA[200,80]]></p:property><p:property name="withBlur"><![CDATA[false]]></p:property><p:property name="radius"><![CDATA[8,0]]></p:property><p:property name="leftStart"><![CDATA[0,12]]></p:property><p:property name="leftEnd"><![CDATA[0,33]]></p:property><p:property name="rightStart"><![CDATA[200,12]]></p:property><p:property name="rightEnd"><![CDATA[200,33]]></p:property><p:property name="topStart"><![CDATA[12,0]]></p:property><p:property name="topEnd"><![CDATA[33,0]]></p:property><p:property name="bottomStart"><![CDATA[12,80]]></p:property><p:property name="bottomEnd"><![CDATA[33,80]]></p:property><p:property name="pin"><![CDATA[-172,83]]></p:property><p:property name="fillColor"><![CDATA[#4388CCFF]]></p:property><p:property name="strokeColor"><![CDATA[#1B3280FF]]></p:property><p:property name="strokeStyle"><![CDATA[2|]]></p:property><p:property name="textContent"><![CDATA[Fait-on apparaitre directement en dessous les formulaires pour les types "restreint" et "groupe" ?<br />]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|normal|normal|13px|none]]></p:property><p:property name="textColor"><![CDATA[#FFFFFFFF]]></p:property></p:metadata>
+
+ <defs>
+ <filter height="1.2558399" y="-0.12792" width="1.06396" x="-0.03198" p:name="imageShading" id="969d521d0a12403ca2d44dd92e86491e">
+ <feGaussianBlur stdDeviation="1.3325" in="SourceAlpha"/>
+ </filter>
+ <g p:name="container" id="ef91d31693884190857784a990fe0b47">
+ <path transform="translate(0.5, 0.5)" style="stroke-width: 2; fill: rgb(67, 136, 204); fill-opacity: 1; stroke: rgb(27, 50, 128); stroke-opacity: 1;" p:name="rect" id="e26dabefdb7a4f51a04d595f76e0328b" d="M 8 0 L 192 0 C 197.33333333333334 0 200 2.6666666666666665 200 8 L 200 72 C 200 77.33333333333333 197.33333333333334 80 192 80 L 8 80 C 2.6666666666666665 80 0 77.33333333333333 0 72 L 0 33 L -172 83 L 0 12 L 0 8 C 0 2.6666666666666665 2.6666666666666665 0 8 0"/>
+ </g>
+ </defs>
+ <use xlink:href="#ef91d31693884190857784a990fe0b47" xmlns:xlink="http://www.w3.org/1999/xlink" transform="translate(1, 1)" p:filter="url(#969d521d0a12403ca2d44dd92e86491e)" style="opacity: 0.6; visibility: hidden;" p:heavy="true" p:name="bgCopy" id="5bd2db198f57489ca7cfd2fafeb651d3"/>
+ <use xlink:href="#ef91d31693884190857784a990fe0b47" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ <foreignObject x="8" y="8" width="184" height="64" p:name="text" id="52ab1dfe50a342d785bea7e939d53e49" style="font-family: "Liberation Sans",Arial,sans-serif; font-size: 13px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(255, 255, 255); fill-opacity: 1; color: rgb(255, 255, 255); opacity: 1;"><div xmlns="http://www.w3.org/1999/xhtml">Fait-on apparaitre directement en dessous les formulaires pour les types "restreint" et "groupe" ?<br /></div></foreignObject><path id="52ab1dfe50a342d785bea7e939d53e49_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:radio" id="4500011eedb64ab4ab40795d9b784d39" transform="matrix(1, 0, 0, 1, 190, 506)"><p:metadata><p:property name="selected"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Normal]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="ff70668d102146f2a81b9cca603bc96d">
+ <path d="m 14.854643,7.698003 c 0,3.85476 -2.200949,6.63069 -7.000875,6.97968 C 3.997527,14.958043 0.50284396,11.669103 0.85288796,7.698003 1.191377,3.858033 4.003037,0.37077296 7.853768,0.71833296 11.720246,1.067323 14.854643,3.843233 14.854643,7.698003 z" p:name="rdCircle" id="4f159e6284c340f38e5119bfae341ed4" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;"/>
+ <path style="stroke: none; visibility: hidden; fill: rgb(0, 0, 0); fill-opacity: 1;" d="m 11.354207,7.349023 c 0,1.79888 -0.295905,3.60616 -3.500439,3.60616 -1.804357,0 -3.500439,-1.57462 -3.500439,-3.37351 0,-1.79889 1.696082,-3.14085 3.500439,-3.14085 1.804357,0 3.500439,1.10931 3.500439,2.9082 z" p:name="rdTick" id="f2266635c86f4f9b8d27601e76cc12e6"/>
+ </g>
+ <text p:name="text" id="39a1d9f64f014287bca0f15b8db1cd55" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Normal</text><path id="39a1d9f64f014287bca0f15b8db1cd55_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="ac364ee3cdb24d9a91972922ec2b2b35" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:radio" id="7932b9d19b924834afc3a0db942e6695" transform="matrix(1, 0, 0, 1, 285, 506)"><p:metadata><p:property name="selected"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Pourcentage]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="f795c1307bcc46e4bd2342e448e63a92">
+ <path d="m 14.854643,7.698003 c 0,3.85476 -2.200949,6.63069 -7.000875,6.97968 C 3.997527,14.958043 0.50284396,11.669103 0.85288796,7.698003 1.191377,3.858033 4.003037,0.37077296 7.853768,0.71833296 11.720246,1.067323 14.854643,3.843233 14.854643,7.698003 z" p:name="rdCircle" id="7eea89f7614c4b84a4934978a5ac7ffb" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;"/>
+ <path style="stroke: none; visibility: hidden; fill: rgb(0, 0, 0); fill-opacity: 1;" d="m 11.354207,7.349023 c 0,1.79888 -0.295905,3.60616 -3.500439,3.60616 -1.804357,0 -3.500439,-1.57462 -3.500439,-3.37351 0,-1.79889 1.696082,-3.14085 3.500439,-3.14085 1.804357,0 3.500439,1.10931 3.500439,2.9082 z" p:name="rdTick" id="9cc4da79218649348500ad813c787dc2"/>
+ </g>
+ <text p:name="text" id="20e5d455b3c74d6ea1f0b137b7f0d55a" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Pourcentage</text><path id="20e5d455b3c74d6ea1f0b137b7f0d55a_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="88d7082508aa4bd3a85a80864b4be467" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="7cff33ef7a0c475e8ad3aafc9f4e5ea7" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:radio" id="9718566648d84a25a6ea71fc2a22c1ca" transform="matrix(1, 0, 0, 1, 391, 506)"><p:metadata><p:property name="selected"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Condorcet]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="a3f359e585fc4d66871a4339a3a907a3">
+ <path d="m 14.854643,7.698003 c 0,3.85476 -2.200949,6.63069 -7.000875,6.97968 C 3.997527,14.958043 0.50284396,11.669103 0.85288796,7.698003 1.191377,3.858033 4.003037,0.37077296 7.853768,0.71833296 11.720246,1.067323 14.854643,3.843233 14.854643,7.698003 z" p:name="rdCircle" id="f84cdddced7d4cc3b84a2b2ee82f257a" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;"/>
+ <path style="stroke: none; visibility: hidden; fill: rgb(0, 0, 0); fill-opacity: 1;" d="m 11.354207,7.349023 c 0,1.79888 -0.295905,3.60616 -3.500439,3.60616 -1.804357,0 -3.500439,-1.57462 -3.500439,-3.37351 0,-1.79889 1.696082,-3.14085 3.500439,-3.14085 1.804357,0 3.500439,1.10931 3.500439,2.9082 z" p:name="rdTick" id="0e3aa4a4fc3848039777b0e268b8824e"/>
+ </g>
+ <text p:name="text" id="57f0eade81ec4fcab53df27a2a977e6a" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Condorcet</text><path id="57f0eade81ec4fcab53df27a2a977e6a_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="903fdfe496ed47019c091a667b5f932b" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="600c00d386b945cea33a6ed37afcbf71" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="561853dd0cda4d6999a00011a0053b52" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:radio" id="bb3c07a004174eda94a1ce18c4316a55" transform="matrix(1, 0, 0, 1, 494, 506)"><p:metadata><p:property name="selected"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Nombre]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="97b6b7cc763247b5ae9a9ddad1a04930">
+ <path d="m 14.854643,7.698003 c 0,3.85476 -2.200949,6.63069 -7.000875,6.97968 C 3.997527,14.958043 0.50284396,11.669103 0.85288796,7.698003 1.191377,3.858033 4.003037,0.37077296 7.853768,0.71833296 11.720246,1.067323 14.854643,3.843233 14.854643,7.698003 z" p:name="rdCircle" id="ae062d0b61f44e86bb753a1f4ef57227" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;"/>
+ <path style="stroke: none; visibility: hidden; fill: rgb(0, 0, 0); fill-opacity: 1;" d="m 11.354207,7.349023 c 0,1.79888 -0.295905,3.60616 -3.500439,3.60616 -1.804357,0 -3.500439,-1.57462 -3.500439,-3.37351 0,-1.79889 1.696082,-3.14085 3.500439,-3.14085 1.804357,0 3.500439,1.10931 3.500439,2.9082 z" p:name="rdTick" id="695d77c752934e6bac27ed9786790927"/>
+ </g>
+ <text p:name="text" id="f2551aef7bf24ec18d0e3594290c2498" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Nombre</text><path id="f2551aef7bf24ec18d0e3594290c2498_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="c951e65760134e53963185a66be27817" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="378e83862f9a42aeb63c3bfdd2370a80" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="dd2bef6c1064482ea2f27d67529f2f7d" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:pane" id="c34e0257941e42bc8ba7bd86fd3fc1e6" transform="matrix(1, 0, 0, 1, 27, 563)"><p:metadata><p:property name="box"><![CDATA[588,291]]></p:property><p:property name="cornerStyle"><![CDATA[none]]></p:property><p:property name="radius"><![CDATA[29.399999999999995,0]]></p:property><p:property name="textPadding"><![CDATA[0,9.7]]></p:property><p:property name="fillColor"><![CDATA[#EEEEEEFF]]></p:property><p:property name="shadowStyle"><![CDATA[0|0|3]]></p:property><p:property name="shadowColor"><![CDATA[#00000000]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[0|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|normal|normal|13px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[1,1]]></p:property></p:metadata>
+ <foreignObject x="-3" y="-3" width="594" height="297" p:name="htmlObject" id="a419ffb5fafa4873a3e45a917cb2634c" style="font-family: "Liberation Sans",Arial,sans-serif; font-size: 13px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; color: rgb(0, 0, 0); opacity: 1;">
+ <div xmlns="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; -moz-box-shadow: none; width: 588px; height: 291px; padding: 9.7px; background-color: rgb(238, 238, 238); -moz-border-radius: 0px 0px 0px 0px; border: medium none; margin-left: 3px; margin-top: 3px;" p:name="div" id="da3c6cd8e80a4b12bf531204ba5120a8"><div xmlns="http://www.w3.org/1999/xhtml"></div></div>
+ </foreignObject><path id="a419ffb5fafa4873a3e45a917cb2634c_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="9ca49748cf8644f1af602a9463c21038" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="8dca3596b10649ed80d5cb47d5285f69" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:heading" id="2c8b4563ad2b492cb61f8856d3e83329" transform="matrix(1, 0, 0, 1, 44, 555)"><p:metadata><p:property name="textContent"><![CDATA[Les options]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|bold|normal|17px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="customStyle"><![CDATA[]]></p:property></p:metadata>
+
+ <foreignObject x="0" y="0" width="93" height="20" p:name="htmlObject" id="890806054de843ceb2785eeb6d43df4a" style="color: rgb(0, 0, 0); opacity: 1; font-family: "Liberation Sans",Arial,sans-serif; font-size: 17px; font-weight: bold; font-style: normal; text-decoration: none;">
+ <div xmlns="http://www.w3.org/1999/xhtml" p:name="textDiv" id="4684e2c41bb04124bed72d4499c21fdf" style="white-space: nowrap; display: inline-block ! important;"><div xmlns="http://www.w3.org/1999/xhtml">Les options</div></div>
+ </foreignObject><path id="890806054de843ceb2785eeb6d43df4a_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="e1eec77fc459497bae718c9e428458de" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="d8ba07a922b9426bb096013bad856a40" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:checkbox" id="f43690990e454e20b31e3e7beee1b799" transform="matrix(1, 0, 0, 1, 76, 604)"><p:metadata><p:property name="checked"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Sondage anonyme]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="ee6ce7b8dd604477b887fe25d1467b1b" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path d="m 1.2896594,14.987973 c 4.21875,-0.0313 9.1874996,-0.562496 13.4062466,-0.593746 0.44792,-4.21875 -0.604173,-8.4375002 -0.156253,-12.6562502 -4.5937436,-0.22917 -8.9374936,0.0417 -13.5312436,-0.1875 -0.0729,4.47917 0.35417,8.9583302 0.28125,13.4374962 z" p:name="cbBox" id="f52b6886c9bb4015bfba2b85e2a81631"/>
+ <path style="fill: none; visibility: hidden;" d="m 5.0048894,5.0121168 1.88908,4.8033 3.3587596,-3.18198 c 2.28541,-4.02289 3.74045,-4.86056 5.126527,-8.83883" p:name="cbTick" id="061ea69d415146bba6f2bb7ca76465d7"/>
+ </g>
+ <text p:name="text" id="5ee39990a2a6456480f806420c70bddd" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Sondage anonyme</text><path id="5ee39990a2a6456480f806420c70bddd_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:checkbox" id="0ac017f51a034d36a9b05ee6fcbe96dd" transform="matrix(1, 0, 0, 1, 76, 632)"><p:metadata><p:property name="checked"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Autoriser le vote anonyme]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="8dffce887a58483bb2ec0380855fbc47" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path d="m 1.2896594,14.987973 c 4.21875,-0.0313 9.1874996,-0.562496 13.4062466,-0.593746 0.44792,-4.21875 -0.604173,-8.4375002 -0.156253,-12.6562502 -4.5937436,-0.22917 -8.9374936,0.0417 -13.5312436,-0.1875 -0.0729,4.47917 0.35417,8.9583302 0.28125,13.4374962 z" p:name="cbBox" id="1e8924caf2f04e3cbdeaa2fc3c2e6e2a"/>
+ <path style="fill: none; visibility: hidden;" d="m 5.0048894,5.0121168 1.88908,4.8033 3.3587596,-3.18198 c 2.28541,-4.02289 3.74045,-4.86056 5.126527,-8.83883" p:name="cbTick" id="582c4283b93f49d09a0b4339ebe4bcfd"/>
+ </g>
+ <text p:name="text" id="9ac18a64763542b09bb28d135d966e1d" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Autoriser le vote anonyme</text><path id="9ac18a64763542b09bb28d135d966e1d_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="527c39e22eae4228b0183726030d1524" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:checkbox" id="af0a77dd46e946ea98ade164ba2c80d5" transform="matrix(1, 0, 0, 1, 76, 660)"><p:metadata><p:property name="checked"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Résultats continus]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="1e0a13aa41b7416f8b5a7625d04455cd" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path d="m 1.2896594,14.987973 c 4.21875,-0.0313 9.1874996,-0.562496 13.4062466,-0.593746 0.44792,-4.21875 -0.604173,-8.4375002 -0.156253,-12.6562502 -4.5937436,-0.22917 -8.9374936,0.0417 -13.5312436,-0.1875 -0.0729,4.47917 0.35417,8.9583302 0.28125,13.4374962 z" p:name="cbBox" id="b23c3578d17e461fa8a0f76ccab5f722"/>
+ <path style="fill: none; visibility: hidden;" d="m 5.0048894,5.0121168 1.88908,4.8033 3.3587596,-3.18198 c 2.28541,-4.02289 3.74045,-4.86056 5.126527,-8.83883" p:name="cbTick" id="bf3478c42d4e4ead92765276efef1425"/>
+ </g>
+ <text p:name="text" id="67748bac6c0942668501b5651ae14092" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Résultats continus</text><path id="67748bac6c0942668501b5651ae14092_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="f8c50c934b584342a77da3dda53ab0fc" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:checkbox" id="87a011d1bd6a4f28b47ef0b2fdbc3317" transform="matrix(1, 0, 0, 1, 76, 691)"><p:metadata><p:property name="checked"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Résultats publics]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="a95aaea3a848487eb50a7120abfd0d99" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path d="m 1.2896594,14.987973 c 4.21875,-0.0313 9.1874996,-0.562496 13.4062466,-0.593746 0.44792,-4.21875 -0.604173,-8.4375002 -0.156253,-12.6562502 -4.5937436,-0.22917 -8.9374936,0.0417 -13.5312436,-0.1875 -0.0729,4.47917 0.35417,8.9583302 0.28125,13.4374962 z" p:name="cbBox" id="3e00da9cd30a429182de2d28bbadb036"/>
+ <path style="fill: none; visibility: hidden;" d="m 5.0048894,5.0121168 1.88908,4.8033 3.3587596,-3.18198 c 2.28541,-4.02289 3.74045,-4.86056 5.126527,-8.83883" p:name="cbTick" id="0dcfaddb63cd4b86acf6e4b8cf9d6231"/>
+ </g>
+ <text p:name="text" id="5ef760e11bb64a53a87f5b070dc5bd16" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Résultats publics</text><path id="5ef760e11bb64a53a87f5b070dc5bd16_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="de0f0be85dd6469dae100b445cc7109a" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:checkbox" id="606f6c06849d4ef5808d271c56823dc4" transform="matrix(1, 0, 0, 1, 76, 724)"><p:metadata><p:property name="checked"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Autoriser l'ajout de choix]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="37a8a7be34e34323be112251b73e3c30" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path d="m 1.2896594,14.987973 c 4.21875,-0.0313 9.1874996,-0.562496 13.4062466,-0.593746 0.44792,-4.21875 -0.604173,-8.4375002 -0.156253,-12.6562502 -4.5937436,-0.22917 -8.9374936,0.0417 -13.5312436,-0.1875 -0.0729,4.47917 0.35417,8.9583302 0.28125,13.4374962 z" p:name="cbBox" id="9f828e274b4a4f0e9ac46471af558f6a"/>
+ <path style="fill: none; visibility: hidden;" d="m 5.0048894,5.0121168 1.88908,4.8033 3.3587596,-3.18198 c 2.28541,-4.02289 3.74045,-4.86056 5.126527,-8.83883" p:name="cbTick" id="d693f85e1d4f4c6a96a2d45e7c426174"/>
+ </g>
+ <text p:name="text" id="bb37ae909c0e451bafbd92e38b0d19a0" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Autoriser l'ajout de choix</text><path id="bb37ae909c0e451bafbd92e38b0d19a0_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="924024a488794200a89983001fa1a456" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:checkbox" id="39241129265646698f949dfadb2a85e5" transform="matrix(1, 0, 0, 1, 76, 757)"><p:metadata><p:property name="checked"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Limiter le nombre de choix par vote]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="6b5d1108bcd947a18c23464c286ca02c" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path d="m 1.2896594,14.987973 c 4.21875,-0.0313 9.1874996,-0.562496 13.4062466,-0.593746 0.44792,-4.21875 -0.604173,-8.4375002 -0.156253,-12.6562502 -4.5937436,-0.22917 -8.9374936,0.0417 -13.5312436,-0.1875 -0.0729,4.47917 0.35417,8.9583302 0.28125,13.4374962 z" p:name="cbBox" id="cdf06ac3e0904ebeaec32c196614e1dd"/>
+ <path style="fill: none; visibility: hidden;" d="m 5.0048894,5.0121168 1.88908,4.8033 3.3587596,-3.18198 c 2.28541,-4.02289 3.74045,-4.86056 5.126527,-8.83883" p:name="cbTick" id="c47f7119049448baa0a7981a45c866a9"/>
+ </g>
+ <text p:name="text" id="f6f1feebc5734cbf9fcfaf14b56e7e99" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Limiter le nombre de choix par vote</text><path id="f6f1feebc5734cbf9fcfaf14b56e7e99_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="dfc6b661a27f40d298ca0c96731d9dad" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:checkbox" id="3ffa0119cf7d4b3980d4195ae615ea7f" transform="matrix(1, 0, 0, 1, 76, 789)"><p:metadata><p:property name="checked"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Recevoir des emails de notification]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="d2589d7ddc144775ad3c1a78a1c4f02b" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path d="m 1.2896594,14.987973 c 4.21875,-0.0313 9.1874996,-0.562496 13.4062466,-0.593746 0.44792,-4.21875 -0.604173,-8.4375002 -0.156253,-12.6562502 -4.5937436,-0.22917 -8.9374936,0.0417 -13.5312436,-0.1875 -0.0729,4.47917 0.35417,8.9583302 0.28125,13.4374962 z" p:name="cbBox" id="0229f4d5b77b460a8ea82502cd874d7d"/>
+ <path style="fill: none; visibility: hidden;" d="m 5.0048894,5.0121168 1.88908,4.8033 3.3587596,-3.18198 c 2.28541,-4.02289 3.74045,-4.86056 5.126527,-8.83883" p:name="cbTick" id="7d5f8155142d41f8a56eb679ce7aa797"/>
+ </g>
+ <text p:name="text" id="4b3457b0207d45faa2be89cf87ae0720" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Recevoir des emails de notification</text><path id="4b3457b0207d45faa2be89cf87ae0720_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="a14bd03301af4f5f826dabcc75c95b46" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:checkbox" id="01c61613b81d4f05920c682b6fd331d3" transform="matrix(1, 0, 0, 1, 76, 820)"><p:metadata><p:property name="checked"><![CDATA[false]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Envoyer des emails de rappel]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property></p:metadata>
+ <g p:name="rect" id="1fd72ea3662b471f9a9dd4b9deb435a6" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path d="m 1.2896594,14.987973 c 4.21875,-0.0313 9.1874996,-0.562496 13.4062466,-0.593746 0.44792,-4.21875 -0.604173,-8.4375002 -0.156253,-12.6562502 -4.5937436,-0.22917 -8.9374936,0.0417 -13.5312436,-0.1875 -0.0729,4.47917 0.35417,8.9583302 0.28125,13.4374962 z" p:name="cbBox" id="11ec86bd81854547a31db6ee7e304ebc"/>
+ <path style="fill: none; visibility: hidden;" d="m 5.0048894,5.0121168 1.88908,4.8033 3.3587596,-3.18198 c 2.28541,-4.02289 3.74045,-4.86056 5.126527,-8.83883" p:name="cbTick" id="6adafb63027f45aeb37b55a3cce563dc"/>
+ </g>
+ <text p:name="text" id="585c7434f0d24ce0b6ef0dcdefc44b8b" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="20" y="12">Envoyer des emails de rappel</text><path id="585c7434f0d24ce0b6ef0dcdefc44b8b_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="028b2f7811db458c877d7e5d0e433dfc" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:heading" id="51698b39acec44e3852d7452be290be4" transform="matrix(1, 0, 0, 1, 46, 878)"><p:metadata><p:property name="textContent"><![CDATA[Les choix]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|bold|normal|17px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="customStyle"><![CDATA[]]></p:property></p:metadata>
+
+ <foreignObject x="0" y="0" width="76" height="20" p:name="htmlObject" id="33a354629f684b00ac0230bb4dfe3538" style="color: rgb(0, 0, 0); opacity: 1; font-family: "Liberation Sans",Arial,sans-serif; font-size: 17px; font-weight: bold; font-style: normal; text-decoration: none;">
+ <div xmlns="http://www.w3.org/1999/xhtml" p:name="textDiv" id="611f451311e14a018750d9e855c581d5" style="white-space: nowrap; display: inline-block ! important;"><div xmlns="http://www.w3.org/1999/xhtml">Les choix</div></div>
+ </foreignObject><path id="33a354629f684b00ac0230bb4dfe3538_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="ab8114f61d024dce98b43f96b8c16d71" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="57ed331c6f42423a9a4359de9dc8a1e2" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="d72b3c770b534333b65a71f004c85df1" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.BasicWebElements:table" id="e712e7cd243e41c2b1f23c34265fb22b" transform="matrix(1, 0, 0, 1, 87, 919)"><p:metadata><p:property name="box"><![CDATA[474,80]]></p:property><p:property name="useHtmlContent"><![CDATA[false]]></p:property><p:property name="fixedHeaderHeight"><![CDATA[false]]></p:property><p:property name="padding"><![CDATA[0,4]]></p:property><p:property name="headerHeight"><![CDATA[0,20]]></p:property><p:property name="h0"><![CDATA[158,0]]></p:property><p:property name="h1"><![CDATA[189.60000000000002,0]]></p:property><p:property name="h2"><![CDATA[347.6,0]]></p:property><p:property name="h3"><![CDATA[410.8,0]]></p:property><p:property name="h4"><![CDATA[426.6,0]]></p:property><p:property name="h5"><![CDATA[442.40000000000003,0]]></p:property><p:property name="h6"><![CDATA[458.20000000000005,0]]></p:property><p:property name="h7"><![CDATA[458.20000000000005,0]]></p:property><p:property name="h8"><![CDATA[458.20000000000005,0]]></p:property><p:property name="h9"><![CDATA[458.20000000000005,0]]></p:property><p:property name="h10"><![CDATA[458.20000000000005,0]]></p:property><p:property name="h11"><![CDATA[458.20000000000005,0]]></p:property><p:property name="content"><![CDATA[Choix | Description
+Choix 1 | Description 1
+Choix 2 | Description 2]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|normal|normal|13px|none]]></p:property><p:property name="textAlign"><![CDATA[0,1]]></p:property><p:property name="customStyle"><![CDATA[]]></p:property><p:property name="textColor"><![CDATA["Liberation Sans",Arial,sans-serif|normal|normal|13px|none]]></p:property><p:property name="fillColor"><![CDATA[#00000000]]></p:property><p:property name="headerTextColor"><![CDATA[#000000FF]]></p:property><p:property name="headerBackground"><![CDATA[#CCCCCCFF]]></p:property><p:property name="strokeColor"><![CDATA[#00000055]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property></p:metadata>
+
+ <foreignObject x="0" y="0" width="475" height="81" p:name="htmlObject" id="93356e8dc8f240e2a5c76050d74ba77f">
+ <div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; width: 474px; color: rgb(0, 0, 0); opacity: 1; font-family: "Liberation Sans",Arial,sans-serif; font-size: 13px; font-weight: normal; font-style: normal; text-decoration: none;" p:name="textDiv" id="4e1a37a9d2884d5692dcfa90a8f9c25b"><table style="border-collapse: collapse; background-color: transparent; width: 473px; height: 79px; margin-left: 1px; margin-top: 1px;"><thead><tr><th style="border: 1px solid rgba(0, 0, 0, 0.33); padding: 0px; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0); text-align: left; vertical-align: middle; min-width: 0px; min-height: 0px; overflow: hidden; width: 156px;"><div style="overflow: hidden; min-width: 0px; -moz-box-sizing: border-box; padding: 4px; width: 156px;">Choix </div></th><th style="border: 1px solid rgba(0, 0, 0, 0.33); padding: 0px; background-color: rgb(204, 204, 204); color: rgb(0, 0, 0); text-align: left; vertical-align: middle; min-width: 0px; min-height: 0px; overflow: hidden; width: 314px;"><div style="overflow: hidden; min-width: 0px; -moz-box-sizing: border-box; padding: 4px; width: 314px;"> Description</div></th></tr></thead><tbody><tr><td style="border: 1px solid rgba(0, 0, 0, 0.33); padding: 0px; text-align: left; vertical-align: middle; min-width: 0px; min-height: 0px; overflow: hidden; width: 156px;"><div style="overflow: hidden; min-width: 0px; -moz-box-sizing: border-box; padding: 4px; width: 156px;">Choix 1 </div></td><td style="border: 1px solid rgba(0, 0, 0, 0.33); padding: 0px; text-align: left; vertical-align: middle; min-width: 0px; min-height: 0px; overflow: hidden; width: 314px;"><div style="overflow: hidden; min-width: 0px; -moz-box-sizing: border-box; padding: 4px; width: 314px;"> Description 1</div></td></tr><tr><td style="border: 1px solid rgba(0, 0, 0, 0.33); padding: 0px; text-align: left; vertical-align: middle; min-width: 0px; min-height: 0px; overflow: hidden; width: 156px;"><div style="overflow: hidden; min-width: 0px; -moz-box-sizing: border-box; padding: 4px; width: 156px;">Choix 2 </div></td><td style="border: 1px solid rgba(0, 0, 0, 0.33); padding: 0px; text-align: left; vertical-align: middle; min-width: 0px; min-height: 0px; overflow: hidden; width: 314px;"><div style="overflow: hidden; min-width: 0px; -moz-box-sizing: border-box; padding: 4px; width: 314px;"> Description 2</div></td></tr></tbody></table></div><path id="4e1a37a9d2884d5692dcfa90a8f9c25b_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ <div xmlns="http://www.w3.org/1999/xhtml" style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="0083d031dda1435082417e143eb01139" transform="matrix(1, 0, 0, 1, 122, 1050)"><p:metadata><p:property name="box"><![CDATA[80,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[Choix]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="80" height="20" p:name="htmlObject" id="5ea84757e7284cb0aab14ec194eb98ca">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 80px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="1c881eee90c1495aa221282e7e30f4b3">
+ <hbox align="center" p:name="xulBox" id="06c631a85d9c45018c43fc78db1757a9" width="80" style="width: 80px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; color: rgb(0, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="560f9212776348ffa1ab936bcf219ee6" value="Choix" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="560f9212776348ffa1ab936bcf219ee6_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="0019680c21f246e7a05c8b9b41703625" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:textbox" id="98694a96deb74f839946c7534a06a017" transform="matrix(1, 0, 0, 1, 248, 1044)"><p:metadata><p:property name="box"><![CDATA[280,25]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[0,1]]></p:property></p:metadata>
+ <g p:name="rect" id="38ff271028254c33826a20e2594d56b1" transform="translate(0.5, 0.5)" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;" p:name="line1" id="015dc61d1c7f48b7941e6bea447b9592" transform="translate(0.5, 0.5)" d="M 0 0 L 18.986998007809454 0.2144137176977351 L 39.40803604192106 -0.45498304330150197 L 55.78281155600413 0.017399216472204104 L 74.4199832779255 -0.2950045551530015 L 97.23659408406536 -0.05044486274165194 L 118.81369471166263 -0.06321568426147772 L 139.4106950106684 -0.3030282378060464 L 156.66278862661127 -0.4130911894008654 L 179.49648236485913 0.382324388784838 L 201.2095480030994 0.02975649717822082 L 218.74258422389696 -0.2792050157101357 L 239.94669653722724 -0.1473412450222975 L 261.3691641921724 -0.1995114099594304 L 280 0 L 280.0097353969185 11.779036240052582 L 280 25 L 260.8811782170675 25.49220916855912 L 238.32856417756577 24.677881246665233 L 217.26405998962224 25.374413727348674 L 197.78267641647034 25.19272942216633 L 177.95287765907108 25.304071481360094 L 160.91510585515226 25.035484149426768 L 138.14136401351325 24.592741357160886 L 116.07185783278956 25.29191283527765 L 97.54287855511868 24.926048067750173 L 78.92801588097598 24.8101262675618 L 59.655733969148606 25.257361946854378 L 39.56816872514811 24.94654154610845 L 22.61669434039605 24.523221513463795 L 0 25 L -0.2667660420363508 13.353256567787584 L 0 0 z"/>
+ </g>
+ <text p:name="text" id="56fdb9c8a50d43e8a3c7f2de01a110b7" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="5" y="30"> </text><path id="56fdb9c8a50d43e8a3c7f2de01a110b7_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="0ea198ad2a0947b7a394df416a94c5f9" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:textbox" id="00f3d6b92edf4f91b83cf68c46a682db" transform="matrix(1, 0, 0, 1, 248, 1075)"><p:metadata><p:property name="box"><![CDATA[280,74]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#FFFFFFFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[0,1]]></p:property></p:metadata>
+ <g p:name="rect" id="57bf015381cd4b138086cd81c1ed636c" transform="translate(0.5, 0.5)" style="fill: rgb(255, 255, 255); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;" p:name="line1" id="df38ca38c1b3476eb3ef624dfd1eacb2" transform="translate(0.5, 0.5)" d="M 0 0 L 16.95296765252178 0.2693157307694165 L 33.6469509730471 0.24548763172867005 L 56.60282031509867 0.21734997481262164 L 77.41498914665331 0.31745331547048106 L 95.08448233691094 0.024737529370026157 L 111.72935777844867 0.4815164229712695 L 134.37890015028637 -0.1580953931280522 L 151.91131284280652 -0.40903742555074996 L 174.69108042121982 -0.3518418337606324 L 191.68519839355727 -0.4800686761240964 L 213.4517473250377 0.1702311744960071 L 233.42869982122588 -0.4250320128640064 L 252.4318084456597 -0.47018552143137526 L 280 0 L 280.4133738745206 21.337755460931962 L 280.0278196686407 44.19671188103438 L 280 74 L 259.19013657788474 73.66380410330306 L 241.70159998481566 73.84555908103103 L 219.7762243122327 73.95180414142777 L 198.20836588917632 74.21112225081428 L 174.59317817395225 73.73288967729006 L 155.23558252372314 73.59694837968384 L 131.91717190686484 73.99982396462272 L 112.30639077117978 74.07336941445554 L 92.58292775020695 74.19157357026971 L 72.73107014997886 73.78422801106555 L 50.65182841129224 74.10424100929212 L 30.268510169953238 74.01973287296644 L 10.95680250271464 74.24710242920864 L 0 74 L 0.28494104342156534 55.57998291719921 L -0.21382593198826494 32.881646671787635 L 0 0 z"/>
+ </g>
+ <text p:name="text" id="c5b91382a9d84009ad6a279c8ccb880a" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="5" y="100"> </text><path id="c5b91382a9d84009ad6a279c8ccb880a_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path id="3a1d5d222a644a18a8d984c0ce436c83" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:Label" id="889a1cd2601a4d839c646c52c410edca" transform="matrix(1, 0, 0, 1, 122, 1079)"><p:metadata><p:property name="box"><![CDATA[80,20]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="parseAccessKey"><![CDATA[true]]></p:property><p:property name="label"><![CDATA[Description]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property></p:metadata>
+ <foreignObject x="0" y="0" width="80" height="20" p:name="htmlObject" id="18aac23fac124121a1533d2b9edf2de2">
+ <html:div xmlns:html="http://www.w3.org/1999/xhtml" style="-moz-box-sizing: border-box; overflow: hidden; position: relative; font-size: 0px; width: 80px; height: 20px;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" p:name="div" id="d60205bf66a942c1872d4df5c60cb4bf">
+ <hbox align="center" p:name="xulBox" id="487e0fe06d204a849ce9dfabb2470911" width="80" style="width: 80px; height: 20px;" height="20" disabled="false">
+ <label style="margin: 0px ! important; min-width: 0px ! important; -moz-box-sizing: border-box; vertical-align: middle; font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; color: rgb(0, 0, 0); opacity: 1;" flex="1" p:name="xulControl" id="d4ea50f326a44a4b900ccb52ae29e719" value="Description" accesskey=""/><path xmlns="http://www.w3.org/2000/svg" id="d4ea50f326a44a4b900ccb52ae29e719_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="8080d98f814648a19c12c7dde4b2d366" style="fill: none; stroke-width: 1px; visibility: hidden;"/><path xmlns="http://www.w3.org/2000/svg" id="24bd5adc7e754b7eb5fdbb1e77b2a91c" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </hbox>
+ <html:div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></html:div>
+ </html:div>
+ </foreignObject>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:button" id="8af557a830104c14aba9b9a06f3aab41" transform="matrix(1, 0, 0, 1, 263, 1160)"><p:metadata><p:property name="box"><![CDATA[116,25]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="default"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#CCCCCCFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Ajouter un choix]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[1,1]]></p:property></p:metadata>
+ <g p:name="rect" id="bb6d885a88ea4eb683fc10caceb1669b" style="fill: rgb(204, 204, 204); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round;" p:name="line1" id="aa13aa62240c46bf95e05509a8c84236" d="M 0 0 L 18.345628299739783 -0.0010022731941372598 L 38.485109421371355 0.10729814049321129 L 60.62082933828368 -0.07636970707955881 L 78.98645933444625 0.25653491279775453 L 116 0 L 115.557065009915 11.213555172098195 L 116 25 L 96.85799380720957 25.38102152152329 L 78.04103139553914 25.444387346395516 L 56.569320178117714 24.974222587058083 L 33.94066461461644 24.814792958795536 L 0 25 L 0.443482118343842 12.35768398372119 L 0 0 z"/>
+ </g>
+ <text p:name="text" id="882ce0fc26d3416cabef15b729e191d0" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="6" y="17">Ajouter un choix</text><path id="882ce0fc26d3416cabef15b729e191d0_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Annotation:Balloon" id="8c6de274643d4f979e2d2f27dc397f4c" transform="matrix(1, 0, 0, 1, 659, 956)"><p:metadata><p:property name="box"><![CDATA[200,60]]></p:property><p:property name="withBlur"><![CDATA[false]]></p:property><p:property name="radius"><![CDATA[8,0]]></p:property><p:property name="leftStart"><![CDATA[0,10]]></p:property><p:property name="leftEnd"><![CDATA[0,24.75]]></p:property><p:property name="rightStart"><![CDATA[200,10]]></p:property><p:property name="rightEnd"><![CDATA[200,24.75]]></p:property><p:property name="topStart"><![CDATA[12,0]]></p:property><p:property name="topEnd"><![CDATA[33,0]]></p:property><p:property name="bottomStart"><![CDATA[12,60]]></p:property><p:property name="bottomEnd"><![CDATA[33,60]]></p:property><p:property name="pin"><![CDATA[-112,-1.5]]></p:property><p:property name="fillColor"><![CDATA[#4388CCFF]]></p:property><p:property name="strokeColor"><![CDATA[#1B3280FF]]></p:property><p:property name="strokeStyle"><![CDATA[2|]]></p:property><p:property name="textContent"><![CDATA[Un clic sur la ligne permet de l'éditer dans le formulaire en dessous<br />]]></p:property><p:property name="textFont"><![CDATA["Liberation Sans",Arial,sans-serif|normal|normal|13px|none]]></p:property><p:property name="textColor"><![CDATA[#FFFFFFFF]]></p:property></p:metadata>
+
+ <defs>
+ <filter height="1.2558399" y="-0.12792" width="1.06396" x="-0.03198" p:name="imageShading" id="30708aa42e394cb9b950fc1ab5b76919">
+ <feGaussianBlur stdDeviation="1.3325" in="SourceAlpha"/>
+ </filter>
+ <g p:name="container" id="553d37858b0f4c2881f945079a258704">
+ <path transform="translate(0.5, 0.5)" style="stroke-width: 2; fill: rgb(67, 136, 204); fill-opacity: 1; stroke: rgb(27, 50, 128); stroke-opacity: 1;" p:name="rect" id="e86f9681daae41febffdd3845792d58d" d="M 8 0 L 192 0 C 197.33333333333334 0 200 2.6666666666666665 200 8 L 200 52 C 200 57.333333333333336 197.33333333333334 60 192 60 L 8 60 C 2.6666666666666665 60 0 57.333333333333336 0 52 L 0 24.75 L -112 -1.5 L 0 10 L 0 8 C 0 2.6666666666666665 2.6666666666666665 0 8 0"/>
+ </g>
+ </defs>
+ <use xlink:href="#553d37858b0f4c2881f945079a258704" xmlns:xlink="http://www.w3.org/1999/xlink" transform="translate(1, 1)" p:filter="url(#30708aa42e394cb9b950fc1ab5b76919)" style="opacity: 0.6; visibility: hidden;" p:heavy="true" p:name="bgCopy" id="3a885496e9f44538bd733995ac711080"/>
+ <use xlink:href="#553d37858b0f4c2881f945079a258704" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+ <foreignObject x="8" y="8" width="184" height="44" p:name="text" id="24ba813a1efd4dd49f091eafe7b2f367" style="font-family: "Liberation Sans",Arial,sans-serif; font-size: 13px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(255, 255, 255); fill-opacity: 1; color: rgb(255, 255, 255); opacity: 1;"><div xmlns="http://www.w3.org/1999/xhtml">Un clic sur la ligne permet de l'éditer dans le formulaire en dessous<br /></div></foreignObject><path id="24ba813a1efd4dd49f091eafe7b2f367_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g><g xmlns="http://www.w3.org/2000/svg" p:type="Shape" xmlns:p="http://www.evolus.vn/Namespace/Pencil" p:def="Evolus.Sketchy.GUI:button" id="9867693fe1d243c18b2019d74e023c66" transform="matrix(1, 0, 0, 1, 243, 1247)"><p:metadata><p:property name="box"><![CDATA[136,25]]></p:property><p:property name="disabled"><![CDATA[false]]></p:property><p:property name="default"><![CDATA[false]]></p:property><p:property name="fillColor"><![CDATA[#CCCCCCFF]]></p:property><p:property name="strokeColor"><![CDATA[#000000FF]]></p:property><p:property name="strokeStyle"><![CDATA[1|]]></p:property><p:property name="textContent"><![CDATA[Créer le sondage]]></p:property><p:property name="textFont"><![CDATA['Comic Sans MS'|normal|normal|12px|none]]></p:property><p:property name="textColor"><![CDATA[#000000FF]]></p:property><p:property name="textAlign"><![CDATA[1,1]]></p:property></p:metadata>
+ <g p:name="rect" id="4c753ac837d0449997db2d7b99887257" style="fill: rgb(204, 204, 204); fill-opacity: 1; stroke: rgb(0, 0, 0); stroke-opacity: 1; stroke-width: 1;">
+ <path style="stroke-linejoin: round;" p:name="line1" id="c77c6427e2e840ebbe84cf0111816f7b" d="M 0 0 L 18.46665309996235 -0.4073535652798289 L 40.269101629299726 0.08008818375167859 L 60.89349719444266 0.21091163600060114 L 79.26568447559956 -0.37512772830036123 L 101.73156136717654 -0.2040933487987575 L 136 0 L 135.78933505492424 12.340063435711288 L 136 25 L 113.26416046312183 24.63347728547087 L 91.05382114743159 24.732147595949954 L 74.38374255569947 25.344072874479053 L 55.68562948963232 24.991891869316525 L 34.64060956826831 24.959595336686046 L 0 25 L 0.3939360831769556 13.811212416416534 L 0 0 z"/>
+ </g>
+ <text p:name="text" id="ed7903d4294c46378308902acdf6c2a1" style="font-family: 'Comic Sans MS'; font-size: 12px; font-weight: normal; font-style: normal; text-decoration: none; fill: rgb(0, 0, 0); fill-opacity: 1; dominant-baseline: auto;" x="16" y="17">Créer le sondage</text><path id="ed7903d4294c46378308902acdf6c2a1_underline" style="fill: none; stroke-width: 1px; visibility: hidden;"/>
+ </g></Content></Page></Pages></Document>
\ No newline at end of file
1
0
r3102 - branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators
by tchemit@users.chorem.org 23 Jan '12
by tchemit@users.chorem.org 23 Jan '12
23 Jan '12
Author: tchemit
Date: 2012-01-23 11:44:53 +0100 (Mon, 23 Jan 2012)
New Revision: 3102
Url: http://chorem.org/repositories/revision/pollen/3102
Log:
fix namespace for logout
Modified:
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-23 10:32:33 UTC (rev 3101)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-23 10:44:53 UTC (rev 3102)
@@ -89,7 +89,7 @@
</s:a>
</li>
<li>
- <s:a action="logout"><s:text name="pollen.menu.logout"/></s:a>
+ <s:a action="logout" namespace="/user"><s:text name="pollen.menu.logout"/></s:a>
</li>
</ul>
</div>
1
0
Author: tchemit
Date: 2012-01-23 11:32:33 +0100 (Mon, 23 Jan 2012)
New Revision: 3101
Url: http://chorem.org/repositories/revision/pollen/3101
Log:
update struts version
add svn properties
user domain is nearly done
split struts config files (and use namespaces)
EmailService should be ok.
Added:
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenFunctions.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenUIUtils.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManagePolls.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManageUsers.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/AbstractJSONPaginedAction.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetUsers.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/AbstractCheckInterceptor.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsAdmin.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsLogguedInterceptor.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-admin.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-json.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-poll.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-user.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/template/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/template/css_xhtml/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/template/css_xhtml/checkbox.ftl
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/template/css_xhtml/controlheader-core.ftl
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/adminRequired.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/createPoll.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollsList.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/usersList.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/js/gridHelper.js
Modified:
branches/pollen-2.0-beta-1/
branches/pollen-2.0-beta-1/pollen-services/pom.xml
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/EmailService.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
branches/pollen-2.0-beta-1/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties
branches/pollen-2.0-beta-1/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationContext.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenTopiaTransactionFilter.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/CreatePoll.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp
branches/pollen-2.0-beta-1/pom.xml
Property changes on: branches/pollen-2.0-beta-1
___________________________________________________________________
Modified: svn:ignore
- *.ipr
*.iws
*.iml
.classpath
.project
target
.pollen
.settings
nbactions.xml
.
.idea
+ *.ipr
*.iws
*.iml
.classpath
.project
target
.settings
nbactions.xml
Added: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenFunctions.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenFunctions.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenFunctions.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * Pollen :: Persistence
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen;
+
+import com.google.common.base.Function;
+import org.chorem.pollen.entity.UserAccount;
+
+/**
+ * USefull pollen functions.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class PollenFunctions {
+
+ public static final Function<UserAccount, String> USER_BY_LOGIN = new Function<UserAccount, String>() {
+ @Override
+ public String apply(UserAccount input) {
+ return input.getLogin();
+ }
+ };
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenFunctions.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/pom.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/pom.xml 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-services/pom.xml 2012-01-23 10:32:33 UTC (rev 3101)
@@ -98,10 +98,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
- <dependency>
- <groupId>org.nuiton.i18n</groupId>
- <artifactId>nuiton-i18n</artifactId>
- </dependency>
</dependencies>
<!-- ************************************************************* -->
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/EmailService.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/EmailService.java 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/EmailService.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -23,32 +23,57 @@
*/
package org.chorem.pollen.services;
-import org.chorem.pollen.PollenBusinessException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.commons.mail.EmailException;
+import org.apache.commons.mail.SimpleEmail;
+import org.chorem.pollen.PollenConfiguration;
import org.chorem.pollen.PollenTechnicalException;
import org.chorem.pollen.bean.PollenEmail;
import org.chorem.pollen.entity.UserAccount;
-import org.chorem.pollen.service.legacy.ServiceEmailImpl;
public class EmailService extends PollenServiceSupport {
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(EmailService.class);
+
public PollenEmail createEmail() {
- ServiceEmailImpl service = new ServiceEmailImpl();
- PollenEmail result = service.createEmail();
+ PollenConfiguration configuration = getConfiguration();
+ PollenEmail result = new PollenEmail();
+ result.setHost(configuration.getEmailHost());
+ result.setFrom(configuration.getEmailFrom());
+ result.setPort(configuration.getEmailPort());
return result;
}
- public void sendEmail(PollenEmail email) {
- ServiceEmailImpl service = new ServiceEmailImpl();
+ public void sendEmail(PollenEmail pollenEmail) {
try {
- service.executeSendEmail(email);
- } catch (PollenBusinessException e) {
- throw new PollenTechnicalException(e);
+ // Create the SimpleEmail to send
+ SimpleEmail email = pollenEmail.createSimpleEmail(
+ getConfiguration().getCharset());
+ email.send();
+
+ if (log.isInfoEnabled()) {
+ log.info("Mail sent to : " + pollenEmail.getTo());
+
+ if (log.isDebugEnabled()) {
+ log.debug("Email infos : " +
+ "\ndate: " + email.getSentDate() +
+ "\nhostname: " + email.getHostName() +
+ "\nport: " + email.getSmtpPort() +
+ "\nfrom: " + email.getFromAddress().toString());
+ }
+ }
+ } catch (EmailException eee) {
+ throw new PollenTechnicalException(
+ "could not send email to " + pollenEmail.getTo(), eee);
}
}
public PollenEmail getNewEmail(UserAccount toUser) {
- ServiceEmailImpl service = new ServiceEmailImpl();
- return service.executeGetNewEmail(toUser);
+ PollenEmail email = createEmail();
+ email.setTo(toUser.getEmail());
+ return email;
}
}
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -23,24 +23,30 @@
*/
package org.chorem.pollen.services;
+import com.google.common.collect.Maps;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.PollenBinderHelper;
import org.chorem.pollen.PollenDAOHelper;
import org.chorem.pollen.PollenException;
+import org.chorem.pollen.PollenFunctions;
import org.chorem.pollen.PollenTechnicalException;
import org.chorem.pollen.bean.PollenEmail;
import org.chorem.pollen.entity.UserAccount;
import org.chorem.pollen.entity.UserAccountDAO;
-import org.chorem.pollen.service.legacy.ServiceUserImpl;
+import org.chorem.pollen.entity.UserAccountImpl;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.EntityFilter;
import org.nuiton.topia.framework.TopiaQuery;
import org.nuiton.topia.persistence.util.TopiaEntityBinder;
+import org.nuiton.util.PagerUtil;
import org.nuiton.util.StringUtil;
import org.nuiton.util.beans.Binder;
+import java.net.URL;
+import java.util.List;
+import java.util.Locale;
import java.util.Map;
import static org.nuiton.i18n.I18n._;
@@ -73,7 +79,8 @@
}
}
- public UserAccount createUser(UserAccount user, String url) throws UserLoginAlreadyUsedException, UserEmailAlreadyUsedException {
+ public UserAccount createUser(UserAccount user,
+ URL url) throws UserLoginAlreadyUsedException, UserEmailAlreadyUsedException {
String password = user.getPassword(); // le mot de passe en clair
@@ -102,13 +109,14 @@
throw new PollenTechnicalException(e);
}
- if (StringUtil.isEmail(user.getEmail())) {
+ if (url != null && StringUtil.isEmail(user.getEmail())) {
- String subject = l_(serviceContext.getLocale(),
- "pollen.email.userRegister.subject", user.getLogin());
- String content = l_(serviceContext.getLocale(),
- "pollen.email.userRegister.content", user.getDisplayName(),
- user.getLogin(), password, url);
+ Locale locale = getLocale();
+ String subject = l_(locale, "pollen.email.userRegister.subject",
+ user.getLogin());
+ String content = l_(locale, "pollen.email.userRegister.content",
+ user.getDisplayName(),
+ user.getLogin(), password, url);
EmailService emailService = newService(EmailService.class);
PollenEmail pollenEmail = emailService.getNewEmail(user);
@@ -121,8 +129,8 @@
}
public UserAccount updateUser(UserAccount user,
- String newPassword,
- boolean byAdmin) throws UserEmailAlreadyUsedException, UserInvalidPasswordException {
+ String newPassword,
+ boolean byAdmin) throws UserEmailAlreadyUsedException, UserInvalidPasswordException {
try {
@@ -168,24 +176,48 @@
}
public UserAccount getNewUser() throws PollenException {
- ServiceUserImpl service = new ServiceUserImpl();
- UserAccount result = service.executeGetNewUser();
+ UserAccount result = new UserAccountImpl();
return result;
}
public void deleteUser(String login) {
- ServiceUserImpl service = new ServiceUserImpl();
try {
- service.executeDeleteUser(getTransaction(), login);
+ UserAccountDAO dao = PollenDAOHelper.getUserAccountDAO(getTransaction());
+ UserAccount user = dao.findByLogin(login);
+ dao.delete(user);
} catch (TopiaException e) {
throw new PollenTechnicalException(e);
}
}
+ public List<UserAccount> getUsers(PagerUtil.PagerBean pager) {
+
+ try {
+ UserAccountDAO dao = PollenDAOHelper.getUserAccountDAO(getTransaction());
+
+ long records = dao.count();
+ pager.setRecords((int) records);
+
+ PagerUtil.computeRecordIndexesAndPagesNumber(pager);
+ TopiaQuery query = dao.createQuery("e");
+ query.setLimit(pager.getRecordStartIndex(), pager.getRecordEndIndex() - 1);
+ List<UserAccount> result = dao.findAllByQuery(query);
+ return result;
+ } catch (TopiaException e) {
+ throw new PollenTechnicalException(e);
+ }
+ }
+
public Map<String, UserAccount> getUsers(EntityFilter filter) {
- ServiceUserImpl service = new ServiceUserImpl();
+
try {
- Map<String, UserAccount> result = service.executeGetUsers(getTransaction(), filter);
+ UserAccountDAO dao = PollenDAOHelper.getUserAccountDAO(getTransaction());
+
+ TopiaQuery query = dao.createQuery().addFilter(filter);
+
+ List<UserAccount> users = dao.findAllByQuery(query);
+ Map<String, UserAccount> result =
+ Maps.uniqueIndex(users, PollenFunctions.USER_BY_LOGIN);
return result;
} catch (TopiaException e) {
throw new PollenTechnicalException(e);
@@ -193,10 +225,10 @@
}
public int getNbUsers() {
- ServiceUserImpl service = new ServiceUserImpl();
try {
- int result = service.executeGetNbUsers(getTransaction());
- return result;
+ UserAccountDAO dao = PollenDAOHelper.getUserAccountDAO(getTransaction());
+ Long result = dao.count();
+ return result.intValue();
} catch (TopiaException e) {
throw new PollenTechnicalException(e);
}
@@ -214,7 +246,7 @@
user.setEmail(getConfiguration().getAdminEmail());
user.setNewPassword(getConfiguration().getAdminPassword());
try {
- createUser(user, "");
+ createUser(user, null);
if (log.isInfoEnabled()) {
log.info(_("pollen.info.admin.created", login));
}
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/resources/i18n/pollen-services_en_GB.properties 2012-01-23 10:32:33 UTC (rev 3101)
@@ -1,3 +1,39 @@
+add=Add
+addChoice-choiceDate-regexp=\\d{2}/\\d{2}/\\d{4}( \\d{2}\\\:\\d{2})?
+addChoice-choiceDate-regexp-message=Date does not match pattern 12/31/2000 12\:59 AM.
+addChoice-choiceDate-required-message=You must provide a choice.
+addChoice-choiceImage-regexp=\\.(jpe?g|gif|png|JPE?G|GIF|PNG)$
+addChoice-choiceImage-regexp-message=The image must be a JPG, GIF or PNG file.
+addChoice-choiceImage-required-message=You must provide a choice.
+addChoice-choiceText-required-message=You must provide a choice.
+cancel=Cancel
+choiceDate-label=Date and time
+choiceDescription-label=Description
+choiceImage-label=Image
+choiceText-label=Choice
+create=Create
+creatorEmail_msg=You had just created the new poll\: "%s".\nYou can access to this poll by following the links below.\n\nVote page\: \n%s\nEdit page\: \n%s
+creatorEmail_subject=[Pollen] Poll creation (%s)
+delete=Delete
+edit=Edit
+email-regexp=^([a-zA-Z0-9_.+-])+(a)(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$
+email-regexp-message=Invalid email
+help=Help
+load=Load
+login-required-message=You must provide a username
+ok=Ok
+pollFeed_choiceContent=%s
+pollFeed_choiceTitle=New choice \: %s
+pollFeed_commentContent=%s
+pollFeed_commentTitle=New comment from %s
+pollFeed_createContent=
+pollFeed_createTitle=Poll created by %s
+pollFeed_desc=%s
+pollFeed_title=Pollen \: %s
+pollFeed_voteContent=Poll state \: %s
+pollFeed_voteTitle=New vote from %s
+pollen.email.userRegister.content=Welcome %1$s. You had just created an account on the web application Pollen.\n\nLogin\: %2$s\nPassword\: %3$s\n\nYou can now manage your polls by logging on the website \: \n%4$s
+pollen.email.userRegister.subject=[Pollen] Confirmation of account creation %s
pollen.error.context.close=
pollen.error.context.getRootContext=
pollen.error.context.parse=
@@ -118,3 +154,25 @@
pollen.info.started=Pollen is started \!
pollen.info.stop=Stop Pollen
pollen.text.empty=
+pollen.ui.choice.add.submit=Add
+pollen.ui.choice.add.title=Adding a choice
+pollen.ui.choice.datePattern=MM/dd/yyyy h\:mm a
+pollen.ui.choice.delete.confirm=Are you sure you want to delete this choice ?
+pollen.ui.choice.delete.title=Delete this choice
+pollen.ui.error.upload=An error occurred while uploading files. Maximum size allowed is %$1s per file, and %$2s total.
+pollen.ui.user.cancelEdit=Cancel changes
+pollen.ui.user.delete=Delete this user account
+pollen.ui.user.delete.confirmMessage=Are you sure you want to definitively delete this user ?
+pollen.ui.user.edit=Edit this user account
+pollen.ui.user.save=Save this user account
+pollen.ui.vote.noPager=%$1d existing votes
+pollen.ui.vote.noVote=Aucune personne n'a encore participé au sondage
+reminderEmail_msg=You have not yet voted for the poll "%s".\nYou can still participate with the identifier %s by following this link\: \n%s
+reminderEmail_subject=[Pollen] Reminder (%s)
+return=Return
+save=Save
+validate=Validate
+voteEmail_msg=A vote has been submitted for the poll "%s". There are now %d votes for this poll.\nYou can access to this poll by following the links below.\n\nVote page\: \n%s\nEdit page\: \n%s
+voteEmail_subject=[Pollen] Vote reporting (%s)
+votingEmail_msg=A new poll has been created\: "%s".\nYou can participate with the identifier %s by following this link\: \n%s
+votingEmail_subject=[Pollen] Invitation to vote (%s)
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/resources/i18n/pollen-services_fr_FR.properties 2012-01-23 10:32:33 UTC (rev 3101)
@@ -1,3 +1,46 @@
+addChoice-choiceDate-regexp=\\d{2}/\\d{2}/\\d{4}( \\d{2}\\\:\\d{2})?
+addChoice-choiceDate-regexp-message=La date de début doit-être au format 31/12/2000 23\:59.
+addChoice-choiceDate-required-message=Vous devez saisir un choix.
+addChoice-choiceImage-regexp=\\.(jpe?g|gif|png|JPE?G|GIF|PNG)$
+addChoice-choiceImage-regexp-message=L'image doit-être au format JPG, GIF ou PNG.
+addChoice-choiceImage-required-message=Vous devez saisir un choix.
+addChoice-choiceText-required-message=Vous devez saisir un choix.
+choiceDate-label=Date et heure
+choiceDateField-label=Date et heure
+choiceDateField-regexp=\\d{2}/\\d{2}/\\d{4}( \\d{2}\\\:\\d{2})?
+choiceDateField-regexp-message=La date doit-être au format 31/12/2000 23\:59.
+choiceDescription-label=Description
+choiceImage-label=Image
+choiceImageField-label=Image
+choiceImageField-regexp=\\.(jpe?g|gif|png|JPE?G|GIF|PNG)$
+choiceImageField-regexp-message=L'image doit-être au format JPG, GIF ou PNG.
+choiceText-label=Choix
+connectionLegend=Connexion
+date-pattern=dd/MM/yyyy HH\:mm
+editEmail-regexp=^([a-zA-Z0-9_.+-])+(a)(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$
+editEmail-regexp-message=Adresse email invalide.
+email-label=Email
+email-regexp=^([a-zA-Z0-9_.+-])+(a)(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$
+email-regexp-message=Adresse email invalide.
+firstName-label=Prénom
+groupName-label=Nom du groupe
+lastName-label=Nom
+listName-label=Nom
+listSelect-label=Liste
+login-label=Identifiant
+loginComp-label=Identifiant
+loginComp-required-message=Vous devez entrer votre identifiant.
+loginFailed=Mauvais identifiant ou mot de passe.
+loginSubmit=Me connecter
+name-label=Nom
+participantEmail-regexp=^([a-zA-Z0-9_.+-])+(a)(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$
+participantEmail-regexp-message=Adresse email invalide.
+passwordComp-label=Mot de passe
+passwordComp-required-message=Vous devez entrer votre mot de passe.
+pollen.email.createPoll.content=Vous venez de créer le sondage "%1$s".\nVous pouvez y accéder en suivant les liens ci-dessous.\n\nPage de vote \: \n%2$s\nModération des votes \: \n%3$s\nPage de modification \: \n%4$s
+pollen.email.createPoll.subject=[Pollen] Création d'un sondage (%1$s)
+pollen.email.userRegister.content=Bienvenue %1$s. Vous venez de créer un compte sur l'application de sondage en ligne Pollen.\n\nIdentifiant \: %2$s\nMot de passe \: %3$s\n\nVous pouvez dès maintenant gérer vos sondages en vous identifiant sur le site \: \n%4$s
+pollen.email.userRegister.subject=[Pollen] Confirmation de création du compte %s
pollen.error.context.close=Erreur lors de la fermeture de la transaction
pollen.error.context.getRootContext=Erreur lors de la récupération du contexte principale
pollen.error.context.parse=Erreur lors du parse du fichier de configuration %1$s
@@ -114,3 +157,72 @@
pollen.info.start=Démarrage de Pollen...
pollen.info.started=Pollen a été démarré avec succès \!
pollen.info.stop=Arrêt de Pollen
+pollen.page.AdminUsers.title=Gestion des utilisateurs
+pollen.page.PollLinks.title=Liens d'accès au sondage
+pollen.page.UserLists.title=Vos listes de votants
+pollen.ui.button.add=Ajouter
+pollen.ui.button.create=Créer
+pollen.ui.button.ok=Ok
+pollen.ui.choice.add.submit=Ajouter
+pollen.ui.choice.add.title=Ajout d'un choix
+pollen.ui.choice.datePattern=dd/MM/yyyy HH\:mm
+pollen.ui.choice.delete.confirm=Etes-vous sûr de vouloir définitivement supprimer ce choix ?
+pollen.ui.choice.delete.title=Supprimer ce choix
+pollen.ui.error.upload=Une erreur s'est produite lors du transfert des fichiers. La taille maximale autorisée est de %1$s par fichier et %2$s au total.
+pollen.ui.list.create.success=La liste %1$s a été créée avec succès.
+pollen.ui.list.create.title=Créer une nouvelle liste
+pollen.ui.list.create.weightHelp=Ce chiffre correspond au poids du vote de la personne, c'est à dire le nombre de voix que possède la personne dans le sondage.
+pollen.ui.list.delete=Supprimer la liste %1$s
+pollen.ui.list.delete.confirmMessage=Etes-vous sûr de vouloir définitivement supprimer cette liste et l'intégralité de ses votants ?
+pollen.ui.list.delete.success=La liste et son contenu ont été supprimé avec succès.
+pollen.ui.list.emptyList=Liste vide. Ajoutez des votants en saisissant leur nom et email.
+pollen.ui.list.nbParticipants=%1$d votants contenus dans cette liste
+pollen.ui.list.notSelected=Aucune liste sélectionnée
+pollen.ui.list.update.addParticipant=Ajouter un nouveau votant à la liste
+pollen.ui.list.update.addParticipant.success=Le votant %1$s a été ajouté à la liste.
+pollen.ui.list.update.cancelEdition=Annuler les changements
+pollen.ui.list.update.removeParticipant=Supprimer ce votant
+pollen.ui.list.update.removeParticipant.confirmMessage=Etes-vous sûr de vouloir supprimer %1$s de la liste ?
+pollen.ui.list.update.removeParticipant.success=Le votant a été supprimé avec succès.
+pollen.ui.list.update.saveParticipant=Enregistrer les modifications
+pollen.ui.list.update.saveParticipant.success=Modification enregistrée avec succès.
+pollen.ui.list.update.updateParticipant=Modifier ce votant
+pollen.ui.participant.add=Nouveau participant
+pollen.ui.participant.email-label=Email
+pollen.ui.participant.name-label=Nom
+pollen.ui.participant.weight-label=Poids
+pollen.ui.poll.form.confirmlistChange=Des changements ont été effectués sur la/les liste(s), un changement de restriction supprimera les modifications. Voulez-vous continuer ?
+pollen.ui.poll.links.adminVotePage=Lien d'accès modérateur à la page des votes \:
+pollen.ui.poll.links.creatorEmail.notDefined=Aucun email n'a été défini à la création du sondage, vous devriez enregistrer cette page dans vos favoris pour ne pas perdre les liens.
+pollen.ui.poll.links.creatorEmail.success=Un email vous a été envoyé avec les liens ci-dessous.
+pollen.ui.poll.links.editPage=Lien d'accès à la modification du sondage \:
+pollen.ui.poll.links.myPolls=Mes sondages
+pollen.ui.poll.links.notAllowed=L'url est incorrect, vous n'êtes pas autorisé à accéder aux liens du sondage.
+pollen.ui.poll.links.pollName=%1$s par %2$s
+pollen.ui.poll.links.register=Si vous êtes un utilisateur identifié, vous pouvez retrouver ces liens dans la page
+pollen.ui.poll.links.uriNotDefined=Page inaccessible sans identifiant du sondage dans l'url \!
+pollen.ui.poll.links.votePage=Lien d'accès publique à la page des votes \:
+pollen.ui.tooltip.help=Aide
+pollen.ui.user.create.emailFailedShowPassword=Le mot de passe généré est le suivant \: %1$s
+pollen.ui.user.create.passwordGenerated=Le mot de passe du nouvel utilisateur a été généré.
+pollen.ui.user.create.passwordHelp=Si vous précisez un email, un mot de passe sera généré et envoyé à l'utilisateur. Sinon le mot de passe sera identique au login.
+pollen.ui.user.create.passwordSameAsLogin=Le mot de passe du nouvel utilisateur est le même que son identifiant.
+pollen.ui.user.create.sendEmail=Un email a été envoyé au nouvel utilisateur %1$s à l'adresse %2$s.
+pollen.ui.user.create.success=L'utilisateur %1$s a été créé avec succès.
+pollen.ui.user.create.title=Créer un nouvel utilisateur
+pollen.ui.user.delete=Supprimer cet utilisateur
+pollen.ui.user.delete.confirmMessage=Etes-vous sûr de vouloir définitivement supprimer cet utilisateur ?
+pollen.ui.user.display.notAllowed=Vous n'avez pas les droits nécessaires pour accéder à la page %1$s.
+pollen.ui.user.display.notConnected=Vous devez vous connecter pour accéder à la page %1$s.
+pollen.ui.user.nbUsers=%1$d utilisateurs existants
+pollen.ui.user.register.autoConnection=Vous êtes maintenant connecté avec l'identifiant %1$s.
+pollen.ui.user.register.sendEmail=Un email vous a été envoyé à l'adresse %1$s.
+pollen.ui.user.update.cancel=Annuler les changements
+pollen.ui.user.update.edit=Modifier cet utilisateur
+pollen.ui.user.update.save=Enregistrer les modifications
+pollen.ui.user.update.success=Modification enregistrée avec succès.
+pollen.ui.user.validate.passwords=Les deux mots de passe ne correspondent pas.
+pollen.ui.vote.delete.confirmMessage=Etes-vous sûr de vouloir supprimer ce vote ?
+pollen.ui.vote.noPager=%1$d votes existants
+pollen.ui.vote.noVote=Aucune personne n'a encore participé au sondage
+weight-label=Poids
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationContext.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationContext.java 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationContext.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -26,6 +26,8 @@
import org.chorem.pollen.PollenConfiguration;
import org.nuiton.topia.TopiaContext;
+import java.net.URL;
+
/**
* @author tchemit <chemit(a)codelutin.com>
* @since 2.0
@@ -35,6 +37,8 @@
protected PollenConfiguration configuration;
protected TopiaContext rootContext;
+
+ protected URL applicationUrl;
public PollenConfiguration getConfiguration() {
return configuration;
@@ -52,4 +56,11 @@
this.rootContext = rootContext;
}
+ public URL getApplicationUrl() {
+ return applicationUrl;
+ }
+
+ public void setApplicationUrl(URL applicationUrl) {
+ this.applicationUrl = applicationUrl;
+ }
}
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenTopiaTransactionFilter.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenTopiaTransactionFilter.java 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenTopiaTransactionFilter.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -46,7 +46,7 @@
@Override
protected TopiaContext beginTransaction() throws TopiaRuntimeException {
PollenApplicationContext applicationContext =
- PollenActionSupport.getEchoBaseApplicationContext();
+ PollenActionSupport.getPollenApplicationContext();
TopiaContext rootContext = applicationContext.getRootContext();
try {
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenUIUtils.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenUIUtils.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenUIUtils.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,77 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui;
+
+import org.apache.struts2.ServletActionContext;
+import org.chorem.pollen.PollenTechnicalException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * Usefull ui methods.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class PollenUIUtils {
+
+ public static void redirect(String url) throws Exception {
+
+ HttpServletResponse response = ServletActionContext.getResponse();
+ HttpServletRequest request = ServletActionContext.getRequest();
+
+ String path = request.getContextPath();
+ if (!url.startsWith("/")) {
+ path += "/";
+ }
+ response.sendRedirect(path + url);
+ }
+
+ public static URL getApplicationBase(HttpServletRequest request) {
+
+ // get port
+ String port;
+ if ("http".equalsIgnoreCase(request.getScheme()) && request.getServerPort() != 80 ||
+ "https".equalsIgnoreCase(request.getScheme()) && request.getServerPort() != 443) {
+ port = ":" + request.getServerPort();
+ } else {
+ port = "";
+ }
+
+ String applicationBase = request.getScheme() + "://" + request.getServerName() +
+ port + request.getContextPath();
+ try {
+ return new URL(applicationBase);
+ } catch (MalformedURLException e) {
+ throw new PollenTechnicalException(
+ "Could not compute pollen url", e);
+ }
+ }
+
+ protected PollenUIUtils() {
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenUIUtils.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/CreatePoll.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/CreatePoll.java 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/CreatePoll.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -23,6 +23,11 @@
*/
package org.chorem.pollen.ui.actions;
+import org.chorem.pollen.entity.Poll;
+import org.chorem.pollen.entity.PollImpl;
+import org.chorem.pollen.services.PollService;
+import org.nuiton.topia.TopiaException;
+
/**
* Creates a new poll.
*
@@ -32,4 +37,36 @@
public class CreatePoll extends PollenActionSupport {
private static final long serialVersionUID = 1L;
+
+ protected Poll poll;
+
+ public String getPageLogo() {
+ return "Creation";
+ }
+
+ public Poll getPoll() {
+ if (poll == null) {
+ poll = new PollImpl();
+ }
+ return poll;
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ PollService service = newService(PollService.class);
+
+
+ try {
+ Poll basicPoll = service.createBasicPoll(poll);
+
+ return SUCCESS;
+ } catch (TopiaException e) {
+
+ }
+
+ // back to input
+ return INPUT;
+
+ }
}
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -68,6 +68,7 @@
try {
UserAccount userAccount = service.connect(login, password);
getPollenSession().setUserAccount(userAccount);
+ addActionMessage(_("pollen.information.your.are.loggued"));
return SUCCESS;
} catch (UserNotFoundException e) {
addActionError(_("pollen.error.user.bad.login.or.password"));
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManagePolls.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManagePolls.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManagePolls.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,34 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+/**
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class ManagePolls extends PollenActionSupport{
+
+ private static final long serialVersionUID = 1L;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManagePolls.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManageUsers.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManageUsers.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManageUsers.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,34 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+/**
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class ManageUsers extends PollenActionSupport{
+
+ private static final long serialVersionUID = 1L;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ManageUsers.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -27,6 +27,7 @@
import com.opensymphony.xwork2.ActionContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsStatics;
import org.chorem.pollen.PollenConfiguration;
import org.chorem.pollen.services.PollenService;
@@ -35,12 +36,14 @@
import org.chorem.pollen.services.PollenServiceFactory;
import org.chorem.pollen.ui.PollenApplicationContext;
import org.chorem.pollen.ui.PollenSession;
+import org.chorem.pollen.ui.PollenUIUtils;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.framework.TopiaTransactionAware;
import org.nuiton.web.filter.TopiaTransactionFilter;
import org.nuiton.web.struts2.BaseAction;
import javax.servlet.http.HttpServletRequest;
+import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
@@ -75,7 +78,7 @@
private SimpleDateFormat monthFormat;
- public static PollenApplicationContext getEchoBaseApplicationContext() {
+ public static PollenApplicationContext getPollenApplicationContext() {
Map<String, Object> application = getActionContext().getApplication();
PollenApplicationContext applicationContext =
(PollenApplicationContext) application.get(APPLICATION_CONTEXT_PARAMETER);
@@ -83,7 +86,7 @@
}
public PollenConfiguration getConfiguration() {
- return getEchoBaseApplicationContext().getConfiguration();
+ return getPollenApplicationContext().getConfiguration();
}
/** Pollen User session. */
@@ -128,9 +131,23 @@
}
public static String getApplicationVersion() {
- return getEchoBaseApplicationContext().getConfiguration().getVersion().toString();
+ return getPollenApplicationContext().getConfiguration().getVersion().toString();
}
+ public URL getApplicationUrl() {
+ URL url = getPollenApplicationContext().getApplicationUrl();
+ if (url == null) {
+
+ // first time asking this, let's compute it
+ url = PollenUIUtils.getApplicationBase(ServletActionContext.getRequest());
+ if (log.isInfoEnabled()) {
+ log.info("Pollen application url : " + url);
+ }
+ getPollenApplicationContext().setApplicationUrl(url);
+ }
+ return url;
+ }
+
/**
* Fabrique pour récupérer le ServiceContext tel qu'il devrait être fourni
* à la fabrication d'un service.
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -68,7 +68,7 @@
UserService service = newService(UserService.class);
try {
- UserAccount createdUser = service.createUser(user);
+ UserAccount createdUser = service.createUser(user, getApplicationUrl());
getTransaction().commitTransaction();
getPollenSession().setUserAccount(createdUser);
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/AbstractJSONPaginedAction.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/AbstractJSONPaginedAction.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/AbstractJSONPaginedAction.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,119 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions.json;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.struts2.json.JSONException;
+import org.apache.struts2.json.JSONUtil;
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+import org.nuiton.util.PagerUtil;
+
+/**
+ * Abstract JSON action with pagination support.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public abstract class AbstractJSONPaginedAction extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ public abstract Integer getRows();
+
+ public abstract Integer getPage();
+
+ public abstract Integer getTotal();
+
+ public abstract Integer getRecords();
+
+ protected PagerUtil.PagerBean pager = PagerUtil.newPagerBean();
+
+ // sorting order - asc or desc
+ protected String sord;
+
+ // get index row - i.e. user click to sort.
+ protected String sidx;
+
+ protected String filters;
+
+ public void setRows(Integer rows) {
+ pager.setPageSize(rows);
+ }
+
+ public void setPage(Integer page) {
+ pager.setPageIndex(page);
+ }
+
+ public String getSord() {
+ return sord;
+ }
+
+ public void setSord(String sord) {
+ this.sord = sord;
+ }
+
+ public String getSidx() {
+ return sidx;
+ }
+
+ public void setSidx(String sidx) {
+ this.sidx = sidx;
+ }
+
+ public String getFilters() {
+ return filters;
+ }
+
+ public void setFilters(String filters) {
+ this.filters = filters;
+ }
+
+ protected String getSortColumn() {
+ String result = null;
+ if (useSort()) {
+ result = sidx;
+ }
+ return result;
+ }
+
+ protected Boolean isSortAscendant() {
+ Boolean result = null;
+ if (useSort()) {
+ result = "asc".equals(sord);
+ }
+ return result;
+ }
+
+ protected boolean useSort() {
+ return StringUtils.isNotEmpty(sidx);
+ }
+
+ protected Object getFilterObject() throws JSONException {
+ Object filterObject = null;
+ if (StringUtils.isNotEmpty(filters)) {
+ filterObject = JSONUtil.deserialize(filters);
+ }
+ return filterObject;
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/AbstractJSONPaginedAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,89 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions.json;
+
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.services.UserService;
+import org.nuiton.util.beans.Binder;
+import org.nuiton.util.beans.BinderFactory;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Obtain paginated users.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class GetPolls extends AbstractJSONPaginedAction {
+
+ private static final long serialVersionUID = 1L;
+
+ protected transient Map<String, Object>[] polls;
+
+ public Map<String, Object>[] getPolls() {
+ return polls;
+ }
+
+ @Override
+ public Integer getRows() {
+ return pager.getPageSize();
+ }
+
+ @Override
+ public Integer getPage() {
+ return pager.getPageIndex();
+ }
+
+ @Override
+ public Integer getTotal() {
+ return pager.getPagesNumber();
+ }
+
+ @Override
+ public Integer getRecords() {
+ return pager.getRecords();
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ UserService userService = newService(UserService.class);
+
+ List<UserAccount> allUsers = userService.getUsers(pager);
+
+ polls = new Map[allUsers.size()];
+ Binder<UserAccount, UserAccount> binder =
+ BinderFactory.newBinder(UserAccount.class);
+ int index = 0;
+ for (UserAccount user : allUsers) {
+ Map<String, Object> map = binder.obtainProperties(user);
+ map.put("id", user.getTopiaId());
+ polls[index++] = map;
+ }
+
+ return SUCCESS;
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetPolls.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetUsers.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetUsers.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetUsers.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,89 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions.json;
+
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.services.UserService;
+import org.nuiton.util.beans.Binder;
+import org.nuiton.util.beans.BinderFactory;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Obtain paginated users.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class GetUsers extends AbstractJSONPaginedAction {
+
+ private static final long serialVersionUID = 1L;
+
+ protected transient Map<String, Object>[] users;
+
+ public Map<String, Object>[] getUsers() {
+ return users;
+ }
+
+ @Override
+ public Integer getRows() {
+ return pager.getPageSize();
+ }
+
+ @Override
+ public Integer getPage() {
+ return pager.getPageIndex();
+ }
+
+ @Override
+ public Integer getTotal() {
+ return pager.getPagesNumber();
+ }
+
+ @Override
+ public Integer getRecords() {
+ return pager.getRecords();
+ }
+
+ @Override
+ public String execute() throws Exception {
+
+ UserService userService = newService(UserService.class);
+
+ List<UserAccount> allUsers = userService.getUsers(pager);
+
+ users = new Map[allUsers.size()];
+ Binder<UserAccount, UserAccount> binder =
+ BinderFactory.newBinder(UserAccount.class);
+ int index = 0;
+ for (UserAccount user : allUsers) {
+ Map<String, Object> map = binder.obtainProperties(user);
+ map.put("id", user.getTopiaId());
+ users[index++] = map;
+ }
+
+ return SUCCESS;
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/json/GetUsers.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/AbstractCheckInterceptor.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/AbstractCheckInterceptor.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/AbstractCheckInterceptor.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,94 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.interceptors;
+
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.ServletActionContext;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Abstract check interceptor.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public abstract class AbstractCheckInterceptor extends AbstractInterceptor {
+
+ private static final long serialVersionUID = -7169251953113201351L;
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(AbstractCheckInterceptor.class);
+
+ /** Where to redirect where user is loggued */
+ protected String redirectAction;
+
+ public void setRedirectAction(String redirectAction) {
+ this.redirectAction = redirectAction;
+ }
+
+ protected abstract boolean doCheck(ActionInvocation invocation);
+
+ @Override
+ public String intercept(ActionInvocation invocation) throws Exception {
+
+ boolean check = doCheck(invocation);
+
+ if (!check) {
+
+ String redirectUrl = getRedirectUrl();
+ if (log.isInfoEnabled()) {
+ log.info("Will redirect to " + redirectUrl);
+ }
+ redirect(redirectUrl);
+
+ return null;
+ }
+
+ String result = invocation.invoke();
+ return result;
+ }
+
+ protected String getRedirectUrl() {
+ return redirectAction;
+ }
+
+ protected void redirect(String url) throws Exception {
+
+ HttpServletResponse response = ServletActionContext.getResponse();
+ HttpServletRequest request = ServletActionContext.getRequest();
+
+ String path = request.getContextPath();
+ if (!url.startsWith("/")) {
+ path += "/";
+ }
+ response.sendRedirect(path + url);
+ }
+
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/AbstractCheckInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsAdmin.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsAdmin.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsAdmin.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,53 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.interceptors;
+
+import com.google.common.base.Preconditions;
+import com.opensymphony.xwork2.ActionInvocation;
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.ui.PollenSession;
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+
+/**
+ * To check if logged user is admin.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class CheckUserIsAdmin extends AbstractCheckInterceptor {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected boolean doCheck(ActionInvocation invocation) {
+ PollenActionSupport action = (PollenActionSupport) invocation.getAction();
+
+ PollenSession echoBaseSession = action.getPollenSession();
+
+ UserAccount user = echoBaseSession.getUserAccount();
+ Preconditions.checkNotNull(user, "No user found is session");
+
+ return user.isAdmin();
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsAdmin.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsLogguedInterceptor.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsLogguedInterceptor.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsLogguedInterceptor.java 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,98 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.interceptors;
+
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.ui.PollenSession;
+import org.chorem.pollen.ui.PollenUIUtils;
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+
+/**
+ * To check user is loggued. If not, then redirect to the {@link #loginAction}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 0.1
+ */
+public class CheckUserIsLogguedInterceptor extends AbstractInterceptor {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(CheckUserIsLogguedInterceptor.class);
+
+ /** Where to redirect if user is not authenticated. */
+ protected String loginAction;
+
+ /** Where to redirect where user is loggued */
+ protected String redirectAction;
+
+ public void setLoginAction(String loginAction) {
+ this.loginAction = loginAction;
+ }
+
+ public void setRedirectAction(String redirectAction) {
+ this.redirectAction = redirectAction;
+ }
+
+ protected static final String URL_PATTERN = "%s?redirectAction=%s";
+
+ @Override
+ public String intercept(ActionInvocation invocation) throws Exception {
+
+ PollenActionSupport action = (PollenActionSupport) invocation.getAction();
+
+ PollenSession echoBaseSession = action.getPollenSession();
+ boolean userLoggued = echoBaseSession.getUserAccount() != null;
+
+ if (!userLoggued && log.isInfoEnabled()) {
+ log.info("No user loggued!");
+ }
+
+ if (!userLoggued) {
+
+ // redirect to login
+
+ String url = String.format(URL_PATTERN,
+ loginAction,
+ redirectAction
+ );
+ if (log.isInfoEnabled()) {
+ log.info("Will redirect to " + url);
+ }
+ PollenUIUtils.redirect(url);
+
+ return null;
+ }
+
+ // let's continue
+ String result = invocation.invoke();
+ return result;
+ }
+
+
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/interceptors/CheckUserIsLogguedInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-admin.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-admin.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-admin.xml 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+
+
+<!DOCTYPE struts PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+ "http://struts.apache.org/dtds/struts-2.1.7.dtd">
+
+<struts>
+
+ <package name="admin" extends="default" namespace="/admin">
+
+ <default-interceptor-ref name="pollenBasicAdminStack"/>
+
+ <!-- add interceptor to be connected -->
+ <!-- add interceptor to be admin -->
+
+ <!-- manage users -->
+ <action name="usersList" method="input"
+ class="org.chorem.pollen.ui.actions.ManageUsers">
+ <interceptor-ref name="pollenBasicAdminStack"/>
+ <result name="input">/WEB-INF/jsp/usersList.jsp</result>
+ </action>
+
+ <!-- manage polls -->
+ <action name="pollsList" method="input"
+ class="org.chorem.pollen.ui.actions.ManagePolls">
+ <interceptor-ref name="pollenBasicAdminStack"/>
+ <result name="input">/WEB-INF/jsp/pollsList.jsp</result>
+ </action>
+
+ </package>
+
+
+</struts>
+
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-admin.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-json.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-json.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-json.xml 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+
+
+<!DOCTYPE struts PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+ "http://struts.apache.org/dtds/struts-2.1.7.dtd">
+
+<struts>
+
+ <package name="json" extends="default" namespace="/json">
+
+ <!-- get pagined users -->
+ <action name="getUsers"
+ class="org.chorem.pollen.ui.actions.json.GetUsers">
+ <interceptor-ref name="pollenBasicLogguedStack"/>
+ <result type="json"/>
+ </action>
+
+ <!-- get pagined polls -->
+ <action name="getPolls"
+ class="org.chorem.pollen.ui.actions.json.GetPolls">
+ <interceptor-ref name="pollenBasicLogguedStack"/>
+ <result type="json"/>
+ </action>
+
+ </package>
+
+</struts>
+
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-json.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-poll.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-poll.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-poll.xml 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+
+
+<!DOCTYPE struts PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+ "http://struts.apache.org/dtds/struts-2.1.7.dtd">
+
+<struts>
+
+ <package name="poll" extends="default" namespace="/poll">
+
+
+ <!-- create poll -->
+ <action name="createPoll"
+ class="org.chorem.pollen.ui.actions.CreatePoll">
+ <result name="input">/WEB-INF/jsp/createPoll.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- display poll -->
+ <action name="displayPoll"
+ class="org.chorem.pollen.ui.actions.DisplayPoll">
+ <result name="input">/WEB-INF/jsp/poll.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- display poll result -->
+ <action name="displayPollResult"
+ class="org.chorem.pollen.ui.actions.DisplayPollResult">
+ <result name="input">/WEB-INF/jsp/pollResult.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- display createds polls -->
+ <action name="displayCreatedPolls"
+ class="org.chorem.pollen.ui.actions.DisplayCreatedPolls">
+ <result name="input">/WEB-INF/jsp/createdPolls.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- display participated polls -->
+ <action name="displayParticipatedPolls"
+ class="org.chorem.pollen.ui.actions.DisplayParticipatedPolls">
+ <result name="input">/WEB-INF/jsp/participatedPolls.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+
+ </package>
+
+
+</struts>
+
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-poll.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-user.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-user.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-user.xml 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+
+
+<!DOCTYPE struts PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+ "http://struts.apache.org/dtds/struts-2.1.7.dtd">
+
+<struts>
+
+ <package name="user" extends="default" namespace="/user">
+
+ <!-- login -->
+ <action name="login" class="org.chorem.pollen.ui.actions.Login">
+ <result name="error">/WEB-INF/jsp/home.jsp</result>
+ <result type="redirectToHome"/>
+ </action>
+
+ <!-- register user -->
+ <action name="registerUser"
+ class="org.chorem.pollen.ui.actions.RegisterUser">
+ <result name="input">/WEB-INF/jsp/registerUser.jsp</result>
+ <result type="redirectToHome"/>
+ </action>
+
+ <!-- show user account -->
+ <action name="showUser"
+ class="org.chorem.pollen.ui.actions.ShowUser">
+ <result>/WEB-INF/jsp/showUser.jsp</result>
+ </action>
+
+ <!-- modify user account -->
+ <action name="updateUser"
+ class="org.chorem.pollen.ui.actions.UpdateUser">
+ <result name="input">/WEB-INF/jsp/updateUser.jsp</result>
+ <result type="redirectAction">
+ <param name="actionName">showUser</param>
+ <param name="namespace">/user</param>
+ </result>
+ </action>
+
+ <!-- logout -->
+ <action name="logout" class="org.chorem.pollen.ui.actions.Logout">
+ <result type="redirectToHome"/>
+ </action>
+
+ </package>
+
+
+</struts>
+
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/config/struts-user.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-01-23 10:32:33 UTC (rev 3101)
@@ -2,6 +2,7 @@
pollen.action.modify=Modify
pollen.action.register=Register
pollen.action.validate=Submit
+pollen.common.admin=Admin
pollen.common.bugReport=Bug report
pollen.common.email=Em@il
pollen.common.firstName=First name
@@ -24,7 +25,10 @@
pollen.error.user.invalid.password=
pollen.error.user.login.already.used=This login is already used
pollen.fieldset.connexionInformation=Information de connexion
+pollen.fieldset.login=Login
pollen.fieldset.userInformation=Informations de l'utilisateur
+pollen.information.need.login=You must be logged to access this page. Please fill the form below.
+pollen.information.your.are.loggued=You are logged.
pollen.label.contact.administrator=Send an email to an administrator
pollen.legend.login=Login
pollen.menu.admin=Administration
@@ -40,6 +44,8 @@
pollen.menu.polls=Polls
pollen.menu.preferences=My account
pollen.menu.register=Register
-pollen.title.login=Page de login
+pollen.title.createPoll=Nouveau sondage
pollen.title.myAccount=My account
+pollen.title.pollsList=Polls administration
pollen.title.register=Register
+pollen.title.usersList=Gestion des utilisateurs
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-01-23 10:32:33 UTC (rev 3101)
@@ -2,6 +2,7 @@
pollen.action.modify=Modifier
pollen.action.register=S'enregistrer
pollen.action.validate=Valider
+pollen.common.admin=Admin
pollen.common.bugReport=Rapport de bug
pollen.common.email=Em@il
pollen.common.firstName=Prénom
@@ -24,11 +25,14 @@
pollen.error.user.invalid.password=
pollen.error.user.login.already.used=Le login saisie est déjà utilisé par un autre utilisateur
pollen.fieldset.connexionInformation=Information de connexion
+pollen.fieldset.login=Connexion
pollen.fieldset.userInformation=Informations de l'utilisateur
+pollen.information.need.login=Vous devez être identifié pour pouvoir accéder à cette page. Veuillez remplir le formulaire ci-dessous.
+pollen.information.your.are.loggued=Vous êtes connecté.
pollen.label.contact.administrator=Contacter un administrateur
pollen.legend.login=Login
pollen.menu.admin=Administration
-pollen.menu.createPoll=Créer une sondage
+pollen.menu.createPoll=Créer un sondage
pollen.menu.displayCreatedPolls=Sondages créés
pollen.menu.displayParticipatedPolls=Sondages participés
pollen.menu.displayVotingLists=Listes de votants
@@ -40,6 +44,8 @@
pollen.menu.polls=Sondages
pollen.menu.preferences=Mon compte
pollen.menu.register=Inscrivez-vous
-pollen.title.login=Page de login
+pollen.title.createPoll=Nouveau sondage
pollen.title.myAccount=Mon compte
+pollen.title.pollsList=Liste des sondages
pollen.title.register=S'enregistrer
+pollen.title.usersList=Gestion des utilisateurs
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml 2012-01-23 10:32:33 UTC (rev 3101)
@@ -47,140 +47,123 @@
<!--see http://struts.apache.org/2.2.3/docs/performance-tuning.html-->
<constant name="struts.freemarker.templatesCache" value="true"/>
- <package name="default" extends="json-default" abstract="true" namespace="/">
+ <package name="default" extends="json-default" namespace="/">
+ <result-types>
+ <result-type name="redirectToHome"
+ class="org.apache.struts2.dispatcher.ServletActionRedirectResult">
+ <param name="namespace">/</param>
+ <param name="actionName">home</param>
+ </result-type>
+ </result-types>
+
<interceptors>
<!-- to remove parameter from context -->
<interceptor name="paramRemover"
class="com.opensymphony.xwork2.interceptor.ParameterRemoverInterceptor"/>
+ <interceptor name="checkUserLoggued"
+ class="org.chorem.pollen.ui.interceptors.CheckUserIsLogguedInterceptor">
+ <param name="loginAction">/notLoggued</param>
+ <param name="redirectAction">/home</param>
+ </interceptor>
+ <interceptor name="checkUserAdmin"
+ class="org.chorem.pollen.ui.interceptors.CheckUserIsAdmin">
+ <param name="loginAction">/notAdmin</param>
+ <param name="redirectAction">/home</param>
+ </interceptor>
+
<!-- basic stack -->
<interceptor-stack name="pollenBasicStack">
<interceptor-ref name="i18n"/>
<interceptor-ref name="basicStack"/>
+ <interceptor-ref name="store">
+ <param name="operationMode">STORE</param>
+ </interceptor-ref>
</interceptor-stack>
+ <interceptor-stack name="pollenBasicLogguedStack">
+ <interceptor-ref name="checkUserLoggued"/>
+ <interceptor-ref name="pollenBasicStack"/>
+ </interceptor-stack>
+
+ <interceptor-stack name="pollenBasicAdminStack">
+ <interceptor-ref name="checkUserLoggued"/>
+ <interceptor-ref name="checkUserAdmin"/>
+ <interceptor-ref name="pollenBasicStack"/>
+ </interceptor-stack>
+
<!-- params stack with params-->
<interceptor-stack name="pollenParamsPrepareParamsStack">
<interceptor-ref name="i18n"/>
<interceptor-ref name="paramsPrepareParamsStack"/>
</interceptor-stack>
+ <interceptor-stack name="pollenParamsPrepareParamsLogguedStack">
+ <interceptor-ref name="checkUserLoggued"/>
+ <interceptor-ref name="pollenParamsPrepareParamsStack"/>
+ </interceptor-stack>
+ <interceptor-stack name="pollenParamsPrepareParamsAdminStack">
+ <interceptor-ref name="checkUserLoggued"/>
+ <interceptor-ref name="checkUserAdmin"/>
+ <interceptor-ref name="pollenParamsPrepareParamsStack"/>
+ </interceptor-stack>
+
</interceptors>
+
<!-- must be authenticated to perform any actions -->
- <default-interceptor-ref name="pollenBasicStack"/>
+ <default-interceptor-ref name="pollenParamsPrepareParamsStack"/>
+ <default-action-ref name="home"/>
+
<!-- default action to use everywhere (fix i18n when not translated) -->
<default-class-ref
class="org.chorem.pollen.ui.actions.PollenActionSupport"/>
- </package>
+ <action name="notLoggued">
+ <result>/WEB-INF/jsp/login.jsp</result>
+ </action>
- <package name="applicationDefault" extends="default" namespace="/">
+ <action name="notAdmin">
+ <result>/WEB-INF/jsp/adminRequired.jsp</result>
+ </action>
- <default-interceptor-ref name="pollenParamsPrepareParamsStack"/>
-
- <default-action-ref name="home"/>
-
-
<!-- go to home -->
<action name="home"
class="org.chorem.pollen.ui.actions.PollenActionSupport">
-
<result>/WEB-INF/jsp/home.jsp</result>
-
- <!--<interceptor-ref name="i18nStack"/>-->
- <!--<!– remove the request_locale parameter from request –>-->
- <!--<interceptor-ref name="paramRemover">-->
- <!--<param name="paramNames">request_locale</param>-->
- <!--</interceptor-ref>-->
+ <interceptor-ref name="store">
+ <param name="operationMode">RETRIEVE</param>
+ </interceptor-ref>
</action>
<!-- change lang-->
<action name="changeLang"
class="org.chorem.pollen.ui.actions.PollenActionSupport">
- <result type="redirectAction">home</result>
+ <result type="redirectToHome"/>
<interceptor-ref name="i18nStack"/>
<!-- remove the request_locale parameter from request -->
<interceptor-ref name="paramRemover">
<param name="paramNames">request_locale</param>
</interceptor-ref>
+ <interceptor-ref name="store">
+ <param name="operationMode">STORE</param>
+ </interceptor-ref>
</action>
- <!-- login -->
- <action name="login" class="org.chorem.pollen.ui.actions.Login">
- <result name="error">/WEB-INF/jsp/home.jsp</result>
- <result type="redirectAction">home</result>
- </action>
-
- <!-- register user -->
- <action name="registerUser"
- class="org.chorem.pollen.ui.actions.RegisterUser">
- <result name="input">/WEB-INF/jsp/registerUser.jsp</result>
- <result type="redirectAction">home</result>
- </action>
-
- <!-- show user account -->
- <action name="showUser"
- class="org.chorem.pollen.ui.actions.ShowUser">
- <result>/WEB-INF/jsp/showUser.jsp</result>
- </action>
-
- <!-- modify user account -->
- <action name="updateUser"
- class="org.chorem.pollen.ui.actions.UpdateUser">
- <result name="input">/WEB-INF/jsp/updateUser.jsp</result>
- <result type="redirectAction">showUser</result>
- </action>
-
- <!-- logout -->
- <action name="logout" class="org.chorem.pollen.ui.actions.Logout">
- <result>/WEB-INF/jsp/home.jsp</result>
- </action>
-
- <!-- create poll -->
- <action name="createPoll"
- class="org.chorem.pollen.ui.actions.CreatePoll">
- <result name="input">/WEB-INF/jsp/createPoll.jsp</result>
- <result>/WEB-INF/jsp/home.jsp</result>
- </action>
-
- <!-- display poll -->
- <action name="displayPoll"
- class="org.chorem.pollen.ui.actions.DisplayPoll">
- <result name="input">/WEB-INF/jsp/poll.jsp</result>
- <result>/WEB-INF/jsp/home.jsp</result>
- </action>
-
- <!-- display poll result -->
- <action name="displayPollResult"
- class="org.chorem.pollen.ui.actions.DisplayPollResult">
- <result name="input">/WEB-INF/jsp/pollResult.jsp</result>
- <result>/WEB-INF/jsp/home.jsp</result>
- </action>
-
- <!-- display createds polls -->
- <action name="displayCreatedPolls"
- class="org.chorem.pollen.ui.actions.DisplayCreatedPolls">
- <result name="input">/WEB-INF/jsp/createdPolls.jsp</result>
- <result>/WEB-INF/jsp/home.jsp</result>
- </action>
-
- <!-- display participated polls -->
- <action name="displayParticipatedPolls"
- class="org.chorem.pollen.ui.actions.DisplayParticipatedPolls">
- <result name="input">/WEB-INF/jsp/participatedPolls.jsp</result>
- <result>/WEB-INF/jsp/home.jsp</result>
- </action>
-
</package>
+ <include file="config/struts-json.xml"/>
+ <include file="config/struts-admin.xml"/>
+ <include file="config/struts-poll.xml"/>
+ <include file="config/struts-user.xml"/>
+
</struts>
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/template/css_xhtml/checkbox.ftl
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/template/css_xhtml/checkbox.ftl (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/template/css_xhtml/checkbox.ftl 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,109 @@
+<#--
+ #%L
+ EchoBase :: UI
+
+ $Id: checkbox.ftl 80 2011-11-14 15:09:26Z tchemit $
+ $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+-->
+<#--
+NOTE: The 'header' stuff that follows is in this one file for checkbox due to the fact
+that for checkboxes we do not want the label field to show up as checkboxes handle their own
+lables
+-->
+<#assign hasFieldErrors = fieldErrors?? && fieldErrors[parameters.name]??/>
+<div <#rt/><#if parameters.id??>id="wwgrp_${parameters.id}"<#rt/></#if> class="wwgrp">
+
+<#if hasFieldErrors>
+<div <#rt/><#if parameters.id??>id="wwerr_${parameters.id}"<#rt/></#if> class="wwerr">
+<#list fieldErrors[parameters.name] as error>
+ <div<#rt/>
+ <#if parameters.id??>
+ errorFor="${parameters.id}"<#rt/>
+ </#if>
+ class="errorMessage">
+ ${error?html}
+ </div><#t/>
+</#list>
+</div><#t/>
+</#if>
+<#if parameters.labelposition?default("left") == 'left'>
+<span <#rt/>
+<#if parameters.id??>id="wwlbl_${parameters.id}"<#rt/></#if> class="wwlbl">
+<label<#t/>
+<#if parameters.id??>
+ for="${parameters.id?html}"<#rt/>
+</#if>
+<#if hasFieldErrors>
+ class="checkboxErrorLabel"<#rt/>
+<#else>
+ class="label"<#rt/>
+</#if>
+>${parameters.label?html}
+<#if parameters.tooltip??>
+ <#include "/${parameters.templateDir}/xhtml/tooltip.ftl" />
+</#if>
+</label><#rt/>
+</span>
+</#if>
+
+<#if parameters.labelposition?default("left") == 'top'>
+<div <#rt/>
+<#else>
+<span <#rt/>
+</#if>
+<#if parameters.id??>id="wwctrl_${parameters.id}"<#rt/></#if> class="wwctrl">
+
+<#if parameters.required?default(false)>
+ <span class="required">*</span><#t/>
+</#if>
+
+<#include "/${parameters.templateDir}/simple/checkbox.ftl" />
+<#if parameters.labelposition?default("left") != 'left'>
+<#if parameters.labelposition?default("left") == 'top'>
+</div> <#rt/>
+<#else>
+</span> <#rt/>
+</#if>
+<#if parameters.label??>
+<#if parameters.labelposition?default("left") == 'top'>
+<div <#rt/>
+<#else>
+<span <#rt/>
+</#if>
+<#if parameters.id??>id="wwlbl_${parameters.id}"<#rt/></#if> class="wwlbl">
+<label<#t/>
+<#if parameters.id??>
+ for="${parameters.id?html}"<#rt/>
+</#if>
+<#if hasFieldErrors>
+ class="checkboxErrorLabel"<#rt/>
+<#else>
+ class="checkboxLabel"<#rt/>
+</#if>
+>${parameters.label?html}</label><#rt/>
+</#if>
+</#if>
+<#if parameters.label??>
+<#if parameters.labelposition?default("left") == 'top'>
+</div> <#rt/>
+<#else>
+</span> <#rt/>
+</#if>
+</#if>
+</div>
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/template/css_xhtml/controlheader-core.ftl
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/template/css_xhtml/controlheader-core.ftl (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/template/css_xhtml/controlheader-core.ftl 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,74 @@
+<#--
+ #%L
+ EchoBase :: UI
+
+ $Id: controlheader-core.ftl 80 2011-11-14 15:09:26Z tchemit $
+ $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-ui/src/main/reso… $
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+-->
+<#--
+ Only show message if errors are available.
+ This will be done if ActionSupport is used.
+-->
+<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors[parameters.name]??/>
+<div <#rt/><#if parameters.id??>id="wwgrp_${parameters.id}"<#rt/></#if> class="wwgrp">
+
+<#if hasFieldErrors>
+<div <#rt/><#if parameters.id??>id="wwerr_${parameters.id}"<#rt/></#if> class="wwerr">
+<#list fieldErrors[parameters.name] as error>
+ <div<#rt/>
+ <#if parameters.id??>
+ errorFor="${parameters.id}"<#rt/>
+ </#if>
+ class="errorMessage">
+ ${error?html}
+ </div><#t/>
+</#list>
+</div><#t/>
+</#if>
+
+<#if parameters.label??>
+<#if parameters.labelposition?default("top") == 'top'>
+<div <#rt/>
+<#else>
+<span <#rt/>
+</#if>
+<#if parameters.id??>id="wwlbl_${parameters.id}"<#rt/></#if> class="wwlbl">
+ <label <#t/>
+<#if parameters.id??>
+ for="${parameters.id?html}" <#t/>
+</#if>
+<#if hasFieldErrors>
+ class="errorLabel"<#t/>
+<#else>
+ class="label"<#t/>
+</#if>
+ ><#t/>
+
+ ${parameters.label?html} ${parameters.labelseparator!":"?html}
+<#if parameters.required?default(false)>
+ <span class="required">*</span><#t/>
+</#if>
+<#include "/${parameters.templateDir}/xhtml/tooltip.ftl" />
+ </label><#t/>
+<#if parameters.labelposition?default("top") == 'top'>
+</div> <#rt/>
+<#else>
+</span> <#rt/>
+</#if>
+</#if>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-23 10:32:33 UTC (rev 3101)
@@ -65,7 +65,7 @@
<!-- Entête de la page -->
<p id="po-header-logo">
- <s:a action="home">
+ <s:a action="home" namespace="/">
<img src="<s:url value='/img/pollen%{pageLogo}_%{safeLanguage}.png' />"
alt="Pollen"/>
</s:a>
@@ -102,7 +102,7 @@
<div class="dropdown_menu" id="login_menu" style="display: none;">
<div class="top_right${pageLogo}"></div>
<div class="top_left${pageLogo}"></div>
- <s:form id="connection" action="login" method="POST">
+ <s:form id="connection" action="login" method="POST" namespace="/user">
<ul class="top_middle${pageLogo}">
<li>
<label for="connection_login">
@@ -126,7 +126,7 @@
</s:form>
</div>
<s:text name="pollen.common.or"/>
- <s:a action="registerUser" method="input">
+ <s:a action="registerUser" method="input" namespace="/user">
<s:text name="pollen.menu.register"/>
</s:a>
</s:else>
@@ -149,23 +149,23 @@
<div class="top_left${pageLogo}"></div>
<ul class="top_middle${pageLogo}">
<li>
- <s:a action="createPoll" method="input">
+ <s:a action="createPoll" method="input" namespace="/poll">
<s:text name="pollen.menu.createPoll"/>
</s:a>
</li>
<s:if test="userExists">
<li>
- <s:a action="displayCreatedPolls" method="input">
+ <s:a action="displayCreatedPolls" method="input" namespace="/poll">
<s:text name="pollen.menu.displayCreatedPolls"/>
</s:a>
</li>
<li>
- <s:a action="displayParticipatedPolls" method="input">
+ <s:a action="displayParticipatedPolls" method="input" namespace="/poll">
<s:text name="pollen.menu.displayParticipatedPolls"/>
</s:a>
</li>
<li>
- <s:a action="displayVotingLists" method="input">
+ <s:a action="displayVotingLists" method="input" namespace="/user">
<s:text name="pollen.menu.displayVotingLists"/>
</s:a>
</li>
@@ -184,12 +184,12 @@
<div class="top_left${pageLogo}"></div>
<ul class="top_middle${pageLogo}">
<li>
- <s:a action="managePolls" method="input">
+ <s:a action="pollsList" namespace="/admin">
<s:text name="pollen.menu.managePolls"/>
</s:a>
</li>
<li>
- <s:a action="manageUsers" method="input">
+ <s:a action="usersList" namespace="/admin">
<s:text name="pollen.menu.manageUsers"/>
</s:a>
</li>
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/adminRequired.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/adminRequired.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/adminRequired.jsp 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,32 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+
+<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<br/>
+
+<div>
+ La page demandé n'est accessible que par un administrateur.
+</div>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/adminRequired.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/createPoll.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/createPoll.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/createPoll.jsp 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,50 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="pollen.title.createPoll"/></title>
+
+<h1 class="title${pageLogo}"><s:text name="pollen.title.createPoll"/></h1>
+
+<s:form method="POST" key="registerForm">
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.connexionInformation"/></legend>
+
+ <s:textfield name="user.login" key="pollen.common.login" required="true"/>
+ <s:password name="user.password" key="pollen.common.password" required="true"/>
+ <s:password name="password2" key="pollen.common.password2" required="true"/>
+ </fieldset>
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.userInformation"/></legend>
+
+ <s:textfield name="user.email" key="pollen.common.email" required="true"/>
+ <s:textfield name="user.firstName" key="pollen.common.firstName"/>
+ <s:textfield name="user.lastName" key="pollen.common.lastName"/>
+ </fieldset>
+ <br/>
+ <s:submit action="registerUser" key="pollen.action.register" align="center"/>
+</s:form>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/createPoll.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp 2012-01-23 10:32:33 UTC (rev 3101)
@@ -31,13 +31,13 @@
</div>
<div class="center">
- <s:a action="createForm">
+ <s:a action="createPoll" namespace="/poll">
<img src="<s:url value='/img/smallCreation_%{safeLanguage}.png' />" alt="poll creation"/>
</s:a>
- <s:a action="createForm">
+ <s:a action="createForm" namespace="/poll">
<img src="<s:url value='/img/smallVote_%{safeLanguage}.png' />" alt="vote"/>
</s:a>
- <s:a action="createForm">
+ <s:a action="createForm" namespace="/poll">
<img src="<s:url value='/img/smallVoteCounting_%{safeLanguage}.png' />" alt="voteCounting"/>
</s:a>
</div>
\ No newline at end of file
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,69 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+
+<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<div>
+ <strong>
+ <s:text name="pollen.information.need.login"/>
+ </strong>
+</div>
+
+<br/>
+
+<s:form id="connection" action="login" method="POST" namespace="/user">
+
+<fieldset>
+ <legend><s:text name="pollen.fieldset.login"/></legend>
+
+ <s:textfield key="login" size="10" label="%{getText('pollen.common.login')}"
+ required="true"/>
+ <s:password key="password"
+ label="%{getText('pollen.common.password')}" size="10"
+ required="true"/>
+
+
+</fieldset>
+ <br/>
+ <s:submit id="submitform" action="login" key="pollen.action.login"
+ align="center"/>
+ </s:form>
+<div class="center" style="margin-bottom:20px;">
+ <img src="<s:url value='/img/pollen_%{safeLanguage}.png' />"
+ alt="Pollen logo"/>
+</div>
+<div class="center">
+ <s:a action="createForm">
+ <img src="<s:url value='/img/smallCreation_%{safeLanguage}.png' />"
+ alt="poll creation"/>
+ </s:a>
+ <s:a action="createForm">
+ <img src="<s:url value='/img/smallVote_%{safeLanguage}.png' />" alt="vote"/>
+ </s:a>
+ <s:a action="createForm">
+ <img src="<s:url value='/img/smallVoteCounting_%{safeLanguage}.png' />"
+ alt="voteCounting"/>
+ </s:a>
+</div>
\ No newline at end of file
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollsList.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollsList.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollsList.jsp 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,61 @@
+<%--
+#%L
+ EchoBase :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+--%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags" %>
+<script type="text/javascript"
+ src="<s:url value='/js/gridHelper.js' />"></script>
+
+<title><s:text name="pollen.title.pollsList"/></title>
+
+<h1 class="title${pageLogo}"><s:text name="pollen.title.pollsList"/></h1>
+
+<s:url id="loadUrl" action="getPolls" namespace="/json" escapeAmp="false"/>
+
+<%--script type="text/javascript">
+
+ jQuery(document).ready(function () {
+ $.addRowSelectTopic('users');
+ $.addClearSelectTopic('users');
+ $.addAddRowTopic('users', '${addUrl}');
+ $.addSingleRowTopic('users', 'Update', '${editUrl}', 'user.id');
+ $.addSingleRowTopic('users', 'Delete', '${delUrl}', 'user.id');
+ });
+</script--%>
+
+<sjg:grid id="users" dataType="json" href="%{loadUrl}" gridModel="users"
+ pager="true" pagerButtons="true" pagerInput="true"
+ navigator="true" rownumbers="false" autowidth="true"
+ onSelectRowTopics='users-rowSelect' editinline="true" editurl="%{loadUrl}"
+ onCompleteTopics='users-cleanSelect'
+ navigatorEdit="false" navigatorDelete="false"
+ navigatorSearch="false" navigatorRefresh="false"
+ navigatorAdd="false" viewrecords="true"
+ rowList="10,15,20,50,100" rowNum="10">
+ <sjg:gridColumn name="id" title="id" hidden="true"/>
+ <sjg:gridColumn name="login" title='%{getText("pollen.common.login")}' sortable="false" editable="true"/>
+ <sjg:gridColumn name="firstName" title='%{getText("pollen.common.firstName")}' sortable="false" editable="true"/>
+ <sjg:gridColumn name="lastName" title='%{getText("pollen.common.lastName")}' sortable="false" editable="true"/>
+ <sjg:gridColumn name="email" title='%{getText("pollen.common.email")}' sortable="false" editable="true"/>
+ <sjg:gridColumn name="admin" title='%{getText("pollen.common.admin")}' sortable="false" width="100" formatter="checkbox" editable="true" edittype="checkbox"/>
+</sjg:grid>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/pollsList.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/usersList.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/usersList.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/usersList.jsp 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,61 @@
+<%--
+#%L
+ EchoBase :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2011 Ifremer, Codelutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+--%>
+<%@page contentType="text/html" pageEncoding="UTF-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags" %>
+<script type="text/javascript"
+ src="<s:url value='/js/gridHelper.js' />"></script>
+
+<title><s:text name="pollen.title.usersList"/></title>
+
+<h1 class="title${pageLogo}"><s:text name="pollen.title.usersList"/></h1>
+
+<s:url id="loadUrl" action="getUsers" namespace="/json" escapeAmp="false"/>
+
+<%--script type="text/javascript">
+
+ jQuery(document).ready(function () {
+ $.addRowSelectTopic('users');
+ $.addClearSelectTopic('users');
+ $.addAddRowTopic('users', '${addUrl}');
+ $.addSingleRowTopic('users', 'Update', '${editUrl}', 'user.id');
+ $.addSingleRowTopic('users', 'Delete', '${delUrl}', 'user.id');
+ });
+</script--%>
+
+<sjg:grid id="users" dataType="json" href="%{loadUrl}" gridModel="users"
+ pager="true" pagerButtons="true" pagerInput="true"
+ navigator="true" rownumbers="false" autowidth="true"
+ onSelectRowTopics='users-rowSelect' editinline="true" editurl="%{loadUrl}"
+ onCompleteTopics='users-cleanSelect'
+ navigatorEdit="false" navigatorDelete="false"
+ navigatorSearch="false" navigatorRefresh="false"
+ navigatorAdd="false" viewrecords="true"
+ rowList="10,15,20,50,100" rowNum="10">
+ <sjg:gridColumn name="id" title="id" hidden="true"/>
+ <sjg:gridColumn name="login" title='%{getText("pollen.common.login")}' sortable="false" editable="true"/>
+ <sjg:gridColumn name="firstName" title='%{getText("pollen.common.firstName")}' sortable="false" editable="true"/>
+ <sjg:gridColumn name="lastName" title='%{getText("pollen.common.lastName")}' sortable="false" editable="true"/>
+ <sjg:gridColumn name="email" title='%{getText("pollen.common.email")}' sortable="false" editable="true"/>
+ <sjg:gridColumn name="admin" title='%{getText("pollen.common.admin")}' sortable="false" width="100" formatter="checkbox" editable="true" edittype="checkbox"/>
+</sjg:grid>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/usersList.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/js/gridHelper.js
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/js/gridHelper.js (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/js/gridHelper.js 2012-01-23 10:32:33 UTC (rev 3101)
@@ -0,0 +1,167 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+
+( function ($) {
+
+ $.fn.extend(
+ {
+ addRowSelectTopic:function (gridId, callback) {
+ $.subscribe(gridId + '-rowSelect', function (event) {
+ if (event.originalEvent) {
+ var gridId = event.data.id;
+ var opts = jQuery.struts2_jquery[gridId] = {};
+
+ var id = event.originalEvent.id;
+ if (id) {
+ opts['selectedRow'] = id;
+ }
+ }
+ var callback = event.data.callback;
+ if (callback) {
+ callback(event);
+ }
+ }, {id:gridId, callback:callback});
+ },
+
+ addClearSelectTopic:function (gridId, callback) {
+ $.subscribe(gridId + '-clearSelect', function (event) {
+ var gridId = event.data.id;
+ jQuery.struts2_jquery[gridId] = {};
+ var callback = event.data.callback;
+ if (callback) {
+ callback(event);
+ }
+ }, {id:gridId, callback:callback});
+ },
+
+ addAddRowTopic:function (gridId, url) {
+ $.subscribe(gridId + '-rowAdd', function (event) {
+ var url = event.data.url;
+ window.location = url;
+ }, {id:gridId, url:url});
+ },
+
+ addSingleRowTopic:function (gridId, action, url, parameterName) {
+ $.subscribe(gridId + '-row' + action, function (event) {
+ var gridId = event.data.id;
+ var opts = jQuery.struts2_jquery[gridId];
+ if (opts && opts['selectedRow']) {
+ var selectedId = opts['selectedRow'];
+ var parameterName = event.data.parameterName;
+ var params = {}
+ params[parameterName] = selectedId;
+ var url = $.prepareUrl(event.data.url, params);
+ window.location = url;
+ }
+ }, {id:gridId, url:url, parameterName:parameterName});
+ },
+ addMultiRowTopic:function (gridId, action, target, checkboxName, callback) {
+ $.subscribe(gridId + '-row' + action, function (event) {
+ var gridId = event.data.id;
+ var prefix = 'jqg_' + gridId + '_';
+ var prefixLength = prefix.length;
+
+ // get all selected ids
+ var inputs = $('table#' + gridId + ' :checked[id^="' + prefix + '"]');
+
+ if (inputs && inputs.length) {
+ var checkboxName = event.data.checkboxName;
+ inputs.each(function () {
+ var id = this.id;
+ var newId = id.substring(prefixLength);
+ $.attr(this, "name", checkboxName);
+ $.attr(this, "value", newId);
+ $.attr(this, "checked", "checked");
+ });
+ var callback = event.data.callback;
+ if (callback) {
+ callback();
+ }
+ event.data.target.click();
+ }
+ }, {id:gridId,
+ target:target,
+ checkboxName:checkboxName,
+ callback:callback});
+ },
+
+ serializeCheckboxs:function (id, params, newId) {
+ var all = $(':checkbox[name="' + id + '"]');
+ var selected = $(':checked[name="' + id + '"]');
+
+ if (all.length != selected.length) {
+
+ // apply a year filter
+ var list = [];
+ selected.each(function () {
+ list.push(this.value);
+ });
+ if (!newId) {
+ newId = id;
+ }
+ params[newId] = list;
+ }
+ },
+
+ prepareUrl:function (url, params) {
+ var result = url;
+ if (url.indexOf("?") > -1) {
+ result += "&";
+ } else {
+ result += "?";
+ }
+ result += $.param(params);
+ return result;
+ }
+ });
+
+ $.extend({
+ addRowSelectTopic:function (gridId, callback) {
+ return $(document).addRowSelectTopic(gridId, callback);
+ },
+
+ addClearSelectTopic:function (gridId, callback) {
+ return $(document).addClearSelectTopic(gridId, callback);
+ },
+
+ addAddRowTopic:function (gridId, url) {
+ return $(document).addAddRowTopic(gridId, url);
+ },
+
+ addSingleRowTopic:function (gridId, action, url, parameterName) {
+ return $(document).addSingleRowTopic(gridId, action, url, parameterName);
+ },
+
+ addMultiRowTopic:function (gridId, action, target, checkboxName, calbback) {
+ return $(document).addMultiRowTopic(gridId, action, target, checkboxName, calbback);
+ },
+ serializeCheckboxs:function (id, params, newId) {
+ return $(document).serializeCheckboxs(id, params, newId);
+ },
+ prepareUrl:function (url, params) {
+ return $(document).prepareUrl(url, params);
+ }
+ });
+})(jQuery);
+
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/js/gridHelper.js
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pom.xml
===================================================================
--- branches/pollen-2.0-beta-1/pom.xml 2012-01-23 09:25:50 UTC (rev 3100)
+++ branches/pollen-2.0-beta-1/pom.xml 2012-01-23 10:32:33 UTC (rev 3101)
@@ -421,7 +421,7 @@
<nuitonUtilsVersion>2.4.4</nuitonUtilsVersion>
<h2Version>1.3.163</h2Version>
<postgresqlVersion>9.1-901-1.jdbc4</postgresqlVersion>
- <struts2Version>2.3.1.1</struts2Version>
+ <struts2Version>2.3.1.2</struts2Version>
<jqueryPluginVersion>3.2.1</jqueryPluginVersion>
<slf4jVersion>1.6.4</slf4jVersion>
1
0
r3100 - in branches/pollen-2.0-beta-1: . pollen-services pollen-services/src/main/java/org/chorem/pollen/services
by bleny@users.chorem.org 23 Jan '12
by bleny@users.chorem.org 23 Jan '12
23 Jan '12
Author: bleny
Date: 2012-01-23 10:25:50 +0100 (Mon, 23 Jan 2012)
New Revision: 3100
Url: http://chorem.org/repositories/revision/pollen/3100
Log:
moving business stuff from tapestry ui to the new service module
Modified:
branches/pollen-2.0-beta-1/
branches/pollen-2.0-beta-1/pollen-services/pom.xml
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollService.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
Property changes on: branches/pollen-2.0-beta-1
___________________________________________________________________
Modified: svn:ignore
- *.ipr
*.iws
*.iml
.classpath
.project
target
.pollen
.settings
nbactions.xml
+ *.ipr
*.iws
*.iml
.classpath
.project
target
.pollen
.settings
nbactions.xml
.
.idea
Modified: branches/pollen-2.0-beta-1/pollen-services/pom.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/pom.xml 2012-01-21 13:05:10 UTC (rev 3099)
+++ branches/pollen-2.0-beta-1/pollen-services/pom.xml 2012-01-23 09:25:50 UTC (rev 3100)
@@ -98,6 +98,10 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>nuiton-i18n</artifactId>
+ </dependency>
</dependencies>
<!-- ************************************************************* -->
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollService.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollService.java 2012-01-21 13:05:10 UTC (rev 3099)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollService.java 2012-01-23 09:25:50 UTC (rev 3100)
@@ -23,6 +23,7 @@
*/
package org.chorem.pollen.services;
+import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import org.chorem.pollen.PollenBusinessException;
import org.chorem.pollen.PollenException;
@@ -36,11 +37,11 @@
import org.chorem.pollen.entity.PollAccount;
import org.chorem.pollen.entity.UserAccount;
import org.chorem.pollen.service.legacy.ServicePollImpl;
-import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.EntityFilter;
import java.util.Collection;
+import java.util.Date;
import java.util.List;
public class PollService extends PollenServiceSupport {
@@ -264,4 +265,36 @@
}
}
+ public void validatePoll(Poll poll) {
+
+ Date currentTime = serviceContext.getCurrentTime();
+
+ if (poll.getBeginDate() == null) {
+ poll.setBeginDate(currentTime);
+ }
+
+ if (poll.getEndDate() != null) {
+ Preconditions.checkArgument(poll.getEndDate().before(poll.getBeginDate()));
+ }
+
+ // Add choices if allowed after creation
+ if (poll.isChoiceAddAllowed()) {
+
+ // Initialize beginChoiceDate if needed
+ if (poll.getBeginChoiceDate() == null) {
+ poll.setBeginChoiceDate(currentTime);
+ }
+
+ // Check beginChoiceDate
+ if (poll.getEndDate() != null) {
+ Preconditions.checkArgument(poll.getBeginChoiceDate().before(poll.getEndDate()));
+ }
+
+ // Check endChoiceDate
+ if (poll.getEndChoiceDate() != null) {
+ Preconditions.checkArgument(poll.getEndChoiceDate().after(poll.getBeginChoiceDate()));
+ }
+ }
+
+ }
}
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-21 13:05:10 UTC (rev 3099)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-23 09:25:50 UTC (rev 3100)
@@ -30,6 +30,7 @@
import org.chorem.pollen.PollenDAOHelper;
import org.chorem.pollen.PollenException;
import org.chorem.pollen.PollenTechnicalException;
+import org.chorem.pollen.bean.PollenEmail;
import org.chorem.pollen.entity.UserAccount;
import org.chorem.pollen.entity.UserAccountDAO;
import org.chorem.pollen.service.legacy.ServiceUserImpl;
@@ -43,6 +44,7 @@
import java.util.Map;
import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.l_;
public class UserService extends PollenServiceSupport {
@@ -71,8 +73,11 @@
}
}
- public UserAccount createUser(UserAccount user) throws UserLoginAlreadyUsedException, UserEmailAlreadyUsedException {
+ public UserAccount createUser(UserAccount user, String url) throws UserLoginAlreadyUsedException, UserEmailAlreadyUsedException {
+ String password = user.getPassword(); // le mot de passe en clair
+
+ UserAccount userAccount;
try {
UserAccountDAO dao =
PollenDAOHelper.getUserAccountDAO(getTransaction());
@@ -85,18 +90,34 @@
if (userByEmail != null) {
throw new UserEmailAlreadyUsedException();
}
- String password = encodePassword(user.getPassword());
- UserAccount userAccount = dao.create(
+ String encodedPassword = encodePassword(password);
+ userAccount = dao.create(
UserAccount.PROPERTY_LOGIN, user.getLogin(),
- UserAccount.PROPERTY_PASSWORD, password
+ UserAccount.PROPERTY_PASSWORD, encodedPassword
);
user.setTopiaId(userAccount.getTopiaId());
copyUserAccount(user, userAccount);
- return userAccount;
} catch (TopiaException e) {
throw new PollenTechnicalException(e);
}
+
+ if (StringUtil.isEmail(user.getEmail())) {
+
+ String subject = l_(serviceContext.getLocale(),
+ "pollen.email.userRegister.subject", user.getLogin());
+ String content = l_(serviceContext.getLocale(),
+ "pollen.email.userRegister.content", user.getDisplayName(),
+ user.getLogin(), password, url);
+
+ EmailService emailService = newService(EmailService.class);
+ PollenEmail pollenEmail = emailService.getNewEmail(user);
+ pollenEmail.setSubject(subject);
+ pollenEmail.setContent(content);
+ emailService.sendEmail(pollenEmail);
+ }
+
+ return userAccount;
}
public UserAccount updateUser(UserAccount user,
@@ -193,7 +214,7 @@
user.setEmail(getConfiguration().getAdminEmail());
user.setNewPassword(getConfiguration().getAdminPassword());
try {
- createUser(user);
+ createUser(user, "");
if (log.isInfoEnabled()) {
log.info(_("pollen.info.admin.created", login));
}
1
0
21 Jan '12
Author: tchemit
Date: 2012-01-21 14:05:10 +0100 (Sat, 21 Jan 2012)
New Revision: 3099
Url: http://chorem.org/repositories/revision/pollen/3099
Log:
user managment
Added:
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ShowUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/showUser.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/updateUser.jsp
Removed:
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp
Modified:
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UpdateUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/RegisterUser-validation.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/UpdateUser-validation.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/registerUser.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/common.css
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-21 13:05:10 UTC (rev 3099)
@@ -71,7 +71,7 @@
}
}
- public void createUser(UserAccount user) throws UserLoginAlreadyUsedException, UserEmailAlreadyUsedException {
+ public UserAccount createUser(UserAccount user) throws UserLoginAlreadyUsedException, UserEmailAlreadyUsedException {
try {
UserAccountDAO dao =
@@ -92,14 +92,14 @@
);
user.setTopiaId(userAccount.getTopiaId());
copyUserAccount(user, userAccount);
+ return userAccount;
-
} catch (TopiaException e) {
throw new PollenTechnicalException(e);
}
}
- public void updateUser(UserAccount user,
+ public UserAccount updateUser(UserAccount user,
String newPassword,
boolean byAdmin) throws UserEmailAlreadyUsedException, UserInvalidPasswordException {
@@ -139,6 +139,7 @@
}
copyUserAccount(user, userToUpdate);
+ return userToUpdate;
} catch (TopiaException e) {
throw new PollenTechnicalException(e);
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-21 13:05:10 UTC (rev 3099)
@@ -23,7 +23,6 @@
*/
package org.chorem.pollen.ui.actions;
-import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
import org.chorem.pollen.entity.UserAccount;
import org.chorem.pollen.entity.UserAccountImpl;
import org.chorem.pollen.services.UserEmailAlreadyUsedException;
@@ -59,17 +58,20 @@
this.password2 = password2;
}
- @InputConfig(methodName = "input")
+ public String getPageLogo() {
+ return "Creation";
+ }
+
@Override
public String execute() throws Exception {
UserService service = newService(UserService.class);
try {
- service.createUser(user);
+ UserAccount createdUser = service.createUser(user);
getTransaction().commitTransaction();
- getPollenSession().setUserAccount(user);
+ getPollenSession().setUserAccount(createdUser);
return SUCCESS;
} catch (UserLoginAlreadyUsedException e) {
addFieldError("user.login", _("pollen.error.user.login.already.used"));
Copied: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ShowUser.java (from rev 3098, branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UpdateUser.java)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ShowUser.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/ShowUser.java 2012-01-21 13:05:10 UTC (rev 3099)
@@ -0,0 +1,46 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+import org.chorem.pollen.entity.UserAccount;
+
+/**
+ * Show user account.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class ShowUser extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ public String getPageLogo() {
+ return "Creation";
+ }
+
+ public UserAccount getUser() {
+ return getPollenSession().getUserAccount();
+ }
+
+}
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UpdateUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UpdateUser.java 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UpdateUser.java 2012-01-21 13:05:10 UTC (rev 3099)
@@ -23,13 +23,11 @@
*/
package org.chorem.pollen.ui.actions;
-import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
import org.chorem.pollen.entity.UserAccount;
import org.chorem.pollen.entity.UserAccountImpl;
import org.chorem.pollen.services.UserEmailAlreadyUsedException;
import org.chorem.pollen.services.UserInvalidPasswordException;
import org.chorem.pollen.services.UserService;
-import org.nuiton.topia.TopiaException;
/**
* Update a user.
@@ -47,6 +45,10 @@
protected String newPassword2;
+ public String getPageLogo() {
+ return "Creation";
+ }
+
public UserAccount getUser() {
if (user == null) {
user = new UserAccountImpl();
@@ -70,17 +72,28 @@
this.newPassword2 = newPassword2;
}
- @InputConfig(methodName = "input")
+ public String input() throws Exception {
+ UserAccount userAccount = getPollenSession().getUserAccount();
+ UserService userService = newService(UserService.class);
+ user = userService.getEntityById(UserAccount.class, userAccount.getTopiaId());
+ return INPUT;
+ }
+
@Override
- public String execute() throws TopiaException {
+ public String execute() throws Exception {
+ // let's push back admin property to user to save
+ user.setAdmin(getPollenSession().getUserAccount().isAdmin());
+
UserService service = newService(UserService.class);
try {
- service.updateUser(user, newPassword, false);
+ UserAccount updatedUser =
+ service.updateUser(user, newPassword, false);
getTransaction().commitTransaction();
- getPollenSession().setUserAccount(user);
+ // push back user to session
+ getPollenSession().setUserAccount(updatedUser);
return SUCCESS;
} catch (UserEmailAlreadyUsedException e) {
addFieldError("user.email", _("pollen.error.user.email.already.used"));
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-01-21 13:05:10 UTC (rev 3099)
@@ -1,10 +1,18 @@
pollen.action.login=Log me In
+pollen.action.modify=Modify
pollen.action.register=Register
+pollen.action.validate=Submit
pollen.common.bugReport=Bug report
+pollen.common.email=Em@il
+pollen.common.firstName=First name
+pollen.common.lastName=Last name
pollen.common.license=Licence
pollen.common.login=Login
+pollen.common.newPassword=New password
+pollen.common.newPassword2=Reenter new passworsd
pollen.common.or=or
pollen.common.password=Password
+pollen.common.password2=Renter your password
pollen.common.userSupport=User support
pollen.error.email.required=You must provide a email
pollen.error.login.required=You must provide a login
@@ -13,6 +21,7 @@
pollen.error.passwords.not.equals=Les deux mots de passe saisis non identiques
pollen.error.user.bad.login.or.password=Login or password invalid.
pollen.error.user.email.already.used=This email is already used
+pollen.error.user.invalid.password=
pollen.error.user.login.already.used=This login is already used
pollen.fieldset.connexionInformation=Information de connexion
pollen.fieldset.userInformation=Informations de l'utilisateur
@@ -32,4 +41,5 @@
pollen.menu.preferences=My account
pollen.menu.register=Register
pollen.title.login=Page de login
+pollen.title.myAccount=My account
pollen.title.register=Register
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-01-21 13:05:10 UTC (rev 3099)
@@ -1,10 +1,18 @@
pollen.action.login=M'identifier
+pollen.action.modify=Modifier
pollen.action.register=S'enregistrer
+pollen.action.validate=Valider
pollen.common.bugReport=Rapport de bug
+pollen.common.email=Em@il
+pollen.common.firstName=Prénom
+pollen.common.lastName=Nom
pollen.common.license=Licence
-pollen.common.login=Login
+pollen.common.login=Identifiant
+pollen.common.newPassword=Nouveau mot de passe
+pollen.common.newPassword2=Répétez votre nouveau mot de passe
pollen.common.or=ou
pollen.common.password=Mot de passe
+pollen.common.password2=Répétez votre mot de passe
pollen.common.userSupport=Support utilisateur
pollen.error.email.required=Courriel obligatoire
pollen.error.login.required=Login obligatoire
@@ -13,6 +21,7 @@
pollen.error.passwords.not.equals=Les deux mots de passe saisis non identiques
pollen.error.user.bad.login.or.password=Mauvais identifiant ou mot de passe.
pollen.error.user.email.already.used=Le courriel saisi est déjà utilisé par un autre utilisateur
+pollen.error.user.invalid.password=
pollen.error.user.login.already.used=Le login saisie est déjà utilisé par un autre utilisateur
pollen.fieldset.connexionInformation=Information de connexion
pollen.fieldset.userInformation=Informations de l'utilisateur
@@ -32,4 +41,5 @@
pollen.menu.preferences=Mon compte
pollen.menu.register=Inscrivez-vous
pollen.title.login=Page de login
-pollen.title.register=Enregistrement
+pollen.title.myAccount=Mon compte
+pollen.title.register=S'enregistrer
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/RegisterUser-validation.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/RegisterUser-validation.xml 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/RegisterUser-validation.xml 2012-01-21 13:05:10 UTC (rev 3099)
@@ -43,7 +43,7 @@
<field name="password2">
- <field-validator type="requiredstring">
+ <field-validator type="requiredstring" short-circuit="true">
<message key="pollen.error.password2.required"/>
</field-validator>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/UpdateUser-validation.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/UpdateUser-validation.xml 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/UpdateUser-validation.xml 2012-01-21 13:05:10 UTC (rev 3099)
@@ -41,14 +41,10 @@
</field>
- <field name="password2">
+ <field name="newPassword2">
- <field-validator type="requiredstring">
- <message key="pollen.error.password2.required"/>
- </field-validator>
-
<field-validator type="fieldexpression">
- <param name="expression">password2.equals(user.password)</param>
+ <param name="expression">newPassword == null || newPassword == null || newPassword2.equals(newPassword)</param>
<message key="pollen.error.passwords.not.equals"/>
</field-validator>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml 2012-01-21 13:05:10 UTC (rev 3099)
@@ -123,14 +123,20 @@
<action name="registerUser"
class="org.chorem.pollen.ui.actions.RegisterUser">
<result name="input">/WEB-INF/jsp/registerUser.jsp</result>
- <result>/WEB-INF/jsp/home.jsp</result>
+ <result type="redirectAction">home</result>
</action>
- <!-- user preferences -->
+ <!-- show user account -->
+ <action name="showUser"
+ class="org.chorem.pollen.ui.actions.ShowUser">
+ <result>/WEB-INF/jsp/showUser.jsp</result>
+ </action>
+
+ <!-- modify user account -->
<action name="updateUser"
class="org.chorem.pollen.ui.actions.UpdateUser">
- <result name="input">/WEB-INF/jsp/userPreferences.jsp</result>
- <result>/WEB-INF/jsp/home.jsp</result>
+ <result name="input">/WEB-INF/jsp/updateUser.jsp</result>
+ <result type="redirectAction">showUser</result>
</action>
<!-- logout -->
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-21 13:05:10 UTC (rev 3099)
@@ -84,7 +84,7 @@
<div class="top_left${pageLogo}"></div>
<ul class="top_middle${pageLogo}">
<li>
- <s:a action="updateUser" method="input">
+ <s:a action="showUser">
<s:text name="pollen.menu.preferences"/>
</s:a>
</li>
@@ -105,13 +105,18 @@
<s:form id="connection" action="login" method="POST">
<ul class="top_middle${pageLogo}">
<li>
- <s:textfield key="login" label="%{getText('pollen.common.login')}"
- size="10" required="true"/>
+ <label for="connection_login">
+ <s:text name="pollen.common.login"/> :
+ </label>
+ <s:textfield key="login" size="10" required="true" theme="simple"/>
</li>
<li>
+ <label for="connection_password">
+ <s:text name="pollen.common.password"/> :
+ </label>
<s:password key="password"
label="%{getText('pollen.common.password')}" size="10"
- required="true"/>
+ required="true" theme="simple"/>
</li>
<li>
<s:submit id="submitform" action="login" key="pollen.action.login"
@@ -197,7 +202,8 @@
</div>
<!-- Corps de la page -->
-<div id="corps" class="cleanBoth clearfix">
+<%--<div id="corps" class="cleanBoth clearfix">--%>
+<div id="corps">
<!-- Barre d'adresse -->
<div id="po-header-addressBar" class="${pageLogo}Address">
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/registerUser.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/registerUser.jsp 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/registerUser.jsp 2012-01-21 13:05:10 UTC (rev 3099)
@@ -26,8 +26,10 @@
<title><s:text name="pollen.title.register"/></title>
-<s:form method="POST">
+<h1 class="title${pageLogo}"><s:text name="pollen.title.register"/></h1>
+<s:form method="POST" key="registerForm">
+
<fieldset>
<legend><s:text name="pollen.fieldset.connexionInformation"/></legend>
@@ -40,10 +42,9 @@
<legend><s:text name="pollen.fieldset.userInformation"/></legend>
<s:textfield name="user.email" key="pollen.common.email" required="true"/>
- <s:textfield name="user.lastname" key="pollen.common.lastname" required="true"/>
- <s:textfield name="user.firstname" key="pollen.common.firstname"
- required="true"/>
+ <s:textfield name="user.firstName" key="pollen.common.firstName"/>
+ <s:textfield name="user.lastName" key="pollen.common.lastName"/>
</fieldset>
<br/>
- <s:submit action="registerUser" key="pollen.action.register" align="right"/>
+ <s:submit action="registerUser" key="pollen.action.register" align="center"/>
</s:form>
Copied: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/showUser.jsp (from rev 3098, branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/showUser.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/showUser.jsp 2012-01-21 13:05:10 UTC (rev 3099)
@@ -0,0 +1,50 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="pollen.title.myAccount"/></title>
+
+<h1 class="title${pageLogo}"><s:text name="pollen.title.myAccount"/></h1>
+
+<s:form method="GET">
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.connexionInformation"/></legend>
+
+ <s:hidden key="user.topiaId" label="" />
+ <s:label name="user.login" key="pollen.common.login"/>
+ </fieldset>
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.userInformation"/></legend>
+
+ <s:label name="user.email" key="pollen.common.email" />
+ <s:label name="user.firstName" key="pollen.common.firstName" />
+ <s:label name="user.lastName" key="pollen.common.lastName" />
+ </fieldset>
+ <br/>
+ <s:submit action="updateUser" method="input"
+ key="pollen.action.modify" align="center"/>
+</s:form>
Copied: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/updateUser.jsp (from rev 3098, branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/updateUser.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/updateUser.jsp 2012-01-21 13:05:10 UTC (rev 3099)
@@ -0,0 +1,53 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="pollen.title.myAccount"/></title>
+
+<h1 class="title${pageLogo}"><s:text name="pollen.title.myAccount"/></h1>
+
+<s:form method="POST">
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.connexionInformation"/></legend>
+
+ <s:hidden key="user.topiaId" label=""/>
+ <s:textfield name="user.login" key="pollen.common.login" required="true"/>
+ <s:password name="user.password" key="pollen.common.password"
+ required="true"/>
+ <s:password name="newPassword" key="pollen.common.newPassword"/>
+ <s:password name="newPassword2" key="pollen.common.newPassword2"/>
+ </fieldset>
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.userInformation"/></legend>
+
+ <s:textfield name="user.email" key="pollen.common.email" required="true"/>
+ <s:textfield name="user.firstName" key="pollen.common.firstName"/>
+ <s:textfield name="user.lastName" key="pollen.common.lastName"/>
+ </fieldset>
+ <br/>
+ <s:submit action="updateUser" key="pollen.action.validate" align="center"/>
+</s:form>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/updateUser.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp 2012-01-21 13:05:10 UTC (rev 3099)
@@ -1,52 +0,0 @@
-<%--
- #%L
- Pollen :: UI (strust2)
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2009 - 2012 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- --%>
-<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title><s:text name="pollen.title.preferences"/></title>
-
-<s:form method="POST">
-
- <fieldset>
- <legend><s:text name="pollen.fieldset.connexionInformation"/></legend>
-
- <s:hidden key="user.topiaId" label="" />
- <s:textfield name="user.login" key="pollen.common.login" required="true"/>
- <s:password name="user.password" key="pollen.common.oldPassword"
- required="true"/>
- <s:password name="newPassword" key="pollen.common.password"/>
- <s:password name="newPassword2" key="pollen.common.password2"/>
- </fieldset>
-
- <fieldset>
- <legend><s:text name="pollen.fieldset.userInformation"/></legend>
-
- <s:textfield name="user.email" key="pollen.common.email" required="true"/>
- <s:textfield name="user.lastname" key="pollen.common.lastname" required="true"/>
- <s:textfield name="user.firstname" key="pollen.common.firstname"
- required="true"/>
- </fieldset>
- <br/>
- <s:submit action="updateUser" key="pollen.action.updateUser" align="right"/>
-</s:form>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/common.css
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/common.css 2012-01-20 21:42:18 UTC (rev 3098)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/common.css 2012-01-21 13:05:10 UTC (rev 3099)
@@ -62,6 +62,27 @@
* For struts
*/
+
+
+/*.wwgrp {*/
+ /*float: none;*/
+/*}*/
+
+fieldset, hr , .cleanBoth{
+ clear: both
+}
+.wwlbl {
+ float: left;
+ clear: both;
+ width: 300px;
+ /*# text-align: right;*/
+}
+.wwctrl {
+ float: left;
+}
+
+
+
.wwerr {
clear: both;
float: left;
1
0
Author: tchemit
Date: 2012-01-20 22:42:18 +0100 (Fri, 20 Jan 2012)
New Revision: 3098
Url: http://chorem.org/repositories/revision/pollen/3098
Log:
- apply legacy style
- fix user service
Added:
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UpdateUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/UpdateUser-validation.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/common.css
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/main.css
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/favicon.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1downarrow.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1leftarrow.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1rightarrow.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1uparrow.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/2leftarrow.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/2rightarrow.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/7ter.jpg
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/close.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/copy.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/count.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/delete.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/edit.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/editSmall.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/exclamation.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/export.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/feed.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/feed2.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/gplv3.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/help.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/import.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/lutin.gif
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenCreation_en.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenCreation_fr.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVoteCounting_en.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVoteCounting_fr.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVote_en.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVote_fr.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen_en.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen_fr.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/refresh-22px.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/rep1.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/rep2.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/rep3.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/save.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallCreation.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVote.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVoteCounting.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menu.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuCreation.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuIndex.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuVote.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuVoteCounting.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menu.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuCreation.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuIndex.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuVote.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuVoteCounting.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/true.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/undo.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/vote.png
Removed:
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UserPreferences.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/pollen.css
Modified:
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/screen.css
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen.png
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-20 21:42:18 UTC (rev 3098)
@@ -23,12 +23,10 @@
*/
package org.chorem.pollen.services;
-import com.google.common.collect.Lists;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.PollenBinderHelper;
-import org.chorem.pollen.PollenBusinessException;
import org.chorem.pollen.PollenDAOHelper;
import org.chorem.pollen.PollenException;
import org.chorem.pollen.PollenTechnicalException;
@@ -103,26 +101,27 @@
public void updateUser(UserAccount user,
String newPassword,
- boolean byAdmin) throws PollenBusinessException, UserEmailAlreadyUsedException {
+ boolean byAdmin) throws UserEmailAlreadyUsedException, UserInvalidPasswordException {
- ServiceUserImpl service = new ServiceUserImpl();
try {
UserAccountDAO dao =
PollenDAOHelper.getUserAccountDAO(getTransaction());
+ UserAccount userToUpdate = dao.findByTopiaId(user.getTopiaId());
+
// Do not manage password for an admin update
// neither if password was not asked to change
if (!byAdmin && StringUtils.isNotEmpty(newPassword)) {
// Check the password
-// String encodedPassword = context.encodePassword(user.getPassword());
- String encodedPassword = encodePassword(user.getPassword());
+ String encodedPassword = encodePassword(user.getPassword());
+ if (!encodedPassword.equals(userToUpdate.getPassword())) {
+ throw new UserInvalidPasswordException();
+ }
-// checkPassword(dao, user.getLogin(), encodedPassword);
-
-
-
+ String newEncodedPassword = encodePassword(newPassword);
+ userToUpdate.setPassword(newEncodedPassword);
}
// In case of email change, check if an other user has not already
@@ -131,14 +130,16 @@
TopiaQuery query = dao.createQuery().
addWhere(UserAccount.PROPERTY_LOGIN,
TopiaQuery.Op.NEQ, user.getLogin());
- query.addEquals(UserAccount.PROPERTY_EMAIL, StringUtils.lowerCase(user.getEmail()));
+ query.addEquals(UserAccount.PROPERTY_EMAIL,
+ StringUtils.lowerCase(user.getEmail()));
// existing user found
if (dao.existByQuery(query)) {
throw new UserEmailAlreadyUsedException();
}
- service.executeUpdateUser(getTransaction(), Lists.newArrayList(), user, byAdmin);
+ copyUserAccount(user, userToUpdate);
+
} catch (TopiaException e) {
throw new PollenTechnicalException(e);
}
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java 2012-01-20 21:42:18 UTC (rev 3098)
@@ -59,7 +59,7 @@
this.password = password;
}
- @InputConfig(methodName = "input")
+ @InputConfig(resultName = "error")
@Override
public String execute() throws Exception {
@@ -70,12 +70,12 @@
getPollenSession().setUserAccount(userAccount);
return SUCCESS;
} catch (UserNotFoundException e) {
- addFieldError("login", _("pollen.error.user.login.not.found"));
+ addActionError(_("pollen.error.user.bad.login.or.password"));
} catch (UserInvalidPasswordException e) {
- addFieldError("password", _("pollen.error.user.invalid.password"));
+ addActionError(_("pollen.error.user.bad.login.or.password"));
}
// if error go back to input
- return INPUT;
+ return ERROR;
}
}
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-01-20 21:42:18 UTC (rev 3098)
@@ -23,6 +23,7 @@
*/
package org.chorem.pollen.ui.actions;
+import com.google.common.collect.Lists;
import com.opensymphony.xwork2.ActionContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -42,6 +43,7 @@
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.List;
import java.util.Map;
/**
@@ -80,7 +82,7 @@
return applicationContext;
}
- protected PollenConfiguration getConfiguration() {
+ public PollenConfiguration getConfiguration() {
return getEchoBaseApplicationContext().getConfiguration();
}
@@ -99,6 +101,10 @@
protected transient TopiaContext transaction;
+ public String getPageLogo() {
+ return "Index";
+ }
+
public PollenSession getPollenSession() {
if (pollenSession == null) {
@@ -187,6 +193,17 @@
return result;
}
+ public static final List<String> SAFE_LANGUAGES =
+ Lists.newArrayList("en", "fr");
+
+ public String getSafeLanguage() {
+ String language = getLocale().getLanguage();
+ if (!SAFE_LANGUAGES.contains(language)) {
+ language = SAFE_LANGUAGES.get(0);
+ }
+ return language;
+ }
+
protected SimpleDateFormat getDateFormat() {
if (dateFormat == null) {
dateFormat = new SimpleDateFormat("dd/MM/yyyy");
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-20 21:42:18 UTC (rev 3098)
@@ -81,6 +81,7 @@
// reset password
user.setPassword(null);
+ password2 = null;
return INPUT;
}
Copied: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UpdateUser.java (from rev 3097, branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UserPreferences.java)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UpdateUser.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UpdateUser.java 2012-01-20 21:42:18 UTC (rev 3098)
@@ -0,0 +1,100 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.entity.UserAccountImpl;
+import org.chorem.pollen.services.UserEmailAlreadyUsedException;
+import org.chorem.pollen.services.UserInvalidPasswordException;
+import org.chorem.pollen.services.UserService;
+import org.nuiton.topia.TopiaException;
+
+/**
+ * Update a user.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class UpdateUser extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ protected UserAccount user;
+
+ protected String newPassword;
+
+ protected String newPassword2;
+
+ public UserAccount getUser() {
+ if (user == null) {
+ user = new UserAccountImpl();
+ }
+ return user;
+ }
+
+ public String getNewPassword() {
+ return newPassword;
+ }
+
+ public void setNewPassword(String newPassword) {
+ this.newPassword = newPassword;
+ }
+
+ public String getNewPassword2() {
+ return newPassword2;
+ }
+
+ public void setNewPassword2(String newPassword2) {
+ this.newPassword2 = newPassword2;
+ }
+
+ @InputConfig(methodName = "input")
+ @Override
+ public String execute() throws TopiaException {
+
+ UserService service = newService(UserService.class);
+
+ try {
+ service.updateUser(user, newPassword, false);
+ getTransaction().commitTransaction();
+
+ getPollenSession().setUserAccount(user);
+ return SUCCESS;
+ } catch (UserEmailAlreadyUsedException e) {
+ addFieldError("user.email", _("pollen.error.user.email.already.used"));
+ } catch (UserInvalidPasswordException e) {
+ addFieldError("user.password", _("pollen.error.user.invalid.password"));
+ }
+
+ // if error go back to input
+
+ // reset password
+ user.setPassword(null);
+ newPassword = newPassword2 = null;
+
+ return INPUT;
+ }
+
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UpdateUser.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UserPreferences.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UserPreferences.java 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UserPreferences.java 2012-01-20 21:42:18 UTC (rev 3098)
@@ -1,35 +0,0 @@
-/*
- * #%L
- * Pollen :: UI (strust2)
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2012 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package org.chorem.pollen.ui.actions;
-
-/**
- * Register a new user.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.0
- */
-public class UserPreferences extends PollenActionSupport {
-
- private static final long serialVersionUID = 1L;
-}
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-01-20 21:42:18 UTC (rev 3098)
@@ -1,16 +1,35 @@
pollen.action.login=Log me In
pollen.action.register=Register
+pollen.common.bugReport=Bug report
+pollen.common.license=Licence
+pollen.common.login=Login
+pollen.common.or=or
+pollen.common.password=Password
+pollen.common.userSupport=User support
pollen.error.email.required=You must provide a email
pollen.error.login.required=You must provide a login
pollen.error.password.required=Your must provide a password
pollen.error.password2.required=You must repeat your password for confirmation
pollen.error.passwords.not.equals=Les deux mots de passe saisis non identiques
+pollen.error.user.bad.login.or.password=Login or password invalid.
pollen.error.user.email.already.used=This email is already used
-pollen.error.user.invalid.password=Invalid password
pollen.error.user.login.already.used=This login is already used
-pollen.error.user.login.not.found=User login not found
pollen.fieldset.connexionInformation=Information de connexion
pollen.fieldset.userInformation=Informations de l'utilisateur
+pollen.label.contact.administrator=Send an email to an administrator
pollen.legend.login=Login
+pollen.menu.admin=Administration
+pollen.menu.createPoll=Create a poll
+pollen.menu.displayCreatedPolls=Created polls
+pollen.menu.displayParticipatedPolls=Participated polls
+pollen.menu.displayVotingLists=Voting lists
+pollen.menu.home=Home
+pollen.menu.login=Log in
+pollen.menu.logout=Log out
+pollen.menu.managePolls=Manage Polls
+pollen.menu.manageUsers=Manage Users
+pollen.menu.polls=Polls
+pollen.menu.preferences=My account
+pollen.menu.register=Register
pollen.title.login=Page de login
pollen.title.register=Register
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-01-20 21:42:18 UTC (rev 3098)
@@ -1,16 +1,35 @@
pollen.action.login=M'identifier
pollen.action.register=S'enregistrer
+pollen.common.bugReport=Rapport de bug
+pollen.common.license=Licence
+pollen.common.login=Login
+pollen.common.or=ou
+pollen.common.password=Mot de passe
+pollen.common.userSupport=Support utilisateur
pollen.error.email.required=Courriel obligatoire
pollen.error.login.required=Login obligatoire
pollen.error.password.required=Mot de passe obligatoire
pollen.error.password2.required=Mot de passe répété obligatoire
pollen.error.passwords.not.equals=Les deux mots de passe saisis non identiques
+pollen.error.user.bad.login.or.password=Mauvais identifiant ou mot de passe.
pollen.error.user.email.already.used=Le courriel saisi est déjà utilisé par un autre utilisateur
-pollen.error.user.invalid.password=Mot de passe non valide
pollen.error.user.login.already.used=Le login saisie est déjà utilisé par un autre utilisateur
-pollen.error.user.login.not.found=Utilisateur non trouvé
pollen.fieldset.connexionInformation=Information de connexion
pollen.fieldset.userInformation=Informations de l'utilisateur
+pollen.label.contact.administrator=Contacter un administrateur
pollen.legend.login=Login
+pollen.menu.admin=Administration
+pollen.menu.createPoll=Créer une sondage
+pollen.menu.displayCreatedPolls=Sondages créés
+pollen.menu.displayParticipatedPolls=Sondages participés
+pollen.menu.displayVotingLists=Listes de votants
+pollen.menu.home=Accueil
+pollen.menu.login=Identifiez-vous
+pollen.menu.logout=Déconnexion
+pollen.menu.managePolls=Gérer les sondages
+pollen.menu.manageUsers=Gérer les utilisateurs
+pollen.menu.polls=Sondages
+pollen.menu.preferences=Mon compte
+pollen.menu.register=Inscrivez-vous
pollen.title.login=Page de login
pollen.title.register=Enregistrement
Copied: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/UpdateUser-validation.xml (from rev 3097, branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/RegisterUser-validation.xml)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/UpdateUser-validation.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/UpdateUser-validation.xml 2012-01-20 21:42:18 UTC (rev 3098)
@@ -0,0 +1,65 @@
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+
+ <field name="user.login">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.login.required"/>
+ </field-validator>
+ </field>
+
+ <field name="user.password">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.password.required"/>
+ </field-validator>
+
+ </field>
+
+ <field name="password2">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.password2.required"/>
+ </field-validator>
+
+ <field-validator type="fieldexpression">
+ <param name="expression">password2.equals(user.password)</param>
+ <message key="pollen.error.passwords.not.equals"/>
+ </field-validator>
+
+ </field>
+
+ <field name="user.email">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.email.required"/>
+ </field-validator>
+
+ </field>
+
+</validators>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml 2012-01-20 21:42:18 UTC (rev 3098)
@@ -93,6 +93,19 @@
<result>/WEB-INF/jsp/home.jsp</result>
+ <!--<interceptor-ref name="i18nStack"/>-->
+ <!--<!– remove the request_locale parameter from request –>-->
+ <!--<interceptor-ref name="paramRemover">-->
+ <!--<param name="paramNames">request_locale</param>-->
+ <!--</interceptor-ref>-->
+ </action>
+
+ <!-- change lang-->
+ <action name="changeLang"
+ class="org.chorem.pollen.ui.actions.PollenActionSupport">
+
+ <result type="redirectAction">home</result>
+
<interceptor-ref name="i18nStack"/>
<!-- remove the request_locale parameter from request -->
<interceptor-ref name="paramRemover">
@@ -102,8 +115,8 @@
<!-- login -->
<action name="login" class="org.chorem.pollen.ui.actions.Login">
- <result name="input">/WEB-INF/jsp/login.jsp</result>
- <result>/WEB-INF/jsp/home.jsp</result>
+ <result name="error">/WEB-INF/jsp/home.jsp</result>
+ <result type="redirectAction">home</result>
</action>
<!-- register user -->
@@ -114,8 +127,8 @@
</action>
<!-- user preferences -->
- <action name="userPreferences"
- class="org.chorem.pollen.ui.actions.UserPreferences">
+ <action name="updateUser"
+ class="org.chorem.pollen.ui.actions.UpdateUser">
<result name="input">/WEB-INF/jsp/userPreferences.jsp</result>
<result>/WEB-INF/jsp/home.jsp</result>
</action>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-20 21:42:18 UTC (rev 3098)
@@ -1,7 +1,7 @@
+<%@ page import="org.chorem.pollen.ui.actions.PollenActionSupport" %>
<%--
- #%L
+#%L
Pollen :: UI (strust2)
-
$Id$
$HeadURL$
%%
@@ -20,7 +20,7 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
#L%
- --%>
+--%>
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -29,25 +29,231 @@
<%@ taglib prefix="d" uri="http://www.opensymphony.com/sitemesh/decorator" %>
<html xmlns="http://www.w3.org/1999/xhtml">
-<%-- metas in head --%>
-<%@ include file="/WEB-INF/includes/metas.jsp" %>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>Pollen - <d:title default="Pollen"/></title>
+ <d:head/>
+ <%--<link rel="stylesheet" type="text/css" href="<s:url value='/css/pollen.css' />"/>--%>
+ <%--<link rel="stylesheet" type="text/css" href="<s:url value='/css/screen.css' />"/>--%>
+ <link rel="stylesheet" type="text/css" href="<s:url value='/css/main.css' />"/>
+ <link rel="stylesheet" type="text/css" href="<s:url value='/css/common.css' />"/>
+ <link rel="icon" type="image/png" href="<s:url value='/favicon.png' />"/>
+ <sj:head jqueryui="true" jquerytheme="cupertino"/>
+</head>
-<body>
+<s:set var="user" value="%{#session.pollenSession.userAccount}"/>
+<s:set var="userExists" value="%{#user != null}"/>
+<s:set var="userIsAdmin" value="%{#userExists && #user.admin}"/>
-<%-- header --%>
-<%@ include file="/WEB-INF/includes/header.jsp" %>
+<body id="${pageLogo}Body">
-<%-- body --%>
-<h2><d:title default="Pollen"/></h2>
+<!-- Langue -->
+<div id="po-header-localization" class="${pageLogo}Localization">
+ <s:a title="Contacter un administrateur"
+ href="mailto:%{configuration.adminEmail}">
+ <img src="<s:url value='/img/contact.png' />" alt="Contact"/>
+ </s:a>
+ | Date - Heure |
+ <s:a action="changeLang" id="localeFr">
+ <s:param name="request_locale">fr_FR</s:param>
+ <img src="<s:url value='/img/fr.png' />" alt="Français"/>
+ </s:a> | <s:a action="changeLang" id="localeEn">
+ <s:param name="request_locale">en_GB</s:param>
+ <img src="<s:url value='/img/en.png' />" alt="English"/>
+</s:a>
+</div>
-<div id="body">
+<!-- Entête de la page -->
+<p id="po-header-logo">
+ <s:a action="home">
+ <img src="<s:url value='/img/pollen%{pageLogo}_%{safeLanguage}.png' />"
+ alt="Pollen"/>
+ </s:a>
+</p>
- <d:body/>
+<div id="top" class="${pageLogo}">
+ <!-- Login -->
+ <div id="po-header-connection" class="${pageLogo}">
+ <s:if test="userExists">
+ <span class="menu_elt" onmouseover="$('#compte_menu').show()"
+ onmouseout="$('#compte_menu').hide()">
+ ${user.displayName}
+ <div class="dropdown_menu" id="compte_menu" style="display: none;">
+ <div class="top_right${pageLogo}"></div>
+ <div class="top_left${pageLogo}"></div>
+ <ul class="top_middle${pageLogo}">
+ <li>
+ <s:a action="updateUser" method="input">
+ <s:text name="pollen.menu.preferences"/>
+ </s:a>
+ </li>
+ <li>
+ <s:a action="logout"><s:text name="pollen.menu.logout"/></s:a>
+ </li>
+ </ul>
+ </div>
+ </span>
+ </s:if>
+ <s:else>
+ <span onClick="$('#login_menu').toggle()"><s:text
+ name="pollen.menu.login"/></span>
+
+ <div class="dropdown_menu" id="login_menu" style="display: none;">
+ <div class="top_right${pageLogo}"></div>
+ <div class="top_left${pageLogo}"></div>
+ <s:form id="connection" action="login" method="POST">
+ <ul class="top_middle${pageLogo}">
+ <li>
+ <s:textfield key="login" label="%{getText('pollen.common.login')}"
+ size="10" required="true"/>
+ </li>
+ <li>
+ <s:password key="password"
+ label="%{getText('pollen.common.password')}" size="10"
+ required="true"/>
+ </li>
+ <li>
+ <s:submit id="submitform" action="login" key="pollen.action.login"
+ align="right"/>
+ </li>
+ </ul>
+ </s:form>
+ </div>
+ <s:text name="pollen.common.or"/>
+ <s:a action="registerUser" method="input">
+ <s:text name="pollen.menu.register"/>
+ </s:a>
+ </s:else>
+
+ </div>
+
+ <!-- Menu -->
+ <ul id="menu">
+ <li class="menu_elt">
+ <s:a action="home">
+ <s:text name="pollen.menu.home"/>
+ </s:a>
+ </li>
+ <li class="menu_elt" onmouseout="$('#menu1').hide()"
+ onmouseover="$('#menu1').show()">
+ <a><s:text name="pollen.menu.polls"/></a>
+
+ <div class="dropdown_menu" id="menu1" style="display:none">
+ <div class="top_right${pageLogo}"></div>
+ <div class="top_left${pageLogo}"></div>
+ <ul class="top_middle${pageLogo}">
+ <li>
+ <s:a action="createPoll" method="input">
+ <s:text name="pollen.menu.createPoll"/>
+ </s:a>
+ </li>
+ <s:if test="userExists">
+ <li>
+ <s:a action="displayCreatedPolls" method="input">
+ <s:text name="pollen.menu.displayCreatedPolls"/>
+ </s:a>
+ </li>
+ <li>
+ <s:a action="displayParticipatedPolls" method="input">
+ <s:text name="pollen.menu.displayParticipatedPolls"/>
+ </s:a>
+ </li>
+ <li>
+ <s:a action="displayVotingLists" method="input">
+ <s:text name="pollen.menu.displayVotingLists"/>
+ </s:a>
+ </li>
+ </s:if>
+ </ul>
+ </div>
+ </li>
+ <s:if test="userExists">
+ <s:if test="userIsAdmin">
+ <li class="menu_elt" onmouseout="$('#menu2').hide()"
+ onmouseover="$('#menu2').show()">
+ <a><s:text name="pollen.menu.admin"/></a>
+
+ <div class="dropdown_menu" id="menu2" style="display:none">
+ <div class="top_right${pageLogo}"></div>
+ <div class="top_left${pageLogo}"></div>
+ <ul class="top_middle${pageLogo}">
+ <li>
+ <s:a action="managePolls" method="input">
+ <s:text name="pollen.menu.managePolls"/>
+ </s:a>
+ </li>
+ <li>
+ <s:a action="manageUsers" method="input">
+ <s:text name="pollen.menu.manageUsers"/>
+ </s:a>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </s:if>
+ </s:if>
+ </ul>
</div>
-<%-- footer --%>
-<%@ include file="/WEB-INF/includes/footer.jsp" %>
+<!-- Corps de la page -->
+<div id="corps" class="cleanBoth clearfix">
+ <!-- Barre d'adresse -->
+ <div id="po-header-addressBar" class="${pageLogo}Address">
+ <%--<t:loop t:source="addressBar.items" t:value="item">--%>
+ <%-->--%>
+ <%--<strong>--%>
+ <%--<t:if test="item.address">--%>
+ <%--<a t:type="pagelink" t:page="prop:item.address" href="index">${item.name}</a>--%>
+ <%--<p:else>--%>
+ <%--${item.name}--%>
+ <%--</p:else>--%>
+ <%--</t:if>--%>
+ <%--</strong>--%>
+ <%--</t:loop>--%>
+ </div>
+
+ <!-- Contenu -->
+ <div id="${pageBodyId}" class="content">
+ <noscript>
+ <%--<div t:type="nuiton/feedback" t:id="errorJs" />--%>
+ </noscript>
+ <%--<div t:type="nuiton/feedback" t:id="borderFeedback" t:autoClear="false"/>--%>
+
+ <s:if test="hasActionMessages()">
+ <div class="fb-message">
+ <s:actionmessage/>
+ </div>
+ </s:if>
+
+ <s:if test="hasActionErrors()">
+ <div class="fb-error">
+ <s:actionerror/>
+ </div>
+ </s:if>
+ <d:body/>
+ </div>
+</div>
+
+<!-- Pied de page -->
+<div id="po-footer" class="${pageLogo}" xml:space="preserve">
+ <a href="http://maven-site.chorem.org/pollen">Pollen</a>
+ <a href="http://www.chorem.org/projects/pollen/files">
+ <%=PollenActionSupport.getApplicationVersion()%>
+ </a> -
+ <a href="http://www.gnu.org/licenses/gpl.html">
+ <s:text name="pollen.common.license"/>
+ </a> -
+ <span title="Copyright">©2009-${currentYear}</span>
+ <a href="http://www.codelutin.com">Code Lutin</a> -
+ <a href="http://www.chorem.org/projects/pollen/issues">
+ <s:text name="pollen.common.bugReport"/>
+ </a> -
+ <a href="http://list.chorem.org/cgi-bin/mailman/listinfo/pollen-users">
+ <s:text name="pollen.common.userSupport"/>
+ </a>
+</div>
+
</body>
</html>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp 2012-01-20 21:42:18 UTC (rev 3098)
@@ -25,4 +25,19 @@
<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
-<h2><s:text name="pollen.title.welcome"/></h2>
+<br/>
+<div class="center" style="margin-bottom:20px;">
+ <img src="<s:url value='/img/pollen_%{safeLanguage}.png' />" alt="Pollen logo"/>
+</div>
+
+<div class="center">
+ <s:a action="createForm">
+ <img src="<s:url value='/img/smallCreation_%{safeLanguage}.png' />" alt="poll creation"/>
+ </s:a>
+ <s:a action="createForm">
+ <img src="<s:url value='/img/smallVote_%{safeLanguage}.png' />" alt="vote"/>
+ </s:a>
+ <s:a action="createForm">
+ <img src="<s:url value='/img/smallVoteCounting_%{safeLanguage}.png' />" alt="voteCounting"/>
+ </s:a>
+</div>
\ No newline at end of file
Deleted: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp 2012-01-20 21:42:18 UTC (rev 3098)
@@ -1,40 +0,0 @@
-<%--
- #%L
- Pollen :: UI (strust2)
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2009 - 2012 CodeLutin
- %%
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- #L%
- --%>
-<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
-<%@ taglib prefix="s" uri="/struts-tags" %>
-
-<title><s:text name="pollen.title.login"/></title>
-
-<s:form method="POST">
- <fieldset>
- <legend>
- <s:text name="pollen.legend.login"/>
- </legend>
- <s:hidden key="redirectAction" label=""/>
- <s:textfield name="login" key="pollen.common.login" required="true"/>
- <s:password name="password" key="pollen.common.password" required="true"/>
- </fieldset>
- <br/>
- <s:submit action="login" key="pollen.action.login" align="right"/>
-</s:form>
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp 2012-01-20 21:42:18 UTC (rev 3098)
@@ -31,21 +31,22 @@
<fieldset>
<legend><s:text name="pollen.fieldset.connexionInformation"/></legend>
- <s:textfield name="login" key="pollen.common.login" required="true"/>
- <s:password name="oldPassword" key="pollen.common.oldPassword"
+ <s:hidden key="user.topiaId" label="" />
+ <s:textfield name="user.login" key="pollen.common.login" required="true"/>
+ <s:password name="user.password" key="pollen.common.oldPassword"
required="true"/>
- <s:password name="password" key="pollen.common.password"/>
- <s:password name="password2" key="pollen.common.password2"/>
+ <s:password name="newPassword" key="pollen.common.password"/>
+ <s:password name="newPassword2" key="pollen.common.password2"/>
</fieldset>
<fieldset>
<legend><s:text name="pollen.fieldset.userInformation"/></legend>
- <s:textfield name="email" key="pollen.common.email" required="true"/>
- <s:textfield name="lastname" key="pollen.common.lastname" required="true"/>
- <s:textfield name="firstname" key="pollen.common.firstname"
+ <s:textfield name="user.email" key="pollen.common.email" required="true"/>
+ <s:textfield name="user.lastname" key="pollen.common.lastname" required="true"/>
+ <s:textfield name="user.firstname" key="pollen.common.firstname"
required="true"/>
</fieldset>
<br/>
- <s:submit action="registerUser" key="pollen.action.register" align="right"/>
+ <s:submit action="updateUser" key="pollen.action.updateUser" align="right"/>
</s:form>
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/common.css
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/common.css (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/common.css 2012-01-20 21:42:18 UTC (rev 3098)
@@ -0,0 +1,126 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+
+.fleft {
+ float: left;
+}
+
+.fright {
+ float: right;
+}
+
+.clearfix {
+ display:block;
+}
+
+.clearfix:after {
+ content:".";
+ display:block;
+ height:0;
+ clear:both;
+ visibility:hidden;
+}
+
+.hidden {
+ display: none;
+}
+
+.display {
+ display: block;
+}
+
+.center {
+ text-align: center;
+}
+
+.selected {
+ background-color: yellow;
+}
+
+/*
+ * For struts
+*/
+
+.wwerr {
+ clear: both;
+ float: left;
+}
+
+.required {
+ color: #880000;
+ font-style: italic;
+}
+
+div.errorMessage{
+ clear: both;
+ float: left;
+}
+
+.errorMessage {
+ background: url("../img/exclamation.png") no-repeat ;
+ list-style: none;
+ font-style: italic;
+ padding-left: 25px;
+ color: #000;
+ border-color: #f00;
+ margin-left:0px;
+}
+
+.info_success {
+ background: no-repeat scroll 8px 5px #DFFFDF;
+ border: 2px solid #9FCF9F;
+ width: 800px;
+ margin-bottom: 5px;
+}
+.info_success ul{
+ margin: 5px;
+ padding-left: 5px;
+}
+.info_success li{
+ background: url("../img/true.png") no-repeat ;
+ list-style: none;
+ font-style: italic;
+ padding-left: 25px;
+ color: #005F00;
+ margin-left:0px;
+}
+
+.info_error {
+ background: no-repeat scroll 8px 5px #FFE3E3;
+ border: 2px solid #DD0000;
+ width: 800px;
+ margin-bottom: 5px;
+}
+.info_error ul{
+ margin: 5px;
+ padding-left: 5px;
+}
+.info_error li{
+ background: url("../img/exclamation.png") no-repeat ;
+ list-style: none;
+ font-style: italic;
+ padding-left: 25px;
+ color: #880000;
+ margin-left:0px;
+}
\ No newline at end of file
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/common.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/main.css
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/main.css (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/main.css 2012-01-20 21:42:18 UTC (rev 3098)
@@ -0,0 +1,469 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+body {
+ background-color: #FFF;
+ background-repeat: no-repeat;
+ background-position: bottom right;
+ background-attachment: fixed;
+ border: none;
+ font-family: "Trebuchet MS", Arial, sans-serif;
+ font-size: small;
+ width: 1000px;
+ margin: auto;
+}
+
+#CreationBody {
+ background-image: url("../img/bigCreation.png");
+}
+
+#VoteBody {
+ background-image: url("../img/bigVote.png");
+}
+
+#VoteCountingBody {
+ background-image: url("../img/bigVoteCounting.png");
+}
+
+body a {
+ color: #727a7e;
+}
+
+body a img {
+ border: none;
+}
+
+body ul {
+ list-style-type: none;
+ margin: 0px;
+ padding: 0px;
+}
+
+/*Haut de page*/
+.CreationLocalization, .VoteLocalization,
+.VoteCountingLocalization {
+ margin-top: 82px;
+}
+
+.IndexLocalization {
+ margin-top: 10px;
+}
+
+#po-header-localization {
+ text-align: right;
+ margin-bottom: 1px;
+}
+
+#po-header-localization a {
+ text-decoration: none;
+}
+
+#po-header-logo {
+ float: left;
+ margin-top: -102px;
+ margin-right: 10px;
+}
+
+#po-header-connection {
+ float: right;
+ vertical-align: top;
+ position: relative;
+ margin-right: 10px;
+ text-align: right;
+}
+
+#po-header-connection form {
+ margin: 0px;
+ padding: 0px;
+ width: 200px;
+}
+
+#po-header-connection a,
+#po-header-connection span {
+ padding: 1px;
+ padding-left: 5px;
+ padding-right: 5px;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+#po-header-connection a:hover,
+#po-header-connection span:hover {
+ -moz-border-radius: 10px;
+ background-color: #000;
+ color: #fff;
+}
+
+.Index {
+ background-color: #ff0;
+ color: #000;
+}
+
+.Creation {
+ background-color: #32b5c9;
+ color: #000;
+}
+
+.Vote {
+ background-color: #55cb00;
+ color: #000;
+}
+
+.VoteCounting {
+ background-color: #ff1920;
+ color: #000;
+}
+
+#top {
+ padding: 7px;
+ text-align: left;
+ vertical-align: middle;
+}
+
+#top a {
+ color: #000;
+ text-decoration: none;
+}
+
+#menu {
+ display: inline;
+}
+
+#menu li {
+ cursor: pointer;
+}
+
+#menu li a {
+ padding: 1px;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+#menu li a:hover {
+ -moz-border-radius: 10px;
+ background-color: #000;
+ color: #fff;
+}
+
+.menu_elt {
+ display: inline;
+ margin-right: 40px;
+ position: relative;
+}
+
+/** DROPDOWN MENU **/
+.dropdown_menu {
+ padding-top: 9px;
+ position: absolute;
+ z-index: 20;
+}
+
+.dropdown_menu .top_leftIndex {
+ height: 16px;
+ width: 16px;
+ border: none;
+ background-image: url("../img/topleft_menuIndex.png");
+ background-repeat: no-repeat;
+ background-position: left;
+ float: left;
+}
+
+.dropdown_menu .top_rightIndex {
+ height: 16px;
+ width: 16px;
+ border: none;
+ background-image: url("../img/topright_menuIndex.png");
+ background-repeat: no-repeat;
+ background-position: right;
+ float: right;
+}
+
+.dropdown_menu .top_middleIndex {
+ margin: 15px;
+ margin-bottom: 0px;
+ margin-top: 0px;
+ background-color: #ff0;
+ border-top: none;
+ -moz-border-radius-bottomright: 15px;
+ -moz-border-radius-bottomleft: 15px;
+ padding: 10px;
+ padding-top: 0px;
+ min-width: 140px;
+}
+
+.dropdown_menu .top_leftCreation {
+ height: 16px;
+ width: 16px;
+ border: none;
+ background-image: url("../img/topleft_menuCreation.png");
+ background-repeat: no-repeat;
+ background-position: left;
+ float: left;
+}
+
+.dropdown_menu .top_rightCreation {
+ height: 16px;
+ width: 16px;
+ border: none;
+ background-image: url("../img/topright_menuCreation.png");
+ background-repeat: no-repeat;
+ background-position: right;
+ float: right;
+}
+
+.dropdown_menu .top_middleCreation {
+ margin: 15px;
+ margin-bottom: 0px;
+ margin-top: 0px;
+ background-color: #32b5c9;
+ border-top: none;
+ -moz-border-radius-bottomright: 15px;
+ -moz-border-radius-bottomleft: 15px;
+ padding: 10px;
+ padding-top: 0px;
+ min-width: 140px;
+}
+
+.dropdown_menu .top_leftVote {
+ height: 16px;
+ width: 16px;
+ border: none;
+ background-image: url("../img/topleft_menuVote.png");
+ background-repeat: no-repeat;
+ background-position: left;
+ float: left;
+}
+
+.dropdown_menu .top_rightVote {
+ height: 16px;
+ width: 16px;
+ border: none;
+ background-image: url("../img/topright_menuVote.png");
+ background-repeat: no-repeat;
+ background-position: right;
+ float: right;
+}
+
+.dropdown_menu .top_middleVote {
+ margin: 15px;
+ margin-bottom: 0px;
+ margin-top: 0px;
+ background-color: #55cb00;
+ border-top: none;
+ -moz-border-radius-bottomright: 15px;
+ -moz-border-radius-bottomleft: 15px;
+ padding: 10px;
+ padding-top: 0px;
+ min-width: 140px;
+}
+
+.dropdown_menu .top_leftVoteCounting {
+ height: 16px;
+ width: 16px;
+ border: none;
+ background-image: url("../img/topleft_menuVoteCounting.png");
+ background-repeat: no-repeat;
+ background-position: left;
+ float: left;
+}
+
+.dropdown_menu .top_rightVoteCounting {
+ height: 16px;
+ width: 16px;
+ border: none;
+ background-image: url("../img/topright_menuVoteCounting.png");
+ background-repeat: no-repeat;
+ background-position: right;
+ float: right;
+}
+
+.dropdown_menu .top_middleVoteCounting {
+ margin: 15px;
+ margin-bottom: 0px;
+ margin-top: 0px;
+ background-color: #ff1920;
+ border-top: none;
+ -moz-border-radius-bottomright: 15px;
+ -moz-border-radius-bottomleft: 15px;
+ padding: 10px;
+ padding-top: 0px;
+ min-width: 140px;
+}
+
+.dropdown_menu li {
+ z-index: 25;
+ padding: 3px;
+ display: block;
+ letter-spacing: 0px;
+}
+
+#menu1 {
+ top: 12px;
+ left: -45px;
+}
+
+#menu2 {
+ top: 12px;
+ left: -45px;
+}
+
+#login_menu {
+ top: 12px;
+ right: -10px;
+}
+
+#compte_menu {
+ top: 12px;
+ right: -25px;
+}
+
+HTML>BODY DIV.t-error LI {
+ margin-left: 10px;
+}
+
+/* Le corps de la page */
+#corps {
+ text-align: justify;
+ color: #000;
+ border: none;
+ min-height: 300px;
+}
+
+#corps h1,h2,h3,h4 {
+ text-align: center;
+}
+
+#corps .titleIndex {
+ color: #fc0;
+ font-weight: bold;
+}
+
+/* TODO : refactor titleCreation usage by titlePoll */
+#corps .titlePoll,
+#corps .titleCreation {
+ color: #32b5c9;
+ font-weight: bold;
+}
+
+#corps .titleVote {
+ color: #55cb00;
+ font-weight: bold;
+}
+
+#corps .titleVoteCounting {
+ color: #ff1920;
+ font-weight: bold;
+}
+
+#corps h2 {
+ color: #727a7e;
+}
+
+#po-header-addressBar {
+ padding: 5px;
+ margin-left: 350px;
+}
+
+.IndexAddress {
+ background-color: #ffffaa;
+}
+
+.CreationAddress {
+ background-color: #98dae4;
+}
+
+.VoteAddress {
+ background-color: #b0f580;
+}
+
+.VoteCountingAddress {
+ background-color: #ff8c8f;
+}
+
+.content {
+ padding: 15px;
+}
+
+/* Pied de page */
+#po-footer {
+ padding: 5px;
+ font-size: small;
+ text-align: center;
+ margin-top: 20px;
+}
+
+#po-footer a,
+#po-footer span {
+ color:#727a7e;
+}
+
+/** old LoginComponent > Connexion page **/
+#loginCompForm fieldset {
+ border: 1px solid #aab;
+ padding: 15px;
+ padding-bottom: 10px;
+ width: 280px;
+ margin: auto;
+ margin-top: 20px;
+ vertical-align: top;
+ text-align: left;
+}
+
+#loginCompForm div {
+ margin-bottom: 10px;
+}
+
+#loginCompForm label {
+ display: block;
+ width: 100px;
+ float: left;
+}
+
+#loginCompForm .buttons {
+ text-align: center;
+ margin-top: 20px;
+ padding-left: 0px;
+}
+
+.fb-error {
+ width: 400px;
+ margin: auto;
+ text-align: center;
+ color: #000;
+ font-weight: bold;
+ padding: 3px;
+ border: solid;
+ border-color: #f00;
+ border-width: 2px;
+}
+
+.fb-info {
+ width: 400px;
+ margin: auto;
+ text-align: center;
+ color: #000;
+ padding: 3px;
+ border: solid;
+ border-color: #000;
+ border-width: 2px;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/main.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/pollen.css
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/pollen.css 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/pollen.css 2012-01-20 21:42:18 UTC (rev 3098)
@@ -1,158 +0,0 @@
-/*
- * #%L
- * Pollen :: UI (strust2)
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2012 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-/* global */
-body {
- font-family: "Trebuchet MS",Arial,sans-serif;
- width: 1000px;
- margin: auto;
- font-size: small;
-}
-
-/* header */
-#po-header-localization{
- text-align:right;
- margin-top: 10px;
-}
-#po-header-localization .po-contactlink {
- width:20px;
- background:url("../WEB-INF/img/contact.png") no-repeat center;
-}
-#po-header-localization .po-localelink {
- width:20px;
- background:url("../WEB-INF/img/en.png") no-repeat center;
-}
-#po-header-localization .po-localelink:lang(fr){
- background-image:url("../WEB-INF/img/fr.png")
-}
-
-#po-header-logo{
- float: left;
- margin-right: 10px;
- margin-top: -100px;
- width:350px;
- height:153px;
- background:url("../WEB-INF/img/pollenIndex_en.png") no-repeat;
-}
-html:lang(fr) #po-header-logo {
- background-image:url("../WEB-INF/img/pollenIndex_fr.png")
-}
-
-#po-header-menu{
- padding: 7px;
- background-color: #FFFF00;
-}
-#po-header-menu #po-header-connection {
- float:right;
-}
-#po-header-menu #po-header-connection #po-header-login-box{
- display:none;
-}
-#po-header-menu #po-header-connection-menu{
- margin:0;
- padding:0;
-}
-#po-header-menu #po-header-connection-menu li{
- display:inline
-}
-#po-header-menu #po-header-connection span{
- cursor:pointer;
- padding: 1px 5px;
-}
-#po-header-menu #po-header-connection span:hover{
- background-color: #000000;
- border-radius: 10px 10px 10px 10px;
- color: white;
-}
-#po-header-menu #po-header-connection a{
- color: black;
- text-decoration:none;
-}
-#po-header-menu #po-header-connection a:hover{
- color: white;
-}
-
-/* footer */
-#po-footer {
- background-color: #FFFF00;
- font-size: small;
- margin-top: 20px;
- padding: 5px;
- text-align: center;
- color: #727A7E;
-}
-#po-footer a{
- color: #727A7E;
-}
-
-/* page content */
-.page #po-placebar {
- background-color: #FFFFAA;
- margin-left: 350px;
- padding: 5px;
-}
-.page #po-placebar .pbitem {
- font-weight:bold;
-}
-.page #po-placebar .pbitem:before{
- content:"> ";
-}
-.page .content {
- padding: 15px;
-}
-
-/* page : home page */
-#po-homelogo {
- width:20px;
- background:url("../WEB-INF/img/pollen.png") no-repeat center;
- margin:auto;
- width:260px;
- height:200px;
-}
-#po-homeactions {
- text-align:center;
-}
-#po-homeactions .createpoll{
- background:url("../WEB-INF/img/smallCreation_en.png") no-repeat center;
- width:250px;
- height:100px;
-}
-html:lang(fr) #po-homeactions .createpoll {
- background-image:url("../WEB-INF/img/smallCreation_fr.png")
-}
-#po-homeactions .mypoll{
- background:url("../WEB-INF/img/smallVote_en.png") no-repeat center;
- width:200px;
- height:100px;
-}
-html:lang(fr) #po-homeactions .mypoll {
- background-image:url("../WEB-INF/img/smallVote_fr.png")
-}
-#po-homeactions .votecounting{
- background:url("../WEB-INF/img/smallVoteCounting_en.png") no-repeat center;
- width:250px;
- height:100px;
-}
-html:lang(fr) #po-homeactions .votecounting {
- background-image:url("../WEB-INF/img/smallVoteCounting_fr.png")
-}
\ No newline at end of file
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/screen.css
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/screen.css 2012-01-20 16:48:46 UTC (rev 3097)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/screen.css 2012-01-20 21:42:18 UTC (rev 3098)
@@ -21,9 +21,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
-* {
- font-family: sans-serif;
-}
+/** {*/
+ /*font-family: sans-serif;*/
+/*}*/
.inline {
display:inline;
@@ -45,24 +45,10 @@
font-size: 11px;
}
-#body {
- /*min-height: 500px;*/
- float: left;
- /*left: 275px;*/
- padding: 10px;
- width: 99%;
-}
-
.clearBoth {
clear: both;
}
-#footer {
- /*margin-top: 120px;*/
- clear: both;
- text-align: center;
-}
-
.hidden {
display:none;
}
@@ -109,7 +95,7 @@
padding-left: 5px;
}
.info_error li{
- background: url("../images/exclamation.png") no-repeat ;
+ background: url("../img/exclamation.png") no-repeat ;
list-style: none;
font-style: italic;
padding-left: 25px;
@@ -118,7 +104,7 @@
}
.errorMessage li{
- background: url("../images/exclamation.png") no-repeat ;
+ background: url("../img/exclamation.png") no-repeat ;
list-style: none;
font-style: italic;
padding-left: 25px;
@@ -129,6 +115,7 @@
.verticalAlignTop {
vertical-align: top;
}
+
fieldset, hr , .cleanBoth{
clear: both
}
@@ -152,7 +139,7 @@
float: left;
}
.errorMessage {
- background: url("../images/exclamation.png") no-repeat ;
+ background: url("../img/exclamation.png") no-repeat ;
list-style: none;
font-style: italic;
padding-left: 25px;
@@ -173,77 +160,3 @@
.clearfix {
display: block;
}
-
-#footer {
- /*background: url(../images/footer.png) repeat-x;*/
- /*height: 45px;*/
- /*padding: 10px 20px 15px 20px;*/
- /*margin: 30px 0;*/
- position: relative;
- /*text-transform: uppercase;*/
- text-align:center;
- /*color: #fff;*/
- /*font-size: 140%;*/
-}
-
-#footer ul {
- width: 1000px;
- margin: 0 auto;
-}
-
-div#headerRight {
- float:right;
-}
-
-div#headerRight div {
- float: right;
-}
-
-#headerRight ul {
- display:inline;
- line-height: 20px;
- padding: 0 5px;
-}
-
-#headerRight li {
- display:inline;
- padding: 0 5px;
-}
-
-ul.toolbar {
- display:inline;
- /*line-height: 20px;*/
- /*padding: 0 5px;*/
-}
-
-ul.toolbar li {
- display:inline;
- padding: 0 5px;
-}
-
-#footer ul li {
- display:inline;
- list-style: none;
- margin: 0 10px;
- line-height: 30px;
- padding: 0 5px;
-}
-
-#footer ul li a {
- /*color: #fff;*/
- text-decoration: none;
-}
-
-#footer ul li a:hover {
- /*color: #ffe600;*/
-}
-
-ul#mode_ul {
- margin: 5px;
- padding-left: 5px;
-}
-ul#mode_ul li{
- list-style: none;
- padding-left: 25px;
- margin-left:0px;
-}
Copied: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/favicon.png (from rev 3097, branches/pollen-2.0-beta-1/pollen-ui-tapestry/src/main/webapp/favicon.png)
===================================================================
(Binary files differ)
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1downarrow.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1downarrow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1leftarrow.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1leftarrow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1rightarrow.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1rightarrow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1uparrow.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/1uparrow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/2leftarrow.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/2leftarrow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/2rightarrow.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/2rightarrow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/7ter.jpg
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/7ter.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/close.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/close.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/copy.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/copy.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/count.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/count.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/delete.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/delete.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/edit.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/edit.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/editSmall.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/editSmall.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/exclamation.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/exclamation.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/export.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/export.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/feed.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/feed.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/feed2.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/feed2.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/gplv3.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/gplv3.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/help.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/help.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/import.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/import.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/lutin.gif
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/lutin.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen.png
===================================================================
(Binary files differ)
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenCreation_en.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenCreation_en.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenCreation_fr.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenCreation_fr.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVoteCounting_en.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVoteCounting_en.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVoteCounting_fr.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVoteCounting_fr.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVote_en.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVote_en.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVote_fr.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenVote_fr.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen_en.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen_en.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen_fr.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen_fr.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/refresh-22px.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/refresh-22px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/rep1.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/rep1.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/rep2.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/rep2.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/rep3.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/rep3.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/save.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/save.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallCreation.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallCreation.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVote.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVote.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVoteCounting.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVoteCounting.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menu.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menu.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuCreation.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuCreation.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuIndex.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuIndex.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuVote.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuVote.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuVoteCounting.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topleft_menuVoteCounting.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menu.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menu.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuCreation.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuCreation.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuIndex.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuIndex.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuVote.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuVote.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuVoteCounting.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/topright_menuVoteCounting.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/true.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/true.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/undo.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/undo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/vote.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/vote.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
Author: tchemit
Date: 2012-01-20 17:48:46 +0100 (Fri, 20 Jan 2012)
New Revision: 3097
Url: http://chorem.org/repositories/revision/pollen/3097
Log:
commit for friends...
Added:
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenContext.java
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenProperty.java
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenUtils.java
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/service/
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/service/legacy/
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/service/legacy/ServiceUser.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserEmailAlreadyUsedException.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserInvalidPasswordException.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserLoginAlreadyUsedException.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserNotFoundException.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/
branches/pollen-2.0-beta-1/pollen-ui-struts2/LICENSE.txt
branches/pollen-2.0-beta-1/pollen-ui-struts2/README.txt
branches/pollen-2.0-beta-1/pollen-ui-struts2/changelog.txt
branches/pollen-2.0-beta-1/pollen-ui-struts2/pom.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationContext.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationListener.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenSession.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenTopiaTransactionFilter.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/CreatePoll.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayCreatedPolls.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayParticipatedPolls.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayPoll.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayPollResult.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Logout.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UserPreferences.java
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/log4j.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/Login-validation.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/RegisterUser-validation.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/pollen.properties
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/validators.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/footer.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/header.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/i18n.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/metas.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/registerUser.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/web.xml
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/pollen.css
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/screen.css
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/bigCreation.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/bigVote.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/bigVoteCounting.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/contact.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/en.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/fr.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenIndex_en.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenIndex_fr.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallCreation_en.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallCreation_fr.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVoteCounting_en.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVoteCounting_fr.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVote_en.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVote_fr.png
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/index.jsp
branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/js/
branches/pollen-2.0-beta-1/pollen-ui-tapestry/
branches/pollen-2.0-beta-1/pollen-ui-webmotion/
Removed:
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenContext.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenProperty.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenUtils.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/service/legacy/ServiceUser.java
branches/pollen-2.0-beta-1/pollen-services/src/main/resources/pollen.properties
branches/pollen-2.0-beta-1/pollen-ui/
branches/pollen-2.0-beta-1/pollen-wm/
Modified:
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenBusinessException.java
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfiguration.java
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfigurationOption.java
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenTechnicalException.java
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenTopiaRootContextSupplierFactory.java
branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/entity/PollImpl.java
branches/pollen-2.0-beta-1/pollen-persistence/src/main/xmi/pollen.zargo
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/bean/PollenEmail.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/EmailService.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/FavoriteService.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollService.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenService.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContext.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContextImpl.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceFactory.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceSupport.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/VoteService.java
branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/AbstractPollenServiceTest.java
branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/EmailServiceTest.java
branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/FakeServiceContext.java
branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/FavoriteServiceTest.java
branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/PollServiceTest.java
branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/UserServiceTest.java
branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/VoteServiceTest.java
branches/pollen-2.0-beta-1/pollen-services/src/test/resources/pollen-fake.properties
branches/pollen-2.0-beta-1/pollen-ui-tapestry/pom.xml
branches/pollen-2.0-beta-1/pollen-ui-webmotion/pom.xml
branches/pollen-2.0-beta-1/pom.xml
Modified: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenBusinessException.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenBusinessException.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenBusinessException.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -59,6 +59,7 @@
public enum PollenExceptionType {
+
/** Exception when poll is not found in data * */
POLL_NOT_EXIST(n_("pollen.exception.poll_not_exist")),
/** Exception when user login exists in data * */
Modified: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfiguration.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfiguration.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfiguration.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,11 +1,11 @@
/*
* #%L
- * EchoBase :: Services
+ * Pollen :: Persistence
*
- * $Id: EchoBaseConfiguration.java 282 2012-01-15 21:30:41Z tchemit $
- * $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-entities/src/mai… $
+ * $Id$
+ * $HeadURL$
* %%
- * Copyright (C) 2011 Ifremer, Codelutin
+ * Copyright (C) 2009 - 2012 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Property changes on: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfiguration.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfigurationOption.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfigurationOption.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfigurationOption.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,11 +1,11 @@
/*
* #%L
- * EchoBase :: Entities
+ * Pollen :: Persistence
*
- * $Id: EchoBaseConfigurationOption.java 116 2011-11-24 23:06:43Z tchemit $
- * $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-entities/src/mai… $
+ * $Id$
+ * $HeadURL$
* %%
- * Copyright (C) 2011 Ifremer, Codelutin
+ * Copyright (C) 2009 - 2012 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -27,7 +27,6 @@
import org.nuiton.util.Version;
import java.io.File;
-import java.net.URL;
/**
* All EchoBase configuration options.
@@ -38,6 +37,8 @@
public enum PollenConfigurationOption implements ApplicationConfig.OptionDef {
/** login for default admin. */
+ DATA_DIR("pollen.dataDirectory", "Default directory where to put datas", "${HOME}/.pollen", File.class),
+ /** login for default admin. */
ADMIN_LOGIN("adminLogin", "login for default admin", "admin", String.class),
/** password for default admin. */
ADMIN_PASSWORD("adminPassword", "password for default admin", "pollen", String.class),
@@ -52,11 +53,11 @@
/** from for email sending configuration. */
EMAIL_FROM("email_from", "from for email sending configuration", "bot(a)pollen.org", String.class),
/** directory to store emails before sending them. */
- EMAIL_DIR("pollen.emails.directory", "directory to store emails before sending them", "${HOME}/.pollen/emails", File.class),
+ EMAIL_DIR("pollen.emails.directory", "directory to store emails before sending them", "${pollen.dataDirectory}/emails", File.class),
/** path for feed directory. */
- FEED_DIR("feedDir", "path for feed directory", "${HOME}/.pollen/feeds", File.class),
+ FEED_DIR("feedDir", "path for feed directory", "${pollen.dataDirectory}/feeds", File.class),
/** path for uploaded images directory. */
- IMG_DIR("upImgDir", "path for uploaded images directory", "${HOME}/.pollen/uploadedImages", File.class),
+ IMG_DIR("upImgDir", "path for uploaded images directory", "${pollen.dataDirectory}/uploadedImages", File.class),
/** nb votes to display per page. */
NB_VOTES_PER_PAGE("pollen.ui.nbVotesPerPage", "nb votes to display per page", "25", int.class),
/** Charset of Pollen. */
Property changes on: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenConfigurationOption.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenContext.java (from rev 3096, branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenContext.java)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenContext.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenContext.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,150 @@
+/*
+ * #%L
+ * Pollen :: Persistence
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen;
+
+import java.util.Date;
+import org.chorem.pollen.service.legacy.ServiceUser;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.framework.EntityFilter;
+import org.nuiton.util.ApplicationConfig;
+
+
+public interface PollenContext {
+
+ /**
+ * loadConfiguration :
+ * Load the application configuration :
+ * <pre>
+ * - Add entities implementation classes for Topia-persistence
+ * - Add model version for Topia-migration-service
+ * </pre>
+ * @param config ApplicationConfig
+ */
+ void loadConfiguration(ApplicationConfig config);
+
+ /**
+ * start :
+ * Start of the application. The application configuration will be loaded
+ * automatically if needed using {@link #loadDefaultConfiguration}. Also
+ * you can manually load the configuration using
+ * {@link #loadConfiguration(ApplicationConfig)}
+ * This start does :
+ * <pre>
+ * - Initialize i18n for error messages
+ * - Create default admin if needed (this will load the topiaRootContext).
+ * </pre>
+ * @param serviceUser to manage default admin if needed
+ */
+ void start(ServiceUser serviceUser);
+
+ /**
+ * stop :
+ * Stop the application. Close the Topia rootContext.
+ */
+ void stop();
+
+ /**
+ * getProperty :
+ * Get a property from the configuration.
+ * @param property PollenProperty
+ * @return String
+ */
+ String getProperty(PollenProperty property);
+
+ /**
+ * hasProperty :
+ * Test if the property is defined in this context
+ * @param property PollenProperty
+ * @return boolean
+ */
+ boolean hasProperty(PollenProperty property);
+
+ /**
+ * getConfiguration :
+ * Get the configuration of the application. Instantiate the default one
+ * if needed.
+ * @return ApplicationConfig
+ */
+ ApplicationConfig getConfiguration();
+
+ /**
+ * getCurrentDate :
+ * Return the current date from context
+ * @return Date
+ */
+ Date getCurrentDate();
+
+ /**
+ * encodePassword :
+ * @param password
+ * @return String
+ */
+ String encodePassword(String password);
+
+ /**
+ * createPollenUrlId :
+ * Create a unique UId for entities which need it (PollAccount, Poll).
+ * This UId represent the entity in UI module.
+ * @return String
+ */
+ String createPollenUrlId();
+
+ /**
+ * beginTransaction :
+ * @return TopiaContext
+ * @throws TopiaException
+ */
+ TopiaContext beginTransaction() throws TopiaException;
+
+ /**
+ * doCatch :
+ * @param eee
+ * @param message
+ * @param args
+ * @throws PollenException
+ */
+ void treateError(Exception eee, String message, Object... args)
+ throws PollenException;
+
+ /**
+ * doCatch :
+ * @param transaction
+ * @param eee
+ * @param message
+ * @param args
+ * @throws PollenException
+ */
+ void treateError(TopiaContext transaction, Exception eee,
+ String message, Object... args) throws PollenException;
+
+ /**
+ * doFinally :
+ * @param transaction
+ */
+ void closeTransaction(TopiaContext transaction);
+
+ public EntityFilter getNewFilter();
+
+} //PollenContext
Property changes on: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenContext.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenProperty.java (from rev 3096, branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenProperty.java)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenProperty.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenProperty.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,96 @@
+/*
+ * #%L
+ * Pollen :: Persistence
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+
+package org.chorem.pollen;
+
+/**
+ * PollenProp
+ *
+ * Created: 25 févr. 2010
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public enum PollenProperty {
+ /** version of the application **/
+ APP_VERSION("version"),
+ /**
+ * url of the server
+ * @deprecated don't need to use it from properties file. Will be analysing
+ * from url in ui module.
+ */
+ @Deprecated
+ SERVER_URL("siteUrl"),
+ /** login for default admin **/
+ ADMIN_LOGIN("adminLogin"),
+ /** password for default admin **/
+ ADMIN_PASSWORD("adminPassword"),
+ /** email for default admin **/
+ ADMIN_EMAIL("adminEmail"),
+ /** email for contact link **/
+ CONTACT_EMAIL(ADMIN_EMAIL.getKey()),
+ /** host for email sending configuration **/
+ EMAIL_HOST("email_host"),
+ /** port for email sending configuration **/
+ EMAIL_PORT("email_port"),
+ /** from for email sending configuration **/
+ EMAIL_FROM("email_from"),
+ /** directory to store emails before sending them **/
+ EMAIL_DIR("pollen.emails.directory"),
+ /** path for feed directory **/
+ FEED_DIR("feedDir"),
+ /** path for uploaded images directory **/
+ IMG_DIR("upImgDir"),
+ /** nb votes to display per page **/
+ NB_VOTES_PER_PAGE("pollen.ui.nbVotesPerPage"),
+ /** Charset of Pollen **/
+ CHARSET("pollen.charset");
+
+ private String key;
+
+ private static PollenContext context;
+
+ PollenProperty(String key) {
+ this.key = key;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ static void setContext(PollenContext cx) {
+ context = cx;
+ }
+
+ public String getValue() {
+ return context.getProperty(this);
+ }
+
+ public boolean hasValue() {
+ return !getValue().equals("");
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenProperty.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenTechnicalException.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenTechnicalException.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenTechnicalException.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,11 +1,11 @@
/*
* #%L
- * EchoBase :: Entities
+ * Pollen :: Persistence
*
- * $Id: EchoBaseTechnicalException.java 19 2011-11-08 08:56:23Z tchemit $
- * $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-entities/src/mai… $
+ * $Id$
+ * $HeadURL$
* %%
- * Copyright (C) 2011 Ifremer, Codelutin
+ * Copyright (C) 2009 - 2012 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Property changes on: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenTechnicalException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenTopiaRootContextSupplierFactory.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenTopiaRootContextSupplierFactory.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenTopiaRootContextSupplierFactory.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,11 +1,11 @@
/*
* #%L
- * Extranet NF-Logement :: Entities
+ * Pollen :: Persistence
*
- * $Id: EchoBaseTopiaRootContextSupplierFactory.java 114 2011-11-24 13:31:55Z sletellier $
- * $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-entities/src/mai… $
+ * $Id$
+ * $HeadURL$
* %%
- * Copyright (C) 2011 Cerqual
+ * Copyright (C) 2009 - 2012 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -49,22 +49,8 @@
private static final Log log =
LogFactory.getLog(PollenTopiaRootContextSupplierFactory.class);
- protected static class PollenTopiaRootContextSupplier implements Supplier<TopiaContext> {
+ public TopiaContext newEmbeddedDatabase(File dir, String configPath) {
- protected TopiaContext rootContext;
-
- public PollenTopiaRootContextSupplier(TopiaContext rootContext) {
- this.rootContext = rootContext;
- }
-
- @Override
- public TopiaContext get() {
- return rootContext;
- }
- }
-
- public Supplier<TopiaContext> newEmbeddedDatabase(File dir, String configPath) {
-
File databaseFile = new File(dir, "db");
String databaseAbsolutePath = databaseFile.getAbsolutePath();
@@ -100,17 +86,17 @@
log.debug("will output database in " + databaseAbsolutePath);
}
- return new PollenTopiaRootContextSupplier(rootContext);
+ return rootContext;
}
- public Supplier<TopiaContext> newDatabaseFromConfig(PollenConfiguration config) {
+ public TopiaContext newDatabaseFromConfig(PollenConfiguration config) {
Properties properties = config.getProperties();
return newDatabaseFromProperties(properties);
}
- public Supplier<TopiaContext> newDatabaseFromProperties(Properties properties) {
+ public TopiaContext newDatabaseFromProperties(Properties properties) {
if (log.isDebugEnabled()) {
log.debug("Database settings are :");
@@ -136,6 +122,6 @@
throw new TopiaRuntimeException(e);
}
- return new PollenTopiaRootContextSupplier(rootContext);
+ return rootContext;
}
}
Property changes on: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenTopiaRootContextSupplierFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Copied: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenUtils.java (from rev 3096, branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenUtils.java)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenUtils.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenUtils.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,45 @@
+/*
+ * #%L
+ * Pollen :: Persistence
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen;
+
+import java.util.Date;
+
+/**
+ * Created: 21 mai 2010
+ *
+ * @author fdesbois <fdesbois(a)codelutin.com>
+ * @version $Id$
+ */
+public class PollenUtils {
+
+ private static PollenContext context;
+
+ public static void setContext(PollenContext context) {
+ PollenUtils.context = context;
+ }
+
+ public static Date getCurrentDate() {
+ return context.getCurrentDate();
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/PollenUtils.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/entity/PollImpl.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/entity/PollImpl.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/entity/PollImpl.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -24,18 +24,20 @@
package org.chorem.pollen.entity;
+import org.chorem.pollen.PollenUtils;
+
import java.util.Date;
/**
* PollImpl
- *
+ * <p/>
* Created: 23 mars 2010
*
* @author fdesbois
* @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
+ * <p/>
+ * Mise a jour: $Date$
+ * par : $Author$
*/
public class PollImpl extends PollAbstract {
@@ -54,22 +56,34 @@
@Override
public boolean isStarted() {
- //FIXME : tc-2012-01-19 See if this does cause problem...
-// Date now = PollenUtils.getCurrentDate();
- Date now = new Date();
- return getBeginDate() == null || getBeginDate().before(now);
+ Date now = PollenUtils.getCurrentDate();
+ return isStarted(now);
}
@Override
public boolean isFinished() {
- //FIXME : tc-2012-01-19 See if this does cause problem...
-// Date now = PollenUtils.getCurrentDate();
- Date now = new Date();
- return getEndDate() != null && getEndDate().before(now);
+ Date now = PollenUtils.getCurrentDate();
+ return isFinished(now);
}
@Override
public boolean isRunning() {
- return isStarted() && !isFinished() && !isClosed();
+ Date now = PollenUtils.getCurrentDate();
+ return isRunning(now);
}
+
+ @Override
+ public boolean isStarted(Date currentDate) {
+ return getBeginDate() == null || getBeginDate().before(currentDate);
+ }
+
+ @Override
+ public boolean isFinished(Date currentDate) {
+ return getEndDate() != null && getEndDate().before(currentDate);
+ }
+
+ @Override
+ public boolean isRunning(Date currentDate) {
+ return isStarted(currentDate) && !isFinished(currentDate) && !isClosed();
+ }
}
Copied: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/service/legacy/ServiceUser.java (from rev 3096, branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/service/legacy/ServiceUser.java)
===================================================================
--- branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/service/legacy/ServiceUser.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/service/legacy/ServiceUser.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,48 @@
+/*
+ * #%L
+ * Pollen :: Persistence
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.service.legacy;
+
+import java.util.Map;
+import org.chorem.pollen.PollenBusinessException;
+import org.chorem.pollen.PollenException;
+import org.chorem.pollen.entity.UserAccount;
+import org.nuiton.topia.framework.EntityFilter;
+
+public interface ServiceUser {
+
+ UserAccount connect(String login, String password) throws PollenException, PollenBusinessException;
+
+ UserAccount getNewUser() throws PollenException;
+
+ void createUser(UserAccount user) throws PollenException, PollenBusinessException;
+
+ void updateUser(UserAccount user, boolean byAdmin) throws PollenException, PollenBusinessException;
+
+ void deleteUser(String login) throws PollenException;
+
+ Map<String, UserAccount> getUsers(EntityFilter filter) throws PollenException;
+
+ int getNbUsers() throws PollenException;
+
+} //ServiceUser
Property changes on: branches/pollen-2.0-beta-1/pollen-persistence/src/main/java/org/chorem/pollen/service/legacy/ServiceUser.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-persistence/src/main/xmi/pollen.zargo
===================================================================
(Binary files differ)
Deleted: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenContext.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenContext.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenContext.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,150 +0,0 @@
-/*
- * #%L
- * Pollen :: Services
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2012 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package org.chorem.pollen;
-
-import java.util.Date;
-import org.chorem.pollen.service.legacy.ServiceUser;
-import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.EntityFilter;
-import org.nuiton.util.ApplicationConfig;
-
-
-public interface PollenContext {
-
- /**
- * loadConfiguration :
- * Load the application configuration :
- * <pre>
- * - Add entities implementation classes for Topia-persistence
- * - Add model version for Topia-migration-service
- * </pre>
- * @param config ApplicationConfig
- */
- void loadConfiguration(ApplicationConfig config);
-
- /**
- * start :
- * Start of the application. The application configuration will be loaded
- * automatically if needed using {@link #loadDefaultConfiguration}. Also
- * you can manually load the configuration using
- * {@link #loadConfiguration(ApplicationConfig)}
- * This start does :
- * <pre>
- * - Initialize i18n for error messages
- * - Create default admin if needed (this will load the topiaRootContext).
- * </pre>
- * @param serviceUser to manage default admin if needed
- */
- void start(ServiceUser serviceUser);
-
- /**
- * stop :
- * Stop the application. Close the Topia rootContext.
- */
- void stop();
-
- /**
- * getProperty :
- * Get a property from the configuration.
- * @param property PollenProperty
- * @return String
- */
- String getProperty(PollenProperty property);
-
- /**
- * hasProperty :
- * Test if the property is defined in this context
- * @param property PollenProperty
- * @return boolean
- */
- boolean hasProperty(PollenProperty property);
-
- /**
- * getConfiguration :
- * Get the configuration of the application. Instantiate the default one
- * if needed.
- * @return ApplicationConfig
- */
- ApplicationConfig getConfiguration();
-
- /**
- * getCurrentDate :
- * Return the current date from context
- * @return Date
- */
- Date getCurrentDate();
-
- /**
- * encodePassword :
- * @param password
- * @return String
- */
- String encodePassword(String password);
-
- /**
- * createPollenUrlId :
- * Create a unique UId for entities which need it (PollAccount, Poll).
- * This UId represent the entity in UI module.
- * @return String
- */
- String createPollenUrlId();
-
- /**
- * beginTransaction :
- * @return TopiaContext
- * @throws TopiaException
- */
- TopiaContext beginTransaction() throws TopiaException;
-
- /**
- * doCatch :
- * @param eee
- * @param message
- * @param args
- * @throws PollenException
- */
- void treateError(Exception eee, String message, Object... args)
- throws PollenException;
-
- /**
- * doCatch :
- * @param transaction
- * @param eee
- * @param message
- * @param args
- * @throws PollenException
- */
- void treateError(TopiaContext transaction, Exception eee,
- String message, Object... args) throws PollenException;
-
- /**
- * doFinally :
- * @param transaction
- */
- void closeTransaction(TopiaContext transaction);
-
- public EntityFilter getNewFilter();
-
-} //PollenContext
Deleted: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenProperty.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenProperty.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenProperty.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,96 +0,0 @@
-/*
- * #%L
- * Pollen :: Services
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2012 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-package org.chorem.pollen;
-
-/**
- * PollenProp
- *
- * Created: 25 févr. 2010
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-public enum PollenProperty {
- /** version of the application **/
- APP_VERSION("version"),
- /**
- * url of the server
- * @deprecated don't need to use it from properties file. Will be analysing
- * from url in ui module.
- */
- @Deprecated
- SERVER_URL("siteUrl"),
- /** login for default admin **/
- ADMIN_LOGIN("adminLogin"),
- /** password for default admin **/
- ADMIN_PASSWORD("adminPassword"),
- /** email for default admin **/
- ADMIN_EMAIL("adminEmail"),
- /** email for contact link **/
- CONTACT_EMAIL(ADMIN_EMAIL.getKey()),
- /** host for email sending configuration **/
- EMAIL_HOST("email_host"),
- /** port for email sending configuration **/
- EMAIL_PORT("email_port"),
- /** from for email sending configuration **/
- EMAIL_FROM("email_from"),
- /** directory to store emails before sending them **/
- EMAIL_DIR("pollen.emails.directory"),
- /** path for feed directory **/
- FEED_DIR("feedDir"),
- /** path for uploaded images directory **/
- IMG_DIR("upImgDir"),
- /** nb votes to display per page **/
- NB_VOTES_PER_PAGE("pollen.ui.nbVotesPerPage"),
- /** Charset of Pollen **/
- CHARSET("pollen.charset");
-
- private String key;
-
- private static PollenContext context;
-
- PollenProperty(String key) {
- this.key = key;
- }
-
- public String getKey() {
- return key;
- }
-
- static void setContext(PollenContext cx) {
- context = cx;
- }
-
- public String getValue() {
- return context.getProperty(this);
- }
-
- public boolean hasValue() {
- return !getValue().equals("");
- }
-}
Deleted: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenUtils.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenUtils.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/PollenUtils.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,45 +0,0 @@
-/*
- * #%L
- * Pollen :: Services
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2012 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package org.chorem.pollen;
-
-import java.util.Date;
-
-/**
- * Created: 21 mai 2010
- *
- * @author fdesbois <fdesbois(a)codelutin.com>
- * @version $Id$
- */
-public class PollenUtils {
-
- private static PollenContext context;
-
- public static void setContext(PollenContext context) {
- PollenUtils.context = context;
- }
-
- public static Date getCurrentDate() {
- return context.getCurrentDate();
- }
-}
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/bean/PollenEmail.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/bean/PollenEmail.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/bean/PollenEmail.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -26,7 +26,6 @@
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.SimpleEmail;
-import org.chorem.pollen.PollenProperty;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
Deleted: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/service/legacy/ServiceUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/service/legacy/ServiceUser.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/service/legacy/ServiceUser.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,48 +0,0 @@
-/*
- * #%L
- * Pollen :: Services
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2012 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-package org.chorem.pollen.service.legacy;
-
-import java.util.Map;
-import org.chorem.pollen.PollenBusinessException;
-import org.chorem.pollen.PollenException;
-import org.chorem.pollen.entity.UserAccount;
-import org.nuiton.topia.framework.EntityFilter;
-
-public interface ServiceUser {
-
- UserAccount connect(String login, String password) throws PollenException, PollenBusinessException;
-
- UserAccount getNewUser() throws PollenException;
-
- void createUser(UserAccount user) throws PollenException, PollenBusinessException;
-
- void updateUser(UserAccount user, boolean byAdmin) throws PollenException, PollenBusinessException;
-
- void deleteUser(String login) throws PollenException;
-
- Map<String, UserAccount> getUsers(EntityFilter filter) throws PollenException;
-
- int getNbUsers() throws PollenException;
-
-} //ServiceUser
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/EmailService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/FavoriteService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenService.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenService.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenService.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,11 +1,11 @@
/*
* #%L
- * EchoBase :: Services
+ * Pollen :: Services
*
- * $Id: EchoBaseService.java 20 2011-11-08 09:01:17Z tchemit $
- * $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-services/src/mai… $
+ * $Id$
+ * $HeadURL$
* %%
- * Copyright (C) 2011 Ifremer, Codelutin
+ * Copyright (C) 2009 - 2012 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContext.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContext.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContext.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,11 +1,11 @@
/*
* #%L
- * EchoBase :: Services
+ * Pollen :: Services
*
- * $Id: EchoBaseServiceContext.java 54 2011-11-13 22:20:37Z tchemit $
- * $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-services/src/mai… $
+ * $Id$
+ * $HeadURL$
* %%
- * Copyright (C) 2011 Ifremer, Codelutin
+ * Copyright (C) 2009 - 2012 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContext.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContextImpl.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContextImpl.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContextImpl.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,11 +1,11 @@
/*
* #%L
- * EchoBase :: Services
+ * Pollen :: Services
*
- * $Id: EchoBaseServiceContextImpl.java 148 2011-12-05 22:55:34Z tchemit $
- * $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-services/src/mai… $
+ * $Id$
+ * $HeadURL$
* %%
- * Copyright (C) 2011 Ifremer, Codelutin
+ * Copyright (C) 2009 - 2012 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -24,10 +24,8 @@
package org.chorem.pollen.services;
import com.google.common.base.Preconditions;
-import com.google.common.base.Supplier;
import org.chorem.pollen.PollenConfiguration;
import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaException;
import java.util.Date;
import java.util.Locale;
@@ -61,17 +59,6 @@
public static PollenServiceContext newContext(
Locale locale,
- Supplier<TopiaContext> topiaContextSupplier,
- PollenConfiguration configuration,
- PollenServiceFactory serviceFactory) throws TopiaException {
- return newContext(locale,
- topiaContextSupplier.get().beginTransaction(),
- configuration,
- serviceFactory);
- }
-
- public static PollenServiceContext newContext(
- Locale locale,
TopiaContext transaction,
PollenConfiguration configuration,
PollenServiceFactory serviceFactory) {
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceContextImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceFactory.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceFactory.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceFactory.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,11 +1,11 @@
/*
* #%L
- * EchoBase :: Services
+ * Pollen :: Services
*
- * $Id: EchoBaseServiceFactory.java 20 2011-11-08 09:01:17Z tchemit $
- * $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-services/src/mai… $
+ * $Id$
+ * $HeadURL$
* %%
- * Copyright (C) 2011 Ifremer, Codelutin
+ * Copyright (C) 2009 - 2012 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceFactory.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceSupport.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceSupport.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceSupport.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,11 +1,11 @@
/*
* #%L
- * EchoBase :: Services
+ * Pollen :: Services
*
- * $Id: EchoBaseServiceSupport.java 213 2011-12-26 10:10:04Z tchemit $
- * $HeadURL: http://svn.forge.codelutin.com/svn/echobase/trunk/echobase-services/src/mai… $
+ * $Id$
+ * $HeadURL$
* %%
- * Copyright (C) 2011 Ifremer, Codelutin
+ * Copyright (C) 2009 - 2012 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/PollenServiceSupport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserEmailAlreadyUsedException.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserEmailAlreadyUsedException.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserEmailAlreadyUsedException.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,36 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.services;
+
+/**
+ * TODO
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class UserEmailAlreadyUsedException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserEmailAlreadyUsedException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserInvalidPasswordException.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserInvalidPasswordException.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserInvalidPasswordException.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,36 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.services;
+
+/**
+ * TODO
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class UserInvalidPasswordException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserInvalidPasswordException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserLoginAlreadyUsedException.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserLoginAlreadyUsedException.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserLoginAlreadyUsedException.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,36 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.services;
+
+/**
+ * TODO
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class UserLoginAlreadyUsedException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserLoginAlreadyUsedException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserNotFoundException.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserNotFoundException.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserNotFoundException.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,36 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.services;
+
+/**
+ * TODO
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class UserNotFoundException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserNotFoundException.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -24,52 +24,132 @@
package org.chorem.pollen.services;
import com.google.common.collect.Lists;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.PollenBinderHelper;
import org.chorem.pollen.PollenBusinessException;
+import org.chorem.pollen.PollenDAOHelper;
import org.chorem.pollen.PollenException;
import org.chorem.pollen.PollenTechnicalException;
import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.entity.UserAccountDAO;
import org.chorem.pollen.service.legacy.ServiceUserImpl;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.framework.EntityFilter;
+import org.nuiton.topia.framework.TopiaQuery;
+import org.nuiton.topia.persistence.util.TopiaEntityBinder;
+import org.nuiton.util.StringUtil;
+import org.nuiton.util.beans.Binder;
import java.util.Map;
+import static org.nuiton.i18n.I18n._;
+
public class UserService extends PollenServiceSupport {
- public UserAccount connect(String login, String password) throws PollenBusinessException {
- ServiceUserImpl service = new ServiceUserImpl();
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(UserService.class);
+
+ public UserAccount connect(String login, String password) throws UserNotFoundException, UserInvalidPasswordException {
try {
- UserAccount result = service.executeConnect(getTransaction(), Lists.newArrayList(), login, password);
- return result;
+ UserAccountDAO dao =
+ PollenDAOHelper.getUserAccountDAO(getTransaction());
+
+ UserAccount user = dao.findByLogin(login);
+
+ if (user == null) {
+ throw new UserNotFoundException();
+ }
+
+ String encodedPassword = encodePassword(password);
+ if (!encodedPassword.equals(user.getPassword())) {
+ throw new UserInvalidPasswordException();
+ }
+
+ return user;
} catch (TopiaException e) {
throw new PollenTechnicalException(e);
}
}
- public UserAccount getNewUser() throws PollenException {
- ServiceUserImpl service = new ServiceUserImpl();
- UserAccount result = service.executeGetNewUser();
- return result;
- }
+ public void createUser(UserAccount user) throws UserLoginAlreadyUsedException, UserEmailAlreadyUsedException {
- public void createUser(UserAccount user) throws PollenBusinessException {
- ServiceUserImpl service = new ServiceUserImpl();
try {
- service.executeCreateUser(getTransaction(), Lists.newArrayList(), user);
+ UserAccountDAO dao =
+ PollenDAOHelper.getUserAccountDAO(getTransaction());
+
+ UserAccount userByLogin = dao.findByLogin(user.getLogin());
+ if (userByLogin != null) {
+ throw new UserLoginAlreadyUsedException();
+ }
+ UserAccount userByEmail = dao.findByEmail(user.getEmail());
+ if (userByEmail != null) {
+ throw new UserEmailAlreadyUsedException();
+ }
+ String password = encodePassword(user.getPassword());
+ UserAccount userAccount = dao.create(
+ UserAccount.PROPERTY_LOGIN, user.getLogin(),
+ UserAccount.PROPERTY_PASSWORD, password
+ );
+ user.setTopiaId(userAccount.getTopiaId());
+ copyUserAccount(user, userAccount);
+
+
} catch (TopiaException e) {
throw new PollenTechnicalException(e);
}
}
- public void updateUser(UserAccount user, boolean byAdmin) throws PollenBusinessException {
+ public void updateUser(UserAccount user,
+ String newPassword,
+ boolean byAdmin) throws PollenBusinessException, UserEmailAlreadyUsedException {
+
ServiceUserImpl service = new ServiceUserImpl();
try {
+
+ UserAccountDAO dao =
+ PollenDAOHelper.getUserAccountDAO(getTransaction());
+
+ // Do not manage password for an admin update
+ // neither if password was not asked to change
+ if (!byAdmin && StringUtils.isNotEmpty(newPassword)) {
+
+ // Check the password
+// String encodedPassword = context.encodePassword(user.getPassword());
+ String encodedPassword = encodePassword(user.getPassword());
+
+// checkPassword(dao, user.getLogin(), encodedPassword);
+
+
+
+ }
+
+ // In case of email change, check if an other user has not already
+ // the new email
+ // FIXME-fdesbois-20100510 : replace by using id directly
+ TopiaQuery query = dao.createQuery().
+ addWhere(UserAccount.PROPERTY_LOGIN,
+ TopiaQuery.Op.NEQ, user.getLogin());
+ query.addEquals(UserAccount.PROPERTY_EMAIL, StringUtils.lowerCase(user.getEmail()));
+
+ // existing user found
+ if (dao.existByQuery(query)) {
+ throw new UserEmailAlreadyUsedException();
+ }
+
service.executeUpdateUser(getTransaction(), Lists.newArrayList(), user, byAdmin);
} catch (TopiaException e) {
throw new PollenTechnicalException(e);
}
}
+ public UserAccount getNewUser() throws PollenException {
+ ServiceUserImpl service = new ServiceUserImpl();
+ UserAccount result = service.executeGetNewUser();
+ return result;
+ }
+
public void deleteUser(String login) {
ServiceUserImpl service = new ServiceUserImpl();
try {
@@ -100,9 +180,54 @@
}
public String encodePassword(String password) {
- ServiceUserImpl service = new ServiceUserImpl();
- String result = service.encodePassword(password);
- return result;
+ return StringUtil.encodeMD5(password);
}
-} //ServiceUser
+ public void createDefaultUsers() {
+ UserAccount user = getNewUser();
+ user.setAdmin(true);
+ String login = getConfiguration().getAdminLogin();
+ user.setLogin(login);
+ user.setEmail(getConfiguration().getAdminEmail());
+ user.setNewPassword(getConfiguration().getAdminPassword());
+ try {
+ createUser(user);
+ if (log.isInfoEnabled()) {
+ log.info(_("pollen.info.admin.created", login));
+ }
+ } catch (Exception eee) {
+ if (log.isInfoEnabled()) {
+ log.info(_("pollen.info.admin.exists") + " : " +
+ _(eee.getMessage()));
+ }
+ }
+ }
+
+ /**
+ * Copy {@code source} user account to {@code destination} one.
+ * The email is lower cased in the {@code destination} user account.
+ *
+ * @param source user account to copy
+ * @param destination which receive the copy
+ * @see Binder#copy(Object, Object, String...)
+ */
+ protected void copyUserAccount(UserAccount source, UserAccount destination) {
+ TopiaEntityBinder<UserAccount> binder =
+ PollenBinderHelper.getSimpleTopiaBinder(UserAccount.class);
+
+ binder.copy(source, destination,
+ UserAccount.PROPERTY_ADMIN,
+ UserAccount.PROPERTY_FIRST_NAME,
+ UserAccount.PROPERTY_LAST_NAME);
+
+ // Don't keep case for email
+ destination.setEmail(StringUtils.lowerCase(source.getEmail()));
+
+// // Manage new password if needed
+// String password = source.getNewPassword();
+// if (StringUtils.isNotEmpty(password)) {
+//// destination.setPassword(context.encodePassword(password));
+// destination.setPassword(encodePassword(password));
+// }
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/UserService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/main/java/org/chorem/pollen/services/VoteService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Deleted: branches/pollen-2.0-beta-1/pollen-services/src/main/resources/pollen.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/main/resources/pollen.properties 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/main/resources/pollen.properties 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,83 +0,0 @@
-###
-# #%L
-# Pollen :: Services
-#
-# $Id$
-# $HeadURL$
-# %%
-# Copyright (C) 2009 - 2012 CodeLutin
-# %%
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# #L%
-###
-## Configuration de la base de donn\u00C3\u00A9es
-#hibernate.hbm2ddl.auto=update
-hibernate.show_sql=false
-hibernate.hbm2ddl.auto=update
-hibernate.dialect=org.hibernate.dialect.H2Dialect
-hibernate.connection.username=sa
-hibernate.connection.password=
-hibernate.connection.driver_class=org.h2.Driver
-hibernate.connection.url=jdbc:h2:file:~/.pollen/pollendb
-
-#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
-#hibernate.connection.username=pollen
-#hibernate.connection.password=pollen
-#hibernate.connection.driver_class=org.postgresql.Driver
-#hibernate.connection.url=jdbc:postgresql://intranet/pollen
-#hibernate.default_schema=public
-
-## Configuration de topia-migration
-#topia.service.migration=org.nuiton.topia.migration.TopiaMigrationServiceImpl
-#topia.service.migration.callbackhandlers=org.chorem.pollen.business.migration.PollenMigrationCallbackHandler
-#topia.service.migration.mappingsdir=oldmappings
-#topia.service.migration.modelnames=pollen
-
-## Initialisation de la base de donn\u00E9es
-#choiceType=DATE,IMAGE,TEXT
-#pollType=RESTRICTED,FREE,GROUP
-#voteCounting=NORMAL,PERCENTAGE,CONDORCET,NUMBER
-
-## Utilisateur par d\u00C3\u00A9faut
-adminLogin=admin
-adminPassword=pollen
-adminEmail=admin(a)domain.com
-
-## R\u00C3\u00A9pertoire des images transf\u00C3\u00A9r\u00C3\u00A9es
-upImgDir=${HOME}/.pollen/uploadedImages
-
-## Taille maximal des images transf\u00C3\u00A9r\u00C3\u00A9es (en octets)
-upload.filesize-max=1048576
-upload.requestsize-max=10485760
-
-## Configuration de l'envoi d'emails automatiques
-email_host=smtp
-email_port=25
-email_from=bot(a)pollen.org
-
-## R\u00E9pertoire des flux de syndication (Atom)
-feedDir=${HOME}/.pollen/feeds
-
-## Repertoire de stockage des mails a envoyer
-pollen.emails.directory=${HOME}/.pollen/emails
-pollen.charset=UTF-8
-
-## Nombre de votes a afficher par page
-pollen.ui.nbVotesPerPage=25
-
-## Adresse du site (utilis\u00C3\u00A9e pour les emails de rappel)
-##siteUrl=
-
-## Version de l'application
-version=${project.version}
Modified: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/AbstractPollenServiceTest.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/AbstractPollenServiceTest.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/AbstractPollenServiceTest.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,31 +1,31 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
package org.chorem.pollen.services;
-import org.chorem.pollen.PollenBusinessException;
-import org.chorem.pollen.PollenDAOHelper;
-import org.chorem.pollen.common.ChoiceType;
-import org.chorem.pollen.common.PollType;
-import org.chorem.pollen.common.VoteCountingType;
-import org.chorem.pollen.entity.Choice;
-import org.chorem.pollen.entity.ChoiceDAO;
-import org.chorem.pollen.entity.FavoriteList;
-import org.chorem.pollen.entity.FavoriteListDAO;
-import org.chorem.pollen.entity.FavoriteParticipant;
-import org.chorem.pollen.entity.FavoriteParticipantDAO;
-import org.chorem.pollen.entity.Poll;
-import org.chorem.pollen.entity.PollAccount;
-import org.chorem.pollen.entity.PollAccountDAO;
-import org.chorem.pollen.entity.PollDAO;
-import org.chorem.pollen.entity.UserAccount;
-import org.chorem.pollen.entity.UserAccountDAO;
import org.junit.Before;
import org.junit.Rule;
-import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.TopiaQuery;
-import org.nuiton.topia.persistence.TopiaEntity;
-import java.util.List;
-
/**
* For each test, create an isolated transaction context, in a H2 database.
* The H2 file is stored in a directory depending on the test class name, the
@@ -46,227 +46,4 @@
setServiceContext(serviceContext);
}
-
- /**
- * Create a user :<br /> <ul> <li>login : homer</li> <li>email :
- * homer(a)simpson.us</li> <li>password : wouhou</li> </ul> You can decide if
- * this user is an admin using {@code admin} argument.
- *
- * @param admin flag to create the user as an admin
- * @return the new UserAccount created
- * @throws TopiaException
- * @throws PollenBusinessException
- */
- public UserAccount createUser(boolean admin) throws TopiaException, PollenBusinessException {
-
- UserService userService = newService(UserService.class);
-
- UserAccount user = userService.getNewUser();
- user.setLogin("homer");
- user.setEmail("homer(a)simpson.us");
- user.setNewPassword("wouhou");
- user.setAdmin(admin);
-
- userService.createUser(user);
-
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- UserAccountDAO dao =
- PollenDAOHelper.getUserAccountDAO(transaction);
-
- UserAccount findUser = dao.findByLogin(user.getLogin());
- return findUser;
- } finally {
- transaction.closeContext();
- }
- }
-
- public FavoriteList createFavoriteList(String name, UserAccount user)
- throws TopiaException {
-
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- FavoriteListDAO dao =
- PollenDAOHelper.getFavoriteListDAO(transaction);
-
- FavoriteList list = dao.create(name, user);
- transaction.commitTransaction();
- return list;
- } finally {
- transaction.closeContext();
- }
- }
-
- public FavoriteParticipant createFavoriteParticipant(String name,
- String email, FavoriteList list) throws TopiaException {
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- FavoriteParticipantDAO dao =
- PollenDAOHelper.getFavoriteParticipantDAO(transaction);
-
- FavoriteParticipant participant = dao.create(name, email, list);
- transaction.commitTransaction();
- return participant;
- } finally {
- transaction.closeContext();
- }
- }
-
- public FavoriteList findFavoriteList(String id, String... propertiesLoad)
- throws TopiaException {
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- FavoriteListDAO dao =
- PollenDAOHelper.getFavoriteListDAO(transaction);
-
- TopiaQuery query = dao.createQuery().
- addEquals(TopiaEntity.TOPIA_ID, id).
- addLoad(propertiesLoad);
-
- FavoriteList result = dao.findByQuery(query);
-
- return result;
- } finally {
- transaction.closeContext();
- }
- }
-
- protected Poll createPoll(TopiaContext transaction,
- String title, UserAccount user,
- PollType type, VoteCountingType voteCounting)
- throws TopiaException {
-
- PollAccountDAO accountDAO =
- PollenDAOHelper.getPollAccountDAO(transaction);
-
- PollAccount creator = accountDAO.create(serviceContext.createPollenUrlId());
- creator.setName(user.getDisplayName());
- creator.setEmail(user.getEmail());
- creator.setUserAccount(user);
- creator.setAdmin(true);
-
- PollDAO pollDAO = PollenDAOHelper.getPollDAO(transaction);
-
- Poll poll = pollDAO.create(serviceContext.createPollenUrlId());
- poll.setCreator(creator);
- poll.setTitle(title);
- poll.setType(type);
- if (voteCounting == null) {
- voteCounting = VoteCountingType.NORMAL;
- }
- poll.setVoteCounting(voteCounting);
-
- return poll;
- }
-
- public Poll createFreePoll(String title, UserAccount user, VoteCountingType voteCounting)
- throws TopiaException {
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- Poll poll = createPoll(transaction, title, user, PollType.FREE, voteCounting);
-
- transaction.commitTransaction();
-
- return poll;
- } finally {
- transaction.closeContext();
- }
- }
-
- public List<Choice> addChoicesToPoll(Poll poll, ChoiceType choiceType, String... choices)
- throws TopiaException {
-
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- ChoiceDAO dao = PollenDAOHelper.getChoiceDAO(transaction);
-
- poll.setChoiceType(choiceType);
-
- for (String choice : choices) {
- Choice newChoice = dao.create();
- newChoice.setName(choice);
- newChoice.setType(choiceType);
- poll.addChoice(newChoice);
- }
-
- transaction.commitTransaction();
-
- return poll.getChoice();
- } finally {
- transaction.closeContext();
- }
- }
-
- public Poll createGroupPoll(String title,
- UserAccount user, VoteCountingType voteCounting,
- int nbParticipantsByGroup,
- String... groupNames)
- throws TopiaException {
-
- TopiaContext transaction = serviceContext.newTransaction();
- try {
-
- Poll poll = createPoll(transaction, title, user, PollType.GROUP, voteCounting);
-
- PollAccountDAO accountDAO =
- PollenDAOHelper.getPollAccountDAO(transaction);
-
- for (String groupName : groupNames) {
- PollAccount group = accountDAO.create(serviceContext.createPollenUrlId());
- group.setName(groupName);
- group.setList(true);
-
- for (int i = 1; i <= nbParticipantsByGroup; i++) {
- PollAccount participant =
- accountDAO.create(serviceContext.createPollenUrlId());
- participant.setName(groupName + "_participant" + i);
- participant.setEmail(groupName + "_email" + i + "@domain.org");
- participant.setWeight(1.);
- if (i == 1) {
- participant.setUserAccount(user);
- }
- group.addChild(participant);
- }
-
- poll.addPollAccount(group);
- }
-
- transaction.commitTransaction();
-
- return poll;
-
- } finally {
- transaction.closeContext();
- }
- }
-
- public <E extends TopiaEntity> E loadEntity(E source,
- String... propertiesToLoad)
- throws Exception {
-
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- TopiaQuery query = new TopiaQuery(source.getClass());
-
- query.addFetch(propertiesToLoad);
-
- String mainIdProperty =
- TopiaQuery.getProperty(query.getMainAlias(), TopiaEntity.TOPIA_ID);
-
- query.addEquals(mainIdProperty, source.getTopiaId()).
- setMaxResults(1);
-
- E result = (E) query.executeToEntity(transaction, source.getClass());
-
- if (result != null) {
- return result;
- }
-
- throw new NullPointerException("nothing to find... from id = " +
- source.getTopiaId());
- } finally {
- transaction.closeContext();
- }
- }
-
}
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/AbstractPollenServiceTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/EmailServiceTest.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/EmailServiceTest.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/EmailServiceTest.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
package org.chorem.pollen.services;
import org.junit.Before;
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/EmailServiceTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/FakeServiceContext.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/FakeServiceContext.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/FakeServiceContext.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
package org.chorem.pollen.services;
@@ -77,9 +100,8 @@
if (log.isInfoEnabled()) {
log.info("Test dir = " + testDir);
}
- rootContextSupplier = factory.newEmbeddedDatabase(
+ rootContext = factory.newEmbeddedDatabase(
testDir, "/" + CONFIGURATION_PATH);
- rootContext = rootContextSupplier.get();
}
@Override
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/FakeServiceContext.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/FavoriteServiceTest.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/FavoriteServiceTest.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/FavoriteServiceTest.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
package org.chorem.pollen.services;
import org.apache.commons.logging.Log;
@@ -2,13 +25,5 @@
import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.PollenBusinessException;
-import org.chorem.pollen.PollenDAOHelper;
-import org.chorem.pollen.entity.FavoriteList;
-import org.chorem.pollen.entity.FavoriteParticipant;
-import org.chorem.pollen.entity.FavoriteParticipantDAO;
-import org.chorem.pollen.entity.UserAccount;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
-import org.nuiton.topia.TopiaContext;
@@ -20,6 +35,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 2.0
*/
+@Ignore
public class FavoriteServiceTest extends AbstractPollenServiceTest {
/** Logger. */
@@ -36,137 +52,55 @@
@Test
public void testCreateFavoriteParticipant() throws Exception {
- //start("testCreateFavoriteParticipant");
- FavoriteService service = newService(FavoriteService.class);
-
- UserAccount user = createUser(false);
-
- final FavoriteList list = createFavoriteList("LIST", user);
-
- log.info("test 1 : no problem on creation");
- FavoriteParticipant participant =
- service.getNewFavoriteParticipant(list);
-
- participant.setName("participant");
- participant.setEmail("email");
-
- service.createFavoriteParticipant(participant);
-
- log.info("test 2 : problem on naturalId : participant already" +
- " set with same email");
-
- participant =
- service.getNewFavoriteParticipant(list);
-
- participant.setName("participant");
- participant.setEmail("email");
-
- try {
- service.createFavoriteParticipant(participant);
- } catch (PollenBusinessException eee) {
- Assert.assertEquals(PollenBusinessException.PollenExceptionType.PARTICIPANT_EXIST,
- eee.getType());
- }
-
- log.info("test 3 : email in naturalId can be null");
-
- participant =
- service.getNewFavoriteParticipant(list);
-
- participant.setName("participant2");
- participant.setEmail(null);
-
- service.createFavoriteParticipant(participant);
-
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- FavoriteParticipantDAO dao =
- PollenDAOHelper.getFavoriteParticipantDAO(transaction);
- String email = null;
-
- FavoriteParticipant result = dao.findByProperties(
- FavoriteParticipant.PROPERTY_NAME, "participant2",
- FavoriteParticipant.PROPERTY_EMAIL, email,
- FavoriteParticipant.PROPERTY_FAVORITE_LIST, list);
-
- Assert.assertNotNull(result);
- } finally {
- transaction.closeContext();
- }
}
@Test
public void testUpdateFavoriteParticipant() throws Exception {
- //start("testUpdateFavoriteParticipant");
- FavoriteService service = newService(FavoriteService.class);
-
- /** PREPARE DATA **/
- UserAccount user = createUser(false);
-
- FavoriteList list = createFavoriteList("LIST", user);
- FavoriteParticipant participant =
- createFavoriteParticipant("participant", null, list);
-
- /** EXEC METHOD **/
- log.info("test 1 : update ok : add email");
- participant.setEmail("email");
- participant.setWeight(1.);
-
- service.updateFavoriteParticipant(participant);
}
@Test
- @Ignore
public void testDeleteFavoriteParticipant() throws Exception {
}
@Test
- @Ignore
public void testGetFavoriteParticipant() throws Exception {
}
@Test
- @Ignore
public void testGetFavoriteParticipants() throws Exception {
}
@Test
- @Ignore
public void testGetFavoriteLists() throws Exception {
}
@Test
- @Ignore
public void testDeleteFavoriteList() throws Exception {
}
@Test
- @Ignore
public void testCreateFavoriteList() throws Exception {
}
@Test
- @Ignore
public void testGetNbFavoriteParticipants() throws Exception {
}
@Test
- @Ignore
public void testGetNewFavoriteParticipant() throws Exception {
}
@Test
- @Ignore
public void testGetNewFavoriteList() throws Exception {
}
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/FavoriteServiceTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/PollServiceTest.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/PollServiceTest.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/PollServiceTest.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,40 +1,33 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
package org.chorem.pollen.services;
-import org.apache.commons.lang.time.DateUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.PollenBusinessException;
-import org.chorem.pollen.PollenDAOHelper;
-import org.chorem.pollen.bean.UserPoll;
-import org.chorem.pollen.common.ChoiceType;
-import org.chorem.pollen.common.PollType;
-import org.chorem.pollen.common.VoteCountingType;
-import org.chorem.pollen.entity.Choice;
-import org.chorem.pollen.entity.ChoiceDAO;
-import org.chorem.pollen.entity.FavoriteList;
-import org.chorem.pollen.entity.Participant;
-import org.chorem.pollen.entity.ParticipantList;
-import org.chorem.pollen.entity.Poll;
-import org.chorem.pollen.entity.PollAccount;
-import org.chorem.pollen.entity.PollAccountImpl;
-import org.chorem.pollen.entity.PollDAO;
-import org.chorem.pollen.entity.PollImpl;
-import org.chorem.pollen.entity.UserAccount;
-import org.chorem.pollen.entity.Vote;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
-import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.framework.EntityFilter;
-import org.nuiton.topia.framework.TopiaFilter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
/**
* Tests the {@link PollService}.
*
@@ -44,19 +37,6 @@
@Ignore
public class PollServiceTest extends AbstractPollenServiceTest {
- /** Logger. */
- private static final Log log = LogFactory.getLog(PollServiceTest.class);
-
- private UserAccount user;
-
- private PollAccount creator;
-
- private PollAccount list1;
-
- private FavoriteList list2;
-
- private Poll poll;
-
@Override
@Before
public void setUp() throws Exception {
@@ -65,437 +45,24 @@
super.setUp();
- user = createUser(false);
-
- // Poll creator
- creator = new PollAccountImpl();
- creator.setName(user.getDisplayName());
- creator.setEmail(user.getEmail());
- creator.setUserAccount(user);
- creator.setAdmin(true);
-
- // Poll
- poll = new PollImpl();
- poll.setCreator(creator);
- poll.setTitle("Poll");
- poll.setUid(serviceContext.createPollenUrlId());
- poll.setChoice(new ArrayList<Choice>());
-
- // Participant Lists
- // First list : new list specific for poll restriction
- list1 = new PollAccountImpl();
- list1.setName("List1");
- list1.setList(true);
-
- Collection<Participant> participants = new ArrayList<Participant>();
- Participant participant1_1 = new PollAccountImpl();
- participant1_1.setName("participant1_1");
- participant1_1.setEmail("email1_1(a)domain.org");
- participants.add(participant1_1);
-
- Participant participant1_2 = new PollAccountImpl();
- participant1_2.setName("participant1_2");
- participants.add(participant1_2);
- list1.setParticipants(participants);
-
- // Second list : existing list from user favorites
- list2 = createFavoriteList("list2", user);
- Participant participant2_1 = createFavoriteParticipant(
- "participant2_1", "email2_1(a)domain.org", list2);
- Participant participant2_2 = createFavoriteParticipant(
- "participant2_2", "email2_2(a)domain.org", list2);
- Participant participant2_3 = createFavoriteParticipant(
- "participant2_3", null, list2);
-
- list2 = findFavoriteList(list2.getId(), FavoriteList.PROPERTY_FAVORITE_PARTICIPANT);
-
}
@Test
- public void testUpdatePollNotStartedWithChoice() throws PollenBusinessException, TopiaException {
+ public void testUpdatePollNotStartedWithChoice() throws TopiaException {
- // ---- PREPARE DATA ---- //
-
- PollService servicePoll = newService(PollService.class);
-
- // Prepare restricted Poll with 3 choices
- poll.setType(PollType.RESTRICTED);
- List<ParticipantList> participantLists = new ArrayList<ParticipantList>();
- participantLists.add(list1);
- // begin in 3 days
- Date beginDate = DateUtils.addDays(serviceContext.getCurrentTime(), 3);
- poll.setBeginDate(beginDate);
- poll.setChoiceType(ChoiceType.TEXT);
- poll.addNewChoice("choice1", null);
- poll.addNewChoice("choice2", "desc2");
- poll.addNewChoice("choice3", "desc3");
-
- Poll pollCreated = servicePoll.createPoll(poll, participantLists);
- // Ensure not started and not closed
- Assert.assertFalse(pollCreated.isStarted());
- Assert.assertFalse(pollCreated.isClosed());
-
- // Update Choices
- pollCreated.setChoiceType(ChoiceType.DATE);
- // Reset previous List
- pollCreated.setChoice(null);
- pollCreated.addNewChoice("choiceDate1", null);
- pollCreated.addNewChoice("choiceDate2", null);
- pollCreated.addNewChoice("choiceDate3", null);
-
- // ---- EXECUTE #1 : override choices ---- //
-
- Poll result = servicePoll.updatePoll(pollCreated);
- // Changing type is efficient
- Assert.assertEquals(ChoiceType.DATE, result.getChoiceType());
-
- // ---- CHECK RESULT ---- //
-
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- ChoiceDAO choiceDAO = PollenDAOHelper.getChoiceDAO(transaction);
-
- // This assume that only 3 choices exist, previous ones have been deleted
- long nbChoices = choiceDAO.count();
- Assert.assertEquals(3, nbChoices);
- } finally {
- transaction.closeContext();
- }
-
- // ---- EXECUTE #2 : update existing choice name ---- //
-
- Choice choiceDate1 = result.getChoice().get(0);
- choiceDate1.setName("changeChoice");
- result = servicePoll.updatePoll(result);
-
- // ---- CHECK RESULT ---- //
-
- Assert.assertEquals("changeChoice", result.getChoice().get(0).getName());
}
@Test
- public void testInternalCreateBasicPoll() throws Exception {
- //start("testInternalCreateBasicPoll");
+ public void testGetPollsByUser() throws TopiaException {
- PollService servicePoll = newService(PollService.class);
-
- // ---- PREPARE DATA ---- //
- // done in init() method
-
- // ---- EXECUTE ---- //
-
- log.info("test 1 : create poll with creator from existing user");
-
-
- Poll newPoll;
- {
- newPoll = servicePoll.createBasicPoll(poll);
- Assert.assertNotNull(newPoll);
- Assert.assertNotNull(newPoll.getTopiaId());
- Assert.assertNotNull(newPoll.getUid());
- Assert.assertEquals("Poll", newPoll.getTitle());
-
- PollAccount newCreatorAccount = newPoll.getCreator();
- Assert.assertNotNull(newCreatorAccount);
- Assert.assertNotNull(newCreatorAccount.getUid());
- Assert.assertEquals(user, newCreatorAccount.getUserAccount());
- Assert.assertTrue(newCreatorAccount.getAdmin());
-
- // Will save the poll and its creator
- getTransaction().commitTransaction();
- }
-
- // Verification
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- PollDAO dao = PollenDAOHelper.getPollDAO(transaction);
-
- Poll pollFound = dao.findByTopiaId(newPoll.getTopiaId());
- Assert.assertNotNull(pollFound);
- Assert.assertNotNull(pollFound.getCreator());
- Assert.assertEquals(user, pollFound.getCreator().getUserAccount());
-
- } finally {
- transaction.closeContext();
- }
-
- log.info("test 2 : create poll with new creator");
- poll.getCreator().setUserAccount(null);
-
- newPoll = servicePoll.createBasicPoll(poll);
- PollAccount newCreatorAccount = newPoll.getCreator();
- Assert.assertNull(newCreatorAccount.getUserAccount());
-
}
-// @Test
-// public void testInternalCreatePollAccounts() throws Exception {
-// //start("testInternalCreatePollAccounts");
-//
-// // ---- PREPARE DATA ---- //
-// PollService servicePoll = newService(PollService.class);
-// // list initializations in init() method
-//
-// Collection<ParticipantList> lists = new ArrayList<ParticipantList>();
-// // First list : new list specific for poll restriction
-// lists.add(list1);
-// // Second list : existing list from user favorites
-// lists.add(list2);
-//
-// // ---- EXECUTE ---- //
-//
-// log.info("test 1 : createPollAccounts from one new list : RESTRICTED");
-//
-//
-// TopiaContext transaction = serviceContext.newTransaction();
-// try {
-// // Only the first list of the collection will be considered : list1
-// // Create only person accounts
-// List<PollAccount> accounts = servicePoll.createPollAccounts(
-// transaction, PollType.RESTRICTED, lists);
-//
-// Assert.assertEquals(2, accounts.size());
-// for (PollAccount account : accounts) {
-// Assert.assertFalse(account.getList());
-// Assert.assertNotNull(account.getId());
-// Assert.assertNotNull(account.getUid());
-// // No link with user
-// Assert.assertNull(account.getUserAccount());
-// }
-//
-// } finally {
-// transaction.closeContext();
-// }
-//
-// log.info("test 2 : createPollAccounts from two lists : GROUP." +
-// " One of the list is an existing favorite one");
-//
-// transaction = serviceContext.newTransaction();
-// try {
-// // Create only list accounts
-// List<PollAccount> accounts = servicePoll.createPollAccounts(
-// transaction, PollType.GROUP, lists);
-//
-// Assert.assertEquals(2, accounts.size());
-// for (PollAccount account : accounts) {
-// Assert.assertTrue(account.getList());
-// Assert.assertNotNull(account.getId());
-// Assert.assertNotNull(account.getUid());
-// Assert.assertNotNull(account.getName());
-// // No link with user
-// Assert.assertNull(account.getUserAccount());
-// // Check on list1
-// if (account.getName().equals(list1.getName())) {
-// Assert.assertEquals(2, account.getChild().size());
-// // Check on list2
-// } else if (account.getName().equals(list2.getName())) {
-// Assert.assertEquals(3, account.getChild().size());
-// // Child are person accounts
-// for (PollAccount person : account.getChild()) {
-// Assert.assertFalse(person.getList());
-// Assert.assertNotNull(person.getId());
-// Assert.assertNotNull(person.getUid());
-// // No link with user
-// Assert.assertNull(person.getUserAccount());
-// }
-// }
-// }
-//
-// } finally {
-// transaction.closeContext();
-// }
-// }
-
@Test
- public void integrationCreatePollFree() throws Exception {
+ public void testFetchOnGetter() throws Exception {
- // ---- PREPARE DATA ---- //
- PollService servicePoll = newService(PollService.class);
-
- user = null;
- poll = servicePoll.getNewPoll(user);
- poll.getCreator().setName("homer");
- poll.setType(PollType.FREE);
- poll.setChoiceType(ChoiceType.TEXT);
- poll.addNewChoice("choice1", null);
- poll.addNewChoice("choice2", "desc2");
- poll.addNewChoice("choice3", "desc3");
-
- // ---- EXECUTE ---- //
- servicePoll.createPoll(poll, null);
-
- /** VERIFICATION RESULT **/
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- // No accounts + type = FREE + 3 TEXT choices
- PollDAO dao = PollenDAOHelper.getPollDAO(transaction);
- Assert.assertTrue(dao.existByNaturalId(poll.getUid()));
- Poll pollFound = dao.findByNaturalId(poll.getUid());
-
- // Check pollType and accounts
- Assert.assertEquals(PollType.FREE, pollFound.getType());
- Assert.assertEquals(0, pollFound.getPollAccount().size());
-
- // Check choices
- Assert.assertEquals(ChoiceType.TEXT, pollFound.getChoiceType());
- Assert.assertEquals(3, pollFound.getChoice().size());
-
- // Check creator
- Assert.assertNotNull(pollFound.getCreator());
- Assert.assertNull(pollFound.getCreator().getUserAccount());
- Assert.assertNotNull(pollFound.getCreator().getName());
-
- } finally {
- transaction.closeContext();
- }
}
@Test
- public void integrationCreatePollRestrictedFromNewList() throws Exception {
- /** PREPARE DATA **/
- PollService servicePoll = newService(PollService.class);
- poll = servicePoll.getNewPoll(user);
- poll.setType(PollType.RESTRICTED);
- poll.setChoiceType(ChoiceType.DATE);
- poll.addNewChoice("date1", null);
- poll.addNewChoice("date2", "desc2");
- poll.addNewChoice("date3", "desc3");
-
- Collection<ParticipantList> lists = new ArrayList<ParticipantList>();
- ParticipantList list = servicePoll.getNewPollList();
- lists.add(list);
-
- Collection<Participant> participants = new ArrayList<Participant>();
- Participant participant1 = servicePoll.getNewPollParticipant();
- participant1.setName("participant1");
- participant1.setEmail("email1");
- participant1.setWeight(1.);
- participants.add(participant1);
-
- Participant participant2 = servicePoll.getNewPollParticipant();
- participant2.setName("participant2");
- participant2.setEmail(null);
- participant2.setWeight(1.);
- participants.add(participant2);
- list.setParticipants(participants);
-
- /** EXEC METHOD **/
- servicePoll.createPoll(poll, lists);
-
- /** VERIFICATION RESULT **/
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- // Two person accounts + type = RESTRICTED + 3 DATE choices
- PollDAO dao = PollenDAOHelper.getPollDAO(transaction);
- Assert.assertTrue(dao.existByNaturalId(poll.getUid()));
- Poll pollFound = dao.findByNaturalId(poll.getUid());
-
- // Check pollType and accounts
- Assert.assertEquals(PollType.RESTRICTED, pollFound.getType());
- Assert.assertEquals(2, pollFound.getPollAccount().size());
-
- // Check choices
- Assert.assertEquals(ChoiceType.DATE, pollFound.getChoiceType());
- Assert.assertEquals(3, pollFound.getChoice().size());
-
- // Check creator
- Assert.assertEquals(user, pollFound.getCreator().getUserAccount());
-
- } finally {
- transaction.closeContext();
- }
- }
-
- @Test
- public void testGetPollsByUser() throws PollenBusinessException, TopiaException {
-
- PollService servicePoll = newService(PollService.class);
- VoteService voteService = newService(VoteService.class);
-
- createGroupPoll("POLL", user, null, 3, "group1", "group2");
-
- Poll freePoll = createFreePoll("POLL2", user, null);
-
- PollAccount participant = voteService.getNewPollAccount(user);
- participant.setChoiceVote(new ArrayList<Vote>());
-
- voteService.saveVote(freePoll, participant);
-
-
- /** EXEC METHOD **/
-// EntityFilter filter = context.getNewFilter();
- EntityFilter filter = new TopiaFilter();
- filter.setReference(user);
- List<UserPoll> polls = servicePoll.getPolls(filter);
-
- // POLL 2 : user both creator and participant (+2 accounts)
- // POLL : user creator + added in each group (+3 accounts)
-
- Assert.assertEquals(2, polls.size());
-
- UserPoll userPoll2 = polls.get(0);
- Assert.assertEquals("POLL2", userPoll2.getPoll().getTitle());
- Assert.assertTrue(userPoll2.isCreator());
- Assert.assertEquals(2, userPoll2.getAccounts().size());
-
- UserPoll userPoll1 = polls.get(1);
- Assert.assertEquals("POLL", userPoll1.getPoll().getTitle());
- Assert.assertTrue(userPoll1.isCreator());
- Assert.assertEquals(3, userPoll1.getAccounts().size());
- }
-
- @Test
- public void testFetchOnGetter() throws Exception, PollenBusinessException {
-
- PollService servicePoll = newService(PollService.class);
- VoteService voteService = newService(VoteService.class);
-
- poll = createFreePoll("POLL2", user, VoteCountingType.NORMAL);
- List<Choice> choices =
- addChoicesToPoll(poll, ChoiceType.TEXT, "choice1", "choice2", "choice3");
-
- PollAccount participant = voteService.getNewPollAccount(user);
- Vote voteImpl = voteService.getNewVote(choices.get(0));
- voteImpl.setVoteValue(1.);
- participant.addChoiceVote(voteImpl);
- voteImpl = voteService.getNewVote(choices.get(1));
- voteImpl.setVoteValue(1.);
- participant.addChoiceVote(voteImpl);
- voteImpl = voteService.getNewVote(choices.get(2));
- voteImpl.setVoteValue(1.);
- participant.addChoiceVote(voteImpl);
-
- voteService.saveVote(poll, participant);
-
- poll = loadEntity(poll);
-
- /** EXEC METHOD **/
-
- Poll pollFound = servicePoll.getPoll(poll.getUid(), Poll.PROPERTY_CHOICE);
-
-// Assert.assertEquals(3, pollFound.getChoice().size());
-
-// EntityFilter filter = context.getNewFilter();
- EntityFilter filter = new TopiaFilter();
- filter.setReference(pollFound);
- List<PollAccount> accounts = voteService.getVotes(filter);
-
- for (PollAccount account : accounts) {
- log.debug("Account : " + account.getUid());
- }
- Assert.assertEquals(1, accounts.size());
-
- Assert.assertNotNull(accounts.get(0).getChoiceVote());
- Assert.assertEquals(3, accounts.get(0).getChoiceVote().size());
-
- for (Vote vote : accounts.get(0).getChoiceVote()) {
- log.debug("Vote choice : " + vote.getChoice().getName() +
- " value=" + vote.getVoteValue());
- }
-
- }
-
- @Test
public void testGetNewPoll() throws Exception {
}
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/PollServiceTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/UserServiceTest.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/UserServiceTest.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/UserServiceTest.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,16 +1,31 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
package org.chorem.pollen.services;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.PollenBusinessException;
-import org.chorem.pollen.PollenDAOHelper;
-import org.chorem.pollen.entity.UserAccount;
-import org.chorem.pollen.entity.UserAccountDAO;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
-import org.nuiton.topia.TopiaContext;
/**
* Tests the {@link UserService}.
@@ -18,69 +33,9 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 2.0
*/
+@Ignore
public class UserServiceTest extends AbstractPollenServiceTest {
- /** Logger. */
- private static final Log log = LogFactory.getLog(UserServiceTest.class);
-
-// @Test
-// public void testCopyUserAccount() throws Exception {
-// //start("testManageNewPassword");
-//
-// UserService service = newService(UserService.class);
-//
-// UserAccount user = service.getNewUser();
-// user.setLogin("homer");
-// user.setNewPassword("wouhou");
-//
-// log.info("test 1 : Encode new password");
-// UserAccount destination = new UserAccountImpl();
-// service.copyUserAccount(user, destination);
-// Assert.assertNotNull(destination.getPassword());
-//
-// String expected = service.encodePassword("wouhou");
-// Assert.assertEquals(expected, destination.getPassword());
-//
-// log.info("test 2 : Do not encode new password -> newPassword empty");
-// user.setPassword(expected);
-// user.setNewPassword(null);
-// service.copyUserAccount(user, destination);
-// Assert.assertEquals(expected, destination.getPassword());
-// }
-//
-// @Test
-// public void testCheckPassword() throws Exception {
-// //start("testCheckPassword");
-//
-// UserService service = newService(UserService.class);
-//
-// UserAccount user = service.getNewUser();
-// user.setLogin("homer");
-// user.setNewPassword("wouhou");
-// service.createUser(user);
-//
-// String encodedPassword = service.encodePassword("wouhou");
-//
-// TopiaContext transaction = beginTransaction();
-// try {
-// UserAccountDAO dao = PollenDAOHelper.getUserAccountDAO(transaction);
-//
-// log.info("test 1 : Good password");
-// service.checkPassword(dao, "homer", encodedPassword);
-//
-// log.info("test 2 : Wrong password");
-// try {
-// service.checkPassword(dao, "homer", "bad");
-// } catch (PollenBusinessException eee) {
-// log.error("Error : " + eee.getMessage());
-// Assert.assertEquals(PollenBusinessException.PollenExceptionType.USER_WRONG_PASSWORD,
-// eee.getType());
-// }
-// } finally {
-// transaction.closeContext();
-// }
-// }
-
@Override
@Before
public void setUp() throws Exception {
@@ -92,190 +47,34 @@
@Test
public void testConnect() throws Exception {
- //start("testExecuteConnect");
- UserService service = newService(UserService.class);
-
- // The password is wouhou and login is homer
- UserAccount user = createUser(false);
-
- log.info("test 1 : Connection OK");
- UserAccount connected = service.connect("homer", "wouhou");
- Assert.assertEquals(user, connected);
-
- log.info("test 2 : Connection problem on login -> user not exist");
- try {
- service.connect("marge", "wouhou");
- } catch (PollenBusinessException eee) {
- log.error("Error : " + eee.getMessage());
- Assert.assertEquals(PollenBusinessException.PollenExceptionType.USER_NOT_EXIST,
- eee.getType());
- }
-
- log.info("test 3 : Connection problem on password -> " +
- "don't match with login");
- try {
- service.connect("homer", "coucou");
- } catch (PollenBusinessException eee) {
- log.error("Error : " + eee.getMessage());
- Assert.assertEquals(PollenBusinessException.PollenExceptionType.USER_WRONG_PASSWORD,
- eee.getType());
- }
}
@Test
public void testGetNewUser() throws Exception {
- //start("testGetNewUser");
- UserService service = newService(UserService.class);
-
- UserAccount user = service.getNewUser();
- Assert.assertNotNull(user);
- Assert.assertEquals(false, user.getAdmin());
}
@Test
public void testCreateUser() throws Exception {
- //start("testCreateUser");
- UserService service = newService(UserService.class);
-
- UserAccount user = service.getNewUser();
- user.setLogin("hsimpson");
- user.setEmail("hsimpson(a)springfield.us");
- user.setNewPassword("wouhou");
-
- String encodedPassword = service.encodePassword("wouhou");
-
- log.info("test 1 : Creation OK");
- service.createUser(user);
- //Assert.assertNotNull(user.getTopiaId());
- Assert.assertNotSame(encodedPassword, user.getPassword());
-
- log.info("test 2 : Creation problem on login -> user exist");
- UserAccount user2 = service.getNewUser();
- user2.setLogin("hsimpson");
- // Not the same email
- user2.setEmail("hsimpson(a)springfield.com");
- user2.setNewPassword("troubidou");
-
- try {
- service.createUser(user2);
- } catch (PollenBusinessException eee) {
- log.error("Error : " + eee.getMessage());
- Assert.assertEquals(PollenBusinessException.PollenExceptionType.USER_LOGIN_EXIST,
- eee.getType());
- }
-
- log.info("test 3 : Creation problem on email -> user exist");
- UserAccount user3 = service.getNewUser();
- user3.setLogin("homer");
- user3.setEmail("hsimpson(a)springfield.us");
- user3.setNewPassword("troubidou");
-
- try {
- service.createUser(user3);
- } catch (PollenBusinessException eee) {
- log.error("Error : " + eee.getMessage());
- Assert.assertEquals(PollenBusinessException.PollenExceptionType.USER_EMAIL_EXIST,
- eee.getType());
- }
-
- log.info("test 4 : Creation OK with no email");
- UserAccount user4 = service.getNewUser();
- user4.setLogin("marge");
- user4.setNewPassword("troubidou");
-
- service.createUser(user4);
- Assert.assertNull(user4.getEmail());
}
@Test
public void testUpdateUser() throws Exception {
- //start("testUpdateUser");
- UserService service = newService(UserService.class);
-
- UserAccount user1 = service.getNewUser();
- user1.setLogin("hsimpson");
- user1.setEmail("hsimpson(a)springfield.us");
- user1.setNewPassword("wouhou");
- service.createUser(user1);
-
- UserAccount user2 = service.getNewUser();
- String user2Password = "wouhou";
- user2.setLogin("homer");
- user2.setEmail("hsimpson(a)springfield.fr");
- user2.setNewPassword(user2Password);
- service.createUser(user2);
-
- log.info("test 1 : Can't change login -> don't match with password");
- user2.setLogin("homersimpson");
- user2.setPassword(user2Password);
- try {
- service.updateUser(user2, false);
- } catch (PollenBusinessException eee) {
- log.error("Error : " + eee.getMessage());
- Assert.assertEquals(PollenBusinessException.PollenExceptionType.USER_WRONG_PASSWORD,
- eee.getType());
- }
- user2.setLogin("homer");
-
- log.info("test 2 : Change email OK");
- user2.setEmail("homersimpson(a)springield.fr");
- user2.setPassword(user2Password);
- service.updateUser(user2, false);
-
- log.info("test 3 : Change email problem -> user exist");
- user2.setEmail(user1.getEmail());
- user2.setPassword(user2Password);
- try {
- service.updateUser(user2, false);
- } catch (PollenBusinessException eee) {
- log.error("Error : " + eee.getMessage());
- Assert.assertEquals(PollenBusinessException.PollenExceptionType.USER_EMAIL_EXIST,
- eee.getType());
- }
-
- // TODO test 4 with byAdmin = true
}
@Test
public void testDeleteUser() throws Exception {
- UserService service = newService(UserService.class);
-
- try {
- service.deleteUser("test");
- } catch (Exception eee) {
- log.error(eee);
- Assert.assertEquals(IllegalArgumentException.class,
- eee.getClass());
- }
-
- UserAccount user = service.getNewUser();
- user.setLogin("user");
- service.createUser(user);
-
- service.deleteUser("user");
-
- TopiaContext transaction = serviceContext.newTransaction();
- try {
- UserAccountDAO dao = PollenDAOHelper.getUserAccountDAO(transaction);
- UserAccount userFound = dao.findByLogin("user");
- Assert.assertNull(userFound);
- } finally {
- transaction.closeContext();
- }
}
- @Ignore
@Test
public void testGetUsers() throws Exception {
}
- @Ignore
@Test
public void testGetNbUsers() throws Exception {
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/UserServiceTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/VoteServiceTest.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/VoteServiceTest.java 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/VoteServiceTest.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,3 +1,26 @@
+/*
+ * #%L
+ * Pollen :: Services
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
package org.chorem.pollen.services;
import org.junit.Before;
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/test/java/org/chorem/pollen/services/VoteServiceTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-services/src/test/resources/pollen-fake.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-services/src/test/resources/pollen-fake.properties 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-services/src/test/resources/pollen-fake.properties 2012-01-20 16:48:46 UTC (rev 3097)
@@ -1,3 +1,26 @@
+###
+# #%L
+# Pollen :: Services
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2009 - 2012 CodeLutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# #L%
+###
hibernate.show_sql=false
hibernate.hbm2ddl.auto=update
Property changes on: branches/pollen-2.0-beta-1/pollen-services/src/test/resources/pollen-fake.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2
___________________________________________________________________
Added: svn:ignore
+ target
*.ipr
*.iws
*.iml
*.log
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/LICENSE.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/README.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/changelog.txt
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/pom.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/pom.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/pom.xml 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- ************************************************************* -->
+ <!-- *** POM Relationships *************************************** -->
+ <!-- ************************************************************* -->
+
+ <parent>
+ <groupId>org.chorem</groupId>
+ <artifactId>pollen</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.chorem.pollen</groupId>
+ <artifactId>pollen-ui-struts2</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>pollen-domain</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>pollen-persistence</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>pollen-services</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-validator</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.web</groupId>
+ <artifactId>nuiton-struts2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.nuiton.web</groupId>
+ <artifactId>nuiton-web</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts.xwork</groupId>
+ <artifactId>xwork-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>com.jgeppert.struts2.jquery</groupId>
+ <artifactId>struts2-jquery-plugin</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.jgeppert.struts2.jquery</groupId>
+ <artifactId>struts2-jquery-grid-plugin</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-json-plugin</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-sitemesh-plugin</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-runner</artifactId>
+ </dependency>
+
+ <!-- Provided dependencies -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Runtime dependencies -->
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- base h2 -->
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+
+ </dependencies>
+
+ <!-- ************************************************************* -->
+ <!-- *** Project Information ************************************* -->
+ <!-- ************************************************************* -->
+
+ <name>Pollen :: UI (strust2)</name>
+ <description>Interface Graphique Struts2 pour Pollen</description>
+
+
+ <!-- ************************************************************* -->
+ <!-- *** Build Settings ****************************************** -->
+ <!-- ************************************************************* -->
+
+ <packaging>war</packaging>
+
+ <properties>
+ <i18n.silent>true</i18n.silent>
+ <i18n.bundleOutputName>pollen-i18n</i18n.bundleOutputName>
+
+ <redmine.releaseFiles>
+ target/${project.build.finalName}.war
+ </redmine.releaseFiles>
+ </properties>
+
+ <build>
+
+ <!-- call result war : pollen-xxx.war -->
+ <finalName>pollen-${project.version}</finalName>
+
+ <!-- Add main class into war to make it executable -->
+ <plugins>
+
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>parserValidation</goal>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ <goal>bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <configuration>
+ <stopKey>A</stopKey>
+ <stopPort>1269</stopPort>
+ <webAppConfig>
+ <contextPath>/pollen</contextPath>
+ </webAppConfig>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.nuiton.web.war.JettyLauncher</mainClass>
+ </manifest>
+ </archive>
+ <overlays>
+ <overlay>
+ <groupId>org.nuiton.web</groupId>
+ <artifactId>nuiton-web</artifactId>
+ <type>jar</type>
+ <includes>
+ <include>**/war/Jetty*</include>
+ </includes>
+ </overlay>
+ <overlay>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-runner</artifactId>
+ <type>jar</type>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
+
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/pom.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationContext.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationContext.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationContext.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,55 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui;
+
+import org.chorem.pollen.PollenConfiguration;
+import org.nuiton.topia.TopiaContext;
+
+/**
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class PollenApplicationContext {
+
+ protected PollenConfiguration configuration;
+
+ protected TopiaContext rootContext;
+
+ public PollenConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ public void setConfiguration(PollenConfiguration configuration) {
+ this.configuration = configuration;
+ }
+
+ public TopiaContext getRootContext() {
+ return rootContext;
+ }
+
+ public void setRootContext(TopiaContext rootContext) {
+ this.rootContext = rootContext;
+ }
+
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationContext.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationListener.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationListener.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationListener.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,202 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui;
+
+import org.apache.commons.collections.MapUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.PollenConfiguration;
+import org.chorem.pollen.PollenTechnicalException;
+import org.chorem.pollen.PollenTopiaRootContextSupplierFactory;
+import org.chorem.pollen.entity.Poll;
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.services.PollenServiceContext;
+import org.chorem.pollen.services.PollenServiceContextImpl;
+import org.chorem.pollen.services.PollenServiceFactory;
+import org.chorem.pollen.services.UserService;
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+import org.nuiton.i18n.I18n;
+import org.nuiton.i18n.init.DefaultI18nInitializer;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.framework.TopiaContextImplementor;
+import org.nuiton.topia.framework.TopiaFilter;
+import org.nuiton.topia.framework.TopiaUtil;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import java.util.Date;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * To listen start or end of the application.
+ * <p/>
+ * On start we will load the configuration and check connection to internal
+ * database, creates schema and create an admin user in none found in database.
+ * <p/>
+ * On stop, just release the application configuration.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class PollenApplicationListener implements ServletContextListener {
+
+ /** Logger. */
+ protected static final Log log =
+ LogFactory.getLog(PollenApplicationListener.class);
+
+ private TopiaContext rootContext;
+
+ @Override
+ public void contextInitialized(ServletContextEvent sce) {
+
+ if (log.isInfoEnabled()) {
+ log.info("Application starting at " + new Date() + "...");
+ }
+
+ // init I18n
+ DefaultI18nInitializer i18nInitializer =
+ new DefaultI18nInitializer("pollen-i18n");
+ i18nInitializer.setMissingKeyReturnNull(true);
+ I18n.init(i18nInitializer, Locale.getDefault());
+
+ PollenApplicationContext applicationContext = new PollenApplicationContext();
+ sce.getServletContext().setAttribute(PollenActionSupport.APPLICATION_CONTEXT_PARAMETER, applicationContext);
+
+ // initialize configuration
+ PollenConfiguration configuration = new PollenConfiguration();
+ applicationContext.setConfiguration(configuration);
+
+ if (log.isInfoEnabled()) {
+ log.info("Initializing RootContextSupplier...");
+ }
+ PollenTopiaRootContextSupplierFactory factory =
+ new PollenTopiaRootContextSupplierFactory();
+ rootContext = factory.newDatabaseFromConfig(configuration);
+ applicationContext.setRootContext(rootContext);
+
+ // init database (and create minimal admin user if required)
+ try {
+ createAdminUser(applicationContext);
+ } catch (TopiaException e) {
+ throw new PollenTechnicalException("Could not init db", e);
+ }
+ }
+
+ @Override
+ public void contextDestroyed(ServletContextEvent sce) {
+
+ if (log.isInfoEnabled()) {
+ log.info("Application is ending at " + new Date() + "...");
+ }
+ if (rootContext != null) {
+ if (log.isInfoEnabled()) {
+ log.info("Shuting down RootContextSupplier...");
+ }
+ if (!rootContext.isClosed()) {
+ try {
+ rootContext.closeContext();
+ } catch (TopiaException te) {
+ if (log.isErrorEnabled()) {
+ log.error("Could not close rootContext", te);
+ }
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Creates the adminsitrator ({@code admin/admin}) on the database.
+ *
+ * @param applicationContext application context
+ * @throws TopiaException if could not create the user.
+ */
+ protected void createAdminUser(PollenApplicationContext applicationContext) throws TopiaException {
+
+ PollenConfiguration configuration =
+ applicationContext.getConfiguration();
+
+ PollenServiceFactory serviceFactory =
+ new PollenServiceFactory();
+ TopiaContext transaction = rootContext.beginTransaction();
+
+ try {
+ PollenServiceContext serviceContext = PollenServiceContextImpl.newContext(
+ Locale.getDefault(),
+ transaction,
+ configuration,
+ serviceFactory
+ );
+
+ UserService service =
+ serviceFactory.newService(UserService.class, serviceContext);
+
+ Map<String, UserAccount> users = service.getUsers(new TopiaFilter());
+
+ if (MapUtils.isEmpty(users)) {
+
+ // no users in database create the admin user
+ if (log.isInfoEnabled()) {
+ log.info("No user in database, will create default " +
+ "admin user (password admin).");
+ }
+
+ service.createDefaultUsers();
+ }
+ } finally {
+ transaction.closeContext();
+ }
+ }
+
+ protected boolean isSchemaCreated() throws TopiaException {
+
+ TopiaContextImplementor tx = (TopiaContextImplementor) rootContext;
+ try {
+ boolean schemaFound = TopiaUtil.isSchemaExist(
+ tx,
+ Poll.class.getName()
+ );
+
+ return schemaFound;
+
+ } finally {
+ closeTransaction(tx);
+ }
+ }
+
+ /**
+ * Try to close the given transaction.
+ *
+ * @param tx the transaction to close
+ * @throws TopiaException if could not close the transaction
+ */
+ protected void closeTransaction(TopiaContext tx) throws TopiaException {
+ if (tx != null && !tx.isClosed()) {
+ tx.closeContext();
+ }
+ }
+
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenApplicationListener.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenSession.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenSession.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenSession.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,51 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.entity.UserAccount;
+
+/**
+ * User session to put in servlet session.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class PollenSession {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(PollenSession.class);
+
+ /** User loggued account (if anonymous, then userAccount is null). */
+ private UserAccount userAccount;
+
+ public UserAccount getUserAccount() {
+ return userAccount;
+ }
+
+ public void setUserAccount(UserAccount userAccount) {
+ this.userAccount = userAccount;
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenSession.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenTopiaTransactionFilter.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenTopiaTransactionFilter.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenTopiaTransactionFilter.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,62 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.ui.actions.PollenActionSupport;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.TopiaRuntimeException;
+import org.nuiton.web.filter.TopiaTransactionFilter;
+
+/**
+ * EchoBase implementation of the {@link TopiaTransactionFilter}.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class PollenTopiaTransactionFilter extends TopiaTransactionFilter {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(PollenTopiaTransactionFilter.class);
+
+ @Override
+ protected TopiaContext beginTransaction() throws TopiaRuntimeException {
+ PollenApplicationContext applicationContext =
+ PollenActionSupport.getEchoBaseApplicationContext();
+
+ TopiaContext rootContext = applicationContext.getRootContext();
+ try {
+ TopiaContext transaction = rootContext.beginTransaction();
+ if (log.isDebugEnabled()) {
+ log.debug("Starts a new echo transaction " + transaction);
+ }
+ return transaction;
+ } catch (TopiaException eee) {
+ throw new TopiaRuntimeException("Could not start transaction", eee);
+ }
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/PollenTopiaTransactionFilter.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/CreatePoll.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/CreatePoll.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/CreatePoll.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,35 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+/**
+ * Creates a new poll.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class CreatePoll extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/CreatePoll.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayCreatedPolls.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayCreatedPolls.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayCreatedPolls.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,35 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+/**
+ * Display list of created polls.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class DisplayCreatedPolls extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayCreatedPolls.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayParticipatedPolls.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayParticipatedPolls.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayParticipatedPolls.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,35 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+/**
+ * Display list of participated polls.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class DisplayParticipatedPolls extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayParticipatedPolls.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayPoll.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayPoll.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayPoll.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,35 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+/**
+ * Display a poll.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class DisplayPoll extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayPoll.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayPollResult.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayPollResult.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayPollResult.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,35 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+/**
+ * Display results of a poll.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class DisplayPollResult extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/DisplayPollResult.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,81 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.services.UserInvalidPasswordException;
+import org.chorem.pollen.services.UserNotFoundException;
+import org.chorem.pollen.services.UserService;
+
+/**
+ * Login user to pollen.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class Login extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ protected String login;
+
+ protected String password;
+
+ public String getLogin() {
+ return login;
+ }
+
+ public void setLogin(String login) {
+ this.login = login;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ @InputConfig(methodName = "input")
+ @Override
+ public String execute() throws Exception {
+
+ UserService service = newService(UserService.class);
+
+ try {
+ UserAccount userAccount = service.connect(login, password);
+ getPollenSession().setUserAccount(userAccount);
+ return SUCCESS;
+ } catch (UserNotFoundException e) {
+ addFieldError("login", _("pollen.error.user.login.not.found"));
+ } catch (UserInvalidPasswordException e) {
+ addFieldError("password", _("pollen.error.user.invalid.password"));
+ }
+
+ // if error go back to input
+ return INPUT;
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Login.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Logout.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Logout.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Logout.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+/**
+ * Logout from pollen.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class Logout extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String execute() throws Exception {
+
+ getPollenSession().setUserAccount(null);
+
+ return SUCCESS;
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/Logout.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,208 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+import com.opensymphony.xwork2.ActionContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.StrutsStatics;
+import org.chorem.pollen.PollenConfiguration;
+import org.chorem.pollen.services.PollenService;
+import org.chorem.pollen.services.PollenServiceContext;
+import org.chorem.pollen.services.PollenServiceContextImpl;
+import org.chorem.pollen.services.PollenServiceFactory;
+import org.chorem.pollen.ui.PollenApplicationContext;
+import org.chorem.pollen.ui.PollenSession;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.framework.TopiaTransactionAware;
+import org.nuiton.web.filter.TopiaTransactionFilter;
+import org.nuiton.web.struts2.BaseAction;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * Pollen action support.
+ * <p/>
+ * <b>Note :</b> All actions must implement this class to have a better i18n
+ * support, when a i18n key is not translated it has a empty translation and
+ * we do NOT want this behaviour in gui, prefer to return the marked
+ * untranslated key.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class PollenActionSupport extends BaseAction implements TopiaTransactionAware {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Key to store the {@link PollenSession} instance in the session's map. */
+ protected static final String SESSION_PARAMETER = "pollenSession";
+
+ /** Key to store the single instance of the application context */
+ public static final String APPLICATION_CONTEXT_PARAMETER = "pollenApplicationContext";
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(PollenActionSupport.class);
+
+ private SimpleDateFormat dateFormat;
+
+ private SimpleDateFormat monthFormat;
+
+ public static PollenApplicationContext getEchoBaseApplicationContext() {
+ Map<String, Object> application = getActionContext().getApplication();
+ PollenApplicationContext applicationContext =
+ (PollenApplicationContext) application.get(APPLICATION_CONTEXT_PARAMETER);
+ return applicationContext;
+ }
+
+ protected PollenConfiguration getConfiguration() {
+ return getEchoBaseApplicationContext().getConfiguration();
+ }
+
+ /** Pollen User session. */
+ private transient PollenSession pollenSession;
+
+ /**
+ * Provides a way to get a service.
+ * <p/>
+ * Actions may <strong>not</strong> call it directly by use
+ * {@link #newService(Class)} instead.
+ */
+ protected transient PollenServiceFactory serviceFactory;
+
+ protected transient PollenServiceContext serviceContext;
+
+ protected transient TopiaContext transaction;
+
+ public PollenSession getPollenSession() {
+ if (pollenSession == null) {
+
+ // load it from session
+ Map<String, Object> strutsSession =
+ getActionContext().getSession();
+ PollenSession session = (PollenSession)
+ strutsSession.get(SESSION_PARAMETER);
+
+ if (session == null) {
+
+ // create an empty session
+ session = new PollenSession();
+
+ // and store it in the struts session
+ strutsSession.put(SESSION_PARAMETER, session);
+ }
+ pollenSession = session;
+ }
+ return pollenSession;
+ }
+
+ public static String getApplicationVersion() {
+ return getEchoBaseApplicationContext().getConfiguration().getVersion().toString();
+ }
+
+ /**
+ * Fabrique pour récupérer le ServiceContext tel qu'il devrait être fourni
+ * à la fabrication d'un service.
+ *
+ * @return service context
+ */
+ protected PollenServiceContext getServiceContext() {
+ if (serviceContext == null) {
+ serviceContext = PollenServiceContextImpl.newContext(
+ getLocale(),
+ getTransaction(),
+ getConfiguration(),
+ getServiceFactory()
+ );
+ }
+ return serviceContext;
+ }
+
+ public PollenServiceFactory getServiceFactory() {
+ if (serviceFactory == null) {
+ serviceFactory = new PollenServiceFactory();
+ }
+ return serviceFactory;
+ }
+
+ /**
+ * Sub-classes should use this method to easily get a service instance.
+ *
+ * @param serviceClass The type of service to instantiate
+ * @return A newly created service of the expected type with necessary data set
+ */
+ public <E extends PollenService> E newService(Class<E> serviceClass) {
+ E service = getServiceFactory().newService(serviceClass,
+ getServiceContext());
+ return service;
+ }
+
+ @Override
+ public TopiaContext getTransaction() {
+ if (transaction == null) {
+ HttpServletRequest request = (HttpServletRequest)
+ getActionContext().get(StrutsStatics.HTTP_REQUEST);
+ transaction = TopiaTransactionFilter.getTransaction(request);
+ }
+ return transaction;
+ }
+
+ @Override
+ public void setTransaction(TopiaContext transaction) {
+ this.transaction = transaction;
+ }
+
+ public String formatDate(Date date) {
+ String result = getDateFormat().format(date);
+ return result;
+ }
+
+ public String formatMonth(Date date) {
+ String result = getMonthFormat().format(date);
+ return result;
+ }
+
+ protected SimpleDateFormat getDateFormat() {
+ if (dateFormat == null) {
+ dateFormat = new SimpleDateFormat("dd/MM/yyyy");
+ }
+ return dateFormat;
+ }
+
+ protected SimpleDateFormat getMonthFormat() {
+ if (monthFormat == null) {
+ monthFormat = new SimpleDateFormat("mm-yyyy");
+ }
+ return monthFormat;
+ }
+
+ protected static ActionContext getActionContext() {
+ return ActionContext.getContext();
+ }
+
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/PollenActionSupport.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,87 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
+import org.chorem.pollen.entity.UserAccount;
+import org.chorem.pollen.entity.UserAccountImpl;
+import org.chorem.pollen.services.UserEmailAlreadyUsedException;
+import org.chorem.pollen.services.UserLoginAlreadyUsedException;
+import org.chorem.pollen.services.UserService;
+
+/**
+ * Register a new user.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class RegisterUser extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ protected UserAccount user;
+
+ protected String password2;
+
+ public UserAccount getUser() {
+ if (user == null) {
+ user = new UserAccountImpl();
+ }
+ return user;
+ }
+
+ public String getPassword2() {
+ return password2;
+ }
+
+ public void setPassword2(String password2) {
+ this.password2 = password2;
+ }
+
+ @InputConfig(methodName = "input")
+ @Override
+ public String execute() throws Exception {
+
+ UserService service = newService(UserService.class);
+
+ try {
+ service.createUser(user);
+ getTransaction().commitTransaction();
+
+ getPollenSession().setUserAccount(user);
+ return SUCCESS;
+ } catch (UserLoginAlreadyUsedException e) {
+ addFieldError("user.login", _("pollen.error.user.login.already.used"));
+ } catch (UserEmailAlreadyUsedException e) {
+ addFieldError("user.email", _("pollen.error.user.email.already.used"));
+ }
+
+ // if error go back to input
+
+ // reset password
+ user.setPassword(null);
+
+ return INPUT;
+ }
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/RegisterUser.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UserPreferences.java
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UserPreferences.java (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UserPreferences.java 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,35 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+package org.chorem.pollen.ui.actions;
+
+/**
+ * Register a new user.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class UserPreferences extends PollenActionSupport {
+
+ private static final long serialVersionUID = 1L;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/java/org/chorem/pollen/ui/actions/UserPreferences.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,16 @@
+pollen.action.login=Log me In
+pollen.action.register=Register
+pollen.error.email.required=You must provide a email
+pollen.error.login.required=You must provide a login
+pollen.error.password.required=Your must provide a password
+pollen.error.password2.required=You must repeat your password for confirmation
+pollen.error.passwords.not.equals=Les deux mots de passe saisis non identiques
+pollen.error.user.email.already.used=This email is already used
+pollen.error.user.invalid.password=Invalid password
+pollen.error.user.login.already.used=This login is already used
+pollen.error.user.login.not.found=User login not found
+pollen.fieldset.connexionInformation=Information de connexion
+pollen.fieldset.userInformation=Informations de l'utilisateur
+pollen.legend.login=Login
+pollen.title.login=Page de login
+pollen.title.register=Register
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_en_GB.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,16 @@
+pollen.action.login=M'identifier
+pollen.action.register=S'enregistrer
+pollen.error.email.required=Courriel obligatoire
+pollen.error.login.required=Login obligatoire
+pollen.error.password.required=Mot de passe obligatoire
+pollen.error.password2.required=Mot de passe répété obligatoire
+pollen.error.passwords.not.equals=Les deux mots de passe saisis non identiques
+pollen.error.user.email.already.used=Le courriel saisi est déjà utilisé par un autre utilisateur
+pollen.error.user.invalid.password=Mot de passe non valide
+pollen.error.user.login.already.used=Le login saisie est déjà utilisé par un autre utilisateur
+pollen.error.user.login.not.found=Utilisateur non trouvé
+pollen.fieldset.connexionInformation=Information de connexion
+pollen.fieldset.userInformation=Informations de l'utilisateur
+pollen.legend.login=Login
+pollen.title.login=Page de login
+pollen.title.register=Enregistrement
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/i18n/pollen-ui-struts2_fr_FR.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/log4j.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/log4j.properties (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/log4j.properties 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,30 @@
+###
+# #%L
+# Pollen :: UI (strust2)
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2009 - 2012 CodeLutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# #L%
+###
+log4j.rootCategory=ERROR, console
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d [%p] %c{2} %m%n
+
+log4j.logger.org.chorem.pollen=INFO
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/log4j.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/Login-validation.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/Login-validation.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/Login-validation.xml 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,44 @@
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+
+ <field name="login">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.login.required"/>
+ </field-validator>
+ </field>
+
+ <field name="password">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.password.required"/>
+ </field-validator>
+
+ </field>
+
+</validators>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/Login-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/RegisterUser-validation.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/RegisterUser-validation.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/RegisterUser-validation.xml 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,65 @@
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
+<validators>
+
+ <field name="user.login">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.login.required"/>
+ </field-validator>
+ </field>
+
+ <field name="user.password">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.password.required"/>
+ </field-validator>
+
+ </field>
+
+ <field name="password2">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.password2.required"/>
+ </field-validator>
+
+ <field-validator type="fieldexpression">
+ <param name="expression">password2.equals(user.password)</param>
+ <message key="pollen.error.passwords.not.equals"/>
+ </field-validator>
+
+ </field>
+
+ <field name="user.email">
+
+ <field-validator type="requiredstring">
+ <message key="pollen.error.email.required"/>
+ </field-validator>
+
+ </field>
+
+</validators>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/org/chorem/pollen/ui/actions/RegisterUser-validation.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/pollen.properties
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/pollen.properties (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/pollen.properties 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,33 @@
+###
+# #%L
+# Pollen :: UI (strust2)
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2009 - 2012 CodeLutin
+# %%
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# #L%
+###
+hibernate.show_sql=false
+hibernate.hbm2ddl.auto=update
+hibernate.dialect=org.hibernate.dialect.H2Dialect
+hibernate.connection.username=sa
+hibernate.connection.password=
+hibernate.connection.driver_class=org.h2.Driver
+hibernate.connection.url=jdbc:h2:file:${pollen.dataDirectory}/db/pollendb
+
+## Version de l'application
+pollen.version=${project.version}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/pollen.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+
+
+<!DOCTYPE struts PUBLIC
+ "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
+ "http://struts.apache.org/dtds/struts-2.1.7.dtd">
+
+<struts>
+
+ <bean class="org.nuiton.web.struts2.I18nTextProvider"
+ name="i18nTextProvider"
+ type="com.opensymphony.xwork2.TextProvider"/>
+ <constant name="struts.xworkTextProvider" value="i18nTextProvider"/>
+
+ <constant name="struts.ognl.allowStaticMethodAccess" value="true"/>
+ <constant name="struts.action.extension" value=",,"/>
+ <constant name="struts.locale" value="fr_FR"/>
+ <constant name="struts.i18n.reload" value="false"/>
+ <constant name="struts.configuration.xml.reload" value="false"/>
+ <constant name="struts.ui.theme" value="css_xhtml"/>
+ <constant name="struts.multipart.maxSize" value="209715200"/>
+
+ <!--Performance tuning-->
+ <!--see http://struts.apache.org/2.2.3/docs/performance-tuning.html-->
+ <constant name="struts.freemarker.templatesCache" value="true"/>
+
+ <package name="default" extends="json-default" abstract="true" namespace="/">
+
+ <interceptors>
+
+ <!-- to remove parameter from context -->
+ <interceptor name="paramRemover"
+ class="com.opensymphony.xwork2.interceptor.ParameterRemoverInterceptor"/>
+
+
+ <!-- basic stack -->
+ <interceptor-stack name="pollenBasicStack">
+ <interceptor-ref name="i18n"/>
+ <interceptor-ref name="basicStack"/>
+ </interceptor-stack>
+
+ <!-- params stack with params-->
+ <interceptor-stack name="pollenParamsPrepareParamsStack">
+ <interceptor-ref name="i18n"/>
+ <interceptor-ref name="paramsPrepareParamsStack"/>
+ </interceptor-stack>
+
+
+ </interceptors>
+
+ <!-- must be authenticated to perform any actions -->
+ <default-interceptor-ref name="pollenBasicStack"/>
+
+ <!-- default action to use everywhere (fix i18n when not translated) -->
+ <default-class-ref
+ class="org.chorem.pollen.ui.actions.PollenActionSupport"/>
+
+ </package>
+
+ <package name="applicationDefault" extends="default" namespace="/">
+
+ <default-interceptor-ref name="pollenParamsPrepareParamsStack"/>
+
+ <default-action-ref name="home"/>
+
+
+ <!-- go to home -->
+ <action name="home"
+ class="org.chorem.pollen.ui.actions.PollenActionSupport">
+
+ <result>/WEB-INF/jsp/home.jsp</result>
+
+ <interceptor-ref name="i18nStack"/>
+ <!-- remove the request_locale parameter from request -->
+ <interceptor-ref name="paramRemover">
+ <param name="paramNames">request_locale</param>
+ </interceptor-ref>
+ </action>
+
+ <!-- login -->
+ <action name="login" class="org.chorem.pollen.ui.actions.Login">
+ <result name="input">/WEB-INF/jsp/login.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- register user -->
+ <action name="registerUser"
+ class="org.chorem.pollen.ui.actions.RegisterUser">
+ <result name="input">/WEB-INF/jsp/registerUser.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- user preferences -->
+ <action name="userPreferences"
+ class="org.chorem.pollen.ui.actions.UserPreferences">
+ <result name="input">/WEB-INF/jsp/userPreferences.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- logout -->
+ <action name="logout" class="org.chorem.pollen.ui.actions.Logout">
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- create poll -->
+ <action name="createPoll"
+ class="org.chorem.pollen.ui.actions.CreatePoll">
+ <result name="input">/WEB-INF/jsp/createPoll.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- display poll -->
+ <action name="displayPoll"
+ class="org.chorem.pollen.ui.actions.DisplayPoll">
+ <result name="input">/WEB-INF/jsp/poll.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- display poll result -->
+ <action name="displayPollResult"
+ class="org.chorem.pollen.ui.actions.DisplayPollResult">
+ <result name="input">/WEB-INF/jsp/pollResult.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- display createds polls -->
+ <action name="displayCreatedPolls"
+ class="org.chorem.pollen.ui.actions.DisplayCreatedPolls">
+ <result name="input">/WEB-INF/jsp/createdPolls.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ <!-- display participated polls -->
+ <action name="displayParticipatedPolls"
+ class="org.chorem.pollen.ui.actions.DisplayParticipatedPolls">
+ <result name="input">/WEB-INF/jsp/participatedPolls.jsp</result>
+ <result>/WEB-INF/jsp/home.jsp</result>
+ </action>
+
+ </package>
+
+
+</struts>
+
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/struts.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/validators.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/validators.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/validators.xml 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+
+<!DOCTYPE validators PUBLIC
+ "-//OpenSymphony Group//XWork Validator Config 1.0//EN"
+ "http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd">
+<validators>
+ <!-- default validators from XWork framework -->
+ <validator name="int" class="com.opensymphony.xwork2.validator.validators.IntRangeFieldValidator"/>
+ <validator name="long" class="com.opensymphony.xwork2.validator.validators.LongRangeFieldValidator"/>
+ <validator name="short" class="com.opensymphony.xwork2.validator.validators.ShortRangeFieldValidator"/>
+ <validator name="double" class="com.opensymphony.xwork2.validator.validators.DoubleRangeFieldValidator"/>
+ <validator name="date" class="com.opensymphony.xwork2.validator.validators.DateRangeFieldValidator"/>
+ <validator name="expression" class="com.opensymphony.xwork2.validator.validators.ExpressionValidator"/>
+ <validator name="fieldexpression" class="com.opensymphony.xwork2.validator.validators.FieldExpressionValidator"/>
+ <validator name="conversion" class="com.opensymphony.xwork2.validator.validators.ConversionErrorFieldValidator"/>
+ <validator name="stringlength" class="com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator"/>
+ <validator name="required" class="com.opensymphony.xwork2.validator.validators.RequiredFieldValidator"/>
+ <validator name="requiredstring" class="com.opensymphony.xwork2.validator.validators.RequiredStringValidator"/>
+
+ <!-- default nuiton-validator validators -->
+ <validator name="nfieldexpression" class="org.nuiton.validator.xwork2.field.NuitonFieldExpressionValidator"/>
+ <validator name="nrequired" class="org.nuiton.validator.xwork2.field.SkipableRequiredFieldValidator"/>
+ <validator name="nrequiredstring" class="org.nuiton.validator.xwork2.field.SkipableRequiredStringFieldValidator"/>
+
+ <!-- Pollen validators -->
+
+</validators>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/resources/validators.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,53 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ page language="java" contentType="text/html; charset=utf-8"
+ pageEncoding="utf-8" %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
+<%@ taglib prefix="d" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<%-- metas in head --%>
+<%@ include file="/WEB-INF/includes/metas.jsp" %>
+
+<body>
+
+<%-- header --%>
+<%@ include file="/WEB-INF/includes/header.jsp" %>
+
+<%-- body --%>
+<h2><d:title default="Pollen"/></h2>
+
+<div id="body">
+
+ <d:body/>
+
+</div>
+
+<%-- footer --%>
+<%@ include file="/WEB-INF/includes/footer.jsp" %>
+
+</body>
+</html>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators/layout-default.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators.xml 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,37 @@
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+<decorators defaultdir="/WEB-INF/decorators">
+
+ <excludes>
+ <pattern>/css/*</pattern>
+ <pattern>/js/*</pattern>
+ <pattern>/images/*</pattern>
+ <pattern>/config-browser/*</pattern>
+ </excludes>
+
+ <decorator name="layout-default" page="layout-default.jsp">
+ <pattern>/*</pattern>
+ </decorator>
+
+</decorators>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/decorators.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/footer.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/footer.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/footer.jsp 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,40 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ page import="org.chorem.pollen.ui.actions.PollenActionSupport" %>
+
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<hr/>
+
+<!-- Pied de page -->
+<div id="po-footer">
+ <a href="">Pollen - <%=PollenActionSupport.getApplicationVersion()%></a>
+ <a href="http://www.chorem.org/projects/pollen/files">version</a> -
+ <a href="http://www.gnu.org/licenses/gpl.html">License</a> -
+ <span title="Copyright">© 2009 - 2012</span>
+ <a href="http://www.codelutin.com">Code Lutin</a> -
+ <a href="http://www.chorem.org/projects/pollen/issues">Bug report</a> -
+ <a href="http://list.chorem.org/cgi-bin/mailman/listinfo/pollen-users">Support</a>
+</div>
+
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/footer.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/header.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/header.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/header.jsp 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,144 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
+<%@ taglib prefix="d" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+
+<s:set var="userIsIn" value="%{#session.pollenSession.userAccount !=null}"/>
+<%--<s:set var="userIsAdmin" value="%{userIsIn && #session.pollenSession.userAccount.admin}"/>--%>
+
+<div class='displayBlock'>
+
+ <div class='floatLeft'>
+ <s:a action="home" namespace="/">Pollen</s:a>
+ </div>
+
+ <div id='headerRight'>
+ <div>
+ <s:if test="userIsIn">
+ <s:text name="pollen.label.user.login">
+ <s:param>
+ <s:property value="#session.pollenSession.userAccount.email"/>
+ </s:param>
+ </s:text>
+ <ul>
+ <li>
+ <s:a action="userPreferences" method="input">
+ <s:text name="pollen.menu.preferences"/></s:a>
+ </li>
+ <li>
+ <s:a action="logout">
+ <s:text name="pollen.menu.logout"/></s:a>
+ </li>
+ </ul>
+ </s:if>
+ <s:else>
+ <ul>
+ <li>
+ <s:a action="registerUser" method="input">
+ <s:text name="pollen.menu.register"/></s:a>
+ </li>
+ <li>
+ <s:a action="login" method="input">
+ <s:text name="pollen.menu.login"/></s:a>
+ </li>
+ </ul>
+ </s:else>
+ </div>
+ <br/>
+
+ <div class="cleanBoth">
+ <s:text name="pollen.label.language"/>
+ <ul>
+ <li>
+ <s:if
+ test="%{#session['WW_TRANS_I18N_LOCALE'] != null && #session['WW_TRANS_I18N_LOCALE'].language == 'en'}">
+ <s:text name="pollen.label.locale.english"/>
+ </s:if>
+ <s:else>
+ <s:a action="home" namespace="/">
+ <s:param name="request_locale">en_GB</s:param>
+ <s:text name="pollen.action.locale.english"/>
+ </s:a>
+ </s:else>
+ </li>
+ <li>
+ <s:if
+ test="%{#session['WW_TRANS_I18N_LOCALE'] == null || #session['WW_TRANS_I18N_LOCALE'].language == 'fr'}">
+ <s:text name="pollen.label.locale.french"/>
+ </s:if>
+ <s:else>
+ <s:a action="home" namespace="/">
+ <s:param name="request_locale">fr_FR</s:param>
+ <s:text name="pollen.action.locale.french"/>
+ </s:a>
+ </s:else>
+ </li>
+ </ul>
+ </div>
+ <br/>
+ </div>
+
+
+ <div class="cleanBoth">
+ <ul>
+ <s:if test="userIsIn">
+ <li>
+ <s:a action="createPoll" method="input">
+ <s:text name="echobase.menu.createPoll"/>
+ </s:a>
+ </li>
+ <li>
+ <s:a action="displayCreatedPolls" method="input">
+ <s:text name="echobase.menu.displayCreatedPolls"/>
+ </s:a>
+ </li>
+ <li>
+ <s:a action="displayParticipatedPolls" method="input">
+ <s:text name="echobase.menu.displayParticipatedPolls"/>
+ </s:a>
+ </li>
+ <li>
+ <s:a action="displayParticipatedPolls" method="input">
+ <s:text name="echobase.menu.displayParticipatedPolls"/>
+ </s:a>
+ </li>
+ <li>
+ <s:a action="displayVotingLists" method="input">
+ <s:text name="echobase.menu.displayVotingLists"/>
+ </s:a>
+ </li>
+ </s:if>
+ <s:else>
+ <li>
+ <s:a action="createPoll" method="input">
+ <s:text name="echobase.menu.createPoll"/>
+ </s:a>
+ </li>
+ </s:else>
+ </ul>
+ </div>
+
+</div>
+<hr/>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/header.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/i18n.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/i18n.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/i18n.jsp 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,24 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/i18n.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/metas.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/metas.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/metas.jsp 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,36 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
+<%@ taglib prefix="d" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>Pollen - <d:title default="Pollen"/></title>
+ <d:head/>
+ <link rel="stylesheet" type="text/css" href="<s:url value='/css/pollen.css' />"/>
+ <link rel="stylesheet" type="text/css" href="<s:url value='/css/screen.css' />"/>
+ <%--<link rel="icon" type="image/png"--%>
+ <%--href="<s:url value='/images/logo_codelutin.png' />"/>--%>
+ <sj:head jqueryui="true" jquerytheme="cupertino"/>
+</head>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/includes/metas.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,28 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+
+<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<h2><s:text name="pollen.title.welcome"/></h2>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/home.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,40 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="pollen.title.login"/></title>
+
+<s:form method="POST">
+ <fieldset>
+ <legend>
+ <s:text name="pollen.legend.login"/>
+ </legend>
+ <s:hidden key="redirectAction" label=""/>
+ <s:textfield name="login" key="pollen.common.login" required="true"/>
+ <s:password name="password" key="pollen.common.password" required="true"/>
+ </fieldset>
+ <br/>
+ <s:submit action="login" key="pollen.action.login" align="right"/>
+</s:form>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/login.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/registerUser.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/registerUser.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/registerUser.jsp 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,49 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="pollen.title.register"/></title>
+
+<s:form method="POST">
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.connexionInformation"/></legend>
+
+ <s:textfield name="user.login" key="pollen.common.login" required="true"/>
+ <s:password name="user.password" key="pollen.common.password" required="true"/>
+ <s:password name="password2" key="pollen.common.password2" required="true"/>
+ </fieldset>
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.userInformation"/></legend>
+
+ <s:textfield name="user.email" key="pollen.common.email" required="true"/>
+ <s:textfield name="user.lastname" key="pollen.common.lastname" required="true"/>
+ <s:textfield name="user.firstname" key="pollen.common.firstname"
+ required="true"/>
+ </fieldset>
+ <br/>
+ <s:submit action="registerUser" key="pollen.action.register" align="right"/>
+</s:form>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/registerUser.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,51 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ page language="java" contentType="text/html" pageEncoding="utf-8" %>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<title><s:text name="pollen.title.preferences"/></title>
+
+<s:form method="POST">
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.connexionInformation"/></legend>
+
+ <s:textfield name="login" key="pollen.common.login" required="true"/>
+ <s:password name="oldPassword" key="pollen.common.oldPassword"
+ required="true"/>
+ <s:password name="password" key="pollen.common.password"/>
+ <s:password name="password2" key="pollen.common.password2"/>
+ </fieldset>
+
+ <fieldset>
+ <legend><s:text name="pollen.fieldset.userInformation"/></legend>
+
+ <s:textfield name="email" key="pollen.common.email" required="true"/>
+ <s:textfield name="lastname" key="pollen.common.lastname" required="true"/>
+ <s:textfield name="firstname" key="pollen.common.firstname"
+ required="true"/>
+ </fieldset>
+ <br/>
+ <s:submit action="registerUser" key="pollen.action.register" align="right"/>
+</s:form>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/jsp/userPreferences.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/web.xml 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
+
+<web-app id="Pollen" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>EchoBase</display-name>
+
+ <filter>
+ <filter-name>topiaTransaction</filter-name>
+ <filter-class>org.chorem.pollen.ui.PollenTopiaTransactionFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>struts-prepare</filter-name>
+ <filter-class>
+ org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter
+ </filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>sitemesh</filter-name>
+ <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>struts-execute</filter-name>
+ <filter-class>
+ org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter
+ </filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>topiaTransaction</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>struts-prepare</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>sitemesh</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>struts-execute</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <listener>
+ <description>Init</description>
+ <listener-class>org.chorem.pollen.ui.PollenApplicationListener</listener-class>
+ </listener>
+
+ <welcome-file-list>
+ <welcome-file>/</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>home</welcome-file>
+ </welcome-file-list>
+</web-app>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/WEB-INF/web.xml
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/pollen.css
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/pollen.css (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/pollen.css 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,158 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+/* global */
+body {
+ font-family: "Trebuchet MS",Arial,sans-serif;
+ width: 1000px;
+ margin: auto;
+ font-size: small;
+}
+
+/* header */
+#po-header-localization{
+ text-align:right;
+ margin-top: 10px;
+}
+#po-header-localization .po-contactlink {
+ width:20px;
+ background:url("../WEB-INF/img/contact.png") no-repeat center;
+}
+#po-header-localization .po-localelink {
+ width:20px;
+ background:url("../WEB-INF/img/en.png") no-repeat center;
+}
+#po-header-localization .po-localelink:lang(fr){
+ background-image:url("../WEB-INF/img/fr.png")
+}
+
+#po-header-logo{
+ float: left;
+ margin-right: 10px;
+ margin-top: -100px;
+ width:350px;
+ height:153px;
+ background:url("../WEB-INF/img/pollenIndex_en.png") no-repeat;
+}
+html:lang(fr) #po-header-logo {
+ background-image:url("../WEB-INF/img/pollenIndex_fr.png")
+}
+
+#po-header-menu{
+ padding: 7px;
+ background-color: #FFFF00;
+}
+#po-header-menu #po-header-connection {
+ float:right;
+}
+#po-header-menu #po-header-connection #po-header-login-box{
+ display:none;
+}
+#po-header-menu #po-header-connection-menu{
+ margin:0;
+ padding:0;
+}
+#po-header-menu #po-header-connection-menu li{
+ display:inline
+}
+#po-header-menu #po-header-connection span{
+ cursor:pointer;
+ padding: 1px 5px;
+}
+#po-header-menu #po-header-connection span:hover{
+ background-color: #000000;
+ border-radius: 10px 10px 10px 10px;
+ color: white;
+}
+#po-header-menu #po-header-connection a{
+ color: black;
+ text-decoration:none;
+}
+#po-header-menu #po-header-connection a:hover{
+ color: white;
+}
+
+/* footer */
+#po-footer {
+ background-color: #FFFF00;
+ font-size: small;
+ margin-top: 20px;
+ padding: 5px;
+ text-align: center;
+ color: #727A7E;
+}
+#po-footer a{
+ color: #727A7E;
+}
+
+/* page content */
+.page #po-placebar {
+ background-color: #FFFFAA;
+ margin-left: 350px;
+ padding: 5px;
+}
+.page #po-placebar .pbitem {
+ font-weight:bold;
+}
+.page #po-placebar .pbitem:before{
+ content:"> ";
+}
+.page .content {
+ padding: 15px;
+}
+
+/* page : home page */
+#po-homelogo {
+ width:20px;
+ background:url("../WEB-INF/img/pollen.png") no-repeat center;
+ margin:auto;
+ width:260px;
+ height:200px;
+}
+#po-homeactions {
+ text-align:center;
+}
+#po-homeactions .createpoll{
+ background:url("../WEB-INF/img/smallCreation_en.png") no-repeat center;
+ width:250px;
+ height:100px;
+}
+html:lang(fr) #po-homeactions .createpoll {
+ background-image:url("../WEB-INF/img/smallCreation_fr.png")
+}
+#po-homeactions .mypoll{
+ background:url("../WEB-INF/img/smallVote_en.png") no-repeat center;
+ width:200px;
+ height:100px;
+}
+html:lang(fr) #po-homeactions .mypoll {
+ background-image:url("../WEB-INF/img/smallVote_fr.png")
+}
+#po-homeactions .votecounting{
+ background:url("../WEB-INF/img/smallVoteCounting_en.png") no-repeat center;
+ width:250px;
+ height:100px;
+}
+html:lang(fr) #po-homeactions .votecounting {
+ background-image:url("../WEB-INF/img/smallVoteCounting_fr.png")
+}
\ No newline at end of file
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/pollen.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/screen.css
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/screen.css (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/screen.css 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,249 @@
+/*
+ * #%L
+ * Pollen :: UI (strust2)
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2012 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+* {
+ font-family: sans-serif;
+}
+
+.inline {
+ display:inline;
+}
+
+.fontsize11 {
+ font-size: 11px;
+}
+
+.ui-tabs-panel {
+ font-family: monospace;
+ font-size: 9pt;
+}
+
+.ui-tabs .ui-tabs-nav li a {
+ float: left;
+ padding: .5em .1em;
+ text-decoration: none;
+ font-size: 11px;
+}
+
+#body {
+ /*min-height: 500px;*/
+ float: left;
+ /*left: 275px;*/
+ padding: 10px;
+ width: 99%;
+}
+
+.clearBoth {
+ clear: both;
+}
+
+#footer {
+ /*margin-top: 120px;*/
+ clear: both;
+ text-align: center;
+}
+
+.hidden {
+ display:none;
+}
+
+.displayBlock {
+ display:block;
+}
+
+.floatLeft {
+ float:left;
+}
+
+.floatRight {
+ float:right;
+}
+
+.info_success {
+ background: no-repeat scroll 8px 5px #DFFFDF;
+ border: 2px solid #9FCF9F;
+ width: 800px;
+ margin-bottom: 5px;
+}
+.info_success ul{
+ margin: 5px;
+ padding-left: 5px;
+}
+.info_success li{
+ background: url("../images/true.png") no-repeat ;
+ list-style: none;
+ font-style: italic;
+ padding-left: 25px;
+ color: #005F00;
+ margin-left:0px;
+}
+
+.info_error {
+ background: no-repeat scroll 8px 5px #FFE3E3;
+ border: 2px solid #DD0000;
+ width: 800px;
+ margin-bottom: 5px;
+}
+.info_error ul{
+ margin: 5px;
+ padding-left: 5px;
+}
+.info_error li{
+ background: url("../images/exclamation.png") no-repeat ;
+ list-style: none;
+ font-style: italic;
+ padding-left: 25px;
+ color: #880000;
+ margin-left:0px;
+}
+
+.errorMessage li{
+ background: url("../images/exclamation.png") no-repeat ;
+ list-style: none;
+ font-style: italic;
+ padding-left: 25px;
+ color: #880000;
+ margin-left:0px;
+}
+
+.verticalAlignTop {
+ vertical-align: top;
+}
+fieldset, hr , .cleanBoth{
+ clear: both
+}
+.wwlbl {
+ float: left;
+ clear: both;
+ width: 300px;
+/*# text-align: right;*/
+}
+.wwctrl {
+ float: left;
+}
+
+.wwerr {
+ clear: both;
+ float: left;
+}
+
+div.errorMessage{
+ clear: both;
+ float: left;
+}
+.errorMessage {
+ background: url("../images/exclamation.png") no-repeat ;
+ list-style: none;
+ font-style: italic;
+ padding-left: 25px;
+ color: #880000;
+ margin-left:0px;
+}
+
+.required {
+ color: #880000;
+ font-style: italic;
+}
+
+.clearfix {
+ display: inline-block;
+}
+
+/* Hide from IE Mac \*/
+.clearfix {
+ display: block;
+}
+
+#footer {
+ /*background: url(../images/footer.png) repeat-x;*/
+ /*height: 45px;*/
+ /*padding: 10px 20px 15px 20px;*/
+ /*margin: 30px 0;*/
+ position: relative;
+ /*text-transform: uppercase;*/
+ text-align:center;
+ /*color: #fff;*/
+ /*font-size: 140%;*/
+}
+
+#footer ul {
+ width: 1000px;
+ margin: 0 auto;
+}
+
+div#headerRight {
+ float:right;
+}
+
+div#headerRight div {
+ float: right;
+}
+
+#headerRight ul {
+ display:inline;
+ line-height: 20px;
+ padding: 0 5px;
+}
+
+#headerRight li {
+ display:inline;
+ padding: 0 5px;
+}
+
+ul.toolbar {
+ display:inline;
+ /*line-height: 20px;*/
+ /*padding: 0 5px;*/
+}
+
+ul.toolbar li {
+ display:inline;
+ padding: 0 5px;
+}
+
+#footer ul li {
+ display:inline;
+ list-style: none;
+ margin: 0 10px;
+ line-height: 30px;
+ padding: 0 5px;
+}
+
+#footer ul li a {
+ /*color: #fff;*/
+ text-decoration: none;
+}
+
+#footer ul li a:hover {
+ /*color: #ffe600;*/
+}
+
+ul#mode_ul {
+ margin: 5px;
+ padding-left: 5px;
+}
+ul#mode_ul li{
+ list-style: none;
+ padding-left: 25px;
+ margin-left:0px;
+}
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/css/screen.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/bigCreation.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/bigCreation.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/bigVote.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/bigVote.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/bigVoteCounting.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/bigVoteCounting.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/contact.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/contact.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/en.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/en.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/fr.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/fr.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollen.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenIndex_en.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenIndex_en.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenIndex_fr.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/pollenIndex_fr.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallCreation_en.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallCreation_en.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallCreation_fr.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallCreation_fr.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVoteCounting_en.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVoteCounting_en.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVoteCounting_fr.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVoteCounting_fr.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVote_en.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVote_en.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVote_fr.png
===================================================================
(Binary files differ)
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/img/smallVote_fr.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/index.jsp
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/index.jsp (rev 0)
+++ branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/index.jsp 2012-01-20 16:48:46 UTC (rev 3097)
@@ -0,0 +1,25 @@
+<%--
+ #%L
+ Pollen :: UI (strust2)
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2009 - 2012 CodeLutin
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<% response.sendRedirect("home");%>
Property changes on: branches/pollen-2.0-beta-1/pollen-ui-struts2/src/main/webapp/index.jsp
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: branches/pollen-2.0-beta-1/pollen-ui-tapestry/pom.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-ui/pom.xml 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-ui-tapestry/pom.xml 2012-01-20 16:48:46 UTC (rev 3097)
@@ -16,7 +16,7 @@
</parent>
<groupId>org.chorem.pollen</groupId>
- <artifactId>pollen-ui</artifactId>
+ <artifactId>pollen-ui-tapestry</artifactId>
<dependencies>
<dependency>
@@ -67,7 +67,7 @@
</dependency>
<dependency>
<groupId>org.nuiton.web</groupId>
- <artifactId>nuiton-tapestry-extra</artifactId>
+ <artifactId>nuiton-tapestry</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Modified: branches/pollen-2.0-beta-1/pollen-ui-webmotion/pom.xml
===================================================================
--- branches/pollen-2.0-beta-1/pollen-wm/pom.xml 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pollen-ui-webmotion/pom.xml 2012-01-20 16:48:46 UTC (rev 3097)
@@ -16,7 +16,7 @@
</parent>
<groupId>org.chorem.pollen</groupId>
- <artifactId>pollen-wm</artifactId>
+ <artifactId>pollen-ui-webmotion</artifactId>
<dependencies>
<dependency>
Modified: branches/pollen-2.0-beta-1/pom.xml
===================================================================
--- branches/pollen-2.0-beta-1/pom.xml 2012-01-19 23:57:08 UTC (rev 3096)
+++ branches/pollen-2.0-beta-1/pom.xml 2012-01-20 16:48:46 UTC (rev 3097)
@@ -23,8 +23,9 @@
<module>pollen-services</module>
<!--<module>pollen-business</module>-->
<!--<module>pollen-votecounting</module>-->
- <module>pollen-ui</module>
- <module>pollen-wm</module>
+ <!--<module>pollen-ui-tapestry</module>-->
+ <!--<module>pollen-ui-webmotion</module>-->
+ <module>pollen-ui-struts2</module>
</modules>
<dependencyManagement>
@@ -58,22 +59,45 @@
<artifactId>nuiton-utils</artifactId>
<version>${nuitonUtilsVersion}</version>
</dependency>
+
<dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-validator</artifactId>
+ <version>${nuitonUtilsVersion}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.web</groupId>
+ <artifactId>nuiton-struts2</artifactId>
+ <version>${nuitonWebVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.web</groupId>
+ <artifactId>nuiton-web</artifactId>
+ <version>${nuitonWebVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.nuiton.web</groupId>
+ <artifactId>nuiton-tapestry</artifactId>
+ <version>${nuitonWebVersion}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.nuiton.i18n</groupId>
<artifactId>nuiton-i18n</artifactId>
<version>${nuitonI18nVersion}</version>
</dependency>
- <dependency>
- <groupId>org.nuiton.eugene</groupId>
- <artifactId>eugene</artifactId>
- <version>${eugenePluginVersion}</version>
- </dependency>
<dependency>
<groupId>org.nuiton.topia</groupId>
<artifactId>topia-persistence</artifactId>
<version>${topiaVersion}</version>
</dependency>
+
<dependency>
<groupId>org.nuiton.topia</groupId>
<artifactId>topia-service-migration</artifactId>
@@ -104,11 +128,6 @@
</dependency>
<dependency>
- <groupId>org.nuiton.web</groupId>
- <artifactId>nuiton-tapestry-extra</artifactId>
- <version>${nuitonWebVersion}</version>
- </dependency>
- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4jVersion}</version>
@@ -120,6 +139,8 @@
<version>${slf4jVersion}</version>
<scope>runtime</scope>
</dependency>
+
+ <!-- Tapestry -->
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-upload</artifactId>
@@ -136,7 +157,52 @@
</exclusion>
</exclusions>
</dependency>
+
+ <!-- Struts 2 -->
+
<dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-core</artifactId>
+ <version>${struts2Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.jgeppert.struts2.jquery</groupId>
+ <artifactId>struts2-jquery-plugin</artifactId>
+ <version>${jqueryPluginVersion}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.jgeppert.struts2.jquery</groupId>
+ <artifactId>struts2-jquery-grid-plugin</artifactId>
+ <version>${jqueryPluginVersion}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-json-plugin</artifactId>
+ <version>${struts2Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts</groupId>
+ <artifactId>struts2-sitemesh-plugin</artifactId>
+ <version>${struts2Version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.struts.xwork</groupId>
+ <artifactId>xwork-core</artifactId>
+ <version>${struts2Version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1</version>
@@ -154,7 +220,7 @@
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
- <version>3.8.0.GA</version>
+ <version>3.10.0.GA</version>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
@@ -166,23 +232,34 @@
<artifactId>rome</artifactId>
<version>1.0</version>
</dependency>
+
+ <!-- base postgres -->
<dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>${postgresqlVersion}</version>
+ </dependency>
+
+ <!-- base h2 -->
+ <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
- <version>1.3.162</version>
+ <version>${h2Version}</version>
</dependency>
+
<dependency>
- <groupId>postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <version>9.0-801.jdbc4</version>
- </dependency>
- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-runner</artifactId>
+ <version>${jettyVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
@@ -340,11 +417,16 @@
<eugenePluginVersion>2.4.1</eugenePluginVersion>
<nuitonI18nVersion>2.4.1</nuitonI18nVersion>
<tapestryVersion>5.1.0.5</tapestryVersion>
- <nuitonWebVersion>0.1</nuitonWebVersion>
- <nuitonUtilsVersion>2.3.1</nuitonUtilsVersion>
- <processorPluginVersion>1.2.2</processorPluginVersion>
+ <nuitonWebVersion>1.9.1</nuitonWebVersion>
+ <nuitonUtilsVersion>2.4.4</nuitonUtilsVersion>
+ <h2Version>1.3.163</h2Version>
+ <postgresqlVersion>9.1-901-1.jdbc4</postgresqlVersion>
+ <struts2Version>2.3.1.1</struts2Version>
+ <jqueryPluginVersion>3.2.1</jqueryPluginVersion>
<slf4jVersion>1.6.4</slf4jVersion>
+ <jettyVersion>8.1.0.RC2</jettyVersion>
+
<!--Multilanguage maven-site -->
<siteLocales>en,fr</siteLocales>
@@ -369,12 +451,6 @@
</dependencies>
</plugin>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <version>8.0.4.v20111024</version>
- </plugin>
-
<!-- EUGene plugin for entities generation -->
<plugin>
<groupId>org.nuiton.eugene</groupId>
@@ -397,6 +473,20 @@
<artifactId>maven-i18n-plugin</artifactId>
<version>${nuitonI18nVersion}</version>
</plugin>
+
+ <!-- remove this when using mavenpom 3.1 -->
+ <plugin>
+ <groupId>org.nuiton</groupId>
+ <artifactId>helper-maven-plugin</artifactId>
+ <version>1.4</version>
+ </plugin>
+
+ <!-- remove this when using mavenpom 3.1 -->
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+ <version>${jettyVersion}</version>
+ </plugin>
</plugins>
</pluginManagement>
@@ -408,6 +498,13 @@
</resources>
</build>
+ <reporting>
+
+ <!-- par defaut pas de report pour les sites -->
+ <excludeDefaults>true</excludeDefaults>
+
+ </reporting>
+
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
1
0