r3816 - in branches/pollen-2.0: . pollen-persistence/src/main/java/org/chorem/pollen/persistence pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity pollen-persistence/src/main/resources/META-INF pollen-persistence/src/main/xmi pollen-persistence/src/test/java/org/chorem/pollen/persistence/entity pollen-rest-api pollen-rest-api/src/main/java/org/chorem/pollen/rest pollen-rest-api/src/main/java/org/chorem/po
Author: tchemit Date: 2013-06-05 18:41:46 +0200 (Wed, 05 Jun 2013) New Revision: 3816 Url: http://chorem.org/projects/pollen/repository/revisions/3816 Log: continue persistence + rest api + ... Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaEntityIdFactoryIfNotEmpty.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/BookmarkableDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/ChoiceJpaDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/CommentJpaDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoteJpaDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/BookmarkableEntity.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Choice.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceEntity.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Comment.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/CommentEntity.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Poll.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollEntity.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenEntities.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Vote.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/VoteEntity.java branches/pollen-2.0/pollen-persistence/src/test/java/org/chorem/pollen/persistence/entity/PollenEntitiesTest.java Removed: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaEntityIdGeneratorIfNotEmpty.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListMemberJpaDao.java Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaPollenPersistenceContext.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/PollenPersistenceContext.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/ChoiceDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/CommentDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/FavoriteListDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollJpaDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollenUserDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollenUserJpaDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoteDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListMemberDao.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenUser.java branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Polls.java branches/pollen-2.0/pollen-persistence/src/main/resources/META-INF/persistence.xml branches/pollen-2.0/pollen-persistence/src/main/xmi/pollen.properties branches/pollen-2.0/pollen-persistence/src/main/xmi/pollen.zargo branches/pollen-2.0/pollen-rest-api/LICENSE.txt branches/pollen-2.0/pollen-rest-api/README.txt branches/pollen-2.0/pollen-rest-api/changelog.txt branches/pollen-2.0/pollen-rest-api/pom.xml branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenJpaTransactionFilter.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServiceContextFilter.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServiceListener.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServices.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/AuthService.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/CommentService.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/FavoriteListService.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollService.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/UserService.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoteCountingService.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoteService.java branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoterListService.java branches/pollen-2.0/pollen-rest-api/src/main/resources/mapping branches/pollen-2.0/pollen-rest-api/src/main/webapp/WEB-INF/web.xml branches/pollen-2.0/pollen-rest-api/src/test/resources/log4j.properties branches/pollen-2.0/pollen-service/LICENSE.txt branches/pollen-2.0/pollen-service/README.txt branches/pollen-2.0/pollen-service/changelog.txt branches/pollen-2.0/pollen-service/pom.xml branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/AbstractPollenService.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/AuthService.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/CommentService.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/DefaultPollenServiceContext.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/FavoriteListService.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/FixturesService.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollResult.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollService.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenFixtures.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenServiceContext.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenServiceSupport.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenTechnicalException.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/UserService.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoteCountingService.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoteService.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoterListService.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/PollenServiceConfig.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/PollenServiceConfigOption.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/package-info.java branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/package-info.java branches/pollen-2.0/pollen-service/src/main/resources/fixtures.yaml branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/FakePollenServiceContext.java branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/UserServiceTest.java branches/pollen-2.0/pollen-service/src/test/resources/log4j.properties branches/pollen-2.0/pom.xml Copied: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaEntityIdFactoryIfNotEmpty.java (from rev 3815, branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaEntityIdGeneratorIfNotEmpty.java) =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaEntityIdFactoryIfNotEmpty.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaEntityIdFactoryIfNotEmpty.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,48 @@ +package org.chorem.pollen.persistence; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.apache.commons.lang3.StringUtils; +import org.nuiton.jpa.api.DefaultJpaEntityIdFactory; +import org.nuiton.jpa.api.JpaEntity; + +/** + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class JpaEntityIdFactoryIfNotEmpty extends DefaultJpaEntityIdFactory { + + @Override + public String newId(JpaEntity entity) { + String result; + boolean notEmpty = StringUtils.isNotEmpty(entity.getId()); + + if (notEmpty) { + result = entity.getId(); + } else { + result = super.newId(entity); + } + return result; + } +} Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaEntityIdFactoryIfNotEmpty.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaEntityIdGeneratorIfNotEmpty.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaEntityIdGeneratorIfNotEmpty.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaEntityIdGeneratorIfNotEmpty.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,56 +0,0 @@ -package org.chorem.pollen.persistence; - -/* - * #%L - * Nuiton Jpa :: API - * $Id$ - * $HeadURL: http://svn.nuiton.org/svn/sandbox/nuiton-jpa/nuiton-jpa-api/src/main/java/or... $ - * %% - * Copyright (C) 2013 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser 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 Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ - -import org.apache.commons.lang3.StringUtils; -import org.nuiton.jpa.api.JpaEntity; -import org.nuiton.jpa.api.JpaEntityIdGenerator; - -/** - * Default implementation of {@link JpaEntityIdGenerator}. - * - * @author tchemit <chemit@codelutin.com> - * @since 0.1 - */ -public class JpaEntityIdGeneratorIfNotEmpty implements JpaEntityIdGenerator { - - @Override - public String generate(JpaEntity entity) { - String result; - boolean notEmpty = StringUtils.isNotEmpty(entity.getId()); - - if (notEmpty) { - result = entity.getId(); - } else { - double random = Math.random(); - while (Double.toString(random).contains("E-")) { - random = Math.random(); - } - result = entity.getClass().getName() + '#' + System.currentTimeMillis() + '#' - + random; - } - return result; - } -} Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaPollenPersistenceContext.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaPollenPersistenceContext.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaPollenPersistenceContext.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,6 +1,29 @@ package org.chorem.pollen.persistence; -import org.nuiton.jpa.api.JpaEntityIdGenerator; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.nuiton.jpa.api.JpaEntityIdFactory; import org.nuiton.jpa.api.hibernate.HibernateUtil; import javax.persistence.EntityManager; @@ -17,7 +40,7 @@ super(entityManager); } - public JpaPollenPersistenceContext(JpaEntityIdGenerator idGenerator, + public JpaPollenPersistenceContext(JpaEntityIdFactory idGenerator, EntityManager entityManager) { super(idGenerator, entityManager); } Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/JpaPollenPersistenceContext.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/PollenPersistenceContext.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/PollenPersistenceContext.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/PollenPersistenceContext.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,11 +1,33 @@ package org.chorem.pollen.persistence; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.dao.ChoiceJpaDao; import org.chorem.pollen.persistence.dao.CommentJpaDao; import org.chorem.pollen.persistence.dao.FavoriteListJpaDao; import org.chorem.pollen.persistence.dao.FavoriteListMemberJpaDao; import org.chorem.pollen.persistence.dao.PollJpaDao; -import org.chorem.pollen.persistence.dao.PollenPermanentPermissionJpaDao; import org.chorem.pollen.persistence.dao.PollenUserJpaDao; import org.chorem.pollen.persistence.dao.VoteJpaDao; import org.chorem.pollen.persistence.dao.VoteToChoiceJpaDao; @@ -37,8 +59,6 @@ PollJpaDao getPollDao(); - PollenPermanentPermissionJpaDao getPollenPermanentPermissionDao(); - PollenUserJpaDao getPollenUserDao(); VoteJpaDao getVoteDao(); Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/PollenPersistenceContext.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/BookmarkableDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/BookmarkableDao.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/BookmarkableDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,37 @@ +package org.chorem.pollen.persistence.dao; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.nuiton.jpa.api.JpaEntity; + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public interface BookmarkableDao<E extends JpaEntity> { + + E findBySimpleId(String simpleId); +} Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/BookmarkableDao.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/ChoiceDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/ChoiceDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/ChoiceDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,10 +1,35 @@ package org.chorem.pollen.persistence.dao; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.chorem.pollen.persistence.entity.Choice; + /** * TODO * * @author tchemit <chemit@codelutin.com> * @since 2.0 */ -public interface ChoiceDao { +public interface ChoiceDao extends BookmarkableDao<Choice> { } Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/ChoiceDao.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/ChoiceJpaDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/ChoiceJpaDao.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/ChoiceJpaDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,43 @@ +package org.chorem.pollen.persistence.dao; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.chorem.pollen.persistence.entity.Choice; +import org.chorem.pollen.persistence.entity.PollenEntities; + +import javax.persistence.EntityManager; + +public class ChoiceJpaDao extends AbstractChoiceJpaDao { + + public ChoiceJpaDao(EntityManager entityManager) { + super(entityManager); + } + + @Override + public Choice findBySimpleId(String simpleId) { + String id = PollenEntities.getEntityId(getEntityClass(), simpleId); + return findById(id); + } + +} //ChoiceJpaDao Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/ChoiceJpaDao.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/CommentDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/CommentDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/CommentDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,10 +1,35 @@ package org.chorem.pollen.persistence.dao; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.chorem.pollen.persistence.entity.Comment; + /** * TODO * * @author tchemit <chemit@codelutin.com> * @since 2.0 */ -public interface CommentDao { +public interface CommentDao extends BookmarkableDao<Comment> { } Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/CommentDao.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/CommentJpaDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/CommentJpaDao.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/CommentJpaDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,43 @@ +package org.chorem.pollen.persistence.dao; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.chorem.pollen.persistence.entity.Comment; +import org.chorem.pollen.persistence.entity.PollenEntities; + +import javax.persistence.EntityManager; + +public class CommentJpaDao extends AbstractCommentJpaDao { + + public CommentJpaDao(EntityManager entityManager) { + super(entityManager); + } + + @Override + public Comment findBySimpleId(String simpleId) { + String id = PollenEntities.getEntityId(getEntityClass(), simpleId); + return findById(id); + } + +} //CommentJpaDao Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/CommentJpaDao.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/FavoriteListDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/FavoriteListDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/FavoriteListDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.persistence.dao; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + /** * TODO * Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/FavoriteListDao.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.persistence.dao; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.entity.Poll; import java.util.Set; @@ -10,7 +33,7 @@ * @author tchemit <chemit@codelutin.com> * @since 2.0 */ -public interface PollDao { +public interface PollDao extends BookmarkableDao<Poll> { Set<Poll> findAllCreated(String userId); Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollDao.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollJpaDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollJpaDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollJpaDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,7 +1,31 @@ package org.chorem.pollen.persistence.dao; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.collect.Sets; import org.chorem.pollen.persistence.entity.Poll; +import org.chorem.pollen.persistence.entity.PollenEntities; import javax.persistence.EntityManager; import java.util.Set; @@ -36,4 +60,10 @@ return Sets.newHashSet(); } + @Override + public Poll findBySimpleId(String simpleId) { + String id = PollenEntities.getEntityId(getEntityClass(), simpleId); + return findById(id); + } + } //PollJpaDao Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollJpaDao.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollenUserDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollenUserDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollenUserDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.persistence.dao; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.entity.PollenUser; /** Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollenUserDao.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollenUserJpaDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollenUserJpaDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollenUserJpaDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.persistence.dao; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.entity.PollenUser; import javax.persistence.EntityManager; Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/PollenUserJpaDao.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoteDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoteDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoteDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,10 +1,35 @@ package org.chorem.pollen.persistence.dao; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.chorem.pollen.persistence.entity.Vote; + /** * TODO * * @author tchemit <chemit@codelutin.com> * @since 2.0 */ -public interface VoteDao { +public interface VoteDao extends BookmarkableDao<Vote> { } Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoteDao.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoteJpaDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoteJpaDao.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoteJpaDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,43 @@ +package org.chorem.pollen.persistence.dao; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.chorem.pollen.persistence.entity.PollenEntities; +import org.chorem.pollen.persistence.entity.Vote; + +import javax.persistence.EntityManager; + +public class VoteJpaDao extends AbstractVoteJpaDao { + + public VoteJpaDao(EntityManager entityManager) { + super(entityManager); + } + + @Override + public Vote findBySimpleId(String simpleId) { + String id = PollenEntities.getEntityId(getEntityClass(), simpleId); + return findById(id); + } + +} //VoteJpaDao Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoteJpaDao.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.persistence.dao; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + /** * TODO * Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListDao.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListMemberDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListMemberDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListMemberDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,9 +1,28 @@ package org.chorem.pollen.persistence.dao; -import org.chorem.pollen.persistence.entity.VoterListMember; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ -import java.util.Set; - /** * TODO * @@ -12,5 +31,4 @@ */ public interface VoterListMemberDao { - Set<VoterListMember> findAllByVoterList(String voterListId); } Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListMemberDao.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Deleted: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListMemberJpaDao.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListMemberJpaDao.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/dao/VoterListMemberJpaDao.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,29 +0,0 @@ -package org.chorem.pollen.persistence.dao; - -import com.google.common.collect.Sets; -import org.chorem.pollen.persistence.entity.VoterListMember; - -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; -import java.util.Set; - -/** - * TODO - * - * @author tchemit <chemit@codelutin.com> - * @since 2.0 - */ -public class VoterListMemberJpaDao extends AbstractVoterListMemberJpaDao { - - public VoterListMemberJpaDao(EntityManager entityManager) { - super(entityManager); - } - - public Set<VoterListMember> findAllByVoterList(String voterListId) { - - TypedQuery<VoterListMember> query = createQuery("from " + getEntityClass() + " where voterList.id := voterListId").setParameter("voterListId", voterListId); - Set<VoterListMember> result = Sets.newHashSet(findAll(query)); - return result; - } - -} //VoterListMemberJpaDao Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/BookmarkableEntity.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/BookmarkableEntity.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/BookmarkableEntity.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,41 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public interface BookmarkableEntity { + + String getId(); + + String getSimpleId(); + + PollenUser getPollenUser(); + + void setPollenUser(PollenUser pollenUser); +} Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/BookmarkableEntity.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Choice.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Choice.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Choice.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,43 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import javax.persistence.Entity; + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +@Entity +public class Choice extends AbstractJpaChoice { + + private static final long serialVersionUID = 1L; + + @Override + public String getSimpleId() { + return PollenEntities.getSimpleId(this); + } +} //Choice Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Choice.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceEntity.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceEntity.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceEntity.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,33 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public interface ChoiceEntity extends BookmarkableEntity { +} Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/ChoiceEntity.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Comment.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Comment.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Comment.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,43 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import javax.persistence.Entity; + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +@Entity +public class Comment extends AbstractJpaComment { + + private static final long serialVersionUID = 1L; + + @Override + public String getSimpleId() { + return PollenEntities.getSimpleId(this); + } +} //Comment Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Comment.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/CommentEntity.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/CommentEntity.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/CommentEntity.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,33 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public interface CommentEntity extends BookmarkableEntity { +} Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/CommentEntity.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Poll.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Poll.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Poll.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,43 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import javax.persistence.Entity; + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +@Entity +public class Poll extends AbstractJpaPoll { + + private static final long serialVersionUID = 1L; + + @Override + public String getSimpleId() { + return PollenEntities.getSimpleId(this); + } +} //Poll Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Poll.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollEntity.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollEntity.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollEntity.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,33 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public interface PollEntity extends BookmarkableEntity { +} Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollEntity.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenEntities.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenEntities.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenEntities.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,55 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.apache.commons.lang3.StringUtils; +import org.nuiton.jpa.api.JpaEntity; + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class PollenEntities { + + public static String getSimpleId(JpaEntity e) { + String id = e.getId(); + String result = StringUtils.substringAfter(id, "_").replaceAll("-", ""); + return result; + } + + public static <E extends JpaEntity> String getEntityId(Class<E> type, + String simpleId) { + StringBuilder result = new StringBuilder(type.getName()); + result.append("_"); + result.append(simpleId.substring(0, 8)).append('-'); + result.append(simpleId.substring(8, 12)).append('-'); + result.append(simpleId.substring(12, 16)).append('-'); + result.append(simpleId.substring(16, 20)).append('-'); + result.append(simpleId.substring(20)); + return result.toString(); + } + +} Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenEntities.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenUser.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenUser.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenUser.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.persistence.entity; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import javax.persistence.Entity; @Entity Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenUser.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Polls.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Polls.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Polls.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.persistence.entity; +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.apache.commons.lang3.ObjectUtils; /** Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Polls.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Vote.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Vote.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Vote.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,43 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import javax.persistence.Entity; + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +@Entity +public class Vote extends AbstractJpaVote { + + private static final long serialVersionUID = 1L; + + @Override + public String getSimpleId() { + return PollenEntities.getSimpleId(this); + } +} //Vote Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/Vote.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Added: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/VoteEntity.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/VoteEntity.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/VoteEntity.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,33 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +/** + * TODO + * + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public interface VoteEntity extends BookmarkableEntity { +} Property changes on: branches/pollen-2.0/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/VoteEntity.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: branches/pollen-2.0/pollen-persistence/src/main/resources/META-INF/persistence.xml =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/resources/META-INF/persistence.xml 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/resources/META-INF/persistence.xml 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,3 +1,25 @@ +<!-- + #%L + Pollen :: Persistence + $Id$ + $HeadURL$ + %% + Copyright (C) 2009 - 2013 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% + --> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" Property changes on: branches/pollen-2.0/pollen-persistence/src/main/resources/META-INF/persistence.xml ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-persistence/src/main/xmi/pollen.properties =================================================================== --- branches/pollen-2.0/pollen-persistence/src/main/xmi/pollen.properties 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-persistence/src/main/xmi/pollen.properties 2013-06-05 16:41:46 UTC (rev 3816) @@ -20,7 +20,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # #L% ### -model.tagValue.idGenerator=org.nuiton.jpa.api.DefaultJpaEntityIdGenerator +model.tagValue.idFactory=true model.tagvalue.version=2.0 model.tagvalue.constantPrefix=PROPERTY_ @@ -30,6 +30,7 @@ org.chorem.pollen.persistence.entity.Poll.attribute.comment.stereotype=ordered org.chorem.pollen.persistence.entity.PollenUser.attribute.favoriteList.stereotype=ordered org.chorem.pollen.persistence.entity.FavoriteList.attribute.favoriteListMember.stereotype=ordered +org.chorem.pollen.persistence.entity.VoterList.attribute.voterListMember.stereotype=unique #org.chorem.pollen.persistence.entity.Poll.attribute.choice.stereotype=indexed Modified: branches/pollen-2.0/pollen-persistence/src/main/xmi/pollen.zargo =================================================================== (Binary files differ) Added: branches/pollen-2.0/pollen-persistence/src/test/java/org/chorem/pollen/persistence/entity/PollenEntitiesTest.java =================================================================== --- branches/pollen-2.0/pollen-persistence/src/test/java/org/chorem/pollen/persistence/entity/PollenEntitiesTest.java (rev 0) +++ branches/pollen-2.0/pollen-persistence/src/test/java/org/chorem/pollen/persistence/entity/PollenEntitiesTest.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -0,0 +1,58 @@ +package org.chorem.pollen.persistence.entity; + +/* + * #%L + * Pollen :: Persistence + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + +import org.junit.Assert; +import org.junit.Test; +import org.nuiton.jpa.api.DefaultJpaEntityIdFactory; +import org.nuiton.jpa.api.JpaEntityIdFactoryResolver; + +/** + * @author tchemit <chemit@codelutin.com> + * @since 2.0 + */ +public class PollenEntitiesTest { + + @Test + public void getSimpleId() { + + JpaEntityIdFactoryResolver.setFactory(new DefaultJpaEntityIdFactory()); + + try { + Poll poll = new Poll(); + poll.prepersist(); + + String id = poll.getId(); + Assert.assertNotNull(id); + + String simpleId = PollenEntities.getSimpleId(poll); + String id2 = PollenEntities.getEntityId(Poll.class, simpleId); + + Assert.assertEquals(id, id2); + } finally { + JpaEntityIdFactoryResolver.setFactory(null); + } + + } +} Property changes on: branches/pollen-2.0/pollen-persistence/src/test/java/org/chorem/pollen/persistence/entity/PollenEntitiesTest.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Property changes on: branches/pollen-2.0/pollen-rest-api/LICENSE.txt ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Property changes on: branches/pollen-2.0/pollen-rest-api/README.txt ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Property changes on: branches/pollen-2.0/pollen-rest-api/changelog.txt ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Property changes on: branches/pollen-2.0/pollen-rest-api/pom.xml ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenJpaTransactionFilter.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenJpaTransactionFilter.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenJpaTransactionFilter.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.base.Preconditions; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenJpaTransactionFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServiceContextFilter.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServiceContextFilter.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServiceContextFilter.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.service.DefaultPollenServiceContext; import org.chorem.pollen.service.config.PollenServiceConfig; import org.debux.webmotion.server.WebMotionFilter; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServiceContextFilter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServiceListener.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServiceListener.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServiceListener.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.pollen.service.PollenServiceContext; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServiceListener.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServices.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServices.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServices.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.service.PollenServiceContext; import org.chorem.pollen.service.config.PollenServiceConfig; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/PollenServices.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/AuthService.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/AuthService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/AuthService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest.api; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.service.PollenServiceContext; import org.debux.webmotion.server.WebMotionController; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/AuthService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/CommentService.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/CommentService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/CommentService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest.api; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.entity.Comment; import org.chorem.pollen.service.PollenServiceContext; import org.debux.webmotion.server.WebMotionController; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/CommentService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/FavoriteListService.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/FavoriteListService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/FavoriteListService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest.api; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.entity.FavoriteList; import org.chorem.pollen.persistence.entity.FavoriteListMember; import org.chorem.pollen.service.PollenServiceContext; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/FavoriteListService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollService.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest.api; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.entity.Choice; import org.chorem.pollen.persistence.entity.Poll; import org.chorem.pollen.service.PollenServiceContext; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/UserService.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/UserService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/UserService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest.api; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.entity.PollenUser; import org.chorem.pollen.service.PollenServiceContext; import org.debux.webmotion.server.WebMotionController; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/UserService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoteCountingService.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoteCountingService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoteCountingService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest.api; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.service.PollResult; import org.chorem.pollen.service.PollenServiceContext; import org.debux.webmotion.server.WebMotionController; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoteCountingService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoteService.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoteService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoteService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest.api; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.entity.Vote; import org.chorem.pollen.service.PollenServiceContext; import org.debux.webmotion.server.WebMotionController; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoteService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoterListService.java =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoterListService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoterListService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.rest.api; +/* + * #%L + * Pollen :: Rest Api + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.entity.VoterList; import org.chorem.pollen.persistence.entity.VoterListMember; import org.chorem.pollen.service.PollenServiceContext; Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/VoterListService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/main/resources/mapping =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/resources/mapping 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/resources/mapping 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,70 +1,69 @@ [config] -#package.views=WEB-INF/jsp package.filters=org.chorem.pollen.rest package.actions=org.chorem.pollen.rest.api server.listener.class=org.chorem.pollen.rest.PollenServiceListener [filters] * /* PollenServiceContextFilter.inject +* /* PollenIdOrTokenInjector.inject +* /* PollenSecurityFilter.inject (prend le param auth pour retrouver le PollenUser) -##### -#/!\# -##### il y a un bug si on met le DecoratorFilter en POST avec les formulaires -##### enctype="multipart/form-data", il faut donc que tous les form post -##### fasse un redirect en GET apres leur action, sinon on a pas de decorateur -##### le symptome de l'erreur est qu'il n'y a aucun parametre qui nous arrive :( +- une fois un object lié à PollenUser, c'est immuable. [actions] # AuthService -POST /login action:AuthService.login +PUT /login action:AuthService.login GET /lostpassword/{token} action:AuthService.lostPassword GET /logout action:AuthService.logout # CommentService GET /poll/{pollId}/comments action:CommentService.getComments -GET /poll/{pollId}/comments/{commentId} action:CommentService.getComment -PUT /poll/{pollId}/comments action:CommentService.addComment -POST /poll/{pollId}/comments action:CommentService.editComment -DELETE /poll/{pollId}/comments/{commentId} action:CommentService.deleteComment +POST /poll/{pollId}/comment action:CommentService.addComment +GET /comment/{commentId} action:CommentService.getComment +PUT /comment action:CommentService.editComment +DELETE /comment/{commentId} action:CommentService.deleteComment # FavoriteListService -GET /favoritelists action:FavoriteList.getFavoriteLists -GET /favoritelists/{flId} action:FavoriteList.getFavoriteList -PUT /favoritelists action:FavoriteList.createFavoriteList -POST /favoritelists action:FavoriteList.editFavoriteList -DELETE /favoritelists/{flId} action:FavoriteList.deleteFavoriteList -GET /favoritelists/{flId}/members action:FavoriteList.getMembers -GET /favoritelists/{flId}/members/{mId} action:FavoriteList.getMember -PUT /favoritelists/{flId}/members action:FavoriteList.addMember -POST /favoritelists/{flId}/members action:FavoriteList.editMember -DELETE /favoritelists/{flId}/members/{mId} action:FavoriteList.removeMember +GET /favoriteList action:FavoriteList.getFavoriteLists +GET /favoriteList/{flId} action:FavoriteList.getFavoriteList +POST /favoriteList action:FavoriteList.createFavoriteList +PUT /favoriteList action:FavoriteList.editFavoriteList +DELETE /favoriteList/{flId} action:FavoriteList.deleteFavoriteList +GET /favoriteList/{flId}/members action:FavoriteList.getMembers +GET /favoriteListMember/{mId} action:FavoriteList.getMember +POST /favoriteList/{flId}/member action:FavoriteList.addMember +PUT /favoriteListMember action:FavoriteList.editMember +DELETE /favoriteListMember/{mId} action:FavoriteList.removeMember # PollService -GET /user/{userId}/polls?filter=created action:PollService.getCreatedPolls -GET /user/{userId}/polls?filter=invited action:PollService.getInvitedPolls -GET /user/{userId}/polls?filter=participated action:PollService.getParticipatedPolls +GET /poll action:PollService.getPolls +GET /poll/created action:PollService.getCreatedPolls +GET /poll/invited action:PollService.getInvitedPolls +GET /poll/participated action:PollService.getParticipatedPolls PUT /poll action:PollService.createPoll -POST /poll action:PollService.editPoll -DELETE /poll/{pollId} action:PollService.deletePoll -PUT /poll/{pollId} action:PollService.clonePoll -POST /poll/{pollId}?action={action} action:PollService.{action}Poll +PUT /poll action:PollService.editPoll +DELETE /poll/{pollOrTokenId} action:PollService.deletePoll +POST /poll/{pollId} action:PollService.clonePoll +GET /poll/{pollId}/export action:PollService.exportPoll +PUT /poll/{pollId}/close action:PollService.closePoll + GET /poll/{pollId}/choices action:PollService.getChoices -GET /poll/{pollId}/choices/{choiceId} action:PollService.getChoice -PUT /poll/{pollId}/choices action:PollService.addChoice -POST /poll/{pollId}/choices action:PollService.editChoice -DELETE /poll/{pollId}/choices/{choiceId} action:PollService.deleteChoice +POST /poll/{pollId}/choice action:PollService.addChoice +GET /choice/{choiceId} action:PollService.getChoice +PUT /choice action:PollService.editChoice +DELETE /choice/{choiceId} action:PollService.deleteChoice # UserService -GET /users action:UserService.getUsers +GET /user action:UserService.getUsers GET /user/{userId} action:UserService.getUser -PUT /user action:UserService.createUser -POST /user action:UserService.editUser +POST /user action:UserService.createUser +PUT /user action:UserService.editUser GET /validateemail/{token} action:UserService.validateUserEmail # VoteCountingService @@ -73,25 +72,22 @@ # VoterListService -POST /poll/{pollId}/favoriteLists/{flId} action:VoterListService.importFavoriteList -GET /poll/{pollId}/voterLists action:VoterListService.getVoterLists -GET /poll/{pollId}/voterLists/{vlId} action:VoterListService.getVoterList -POST /poll/{pollId}/voterLists {voterList} action:VoterListService.editVoterList -DELETE /poll/{pollId}/voterLists/{vlId} action:VoterListService.deleteVoterList -GET /poll/{pollId}/members action:VoterListService.getMembers -GET /poll/{pollId}/voterLists/{vlId}/members action:VoterListService.getMembers -GET /poll/{pollId}/voterLists/{vlId}/members/{mId} action:VoterListService.getMember -PUT /poll/{pollId}/members action:VoterListService.addMember -PUT /poll/{pollId}/voterLists/{vlId}/members action:VoterListService.addMember -POST /poll/{pollId}/members action:VoterListService.editMember -POST /poll/{pollId}/voterLists/{vlId}/members action:VoterListService.editMember -DELETE /poll/{pollId}/members/{mId} action:VoterListService.deleteMember -DELETE /poll/{pollId}/voterLists/{vlId}/members/{mId} action:VoterListService.deleteMember +PUT /poll/{pollId}/favoriteLists/{flId} action:VoterListService.importFavoriteList +GET /poll/{pollId}/voterLists action:VoterListService.getVoterLists +GET /voterList/{vlId} action:VoterListService.getVoterList +PUT /voterList/{vlId} action:VoterListService.editVoterList +DELETE /voterList/{vlId} action:VoterListService.deleteVoterList +GET /voterList/{vlId}/members action:VoterListService.getMembers +GET /voterListMember/{mId} action:VoterListService.getMember +POST /voterList/{vlId}/member action:VoterListService.addMember +PUT /voterListMember action:VoterListService.editMember +DELETE /voterListMember/{mId} action:VoterListService.deleteMember + # VoteService GET /poll/{pollId}/votes action:VoteService.getVotes -GET /poll/{pollId}/votes/{voteId} action:VoteService.getVote -PUT /poll/{pollId}/votes action:VoteService.addVote -POST /poll/{pollId}/votes action:VoteService.editVote -DELETE /poll/{pollId}/votes/{voteId} action:VoteService.deleteVote +PUT /poll/{pollId}/vote action:VoteService.addVote +GET /vote/{voteId} action:VoteService.getVote +PUT /vote action:VoteService.editVote +DELETE /vote/{voteId} action:VoteService.deleteVote Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/resources/mapping ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: branches/pollen-2.0/pollen-rest-api/src/main/webapp/WEB-INF/web.xml =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/main/webapp/WEB-INF/web.xml 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/main/webapp/WEB-INF/web.xml 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,4 +1,27 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + Pollen :: Rest Api + $Id$ + $HeadURL$ + %% + Copyright (C) 2009 - 2013 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 version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Property changes on: branches/pollen-2.0/pollen-rest-api/src/main/webapp/WEB-INF/web.xml ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-rest-api/src/test/resources/log4j.properties =================================================================== --- branches/pollen-2.0/pollen-rest-api/src/test/resources/log4j.properties 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-rest-api/src/test/resources/log4j.properties 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,3 +1,25 @@ +### +# #%L +# Pollen :: Rest Api +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2009 - 2013 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 Property changes on: branches/pollen-2.0/pollen-rest-api/src/test/resources/log4j.properties ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Property changes on: branches/pollen-2.0/pollen-service/LICENSE.txt ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Property changes on: branches/pollen-2.0/pollen-service/README.txt ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Property changes on: branches/pollen-2.0/pollen-service/changelog.txt ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Property changes on: branches/pollen-2.0/pollen-service/pom.xml ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/AbstractPollenService.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/AbstractPollenService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/AbstractPollenService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.base.Preconditions; import org.chorem.pollen.persistence.PollenPersistenceContext; import org.chorem.pollen.service.config.PollenServiceConfig; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/AbstractPollenService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/AuthService.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/AuthService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/AuthService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.base.Preconditions; /** Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/AuthService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/CommentService.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/CommentService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/CommentService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -4,7 +4,7 @@ * #%L * Pollen :: Service API * $Id$ - * $HeadURL:$ + * $HeadURL$ * %% * Copyright (C) 2009 - 2013 CodeLutin * %% Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/CommentService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/DefaultPollenServiceContext.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/DefaultPollenServiceContext.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/DefaultPollenServiceContext.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.JpaPollenPersistenceContext; import org.chorem.pollen.persistence.PollenPersistenceContext; import org.chorem.pollen.service.config.PollenServiceConfig; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/DefaultPollenServiceContext.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/FavoriteListService.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/FavoriteListService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/FavoriteListService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -4,7 +4,7 @@ * #%L * Pollen :: Service API * $Id$ - * $HeadURL:$ + * $HeadURL$ * %% * Copyright (C) 2009 - 2013 CodeLutin * %% Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/FavoriteListService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/FixturesService.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/FixturesService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/FixturesService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.base.Preconditions; import com.google.common.collect.Maps; import org.apache.commons.logging.Log; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/FixturesService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollResult.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollResult.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollResult.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import java.io.Serializable; /** Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollResult.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollService.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.base.Preconditions; import org.chorem.pollen.persistence.entity.Choice; import org.chorem.pollen.persistence.entity.Poll; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenFixtures.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenFixtures.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenFixtures.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.esotericsoftware.yamlbeans.YamlException; import com.esotericsoftware.yamlbeans.YamlReader; import org.apache.commons.io.Charsets; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenFixtures.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenServiceContext.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenServiceContext.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenServiceContext.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.persistence.PollenPersistenceContext; import org.chorem.pollen.service.config.PollenServiceConfig; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenServiceContext.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenServiceSupport.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenServiceSupport.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenServiceSupport.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + /** * TODO * Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenServiceSupport.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenTechnicalException.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenTechnicalException.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenTechnicalException.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + public class PollenTechnicalException extends RuntimeException { private static final long serialVersionUID = 1L; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/PollenTechnicalException.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/UserService.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/UserService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/UserService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.base.Preconditions; import org.apache.commons.lang3.ObjectUtils; import org.chorem.pollen.persistence.dao.PollenUserJpaDao; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/UserService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoteCountingService.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoteCountingService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoteCountingService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.base.Preconditions; import org.chorem.pollen.persistence.entity.Poll; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoteCountingService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoteService.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoteService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoteService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.base.Preconditions; import org.chorem.pollen.persistence.entity.Poll; import org.chorem.pollen.persistence.entity.Vote; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoteService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoterListService.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoterListService.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoterListService.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.base.Preconditions; import org.chorem.pollen.persistence.dao.VoterListJpaDao; import org.chorem.pollen.persistence.dao.VoterListMemberJpaDao; @@ -37,20 +60,19 @@ result.setName(favoriteList.getName()); result.setWeight(1d); - dao.persist(result); + VoterListMemberJpaDao voterListMemberDao = + getPersistenceContext().getVoterListMemberDao(); - VoterListMemberJpaDao voterListMemberDao = getPersistenceContext().getVoterListMemberDao(); - for (FavoriteListMember favoriteListMember : favoriteList.getFavoriteListMember()) { VoterListMember voterListMember = voterListMemberDao.newInstance(); voterListMember.setWeight(1d); voterListMember.setEmail(favoriteListMember.getEmail()); - voterListMember.setVoterList(result); - - voterListMemberDao.persist(voterListMember); + result.addVoterListMember(voterListMember); } + dao.persist(result); + getPersistenceContext().commit(); return result; } @@ -132,7 +154,7 @@ VoterList voterList = getVoterList(pollId, voterListId); Preconditions.checkNotNull(voterList); - Set<VoterListMember> result = getPersistenceContext().getVoterListMemberDao().findAllByVoterList(voterListId); + Set<VoterListMember> result = voterList.getVoterListMember(); return result; } @@ -158,8 +180,8 @@ VoterList voterList = getVoterList(pollId, voterListId); Preconditions.checkNotNull(voterList); - member.setVoterList(voterList); - getPersistenceContext().getVoterListMemberDao().persist(member); + voterList.addVoterListMember(member); + getPersistenceContext().getVoterListDao().persist(voterList); getPersistenceContext().commit(); return member; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/VoterListService.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/PollenServiceConfig.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/PollenServiceConfig.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/PollenServiceConfig.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service.config; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.collect.Lists; import com.google.common.collect.Maps; import org.apache.commons.logging.Log; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/PollenServiceConfig.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/PollenServiceConfigOption.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/PollenServiceConfigOption.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/PollenServiceConfigOption.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service.config; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.nuiton.util.config.ConfigOptionDef; Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/PollenServiceConfigOption.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/package-info.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/package-info.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/package-info.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -5,3 +5,26 @@ * @since 2.0 */ package org.chorem.pollen.service.config; + +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/config/package-info.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/package-info.java =================================================================== --- branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/package-info.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/package-info.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -5,3 +5,26 @@ * @since 2.0 */ package org.chorem.pollen.service; + +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ Property changes on: branches/pollen-2.0/pollen-service/src/main/java/org/chorem/pollen/service/package-info.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Property changes on: branches/pollen-2.0/pollen-service/src/main/resources/fixtures.yaml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java =================================================================== --- branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.chorem.pollen.service.config.PollenServiceConfig; import org.junit.Rule; import org.nuiton.jpa.junit.JpaEntityManagerRule; Property changes on: branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/FakePollenServiceContext.java =================================================================== --- branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/FakePollenServiceContext.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/FakePollenServiceContext.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,9 +1,32 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import com.google.common.base.Preconditions; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.chorem.pollen.persistence.JpaEntityIdGeneratorIfNotEmpty; +import org.chorem.pollen.persistence.JpaEntityIdFactoryIfNotEmpty; import org.chorem.pollen.persistence.JpaPollenPersistenceContext; import org.chorem.pollen.persistence.PollenPersistenceContext; @@ -28,7 +51,7 @@ @Override public PollenPersistenceContext getPersistenceContext() { if (persistenceContext == null) { - JpaEntityIdGeneratorIfNotEmpty idGenerator = new JpaEntityIdGeneratorIfNotEmpty(); + JpaEntityIdFactoryIfNotEmpty idGenerator = new JpaEntityIdFactoryIfNotEmpty(); persistenceContext = new JpaPollenPersistenceContext(idGenerator, entityManager); } return persistenceContext; Property changes on: branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/FakePollenServiceContext.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/UserServiceTest.java =================================================================== --- branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/UserServiceTest.java 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/UserServiceTest.java 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,5 +1,28 @@ package org.chorem.pollen.service; +/* + * #%L + * Pollen :: Service + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2009 - 2013 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% + */ + import org.apache.commons.collections.CollectionUtils; import org.chorem.pollen.persistence.entity.PollenUser; import org.junit.Assert; Property changes on: branches/pollen-2.0/pollen-service/src/test/java/org/chorem/pollen/service/UserServiceTest.java ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pollen-service/src/test/resources/log4j.properties =================================================================== --- branches/pollen-2.0/pollen-service/src/test/resources/log4j.properties 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pollen-service/src/test/resources/log4j.properties 2013-06-05 16:41:46 UTC (rev 3816) @@ -1,3 +1,25 @@ +### +# #%L +# Pollen :: Service +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2009 - 2013 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 Property changes on: branches/pollen-2.0/pollen-service/src/test/resources/log4j.properties ___________________________________________________________________ Modified: svn:keywords - Author Date Id Revision + Author Date Id Revision HeadURL Modified: branches/pollen-2.0/pom.xml =================================================================== --- branches/pollen-2.0/pom.xml 2013-06-04 14:47:08 UTC (rev 3815) +++ branches/pollen-2.0/pom.xml 2013-06-05 16:41:46 UTC (rev 3816) @@ -215,8 +215,8 @@ <pluginRepository> - <id>nuiton.release</id> - <name>NuitonReleaseRepository</name> + <id>chorem-group</id> + <name>Chorem Group</name> <url>http://nexus.nuiton.org/nexus/content/groups/pollen-group</url> <snapshots> <enabled>true</enabled>
participants (1)
-
tchemit@users.chorem.org