Pollen-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- 3196 discussions
r3913 - in trunk/pollen-ui-angular/src/main/webapp: . js js/controllers partials
by garandel@users.chorem.org 05 May '14
by garandel@users.chorem.org 05 May '14
05 May '14
Author: garandel
Date: 2014-05-05 14:36:59 +0200 (Mon, 05 May 2014)
New Revision: 3913
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3913
Log:
Add list of polls for edit and vote (no security)
Added:
trunk/pollen-ui-angular/src/main/webapp/partials/poll-list.html
Modified:
trunk/pollen-ui-angular/src/main/webapp/index.html
trunk/pollen-ui-angular/src/main/webapp/js/app.js
trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html
trunk/pollen-ui-angular/src/main/webapp/partials/poll.html
Modified: trunk/pollen-ui-angular/src/main/webapp/index.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/index.html 2014-05-05 09:43:49 UTC (rev 3912)
+++ trunk/pollen-ui-angular/src/main/webapp/index.html 2014-05-05 12:36:59 UTC (rev 3913)
@@ -46,7 +46,7 @@
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="#/poll/create">Creer</a></li>
- <li><a href="#/poll/vote">Voter</a></li>
+ <li><a href="#/poll/list">Liste</a></li>
</ul>
</div>
</div>
Modified: trunk/pollen-ui-angular/src/main/webapp/js/app.js
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/js/app.js 2014-05-05 09:43:49 UTC (rev 3912)
+++ trunk/pollen-ui-angular/src/main/webapp/js/app.js 2014-05-05 12:36:59 UTC (rev 3913)
@@ -68,7 +68,7 @@
$routeProvider.when('/', {templateUrl: './partials/home.html', controller: "HomeCtrl"})
.when('/poll/create', {templateUrl: './partials/poll.html', controller: "PollCreateCtrl"})
.when('/poll/edit/:pollId', {templateUrl: './partials/poll.html', controller:"PollEditCtrl"})
- .when('/poll/vote', {templateUrl: './partials/poll.html', controller :"PollVoteCtrl"})
+ .when('/poll/vote/:pollId', {templateUrl: './partials/poll.html', controller :"PollVoteCtrl"})
.when('/poll/list', {templateUrl: './partials/poll-list.html', controller :"PollListCtrl"})
.otherwise({redirectTo: '/'});
@@ -103,11 +103,11 @@
restrict:'A',
link: function ($scope, element, attrs) {
element.bind('click', function () {
- if ($scope.globalVariables.editMode) {
- $scope.$apply(function () {
- $scope[attrs.editMe] = true;
- $scope.globalVariables.saved = false;
- });
+ if ($scope.globalVariables.editMode) {
+ $scope.$apply(function () {
+ $scope[attrs.editMe] = true;
+ $scope.globalVariables.saved = false;
+ });
}
});
}
@@ -152,18 +152,3 @@
};
})
-.factory('pollStorage', function () {
- var storageId='poll-storage';
- return {
- get: function () {
- return JSON.parse(localStorage.getItem(storageId) || '{}');
- },
- put: function (data) {
- localStorage.setItem(storageId, JSON.stringify(data));
- },
- remove: function () {
- localStorage.setItem(storageId, '{}');
- }
- }
-});
-
Modified: trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js 2014-05-05 09:43:49 UTC (rev 3912)
+++ trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js 2014-05-05 12:36:59 UTC (rev 3913)
@@ -18,7 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
-angular.module('pollControllers', []).controller('HomeCtrl', ['$scope', '$rootScope', function ($scope, $rootScope) {
+angular.module('pollControllers', [])
+.controller('HomeCtrl', ['$scope', function ($scope) {
}])
@@ -70,6 +71,7 @@
var initChoice = function () {
return {
name: '',
+ date: $scope.globalVariables.lastDate,
choiceType: $scope.globalVariables.lastType
};
}
@@ -78,6 +80,7 @@
$scope.globalVariables.create = true;
$scope.globalVariables.voted = angular.isDefined($scope.poll.votants);
$scope.globalVariables.lastType = 'TEXT';
+ $scope.globalVariables.lastDate = new Date();
$scope.$watch('pollForm.$valid', function (newVal) {
$scope.formValid = newVal;
@@ -101,7 +104,6 @@
}
}
-
var popupChoice = function (choice, title) {
var modalInstance = $modal.open({
templateUrl : 'partials/poll-popupChoice.html',
@@ -116,27 +118,10 @@
deleteChoice(ch);
}, function () {
$scope.globalVariables.lastType = choice.choiceType;
+ $scope.globalVariables.lastDate = choice.date;
});
}
- $scope.save = function () {
- if ($scope.formValid) {
- var data = {};
- data.poll = $scope.poll;
-
-// Restangular.all('polls').post('polls', data).then(function (data) {;
- $http.post('http://localhost:8080/pollen-rest-api/v1/polls', data).success(function (data) {
- $scope.test = data;
- $scope.globalVariables.saved = true;
- });
-
- }
- else {
- $scope.globalVariables.errorForm = true;
- }
-
- }
-
$scope.reset = function () {
$scope.poll = initPoll();
$scope.voteChoice = $scope.poll.choice;
@@ -172,24 +157,45 @@
}
}
+
+
+
}])
-.controller('PollCreateCtrl', ['$scope', '$controller', 'Restangular', function ($scope, $controller, Restangular) {
+.controller('PollCreateCtrl', ['$scope', '$controller', 'Restangular', '$http', function ($scope, $controller, Restangular, $http) {
$controller('PollAdminCtrl', {$scope:$scope});
- var initPoll = function () {
- Restangular.service('polls').one('new').get().then(function (skeletonPoll) {
- $scope.poll = skeletonPoll;
- $scope.poll.choice = [];
- $scope.vote = {};
- $scope.vote.choice = $scope.poll.choice;
+ var initPoll = function () {
+ Restangular.service('polls').one('new').get().then(function (skeletonPoll) {
+ $scope.poll = skeletonPoll;
+ $scope.poll.choice = [];
+ $scope.vote = {};
+ $scope.vote.choice = $scope.poll.choice;
+ });
+ }
+ initPoll();
+
+ $scope.save = function () {
+ if ($scope.formValid) {
+ var data = {};
+ data.poll = $scope.poll;
+
+// Restangular.all('polls').post('polls', data).then(function (data) {;
+ $http.post('http://localhost:8080/pollen-rest-api/v1/polls', data).success(function (data) {
+ $scope.test = data;
+ $scope.globalVariables.saved = true;
});
+
}
- initPoll();
+ else {
+ $scope.globalVariables.errorForm = true;
+ }
+ }
+
}])
-.controller('PollEditCtrl', ['$scope', '$controller', '$routeParams', 'Restangular', function ($scope, $controller, $routeParams, Restangular) {
+.controller('PollEditCtrl', ['$scope', '$controller', '$routeParams', 'Restangular', '$http', function ($scope, $controller, $routeParams, Restangular, $http) {
$controller('PollAdminCtrl', {$scope:$scope});
var initPoll = function () {
@@ -204,17 +210,37 @@
});
}
initPoll();
+
+ $scope.save = function () {
+ if ($scope.formValid) {
+ var data = {};
+ data.poll = $scope.poll;
+
+// Restangular.all('polls').post('polls', data).then(function (data) {;
+ $http.put('http://localhost:8080/pollen-rest-api/v1/polls/'+$routeParams.pollId, data).success(function (data) {
+ $scope.test = data;
+ $scope.globalVariables.saved = true;
+ });
+
+ }
+ else {
+ $scope.globalVariables.errorForm = true;
+ }
+
+ }
}])
-.controller('PollVoteCtrl', ['$scope', '$filter', '$controller', 'Restangular', 'pollStorage', function ($scope, $filter, $controller, Restangular, pollStorage) {
+.controller('PollVoteCtrl', ['$scope', '$filter', '$controller', '$routeParams', 'Restangular', function ($scope, $filter, $controller, $routeParams, Restangular) {
$controller('PollCtrl', {$scope:$scope});
- Restangular.one('polls').get().then(function (poll) {
- $scope.poll = poll[0];
+ Restangular.one('polls', $routeParams.pollId).get().then(function (poll) {
+ $scope.poll = poll;
+ Restangular.one('polls', $routeParams.pollId).all('choices').getList().then(function (choices) {
+ $scope.poll.choice = choices;
+ initVote();
+ })
+ });
- initVote();
- })
-
$scope.globalVariables.editMode = false;
$scope.$watch('vote.ame', function (newVal) {
if (newVal != '') {
@@ -226,12 +252,12 @@
$scope.vote = {};
$scope.vote.name = "";
$scope.vote.choice = [];
- for (var i = 0; i < $scope.poll.choices.length; ++i) {
- if ($scope.poll.choices[i].choiceType == 'text') {
- $scope.vote.choices.push({name:$scope.poll.choice[i].name, value:false});
+ for (var i = 0; i < $scope.poll.choice.length; ++i) {
+ if ($scope.poll.choice[i].choiceType == 'TEXT') {
+ $scope.vote.choice.push({name:$scope.poll.choice[i].name, value:false});
}
- else if ($scope.poll.choices[i].choiceType == 'date') {
- $scope.vote.choices.push({name: $scope.poll.choice[i].date , value:false});
+ else if ($scope.poll.choice[i].choiceType == 'DATE') {
+ $scope.vote.choice.push({name: $scope.poll.choice[i].date , value:false});
}
}
}
@@ -245,7 +271,9 @@
$scope.poll.votants = [];
}
$scope.poll.votants.push(data);
- pollStorage.put($scope.poll);
+
+ // save vote
+
$scope.globalVariables.saved = true;
$scope.globalVariables.errorForm = false;
initVote();
@@ -256,8 +284,12 @@
}
}])
-.controller('PollListCtrl', ['$scope', 'pollStorage', function ($scope, pollStorage) {
+.controller('PollListCtrl', ['$scope', '$controller', 'Restangular', function ($scope, $controller, Restangular) {
+ $controller('PollCtrl', {$scope:$scope});
+ Restangular.all('polls').getList().then(function (polls) {
+ $scope.polls = polls;
+ });
}])
;
\ No newline at end of file
Modified: trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html 2014-05-05 09:43:49 UTC (rev 3912)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html 2014-05-05 12:36:59 UTC (rev 3913)
@@ -22,6 +22,7 @@
-->
<table>
+<!-- begin print choices -->
<tr>
<td><button ng-if="globalVariables.editMode" ng-click="bigVersion()" class="btn btn-default" >Big version</button></td>
<td ng-repeat="choice in poll.choice" class="pollChoice pollAnim" ng-mouseenter="showEditHover = true" ng-mouseleave="showEditHover = false">
@@ -42,7 +43,9 @@
</td>
<td ng-if="!globalVariables.voted && globalVariables.editMode"><input type="button" class="btn btn-default btn-large" value="+" ng-click="addChoice()"/></td>
</tr>
+<!-- end print choice -->
+<!-- begin input vote -->
<tr>
<td class="pollChoice"> <input type="text" class="form-control" placeholder="votre nom" ng-model="vote.name" /> </td>
<td ng-repeat="choice in vote.choice" class="pollChoice">
@@ -52,12 +55,15 @@
<input class="btn btn-primary btn-large" type="button" value="Vote" ng-click="voter()" />
</td>
</tr>
+<!-- end input vote -->
+<!-- begin print vote -->
<tr ng-repeat="vote in poll.votants track by $index" class="pollAnim">
<td class="pollChoice"> {{vote.name}}</td>
- <td ng-repeat="choice in vote.choices" class="pollChoice">
+ <td ng-repeat="choice in vote.choice" class="pollChoice">
<input type="checkbox" ng-model="choice.value" disabled/>
</td>
</tr>
+<!-- end print vote -->
</table>
Added: trunk/pollen-ui-angular/src/main/webapp/partials/poll-list.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/poll-list.html (rev 0)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/poll-list.html 2014-05-05 12:36:59 UTC (rev 3913)
@@ -0,0 +1,6 @@
+
+<div ng-repeat="poll in polls">
+ <h2><a href="#/poll/vote/{{poll.topiaId}}">{{poll.title}}</a> <a href="#/poll/edit/{{poll.topiaId}}"><i class="glyphicon glyphicon-pencil"></i></a></h2>
+ <p ng-bind-html="toHTML(poll.description)"></p>
+ <hr/>
+</div>
\ No newline at end of file
Modified: trunk/pollen-ui-angular/src/main/webapp/partials/poll.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/poll.html 2014-05-05 09:43:49 UTC (rev 3912)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/poll.html 2014-05-05 12:36:59 UTC (rev 3913)
@@ -23,7 +23,7 @@
<alert type="'danger'" ng-if="globalVariables.errorForm"> Champ non remplie </alert>
<alert type="'success'" ng-if="globalVariables.editMode && globalVariables.saved"> Sondage sauvegardé..</alert>
- <alert type="'success'" ng-if="!globalVariables.editMode && globalVariables.saved"> Vote effectué.. <pre>{{rest}}</pre></alert>
+ <alert type="'success'" ng-if="!globalVariables.editMode && globalVariables.saved"> Vote effectué..</alert>
<alert type="'warning'" ng-if="globalVariables.voted"> Les votes ont commencé, certaine modification sont inaccessible.. </alert>
1
0
See <http://ci.chorem.org/jenkins/job/pollen-ci/33/changes>
Changes:
[Tony CHEMIT] reformat rest api + use PollenPrincipalRef for create operations
------------------------------------------
[...truncated 1006 lines...]
11:23:05 INFO (SecurityService.java:213) Check permission: :readPoll:org.chorem.pollen.persistence.entity.Poll_90e8bddf-d6c8-4ebf-9506-353c3001254d
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.888 sec - in org.chorem.pollen.service.PollServiceTest
Running org.chorem.pollen.service.PollenUserServiceTest
11:23:05 DEBUG (FakePollenApplicationContext.java:99) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
11:23:05 INFO (PollenServiceConfig.java:88) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
11:23:06 INFO (FixturesService.java:75) will restore database with fixture set
11:23:06 DEBUG (FakePollenApplicationContext.java:99) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
11:23:06 INFO (PollenServiceConfig.java:88) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
11:23:06 INFO (FixturesService.java:75) will restore database with fixture set
11:23:06 DEBUG (FakePollenApplicationContext.java:99) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
11:23:06 INFO (PollenServiceConfig.java:88) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
11:23:07 INFO (FixturesService.java:75) will restore database with fixture set
11:23:07 DEBUG (FakePollenApplicationContext.java:99) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
11:23:07 INFO (PollenServiceConfig.java:88) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
11:23:07 INFO (FixturesService.java:75) will restore database with fixture set
11:23:07 DEBUG (FakePollenApplicationContext.java:99) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
11:23:07 INFO (PollenServiceConfig.java:88) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
11:23:07 INFO (FixturesService.java:75) will restore database with fixture set
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.94 sec - in org.chorem.pollen.service.PollenUserServiceTest
Results :
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ pollen-services ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ pollen-services ---
[JENKINS] Archiving disabled
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Pollen :: Rest Api 2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti… (2 KB at 1.2 KB/sec)
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti… (613 B at 1.7 KB/sec)
[WARNING] The POM for org.antlr:stringtemplate:jar:3.2.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti… (2 KB at 3.0 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ pollen-rest-api ---
[INFO] Deleting <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/target>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ pollen-rest-api ---
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:collect-i18n-artifacts (collect-i18n-artifacts) @ pollen-rest-api ---
[WARNING] Invalid POM for org.antlr:stringtemplate:jar:3.2.1, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/debux/webmotion…
[INFO] Downloaded: https://oss.sonatype.org/content/repositories/snapshots/org/debux/webmotion… (2 KB at 1.3 KB/sec)
[INFO] Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/debux/webmotion…
[INFO] Downloaded: https://oss.sonatype.org/content/repositories/snapshots/org/debux/webmotion… (613 B at 2.1 KB/sec)
[INFO] collected 2 i18n artifacts for locale fr_FR stored in <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/target/…>
[INFO] collected 2 i18n artifacts for locale en_GB stored in <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/target/…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api ---
[WARNING] bundle fr_FR contains 6/70 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 6/70 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pollen-rest-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ pollen-rest-api ---
[INFO] Compiling 17 source files to <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/target/…>
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/src/mai…>:[278,35] getNullValue(java.lang.Class<?>) in org.nuiton.util.ObjectUtil has been deprecated
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/src/mai…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/src/mai…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ pollen-rest-api ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/target/…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pollen-rest-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ pollen-rest-api ---
[INFO] Compiling 3 source files to <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/target/…>
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/src/tes…>:[120,5] method does not override or implement a method from a supertype
[INFO] 1 error
[INFO] -------------------------------------------------------------
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Pollen ............................................ SUCCESS [ 1.607 s]
[INFO] Pollen :: VoteCounting (Api) ...................... SUCCESS [ 5.612 s]
[INFO] Pollen :: VoteCounting :: Normal .................. SUCCESS [ 1.396 s]
[INFO] Pollen :: VoteCounting :: Percentage .............. SUCCESS [ 1.248 s]
[INFO] Pollen :: VoteCounting :: Condorcet ............... SUCCESS [ 1.259 s]
[INFO] Pollen :: VoteCounting :: Number .................. SUCCESS [ 1.148 s]
[INFO] Pollen :: VoteCounting :: Borda ................... SUCCESS [ 1.198 s]
[INFO] Pollen :: VoteCounting :: Instant Runoff .......... SUCCESS [ 1.158 s]
[INFO] Pollen :: VoteCounting :: Coombs .................. SUCCESS [ 1.128 s]
[INFO] Pollen :: VoteCounting (Aggregator) ............... SUCCESS [ 0.219 s]
[INFO] Pollen :: Persistence ............................. SUCCESS [ 6.114 s]
[INFO] Pollen :: Service ................................. SUCCESS [ 6.868 s]
[INFO] Pollen :: Rest Api ................................ FAILURE [ 4.273 s]
[INFO] Pollen :: UI (CanJS) .............................. SKIPPED
[INFO] Pollen :: UI (Angular) ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.757 s
[INFO] Finished at: 2014-05-05T11:23:13+01:00
[INFO] Final Memory: 61M/397M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project pollen-rest-api: Compilation failure
[ERROR] <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/src/tes…>:[120,5] method does not override or implement a method from a supertype
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project pollen-rest-api: Compilation failure
<http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/src/tes…>:[120,5] method does not override or implement a method from a supertype
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
<http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-rest-api/src/tes…>:[120,5] method does not override or implement a method from a supertype
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
at org.apache.maven.plugin.compiler.TestCompilerMojo.execute(TestCompilerMojo.java:152)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 30 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :pollen-rest-api
Sending e-mails to: pollen-commits(a)list.chorem.org chemit+chorem-ci(a)codelutin.com
channel stopped
1
1
Build failed in Jenkins: pollen-ci » Pollen :: Rest Api #33
by admin+ci-chorem.org@codelutin.com 05 May '14
by admin+ci-chorem.org@codelutin.com 05 May '14
05 May '14
See <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>
Changes:
[Tony CHEMIT] reformat rest api + use PollenPrincipalRef for create operations
------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Pollen :: Rest Api 2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti… (2 KB at 1.2 KB/sec)
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti… (613 B at 1.7 KB/sec)
[WARNING] The POM for org.antlr:stringtemplate:jar:3.2.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloaded: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti… (2 KB at 3.0 KB/sec)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ pollen-rest-api ---
[INFO] Deleting <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ pollen-rest-api ---
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:collect-i18n-artifacts (collect-i18n-artifacts) @ pollen-rest-api ---
[WARNING] Invalid POM for org.antlr:stringtemplate:jar:3.2.1, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/debux/webmotion…
[INFO] Downloaded: https://oss.sonatype.org/content/repositories/snapshots/org/debux/webmotion… (2 KB at 1.3 KB/sec)
[INFO] Downloading: https://oss.sonatype.org/content/repositories/snapshots/org/debux/webmotion…
[INFO] Downloaded: https://oss.sonatype.org/content/repositories/snapshots/org/debux/webmotion… (613 B at 2.1 KB/sec)
[INFO] collected 2 i18n artifacts for locale fr_FR stored in <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>
[INFO] collected 2 i18n artifacts for locale en_GB stored in <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api ---
[WARNING] bundle fr_FR contains 6/70 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 6/70 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pollen-rest-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ pollen-rest-api ---
[INFO] Compiling 17 source files to <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>:[278,35] getNullValue(java.lang.Class<?>) in org.nuiton.util.ObjectUtil has been deprecated
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ pollen-rest-api ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pollen-rest-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ pollen-rest-api ---
[INFO] Compiling 3 source files to <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>:[120,5] method does not override or implement a method from a supertype
[INFO] 1 error
[INFO] -------------------------------------------------------------
[JENKINS] Archiving disabled
1
1
r3912 - in trunk: pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity pollen-rest-api/src/main/java/org/chorem/pollen/rest/api pollen-services/src/main/java/org/chorem/pollen/services/service/security
by tchemit@users.chorem.org 05 May '14
by tchemit@users.chorem.org 05 May '14
05 May '14
Author: tchemit
Date: 2014-05-05 11:43:49 +0200 (Mon, 05 May 2014)
New Revision: 3912
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3912
Log:
fix security permission
Added:
trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenPrincipalTopiaDao.java
Modified:
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java
Added: trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenPrincipalTopiaDao.java
===================================================================
--- trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenPrincipalTopiaDao.java (rev 0)
+++ trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenPrincipalTopiaDao.java 2014-05-05 09:43:49 UTC (rev 3912)
@@ -0,0 +1,11 @@
+package org.chorem.pollen.persistence.entity;
+
+public class PollenPrincipalTopiaDao extends AbstractPollenPrincipalTopiaDao<PollenPrincipal> {
+
+ public PollenPrincipal findByPermissionToken(String permissionToken) {
+
+ PollenPrincipal principal = forEquals(PollenPrincipal.PROPERTY_PERMISSION + "." + PollenToken.PROPERTY_TOKEN, permissionToken).findUnique();
+ return principal;
+
+ }
+}
Property changes on: trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenPrincipalTopiaDao.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java 2014-05-05 09:38:12 UTC (rev 3911)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java 2014-05-05 09:43:49 UTC (rev 3912)
@@ -124,7 +124,7 @@
Map<String, String[]> parameters = httpContext.getParameters();
String[] strings = parameters.get(REQUEST_PERMISSION_PARAMETER);
String credentialParam = strings == null || strings.length < 1 ? null : strings[0];
- PollenPrincipal mainPrincipal = securityService.getPollenPrincipalById(credentialParam);
+ PollenPrincipal mainPrincipal = securityService.getPollenPrincipalByPermissionToken(credentialParam);
// --- create security context --- //
PollenSecurityContext securityContext =
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java 2014-05-05 09:38:12 UTC (rev 3911)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java 2014-05-05 09:43:49 UTC (rev 3912)
@@ -26,6 +26,7 @@
import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
+import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.shiro.authc.AuthenticationException;
@@ -141,11 +142,11 @@
}
- public PollenPrincipal getPollenPrincipalById(String principalId) {
+ public PollenPrincipal getPollenPrincipalByPermissionToken(String principalId) {
PollenPrincipal principal = null;
if (principalId != null) {
- principal = getPollenPrincipalDao().findByTopiaId(principalId);
+ principal = getPollenPrincipalDao().findByPermissionToken(principalId);
}
return principal;
@@ -239,7 +240,11 @@
// Create Subject
SimplePrincipalCollection principalCollection = new SimplePrincipalCollection();
- principalCollection.addAll(permissions, PollenSecurityRealm.REALM_NAME);
+
+ if (CollectionUtils.isNotEmpty(permissions)) {
+ principalCollection.addAll(permissions, PollenSecurityRealm.REALM_NAME);
+ }
+
subject = new Subject.
Builder().
authenticated(securityContext.isConnected()).
1
0
r3911 - in trunk/pollen-ui-angular/src/main/webapp: css js js/controllers partials
by garandel@users.chorem.org 05 May '14
by garandel@users.chorem.org 05 May '14
05 May '14
Author: garandel
Date: 2014-05-05 11:38:12 +0200 (Mon, 05 May 2014)
New Revision: 3911
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3911
Log:
separate controllers editing and adding poll
Modified:
trunk/pollen-ui-angular/src/main/webapp/css/style.css
trunk/pollen-ui-angular/src/main/webapp/js/app.js
trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html
Modified: trunk/pollen-ui-angular/src/main/webapp/css/style.css
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/css/style.css 2014-05-05 09:17:44 UTC (rev 3910)
+++ trunk/pollen-ui-angular/src/main/webapp/css/style.css 2014-05-05 09:38:12 UTC (rev 3911)
@@ -184,4 +184,9 @@
.pollBigChoice .pollChoiceInput {
margin-top:20px;
text-align:center;
+}
+
+.pollBigVote {
+ float:right;
+ margin-top:5px;
}
\ No newline at end of file
Modified: trunk/pollen-ui-angular/src/main/webapp/js/app.js
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/js/app.js 2014-05-05 09:17:44 UTC (rev 3910)
+++ trunk/pollen-ui-angular/src/main/webapp/js/app.js 2014-05-05 09:38:12 UTC (rev 3911)
@@ -66,8 +66,8 @@
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/', {templateUrl: './partials/home.html', controller: "HomeCtrl"})
- .when('/poll/create', {templateUrl: './partials/poll.html', controller: "PollAdminCtrl"})
- .when('/poll/edit/:pollId', {templateUrl: './partials/poll.html', controller:"PollAdminCtrl"})
+ .when('/poll/create', {templateUrl: './partials/poll.html', controller: "PollCreateCtrl"})
+ .when('/poll/edit/:pollId', {templateUrl: './partials/poll.html', controller:"PollEditCtrl"})
.when('/poll/vote', {templateUrl: './partials/poll.html', controller :"PollVoteCtrl"})
.when('/poll/list', {templateUrl: './partials/poll-list.html', controller :"PollListCtrl"})
.otherwise({redirectTo: '/'});
Modified: trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js 2014-05-05 09:17:44 UTC (rev 3910)
+++ trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js 2014-05-05 09:38:12 UTC (rev 3911)
@@ -22,7 +22,7 @@
}])
-.controller('PollCtrl', ['$scope', '$sce', '$timeout', 'pollStorage', function ($scope, $sce, $timeout, pollStorage) {
+.controller('PollCtrl', ['$scope', '$sce', '$timeout', function ($scope, $sce, $timeout) {
$scope.globalVariables = {saved:false};
$scope.$watch('globalVariables.saved', function() {
$timeout(function () {
@@ -64,20 +64,9 @@
}])
-.controller('PollAdminCtrl', ['$scope', '$controller', '$modal', '$filter', '$timeout', 'PollsRest', '$http', 'pollStorage', function ($scope, $controller, $modal, $filter, $timeout, PollsRest, $http, pollStorage) {
+.controller('PollAdminCtrl', ['$scope', '$controller', '$modal', '$filter', '$timeout', 'Restangular', '$http', function ($scope, $controller, $modal, $filter, $timeout, Restangular, $http) {
$controller('PollCtrl', {$scope:$scope});
- var initPoll = function () {
-
- PollsRest.one('new').get().then(function (skeletonPoll) {
- $scope.poll = skeletonPoll;
- $scope.poll.choice = [];
- $scope.vote = {};
- $scope.vote.choice = $scope.poll.choice;
-
- });
- }
-
var initChoice = function () {
return {
name: '',
@@ -95,14 +84,6 @@
$scope.globalVariables.errorForm = false;
});
- if (!angular.isDefined($scope.poll.choice)) {
- initPoll();
- }
- else {
- $scope.vote = {};
- $scope.vote.choice = $scope.poll.choice;
- }
-
$scope.addChoice = function () {
var index = $scope.poll.choice.push(initChoice());
var choice = $scope.poll.choice[index-1];
@@ -142,7 +123,10 @@
if ($scope.formValid) {
var data = {};
data.poll = $scope.poll;
+
+// Restangular.all('polls').post('polls', data).then(function (data) {;
$http.post('http://localhost:8080/pollen-rest-api/v1/polls', data).success(function (data) {
+ $scope.test = data;
$scope.globalVariables.saved = true;
});
@@ -190,6 +174,38 @@
}
}])
+.controller('PollCreateCtrl', ['$scope', '$controller', 'Restangular', function ($scope, $controller, Restangular) {
+ $controller('PollAdminCtrl', {$scope:$scope});
+
+ var initPoll = function () {
+ Restangular.service('polls').one('new').get().then(function (skeletonPoll) {
+ $scope.poll = skeletonPoll;
+ $scope.poll.choice = [];
+ $scope.vote = {};
+ $scope.vote.choice = $scope.poll.choice;
+ });
+ }
+ initPoll();
+
+}])
+
+.controller('PollEditCtrl', ['$scope', '$controller', '$routeParams', 'Restangular', function ($scope, $controller, $routeParams, Restangular) {
+ $controller('PollAdminCtrl', {$scope:$scope});
+
+ var initPoll = function () {
+
+ Restangular.one('polls', $routeParams.pollId).get().then(function (poll) {
+ $scope.poll = poll;
+ Restangular.one('polls', $routeParams.pollId).all('choices').getList().then(function (choices) {
+ $scope.poll.choice = choices;
+ $scope.vote = {};
+ $scope.vote.choice = $scope.poll.choice;
+ });
+ });
+ }
+ initPoll();
+}])
+
.controller('PollVoteCtrl', ['$scope', '$filter', '$controller', 'Restangular', 'pollStorage', function ($scope, $filter, $controller, Restangular, pollStorage) {
$controller('PollCtrl', {$scope:$scope});
Modified: trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html 2014-05-05 09:17:44 UTC (rev 3910)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html 2014-05-05 09:38:12 UTC (rev 3911)
@@ -21,11 +21,11 @@
~
-->
-<div ng-repeat="choice in poll.choices" class="row pollBigChoice">
+<div ng-repeat="choice in poll.choice" class="row pollBigChoice">
<div class="col-sm-10">
<div ng-click="showChoiceDesc = !showChoiceDesc" >
- <div ng-if="choice.type == 'TEXT'">
+ <div ng-if="choice.choiceType == 'TEXT'">
<h3 edit-me="showEdit" ng-hide="showEdit" ng-mouseenter="showEditHover = true" ng-mouseleave="showEditHover = false">
<button class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)">...</button>
{{choice.name}}
@@ -35,7 +35,7 @@
</h3>
</div>
- <div ng-if="choice.type == 'DATE'">
+ <div ng-if="choice.choiceType == 'DATE'">
<h3 edit-me="showEdit" ng-hide="showEdit || isOpen" ng-mouseenter="showEditHover = true" ng-mouseleave="showEditHover = false">
<button class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)">...</button>
{{choice.date | date:'dd/MM/yyyy'}}
@@ -49,7 +49,7 @@
<p ng-show="globalVariables.editMode && showEditChoiceDesc"><textarea ng-model="choice.description" focus-me="showEditChoiceDesc" ng-exit="showEditChoiceDesc = false" cols="80" rows="8"></textarea></p>
</div>
<div class="col-sm-2 pollChoiceInput">
- <input type="checkbox" ng-model="vote.choices[$index].value"/>
+ <input type="checkbox" ng-model="vote.choice[$index].value"/>
</div>
</div>
<div class="row pollBigChoice" ng-if="globalVariables.editMode">
@@ -61,7 +61,7 @@
</div>
</div>
-<div style="float:right; margin-top:5px;">
+<div class="pollBigVote">
<input type="text" placeholder="Votre Nom" ng-model="vote.name"/>
<button class="btn btn-primary" ng-click="voter()">Voter</button>
</div>
\ No newline at end of file
1
0
05 May '14
Author: tchemit
Date: 2014-05-05 11:17:44 +0200 (Mon, 05 May 2014)
New Revision: 3910
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3910
Log:
reformat rest api + use PollenPrincipalRef for create operations
Added:
trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenPrincipals.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenPrincipalRef.java
Modified:
trunk/pollen-persistence/src/main/xmi/pollen.zargo
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/AuthApi.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceApi.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/CommentApi.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/DocApi.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ErrorAction.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/FavoriteListApi.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollApi.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserApi.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteApi.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteCountingApi.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoterListApi.java
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/AbstractPollenRestApiTest.java
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java
Added: trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenPrincipals.java
===================================================================
--- trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenPrincipals.java (rev 0)
+++ trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenPrincipals.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -0,0 +1,42 @@
+package org.chorem.pollen.persistence.entity;
+
+import org.nuiton.topia.persistence.TopiaEntity;
+
+/**
+ * Created on 5/5/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class PollenPrincipals {
+
+ public static <E extends TopiaEntity> PollenPrincipal getPrincipal(E entity) {
+
+ PollenPrincipal principal = null;
+
+ if (entity instanceof Poll) {
+
+ principal = ((Poll) entity).getCreator();
+
+ } else if (entity instanceof Choice) {
+
+ principal = ((Choice) entity).getCreator();
+
+ } else if (entity instanceof Comment) {
+
+ principal = ((Comment) entity).getAuthor();
+
+ } else if (entity instanceof Vote) {
+
+ principal = ((Vote) entity).getVoter();
+
+ } else if (entity instanceof FavoriteList) {
+
+ principal = ((FavoriteList) entity).getOwner();
+
+ }
+
+ return principal;
+
+ }
+}
Property changes on: trunk/pollen-persistence/src/main/java/org/chorem/pollen/persistence/entity/PollenPrincipals.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/pollen-persistence/src/main/xmi/pollen.zargo
===================================================================
(Binary files differ)
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRender.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -36,7 +36,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.persistence.PollenEntityEnum;
+import org.chorem.pollen.services.PollenTechnicalException;
import org.chorem.pollen.services.service.InvalidFormException;
+import org.chorem.pollen.services.service.PollenPrincipalRef;
import org.debux.webmotion.server.call.Call;
import org.debux.webmotion.server.call.HttpContext;
import org.debux.webmotion.server.mapping.Mapping;
@@ -104,11 +106,16 @@
}
Object map;
+
if (model instanceof InvalidFormException) {
+
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
map = toMap(((InvalidFormException) model).getErrors());
+
} else {
+
map = toMap(model, includeCollection);
+
}
GsonBuilder gsonBuilder = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
@@ -121,7 +128,9 @@
} else {
result = new JsonPrimitive(src.getTime());
}
+
return result;
+
}
});
@@ -147,6 +156,19 @@
}
protected <M> Object toMap(M model, String... includeCollection) {
+
+ if (model instanceof PollenPrincipalRef<?>) {
+
+ PollenPrincipalRef<?> pollenEntityRef = (PollenPrincipalRef<?>) model;
+
+ Map<String, Object> result = Maps.newTreeMap();
+ result.put("topiaId", pollenEntityRef.getEntity().getTopiaId());
+ result.put("permission", pollenEntityRef.getPrincipal().getPermission().getToken());
+
+ return result;
+
+ }
+
if (model instanceof Iterable<?>) {
// collection of objects
@@ -156,7 +178,9 @@
Object objectMap = toMap(object, includeCollection);
result.add(objectMap);
}
+
return result;
+
}
// single object
@@ -181,6 +205,7 @@
}
result.put(propertyName, propertyValue);
+
}
// treat collections
@@ -259,10 +284,8 @@
if (read != null) {
result.put(sourceProperty, read);
}
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- } catch (InvocationTargetException e) {
- throw new RuntimeException(e);
+ } catch (IllegalAccessException | InvocationTargetException e) {
+ throw new PollenTechnicalException(e);
}
}
return result;
@@ -273,10 +296,8 @@
Method readMethod = model.getSourceReadMethod(sourceProperty);
Object result = readMethod.invoke(source);
return (Iterable<?>) result;
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- } catch (InvocationTargetException e) {
- throw new RuntimeException(e);
+ } catch (IllegalAccessException | InvocationTargetException e) {
+ throw new PollenTechnicalException(e);
}
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -46,7 +46,7 @@
*/
public class PollenRestApiRequestFilter extends WebMotionFilter {
- public static final String REQUEST_CREDENTIAL_PARAMETER = "credential";
+ public static final String REQUEST_PERMISSION_PARAMETER = "permission";
public static final String POLLEN_SESSION = "pollenSession";
@@ -122,7 +122,7 @@
// --- get mainPrincipal (from request parameters) --- //
Map<String, String[]> parameters = httpContext.getParameters();
- String[] strings = parameters.get(REQUEST_CREDENTIAL_PARAMETER);
+ String[] strings = parameters.get(REQUEST_PERMISSION_PARAMETER);
String credentialParam = strings == null || strings.length < 1 ? null : strings[0];
PollenPrincipal mainPrincipal = securityService.getPollenPrincipalById(credentialParam);
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/AuthApi.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/AuthApi.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/AuthApi.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -37,14 +37,21 @@
public class AuthApi extends WebMotionController {
public SessionToken login(AuthService authService, String login, String password, Boolean rememberMe) throws PollenAuthenticationException {
- return authService.login(login, password, rememberMe);
+
+ SessionToken sessionToken = authService.login(login, password, rememberMe);
+ return sessionToken;
+
}
public void logout(AuthService authService) {
+
authService.logout();
+
}
public void lostPassword(AuthService authService, String login) {
+
authService.lostPassword(login);
+
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceApi.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceApi.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ChoiceApi.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -24,8 +24,9 @@
*/
import org.chorem.pollen.persistence.entity.Choice;
+import org.chorem.pollen.services.service.ChoiceService;
import org.chorem.pollen.services.service.InvalidFormException;
-import org.chorem.pollen.services.service.ChoiceService;
+import org.chorem.pollen.services.service.PollenPrincipalRef;
import org.debux.webmotion.server.WebMotionController;
import java.util.List;
@@ -39,26 +40,37 @@
public class ChoiceApi extends WebMotionController {
public List<Choice> getChoices(ChoiceService choiceService, String pollId) {
+
List<Choice> choices = choiceService.getChoices(pollId);
return choices;
+
}
public Choice getChoice(ChoiceService choiceService, String pollId, String choiceId) {
+
Choice choice = choiceService.getChoice(pollId, choiceId);
return choice;
+
}
- public Choice addChoice(ChoiceService choiceService, String pollId, Choice choice) throws InvalidFormException {
+ public PollenPrincipalRef<Choice> addChoice(ChoiceService choiceService, String pollId, Choice choice) throws InvalidFormException {
+
Choice createdChoice = choiceService.addChoice(pollId, choice);
- return createdChoice;
+ PollenPrincipalRef<Choice> principalRef = PollenPrincipalRef.newRef(createdChoice);
+ return principalRef;
+
}
public Choice editChoice(ChoiceService choiceService, String pollId, Choice choice) throws InvalidFormException {
+
Choice editedChoice = choiceService.editChoice(pollId, choice);
return editedChoice;
+
}
public void deleteChoice(ChoiceService choiceService, String pollId, String choiceId) {
+
choiceService.deleteChoice(pollId, choiceId);
+
}
}
\ No newline at end of file
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/CommentApi.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/CommentApi.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/CommentApi.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -24,8 +24,9 @@
*/
import org.chorem.pollen.persistence.entity.Comment;
+import org.chorem.pollen.services.service.CommentService;
import org.chorem.pollen.services.service.InvalidFormException;
-import org.chorem.pollen.services.service.CommentService;
+import org.chorem.pollen.services.service.PollenPrincipalRef;
import org.debux.webmotion.server.WebMotionController;
import java.util.List;
@@ -39,26 +40,37 @@
public class CommentApi extends WebMotionController {
public List<Comment> getComments(CommentService commentService, String pollId) {
+
List<Comment> comments = commentService.getComments(pollId);
return comments;
+
}
public Comment getComment(CommentService commentService, String pollId, String commentId) {
+
Comment comment = commentService.getComment(pollId, commentId);
return comment;
+
}
- public Comment addComment(CommentService commentService, String pollId, Comment comment) throws InvalidFormException {
+ public PollenPrincipalRef<Comment> addComment(CommentService commentService, String pollId, Comment comment) throws InvalidFormException {
+
Comment createdComment = commentService.addComment(pollId, comment);
- return createdComment;
+ PollenPrincipalRef<Comment> principalRef = PollenPrincipalRef.newRef(createdComment);
+ return principalRef;
+
}
public Comment editComment(CommentService commentService, String pollId, Comment comment) throws InvalidFormException {
+
Comment editedComment = commentService.editComment(pollId, comment);
return editedComment;
+
}
public void deleteComment(CommentService commentService, String pollId, String commentId) {
+
commentService.deleteComment(pollId, commentId);
+
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/DocApi.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/DocApi.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/DocApi.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -22,6 +22,7 @@
*/
import org.apache.commons.io.IOUtils;
+import org.chorem.pollen.services.PollenTechnicalException;
import org.debux.webmotion.server.WebMotionController;
import org.debux.webmotion.server.render.Render;
@@ -39,11 +40,16 @@
public Render showMapping() {
InputStream mappingUrl = getClass().getResourceAsStream("/mapping");
+
try {
+
String content = IOUtils.toString(mappingUrl);
return renderContent(content, "text/plain");
+
} catch (IOException e) {
- throw new RuntimeException(e);
+
+ throw new PollenTechnicalException(e);
+
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ErrorAction.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ErrorAction.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/ErrorAction.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -39,23 +39,37 @@
public InvalidFormException on400Form(InvalidFormException e) {
+ // just return the exception,
return e;
+
}
public Render on404(Exception e) {
- return renderError(HttpServletResponse.SC_NOT_FOUND, e.getMessage());
+
+ Render render = renderError(HttpServletResponse.SC_NOT_FOUND, e.getMessage());
+ return render;
+
}
public Render on401(Exception e) {
- return renderError(HttpServletResponse.SC_UNAUTHORIZED, e.getMessage());
+
+ Render render = renderError(HttpServletResponse.SC_UNAUTHORIZED, e.getMessage());
+ return render;
+
}
public Render on403(Exception e) {
- return renderError(HttpServletResponse.SC_FORBIDDEN, e.getMessage());
+
+ Render render = renderError(HttpServletResponse.SC_FORBIDDEN, e.getMessage());
+ return render;
+
}
public Render on500(Exception e) {
- return renderError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
+
+ Render render = renderError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
+ return render;
+
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/FavoriteListApi.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/FavoriteListApi.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/FavoriteListApi.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -26,8 +26,9 @@
import org.chorem.pollen.persistence.entity.FavoriteList;
import org.chorem.pollen.persistence.entity.FavoriteListMember;
import org.chorem.pollen.services.service.FavoriteListImportException;
+import org.chorem.pollen.services.service.FavoriteListService;
import org.chorem.pollen.services.service.InvalidFormException;
-import org.chorem.pollen.services.service.FavoriteListService;
+import org.chorem.pollen.services.service.PollenPrincipalRef;
import org.debux.webmotion.server.WebMotionController;
import java.io.File;
@@ -43,60 +44,86 @@
public class FavoriteListApi extends WebMotionController {
public List<FavoriteList> getFavoriteLists(FavoriteListService favoriteListService) {
+
List<FavoriteList> favoriteLists = favoriteListService.getFavoriteLists();
return favoriteLists;
+
}
public FavoriteList getFavoriteList(FavoriteListService favoriteListService, String favoriteListId) {
+
FavoriteList favoriteList = favoriteListService.getFavoriteList(favoriteListId);
return favoriteList;
+
}
- public FavoriteList createFavoriteList(FavoriteListService favoriteListService, FavoriteList favoriteList) throws InvalidFormException {
+ public PollenPrincipalRef<FavoriteList> createFavoriteList(FavoriteListService favoriteListService, FavoriteList favoriteList) throws InvalidFormException {
+
FavoriteList createdFavoriteList = favoriteListService.createFavoriteList(favoriteList);
- return createdFavoriteList;
+ PollenPrincipalRef<FavoriteList> principalRef = PollenPrincipalRef.newRef(createdFavoriteList);
+ return principalRef;
+
}
public FavoriteList editFavoriteList(FavoriteListService favoriteListService, FavoriteList favoriteList) throws InvalidFormException {
+
FavoriteList editedFavoriteList = favoriteListService.editFavoriteList(favoriteList);
return editedFavoriteList;
+
}
public void deleteFavoriteList(FavoriteListService favoriteListService, String favoriteListId) {
+
favoriteListService.deleteFavoriteList(favoriteListId);
+
}
public int importFavoriteListMembersFromCsv(FavoriteListService favoriteListService, String favoriteListId, File csvFile) throws FavoriteListImportException {
+
int i = favoriteListService.importFavoriteListMembersFromCsv(favoriteListId, csvFile);
return i;
+
}
public int importFavoriteListMembersFromLdap(FavoriteListService favoriteListService, String favoriteListId, String ldap) throws FavoriteListImportException {
+
int i = favoriteListService.importFavoriteListMembersFromLdap(favoriteListId, ldap);
return i;
+
}
public LinkedHashSet<FavoriteListMember> getMembers(FavoriteListService favoriteListService, String favoriteListId) {
+
LinkedHashSet<FavoriteListMember> members = favoriteListService.getFavoriteListMembers(favoriteListId);
return members;
+
}
public FavoriteListMember getMember(FavoriteListService favoriteListService, String favoriteListId, String memberId) {
+
FavoriteListMember member = favoriteListService.getFavoriteListMember(favoriteListId, memberId);
return member;
+
}
- public FavoriteListMember addMember(FavoriteListService favoriteListService, String favoriteListId, FavoriteListMember member) throws InvalidFormException {
+ public PollenPrincipalRef<FavoriteListMember> addMember(FavoriteListService favoriteListService, String favoriteListId, FavoriteListMember member) throws InvalidFormException {
+
FavoriteListMember createdMember = favoriteListService.addFavoriteListMember(favoriteListId, member);
- return createdMember;
+ PollenPrincipalRef<FavoriteListMember> principalRef = PollenPrincipalRef.newRef(createdMember);
+ return principalRef;
+
}
public FavoriteListMember editMember(FavoriteListService favoriteListService, String favoriteListId, FavoriteListMember member) throws InvalidFormException {
+
FavoriteListMember editedMember = favoriteListService.editFavoriteListMember(favoriteListId, member);
return editedMember;
+
}
public void removeMember(FavoriteListService favoriteListService, String favoriteListId, String memberId) {
+
favoriteListService.removeFavoriteListMember(favoriteListId, memberId);
+
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollApi.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollApi.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollApi.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -26,6 +26,7 @@
import org.chorem.pollen.persistence.entity.Poll;
import org.chorem.pollen.services.service.InvalidFormException;
import org.chorem.pollen.services.service.PollService;
+import org.chorem.pollen.services.service.PollenPrincipalRef;
import org.debux.webmotion.server.WebMotionController;
import java.io.File;
@@ -40,60 +41,85 @@
public class PollApi extends WebMotionController {
public Poll getNewPoll(PollService pollService) {
+
Poll newPoll = pollService.getNewPoll();
return newPoll;
+
}
public Set<Poll> getPolls(PollService pollService) {
+
Set<Poll> polls = pollService.getPolls();
return polls;
+
}
public Set<Poll> getCreatedPolls(PollService pollService) {
+
Set<Poll> polls = pollService.getCreatedPolls();
return polls;
+
}
public Set<Poll> getInvitedPolls(PollService pollService) {
+
Set<Poll> polls = pollService.getInvitedPolls();
return polls;
+
}
public Set<Poll> getParticipatedPolls(PollService pollService) {
+
Set<Poll> polls = pollService.getParticipatedPolls();
return polls;
+
}
public Poll getPoll(PollService pollService, String pollId) {
+
Poll poll = pollService.getPoll(pollId);
return poll;
+
}
- public Poll createPoll(PollService pollService, Poll poll) throws InvalidFormException {
+ public PollenPrincipalRef<Poll> createPoll(PollService pollService, Poll poll) throws InvalidFormException {
+
Poll createdPoll = pollService.createPoll(poll);
- return createdPoll;
+ PollenPrincipalRef<Poll> principalRef = PollenPrincipalRef.newRef(createdPoll);
+ return principalRef;
+
}
public Poll editPoll(PollService pollService, Poll poll) throws InvalidFormException {
+
Poll editedPoll = pollService.editPoll(poll);
return editedPoll;
+
}
public void deletePoll(PollService pollService, String pollId) {
+
pollService.deletePoll(pollId);
+
}
public Poll clonePoll(PollService pollService, String pollId) {
+
Poll clonedPoll = pollService.clonePoll(pollId);
return clonedPoll;
+
}
public void closePoll(PollService pollService, String pollId) {
+
pollService.closePoll(pollId);
+
}
public File exportPoll(PollService pollService, String pollId) {
+
File exportedPollFile = pollService.exportPoll(pollId);
return exportedPollFile;
+
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserApi.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserApi.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserApi.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -25,6 +25,7 @@
import org.chorem.pollen.persistence.entity.PollenUser;
import org.chorem.pollen.services.service.InvalidFormException;
+import org.chorem.pollen.services.service.PollenPrincipalRef;
import org.chorem.pollen.services.service.PollenUserService;
import org.chorem.pollen.services.service.security.PollenInvalidEmailActivationTokenException;
import org.chorem.pollen.services.service.security.PollenInvalidPasswordException;
@@ -41,43 +42,57 @@
public class PollenUserApi extends WebMotionController {
public List<PollenUser> getUsers(PollenUserService pollenUserService) {
+
List<PollenUser> users = pollenUserService.getUsers();
return users;
+
}
public PollenUser getUser(PollenUserService pollenUserService, String userId) {
+
PollenUser user = pollenUserService.getUser(userId);
return user;
+
}
- public PollenUser createUser(PollenUserService pollenUserService,
- PollenUser user,
- boolean generatePassword) throws InvalidFormException {
+ public PollenPrincipalRef<PollenUser> createUser(PollenUserService pollenUserService,
+ PollenUser user,
+ boolean generatePassword) throws InvalidFormException {
+
PollenUser createdUser = pollenUserService.createUser(user, generatePassword);
- return createdUser;
+ PollenPrincipalRef<PollenUser> principalRef = PollenPrincipalRef.newRef(createdUser);
+ return principalRef;
}
public PollenUser editUser(PollenUserService pollenUserService,
PollenUser user) throws InvalidFormException {
+
PollenUser editedUser = pollenUserService.editUser(user);
return editedUser;
+
}
public void deleteUser(PollenUserService pollenUserService, String userId) throws InvalidFormException {
+
pollenUserService.deleteUser(userId);
+
}
public void validateUserEmail(PollenUserService pollenUserService,
String userId,
String token) throws PollenInvalidEmailActivationTokenException {
+
pollenUserService.validateUserEmail(userId, token);
+
}
public void changePassword(PollenUserService pollenUserService,
String userId,
String oldPassword,
String newPassword) throws PollenInvalidPasswordException {
+
pollenUserService.changePassword(userId, oldPassword, newPassword);
+
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteApi.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteApi.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteApi.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -25,6 +25,7 @@
import org.chorem.pollen.persistence.entity.Vote;
import org.chorem.pollen.services.service.InvalidFormException;
+import org.chorem.pollen.services.service.PollenPrincipalRef;
import org.chorem.pollen.services.service.VoteService;
import org.debux.webmotion.server.WebMotionController;
@@ -39,26 +40,37 @@
public class VoteApi extends WebMotionController {
public List<Vote> getVotes(VoteService voteService, String pollId) {
+
List<Vote> votes = voteService.getVotes(pollId);
return votes;
+
}
public Vote getVote(VoteService voteService, String pollId, String voteId) {
+
Vote vote = voteService.getVote(pollId, voteId);
return vote;
+
}
- public Vote addVote(VoteService voteService, String pollId, Vote vote) throws InvalidFormException {
+ public PollenPrincipalRef<Vote> addVote(VoteService voteService, String pollId, Vote vote) throws InvalidFormException {
+
Vote createdVote = voteService.addVote(pollId, vote);
- return createdVote;
+ PollenPrincipalRef<Vote> principalRef = PollenPrincipalRef.newRef(createdVote);
+ return principalRef;
+
}
public Vote editVote(VoteService voteService, String pollId, Vote vote) throws InvalidFormException {
+
Vote editedVote = voteService.editVote(pollId, vote);
return editedVote;
+
}
public void deleteVote(VoteService voteService, String pollId, String voteId) {
+
voteService.deleteVote(pollId, voteId);
+
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteCountingApi.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteCountingApi.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoteCountingApi.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -36,7 +36,9 @@
public class VoteCountingApi extends WebMotionController {
public PollResult getResult(VoteCountingService voteCountingService, String pollId) {
+
PollResult result = voteCountingService.getResult(pollId);
return result;
+
}
}
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoterListApi.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoterListApi.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/VoterListApi.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -26,6 +26,7 @@
import org.chorem.pollen.persistence.entity.VoterList;
import org.chorem.pollen.persistence.entity.VoterListMember;
import org.chorem.pollen.services.service.InvalidFormException;
+import org.chorem.pollen.services.service.PollenPrincipalRef;
import org.chorem.pollen.services.service.VoterListService;
import org.debux.webmotion.server.WebMotionController;
@@ -41,55 +42,79 @@
public class VoterListApi extends WebMotionController {
public VoterList importFavoriteList(VoterListService voterListService, String pollId, String favoriteListId) {
+
VoterList importVoterList = voterListService.importFavoriteList(pollId, favoriteListId);
return importVoterList;
+
}
public List<VoterList> getVoterLists(VoterListService voterListService, String pollId) {
+
List<VoterList> voterLists = voterListService.getVoterLists(pollId);
return voterLists;
+
}
- public VoterList getVoterList(VoterListService voterListService, String pollId, String voterListId) {
+ public PollenPrincipalRef<VoterList> getVoterList(VoterListService voterListService, String pollId, String voterListId) {
+
VoterList voterList = voterListService.getVoterList(pollId, voterListId);
- return voterList;
+ PollenPrincipalRef<VoterList> principalRef = PollenPrincipalRef.newRef(voterList);
+ return principalRef;
+
}
public VoterList createVoterList(VoterListService voterListService, String pollId, VoterList voterList) throws InvalidFormException {
+
VoterList createdVoterList = voterListService.addVoterList(pollId, voterList);
return createdVoterList;
+
}
public VoterList editVoterList(VoterListService voterListService, String pollId, VoterList voterList) throws InvalidFormException {
+
VoterList editedVoterList = voterListService.editVoterList(pollId, voterList);
return editedVoterList;
+
}
public void deleteVoterList(VoterListService voterListService, String pollId, String voterListId) {
+
voterListService.deleteVoterList(pollId, voterListId);
+
}
public Set<VoterListMember> getMembers(VoterListService voterListService, String pollId, String voterListId) {
+
Set<VoterListMember> members = voterListService.getVoterListMembers(pollId, voterListId);
return members;
+
}
public VoterListMember getMember(VoterListService voterListService, String pollId, String voterListId, String memberId) {
+
VoterListMember member = voterListService.getVoterListMember(pollId, voterListId, memberId);
return member;
+
}
- public VoterListMember addMember(VoterListService voterListService, String pollId, String voterListId, VoterListMember member) throws InvalidFormException {
+ public PollenPrincipalRef<VoterListMember> addMember(VoterListService voterListService, String pollId, String voterListId, VoterListMember member) throws InvalidFormException {
+
VoterListMember createdMember = voterListService.addVoterListMember(pollId, voterListId, member);
- return createdMember;
+ PollenPrincipalRef<VoterListMember> principalRef = PollenPrincipalRef.newRef(createdMember);
+ return principalRef;
+
}
public VoterListMember editMember(VoterListService voterListService, String pollId, String voterListId, VoterListMember member) throws InvalidFormException {
+
VoterListMember editedMember = voterListService.editVoterListMember(pollId, voterListId, member);
return editedMember;
+
}
public void deleteMember(VoterListService voterListService, String pollId, String voterListId, String memberId) {
+
voterListService.deleteVoterListMember(pollId, voterListId, memberId);
+
}
}
Modified: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/AbstractPollenRestApiTest.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/AbstractPollenRestApiTest.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/AbstractPollenRestApiTest.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -40,6 +40,7 @@
import org.junit.Rule;
import org.nuiton.util.DateUtil;
+import java.io.File;
import java.io.IOException;
import java.util.Locale;
@@ -116,6 +117,14 @@
}
+ @Override
+ protected String getServerBaseDirectory() {
+
+ return new File(application.getTestBasedir(),
+ "tomcat_" + application.getPort()).getAbsolutePath();
+
+ }
+
@After
public void stopServer() throws Exception {
Modified: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollApiTest.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -141,7 +141,7 @@
Poll poll = fixture(PollenFixtures.POLL_NORMAL_ID);
String pollId = poll.getTopiaId();
Request request = createRequest("/v1/polls/" + pollId)
- .addParameter(PollenRestApiRequestFilter.REQUEST_CREDENTIAL_PARAMETER, poll.getCreator().getTopiaId())
+ .addParameter(PollenRestApiRequestFilter.REQUEST_PERMISSION_PARAMETER, poll.getCreator().getPermission().getToken())
.Delete();
String content = request.execute().returnContent().asString();
showTestResult(content);
Added: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenPrincipalRef.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenPrincipalRef.java (rev 0)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenPrincipalRef.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -0,0 +1,48 @@
+package org.chorem.pollen.services.service;
+
+import org.chorem.pollen.persistence.entity.PollenPrincipal;
+import org.chorem.pollen.persistence.entity.PollenPrincipals;
+import org.nuiton.topia.persistence.TopiaEntity;
+
+/**
+ * To box a entity within his principal.
+ * <p/>
+ * Created on 5/5/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class PollenPrincipalRef<E extends TopiaEntity> {
+
+ protected E entity;
+
+ protected PollenPrincipal principal;
+
+ public static <E extends TopiaEntity> PollenPrincipalRef<E> newRef(E entity) {
+
+ PollenPrincipalRef<E> result = new PollenPrincipalRef<>();
+ result.setEntity(entity);
+
+ PollenPrincipal principal = PollenPrincipals.getPrincipal(entity);
+ result.setPrincipal(principal);
+
+ return result;
+
+ }
+
+ public E getEntity() {
+ return entity;
+ }
+
+ public void setEntity(E entity) {
+ this.entity = entity;
+ }
+
+ public PollenPrincipal getPrincipal() {
+ return principal;
+ }
+
+ public void setPrincipal(PollenPrincipal principal) {
+ this.principal = principal;
+ }
+}
Property changes on: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenPrincipalRef.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java 2014-05-05 06:24:12 UTC (rev 3909)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/SecurityService.java 2014-05-05 09:17:44 UTC (rev 3910)
@@ -120,7 +120,7 @@
// Generate token
PollenToken token = generateNewToken();
- principal.setToken(token);
+ principal.setPermission(token);
// Persist
dao.create(principal);
@@ -318,6 +318,7 @@
List<PollenPrincipal> allByPollenUser =
getPollenPrincipalDao().forPollenUserEquals(user).findAll();
principals.addAll(allByPollenUser);
+
}
PrincipalByType principalByType = resolvePrincipals(principals);
@@ -335,6 +336,7 @@
// can only read or edit the choice (only poll creator can delete a choice)
permissions.add(createSubjectPermission(PermissionVerb.readChoice, choice));
permissions.add(createSubjectPermission(PermissionVerb.editChoice, choice));
+
}
for (Poll poll : principalByType.polls) {
@@ -357,6 +359,7 @@
permissions.add(createSubjectPermission(PermissionVerb.readVote, vote));
}
}
+
}
return permissions;
1
0
05 May '14
See <http://ci.chorem.org/jenkins/job/pollen-nightly/14/changes>
Changes:
[Tony CHEMIT] pass ChoiceType to Choice, no more to Poll + add Rest Doc action + begin to add Rest API tests
[Tony CHEMIT] fix ui-angular war deploy
[Tony CHEMIT] make ui-angular war
[Tony CHEMIT] simplify rest-api starting + add some conf
[Tony CHEMIT] simplify rest-api starting + add some conf
[Tony CHEMIT] use specific configuration files (pollen-services.properties, pollen-rest-api.properties to avoid any collision with existing config)
------------------------------------------
[...truncated 2060 lines...]
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[INFO] Load missing file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>
[INFO] Missing file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…> is up-to-date.
[INFO] Writing third-party file to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] Will attach third party file from <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:collect-i18n-artifacts (collect-i18n-artifacts) @ pollen-rest-api ---
[WARNING] Invalid POM for org.antlr:stringtemplate:jar:3.2.1, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] collected 2 i18n artifacts for locale fr_FR stored in <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] collected 2 i18n artifacts for locale en_GB stored in <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api ---
[WARNING] bundle fr_FR contains 11/51 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 11/51 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pollen-rest-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 2 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- license-maven-plugin:1.6:update-file-header (update-file-header) @ pollen-rest-api ---
[INFO] Will search files to update from root <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/src>
[INFO] Will search files to update from root <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] Scan 31 files header done in 307.893ms.
[INFO]
* uptodate header on 25 files.
* add header on 6 files.
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ pollen-rest-api ---
[INFO] Compiling 17 source files to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>:[221,35] getNullValue(java.lang.Class<?>) in org.nuiton.util.ObjectUtil has been deprecated
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- animal-sniffer-maven-plugin:1.10:check (default) @ pollen-rest-api ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java17:1.0
[INFO]
[INFO] --- jredmine-maven-plugin:1.8.1:generate-changes (jredmine-generate-changes) @ pollen-rest-api ---
[INFO] Skipping goal (skipGenerateChanges flag is on).
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ pollen-rest-api ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pollen-rest-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ pollen-rest-api ---
[INFO] Compiling 5 source files to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ pollen-rest-api ---
[INFO] Surefire report directory: <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.chorem.pollen.rest.api.PollServiceTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.017 sec - in org.chorem.pollen.rest.api.PollServiceTest
Running org.chorem.pollen.rest.api.PollenUserServiceTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 sec - in org.chorem.pollen.rest.api.PollenUserServiceTest
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 2
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) @ pollen-rest-api ---
[INFO] Packaging webapp
[INFO] Assembling webapp [pollen-rest-api] in [<http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…]>
[INFO] Processing war project
[INFO] Copying webapp webResources [<http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…]> to [<http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…]>
[INFO] Copying webapp resources [<http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…]>
[INFO] Webapp assembled in [173 msecs]
[INFO] Building war: <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ensure-no-container-api) @ pollen-rest-api ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ pollen-rest-api ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-redmine-login) @ pollen-rest-api ---
[INFO] Skipping goal (runOnce flag is on and goal was already executed).
[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ pollen-rest-api ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ pollen-rest-api ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-pgp-passphrase) @ pollen-rest-api ---
[INFO] Exporting server [gpg-signer] username in ${gpg.keyname}
[INFO] Exporting server [gpg-signer] password in ${gpg.passphrase}
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-artifacts) @ pollen-rest-api ---
[INFO] Loaded <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/target/collect-art…>
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT.war to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/target/collect/org…>
[INFO] Copying THIRD-PARTY.properties to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/target/collect/org…>
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT-sources.jar to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/target/collect/org…>
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT-javadoc.jar to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/target/collect/org…>
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-attachements) @ pollen-rest-api ---
[WARNING] Skipping goal (No file to collect).
[INFO]
[INFO] --- maven-gpg-plugin:1.5:sign (sign-artifacts) @ pollen-rest-api ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ pollen-rest-api ---
[INFO] Used declared dependencies found:
[INFO] org.chorem.pollen:pollen-persistence:jar:2.0-SNAPSHOT:compile
[INFO] org.chorem.pollen:pollen-services:jar:2.0-SNAPSHOT:compile
[INFO] org.nuiton.topia:topia-persistence:jar:3.0-SNAPSHOT:compile
[INFO] org.hibernate:hibernate-core:jar:4.3.5.Final:runtime
[INFO] org.debux.webmotion:webmotion:jar:2.4:compile
[INFO] org.debux.webmotion:webmotion-unittest:jar:2.4:test
[INFO] org.nuiton.web:nuiton-web:jar:1.16:compile
[INFO] org.nuiton.i18n:nuiton-i18n:jar:3.0:compile
[INFO] javax:javaee-api:jar:7.0:provided
[INFO] commons-logging:commons-logging:jar:1.1.3:compile
[INFO] commons-beanutils:commons-beanutils:jar:1.9.1:compile
[INFO] org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] org.apache.httpcomponents:fluent-hc:jar:4.2.3:compile
[INFO] com.google.guava:guava:jar:16.0.1:compile
[INFO] com.google.code.gson:gson:jar:2.2.4:compile
[INFO] junit:junit:jar:4.11:test
[INFO] org.nuiton:nuiton-utils:jar:2.7.1:compile
[INFO] com.h2database:h2:jar:1.3.173:runtime
[INFO] log4j:log4j:jar:1.2.17:compile
[WARNING] Used undeclared dependencies found:
[WARNING] commons-io:commons-io:jar:2.4:compile
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Pollen ............................................ SUCCESS [ 31.464 s]
[INFO] Pollen :: VoteCounting (Api) ...................... SUCCESS [ 14.422 s]
[INFO] Pollen :: VoteCounting :: Normal .................. SUCCESS [ 4.297 s]
[INFO] Pollen :: VoteCounting :: Percentage .............. SUCCESS [ 4.422 s]
[INFO] Pollen :: VoteCounting :: Condorcet ............... SUCCESS [ 4.401 s]
[INFO] Pollen :: VoteCounting :: Number .................. SUCCESS [ 4.010 s]
[INFO] Pollen :: VoteCounting :: Borda ................... SUCCESS [ 4.042 s]
[INFO] Pollen :: VoteCounting :: Instant Runoff .......... SUCCESS [ 3.991 s]
[INFO] Pollen :: VoteCounting :: Coombs .................. SUCCESS [ 3.981 s]
[INFO] Pollen :: VoteCounting (Aggregator) ............... SUCCESS [ 1.449 s]
[INFO] Pollen :: Persistence ............................. SUCCESS [ 22.241 s]
[INFO] Pollen :: Service ................................. SUCCESS [ 16.597 s]
[INFO] Pollen :: Rest Api ................................ FAILURE [ 13.179 s]
[INFO] Pollen :: UI (CanJS) .............................. SKIPPED
[INFO] Pollen :: UI (Angular) ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:12 min
[INFO] Finished at: 2014-04-30T01:03:08+01:00
[INFO] Final Memory: 88M/294M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:analyze-only (analyze) on project pollen-rest-api: Dependency problems found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:analyze-only (analyze) on project pollen-rest-api: Dependency problems found
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.MojoExecutionException: Dependency problems found
at org.apache.maven.plugin.dependency.analyze.AbstractAnalyzeMojo.execute(AbstractAnalyzeMojo.java:188)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 30 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :pollen-rest-api
Sending e-mails to: pollen-commits(a)list.chorem.org chemit+chorem-ci(a)codelutin.com
channel stopped
Skipping sonar analysis due to bad build status FAILURE
1
4
Build failed in Jenkins: pollen-nightly » Pollen :: Rest Api #17
by admin+ci-chorem.org@codelutin.com 05 May '14
by admin+ci-chorem.org@codelutin.com 05 May '14
05 May '14
See <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
Changes:
[Tony CHEMIT] security + sumplify exceptions + ...
[Tony CHEMIT] optimize dependenceis + add license headers + use commons-collections4
[Tony CHEMIT] improve rest api
[Tony CHEMIT] continue dev + begin of implements correct security
------------------------------------------
[...truncated 205 lines...]
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:31 INFO (PollenRestApiApplicationContext.java:231) will use default logging configuration
mai 05, 2014 1:02:32 AM org.apache.coyote.AbstractProtocol init
Infos: Initializing ProtocolHandler ["http-bio-10000"]
mai 05, 2014 1:02:32 AM org.apache.catalina.core.StandardService startInternal
Infos: Starting service Tomcat
mai 05, 2014 1:02:32 AM org.apache.catalina.core.StandardEngine startInternal
Infos: Starting Servlet Engine: Apache Tomcat/7.0.47
mai 05, 2014 1:02:32 AM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
Infos: No global web.xml found
01:02:34 INFO (JCLLoggerAdapter.java:263) Parsed mapping <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
01:02:34 INFO (JCLLoggerAdapter.java:263) WebMotion is started
01:02:34 INFO (PollenTopiaTransactionFilter.java:63) Init Topia Filter
mai 05, 2014 1:02:34 AM org.apache.coyote.AbstractProtocol start
Infos: Starting ProtocolHandler ["http-bio-10000"]
01:02:34 INFO (FixturesService.java:75) will restore database with fixture set
01:02:34 INFO (SecurityService.java:237) All permissions:
*:readPoll:org.chorem.pollen.persistence.entity.Poll_6d3a5e84-0ef1-407b-8ac4-dc4cf4f270cb
*:readChoice:org.chorem.pollen.persistence.entity.Choice_b80bb655-1053-4844-8af9-91002d7b93f0
*:readChoice:org.chorem.pollen.persistence.entity.Choice_aee19e57-c59b-4fed-97f8-c5e4b6b5c23e
*:readChoice:org.chorem.pollen.persistence.entity.Choice_97ad7b29-8bcd-4cfe-bf61-fd5cabbdfee6
01:02:34 INFO (SecurityService.java:213) Check permission: :readPoll:org.chorem.pollen.persistence.entity.Poll_6d3a5e84-0ef1-407b-8ac4-dc4cf4f270cb
01:02:34 INFO (AbstractPollenRestApiTest.java:137) test *getPoll* result
{
"beginDate": 1388530800000,
"commentVisibility": "EVERYBODY",
"creator": {
"email": "poll_creator(a)pollen.chorem.org",
"name": "poll creator",
"token": {
"creationDate": 1388530800000,
"token": "dFH0Ro1SRS6cBF5UG7D9vg",
"topiaCreateDate": 1399244554584,
"topiaId": "org.chorem.pollen.persistence.entity.PollenToken_1e43e28a-3ab2-4b63-a63d-4f83c875ff91"
},
"topiaCreateDate": 1399244554584,
"topiaId": "org.chorem.pollen.persistence.entity.PollenPrincipal_01d6bd93-5599-4de9-a162-4c3b6e6423b7",
"topiaVersion": 1
},
"description": "Sondage de type \u0027normal\u0027",
"endDate": 1391209200000,
"maxChoiceNumber": 2,
"pollType": "FREE",
"resultVisibility": "EVERYBODY",
"title": "Sondage normal",
"topiaCreateDate": 1399244554584,
"topiaId": "org.chorem.pollen.persistence.entity.Poll_6d3a5e84-0ef1-407b-8ac4-dc4cf4f270cb",
"voteCountingType": 1,
"voteVisibility": "EVERYBODY"
}
mai 05, 2014 1:02:34 AM org.apache.coyote.AbstractProtocol pause
Infos: Pausing ProtocolHandler ["http-bio-10000"]
mai 05, 2014 1:02:35 AM org.apache.catalina.core.StandardService stopInternal
Infos: Stopping service Tomcat
mai 05, 2014 1:02:35 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Grave: The web application [/] appears to have started a thread named [Thread-4] but has failed to stop it. This is very likely to create a memory leak.
mai 05, 2014 1:02:35 AM org.apache.coyote.AbstractProtocol stop
Infos: Stopping ProtocolHandler ["http-bio-10000"]
mai 05, 2014 1:02:40 AM org.apache.tomcat.util.net.AbstractEndpoint shutdownExecutor
Avertissement: The executor associated with thread pool [http-bio-10000] has not fully shutdown. Some application threads may still be running.
mai 05, 2014 1:02:40 AM org.apache.coyote.AbstractProtocol destroy
Infos: Destroying ProtocolHandler ["http-bio-10000"]
01:02:40 INFO (PollenServiceConfig.java:88) Pollen configuration:
Filename: pollen-rest-api.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:40 INFO (PollenRestApiApplicationContext.java:231) will use default logging configuration
mai 05, 2014 1:02:40 AM org.apache.coyote.AbstractProtocol init
Infos: Initializing ProtocolHandler ["http-bio-10001"]
mai 05, 2014 1:02:40 AM org.apache.catalina.core.StandardService startInternal
Infos: Starting service Tomcat
mai 05, 2014 1:02:40 AM org.apache.catalina.core.StandardEngine startInternal
Infos: Starting Servlet Engine: Apache Tomcat/7.0.47
mai 05, 2014 1:02:40 AM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
Infos: No global web.xml found
01:02:42 INFO (JCLLoggerAdapter.java:263) Parsed mapping <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
01:02:42 INFO (JCLLoggerAdapter.java:263) WebMotion is started
01:02:42 INFO (PollenTopiaTransactionFilter.java:63) Init Topia Filter
mai 05, 2014 1:02:42 AM org.apache.coyote.AbstractProtocol start
Infos: Starting ProtocolHandler ["http-bio-10001"]
01:02:42 INFO (FixturesService.java:75) will restore database with fixture set
01:02:42 INFO (AbstractPollenRestApiTest.java:137) test *postPoll* result
{
"commentVisibility": "EVERYBODY",
"creator": {
"token": {
"creationDate": 1388530800000,
"token": "a58wIPxlRKWUsY3qwboCaA",
"topiaCreateDate": 1399244562714,
"topiaId": "org.chorem.pollen.persistence.entity.PollenToken_889ebaa6-5d25-481e-9e7b-bd79ee7760e9"
},
"topiaCreateDate": 1399244562714,
"topiaId": "org.chorem.pollen.persistence.entity.PollenPrincipal_e0d0b1f3-9627-4b3f-bfc6-60241a4d0f86"
},
"pollType": "FREE",
"title": "title",
"topiaCreateDate": 1399244562714,
"topiaId": "org.chorem.pollen.persistence.entity.Poll_e0ca21a0-de9a-4fca-9807-d1d5c753a798",
"voteCountingType": 1,
"voteVisibility": "EVERYBODY"
}
mai 05, 2014 1:02:42 AM org.apache.coyote.AbstractProtocol pause
Infos: Pausing ProtocolHandler ["http-bio-10001"]
mai 05, 2014 1:02:42 AM org.apache.catalina.core.StandardService stopInternal
Infos: Stopping service Tomcat
mai 05, 2014 1:02:42 AM org.apache.coyote.AbstractProtocol stop
Infos: Stopping ProtocolHandler ["http-bio-10001"]
mai 05, 2014 1:02:47 AM org.apache.tomcat.util.net.AbstractEndpoint shutdownExecutor
Avertissement: The executor associated with thread pool [http-bio-10001] has not fully shutdown. Some application threads may still be running.
mai 05, 2014 1:02:47 AM org.apache.coyote.AbstractProtocol destroy
Infos: Destroying ProtocolHandler ["http-bio-10001"]
01:02:47 INFO (PollenServiceConfig.java:88) Pollen configuration:
Filename: pollen-rest-api.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:48 INFO (PollenRestApiApplicationContext.java:231) will use default logging configuration
mai 05, 2014 1:02:48 AM org.apache.coyote.AbstractProtocol init
Infos: Initializing ProtocolHandler ["http-bio-10002"]
mai 05, 2014 1:02:48 AM org.apache.catalina.core.StandardService startInternal
Infos: Starting service Tomcat
mai 05, 2014 1:02:48 AM org.apache.catalina.core.StandardEngine startInternal
Infos: Starting Servlet Engine: Apache Tomcat/7.0.47
mai 05, 2014 1:02:48 AM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
Infos: No global web.xml found
01:02:50 INFO (JCLLoggerAdapter.java:263) Parsed mapping <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
01:02:50 INFO (JCLLoggerAdapter.java:263) WebMotion is started
01:02:50 INFO (PollenTopiaTransactionFilter.java:63) Init Topia Filter
mai 05, 2014 1:02:50 AM org.apache.coyote.AbstractProtocol start
Infos: Starting ProtocolHandler ["http-bio-10002"]
01:02:50 INFO (FixturesService.java:75) will restore database with fixture set
01:02:50 INFO (SecurityService.java:237) All permissions:
*:readChoice:org.chorem.pollen.persistence.entity.Choice_5b7ac6e5-4910-407e-ab25-0349b4b8fcbc
*:readPoll:org.chorem.pollen.persistence.entity.Poll_eb68b92f-6817-4e87-9fce-52a525dfefa9
*:*:org.chorem.pollen.persistence.entity.Poll_eb68b92f-6817-4e87-9fce-52a525dfefa9
*:*:org.chorem.pollen.persistence.entity.Choice_3a1d4705-5d35-4e71-84d8-104335909543
*:*:org.chorem.pollen.persistence.entity.Choice_5b7ac6e5-4910-407e-ab25-0349b4b8fcbc
*:readChoice:org.chorem.pollen.persistence.entity.Choice_694281b4-5f63-495c-8512-ac28bff773a3
*:*:org.chorem.pollen.persistence.entity.Choice_694281b4-5f63-495c-8512-ac28bff773a3
*:readChoice:org.chorem.pollen.persistence.entity.Choice_3a1d4705-5d35-4e71-84d8-104335909543
01:02:50 INFO (SecurityService.java:213) Check permission: :deletePoll:org.chorem.pollen.persistence.entity.Poll_eb68b92f-6817-4e87-9fce-52a525dfefa9
01:02:50 INFO (SecurityService.java:213) Check permission: :readPoll:org.chorem.pollen.persistence.entity.Poll_eb68b92f-6817-4e87-9fce-52a525dfefa9
01:02:50 INFO (AbstractPollenRestApiTest.java:137) test *deletePoll* result
null
mai 05, 2014 1:02:50 AM org.apache.coyote.AbstractProtocol pause
Infos: Pausing ProtocolHandler ["http-bio-10002"]
mai 05, 2014 1:02:50 AM org.apache.catalina.core.StandardService stopInternal
Infos: Stopping service Tomcat
mai 05, 2014 1:02:50 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
Grave: The web application [/] appears to have started a thread named [Thread-7] but has failed to stop it. This is very likely to create a memory leak.
mai 05, 2014 1:02:50 AM org.apache.coyote.AbstractProtocol stop
Infos: Stopping ProtocolHandler ["http-bio-10002"]
mai 05, 2014 1:02:55 AM org.apache.tomcat.util.net.AbstractEndpoint shutdownExecutor
Avertissement: The executor associated with thread pool [http-bio-10002] has not fully shutdown. Some application threads may still be running.
mai 05, 2014 1:02:55 AM org.apache.coyote.AbstractProtocol destroy
Infos: Destroying ProtocolHandler ["http-bio-10002"]
Tests run: 12, Failures: 0, Errors: 0, Skipped: 8, Time elapsed: 36.312 sec - in org.chorem.pollen.rest.api.PollApiTest
Results :
Tests run: 13, Failures: 0, Errors: 0, Skipped: 9
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) @ pollen-rest-api ---
[INFO] Packaging webapp
[INFO] Assembling webapp [pollen-rest-api] in [<http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…]>
[INFO] Processing war project
[INFO] Copying webapp webResources [<http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…]> to [<http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…]>
[INFO] Copying webapp resources [<http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…]>
[INFO] Webapp assembled in [96 msecs]
[INFO] Building war: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ensure-no-container-api) @ pollen-rest-api ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ pollen-rest-api ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-redmine-login) @ pollen-rest-api ---
[INFO] Skipping goal (runOnce flag is on and goal was already executed).
[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ pollen-rest-api ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ pollen-rest-api ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-pgp-passphrase) @ pollen-rest-api ---
[INFO] Exporting server [gpg-signer] username in ${gpg.keyname}
[INFO] Exporting server [gpg-signer] password in ${gpg.passphrase}
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-artifacts) @ pollen-rest-api ---
[INFO] Loaded /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect-artifacts.txt
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT.war to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-rest-api/pollen-rest-api-2.0-SNAPSHOT.war
[INFO] Copying THIRD-PARTY.properties to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-rest-api/THIRD-PARTY.properties
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT-sources.jar to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-rest-api/pollen-rest-api-2.0-SNAPSHOT-sources.jar
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT-javadoc.jar to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-rest-api/pollen-rest-api-2.0-SNAPSHOT-javadoc.jar
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-attachements) @ pollen-rest-api ---
[WARNING] Skipping goal (No file to collect).
[INFO]
[INFO] --- maven-gpg-plugin:1.5:sign (sign-artifacts) @ pollen-rest-api ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ pollen-rest-api ---
[INFO] Used declared dependencies found:
[INFO] org.chorem.pollen:pollen-persistence:jar:2.0-SNAPSHOT:compile
[INFO] org.chorem.pollen:pollen-services:jar:2.0-SNAPSHOT:compile
[INFO] org.nuiton.topia:topia-persistence:jar:3.0-SNAPSHOT:compile
[INFO] org.debux.webmotion:webmotion:jar:2.4.1-SNAPSHOT:compile
[INFO] org.debux.webmotion:webmotion-unittest:jar:2.4.1-SNAPSHOT:test
[INFO] org.nuiton.web:nuiton-web:jar:1.16:compile
[INFO] org.nuiton.i18n:nuiton-i18n:jar:3.0:compile
[INFO] javax:javaee-api:jar:7.0:provided
[INFO] commons-logging:commons-logging:jar:1.1.3:compile
[INFO] commons-beanutils:commons-beanutils:jar:1.9.1:compile
[INFO] commons-io:commons-io:jar:2.4:compile
[INFO] org.apache.httpcomponents:fluent-hc:jar:4.2.3:compile
[INFO] com.google.guava:guava:jar:16.0.1:compile
[INFO] com.google.code.gson:gson:jar:2.2.4:compile
[INFO] org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.47:provided
[INFO] junit:junit:jar:4.11:test
[INFO] org.nuiton:nuiton-utils:jar:2.7.1:compile
[INFO] log4j:log4j:jar:1.2.17:compile
[WARNING] Used undeclared dependencies found:
[WARNING] org.apache.shiro:shiro-core:jar:1.2.2:compile
[JENKINS] Archiving disabled
1
1
r3909 - in trunk: pollen-rest-api pollen-rest-api/src/main/java/org/chorem/pollen/rest/api pollen-services/src/main/java/org/chorem/pollen/services/service/security
by tchemit@users.chorem.org 05 May '14
by tchemit@users.chorem.org 05 May '14
05 May '14
Author: tchemit
Date: 2014-05-05 08:24:12 +0200 (Mon, 05 May 2014)
New Revision: 3909
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3909
Log:
fix dep + clean code
Modified:
trunk/pollen-rest-api/pom.xml
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationContext.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/DefaultPollenSecurityContext.java
Modified: trunk/pollen-rest-api/pom.xml
===================================================================
--- trunk/pollen-rest-api/pom.xml 2014-05-04 22:01:05 UTC (rev 3908)
+++ trunk/pollen-rest-api/pom.xml 2014-05-05 06:24:12 UTC (rev 3909)
@@ -64,6 +64,11 @@
</dependency>
<dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-core</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.nuiton.web</groupId>
<artifactId>nuiton-web</artifactId>
</dependency>
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationContext.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationContext.java 2014-05-04 22:01:05 UTC (rev 3908)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiApplicationContext.java 2014-05-05 06:24:12 UTC (rev 3909)
@@ -152,7 +152,10 @@
@Override
public PollenSecurityContext newSecurityContext(SessionToken sessionToken, PollenPrincipal mainPrincipal) {
- return DefaultPollenSecurityContext.newContext(sessionToken, mainPrincipal);
+ DefaultPollenSecurityContext securityContext = new DefaultPollenSecurityContext();
+ securityContext.setSessionToken(sessionToken);
+ securityContext.setMainPrincipal(mainPrincipal);
+ return securityContext;
}
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/DefaultPollenSecurityContext.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/DefaultPollenSecurityContext.java 2014-05-04 22:01:05 UTC (rev 3908)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/security/DefaultPollenSecurityContext.java 2014-05-05 06:24:12 UTC (rev 3909)
@@ -59,13 +59,6 @@
*/
protected PollenPrincipal mainPrincipal;
- public static PollenSecurityContext newContext(SessionToken sessionToken, PollenPrincipal mainPrincipal) {
- DefaultPollenSecurityContext result = new DefaultPollenSecurityContext();
- result.setSessionToken(sessionToken);
- result.setMainPrincipal(mainPrincipal);
- return result;
- }
-
@Override
public PollenPrincipal getMainPrincipal() {
return mainPrincipal;
@@ -102,14 +95,18 @@
}
public void setSessionToken(SessionToken sessionToken) {
+
this.sessionToken = sessionToken;
// force to reload subject
this.subject = null;
+
}
public void setMainPrincipal(PollenPrincipal mainPrincipal) {
+
this.mainPrincipal = mainPrincipal;
// force to reload subject
this.subject = null;
+
}
}
1
0
Build failed in Jenkins: pollen-nightly » Pollen :: Service #16
by admin+ci-chorem.org@codelutin.com 04 May '14
by admin+ci-chorem.org@codelutin.com 04 May '14
04 May '14
See <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
Changes:
[Tony CHEMIT] simplify form exception (keep only one)
[Tony CHEMIT] for the moment let's just authorize everybody to seel all polls
[Tony CHEMIT] - introduce email + notification service
- review security (not done at all...)
- better rest api (remove security info from api)
- ...
------------------------------------------
[...truncated 68 lines...]
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] Scan 67 files header done in 82.692ms.
[INFO]
* update header on 1 file.
* uptodate header on 38 files.
* add header on 28 files.
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ pollen-services ---
[INFO] Compiling 62 source files to <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…> uses unchecked or unsafe operations.
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- animal-sniffer-maven-plugin:1.10:check (default) @ pollen-services ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java17:1.0
[INFO]
[INFO] --- jredmine-maven-plugin:1.8.1:generate-changes (jredmine-generate-changes) @ pollen-services ---
[INFO] Skipping goal (skipGenerateChanges flag is on).
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ pollen-services ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pollen-services ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ pollen-services ---
[INFO] Compiling 3 source files to <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ pollen-services ---
[INFO] Surefire report directory: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.chorem.pollen.service.PollServiceTest
01:02:42 DEBUG (PollenApplication.java:83) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
01:02:42 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:46 INFO (FixturesService.java:72) will restore database with fixture set
01:02:46 DEBUG (PollenApplication.java:83) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
01:02:46 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:47 INFO (FixturesService.java:72) will restore database with fixture set
01:02:47 DEBUG (PollenApplication.java:83) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
01:02:47 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:47 INFO (FixturesService.java:72) will restore database with fixture set
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.04 sec - in org.chorem.pollen.service.PollServiceTest
Running org.chorem.pollen.service.PollenUserServiceTest
01:02:48 DEBUG (PollenApplication.java:83) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
01:02:48 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:48 INFO (FixturesService.java:72) will restore database with fixture set
01:02:48 DEBUG (PollenApplication.java:83) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
01:02:48 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:49 INFO (FixturesService.java:72) will restore database with fixture set
01:02:49 DEBUG (PollenApplication.java:83) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
01:02:49 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:49 INFO (FixturesService.java:72) will restore database with fixture set
01:02:50 DEBUG (PollenApplication.java:83) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
01:02:50 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:50 INFO (FixturesService.java:72) will restore database with fixture set
01:02:50 DEBUG (PollenApplication.java:83) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
01:02:50 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
01:02:51 INFO (FixturesService.java:72) will restore database with fixture set
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.201 sec - in org.chorem.pollen.service.PollenUserServiceTest
Results :
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ pollen-services ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-services >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ensure-no-container-api) @ pollen-services ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ pollen-services ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-redmine-login) @ pollen-services ---
[INFO] Skipping goal (runOnce flag is on and goal was already executed).
[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-services <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-services ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ pollen-services ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-se…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ pollen-services ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-pgp-passphrase) @ pollen-services ---
[INFO] Exporting server [gpg-signer] username in ${gpg.keyname}
[INFO] Exporting server [gpg-signer] password in ${gpg.passphrase}
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-artifacts) @ pollen-services ---
[INFO] Loaded /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect-artifacts.txt
[INFO] Copying pollen-services-2.0-SNAPSHOT.jar to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-services/pollen-services-2.0-SNAPSHOT.jar
[INFO] Copying THIRD-PARTY.properties to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-services/THIRD-PARTY.properties
[INFO] Copying pollen-services-2.0-SNAPSHOT-sources.jar to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-services/pollen-services-2.0-SNAPSHOT-sources.jar
[INFO] Copying pollen-services-2.0-SNAPSHOT-javadoc.jar to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-services/pollen-services-2.0-SNAPSHOT-javadoc.jar
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-attachements) @ pollen-services ---
[WARNING] Skipping goal (No file to collect).
[INFO]
[INFO] --- maven-gpg-plugin:1.5:sign (sign-artifacts) @ pollen-services ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ pollen-services ---
[INFO] Used declared dependencies found:
[INFO] org.chorem.pollen:pollen-persistence:jar:2.0-SNAPSHOT:compile
[INFO] org.nuiton.topia:topia-persistence:jar:3.0-SNAPSHOT:compile
[INFO] org.nuiton.topia:topia-junit:jar:3.0-SNAPSHOT:compile
[INFO] org.hibernate:hibernate-core:jar:4.3.5.Final:runtime
[INFO] com.esotericsoftware.yamlbeans:yamlbeans:jar:1.06:compile
[INFO] org.apache.commons:commons-email:jar:1.3.2:compile
[INFO] com.github.spullara.mustache.java:compiler:jar:0.8.13:compile
[INFO] commons-logging:commons-logging:jar:1.1.3:compile
[INFO] commons-collections:commons-collections:jar:3.2.1:compile
[INFO] commons-io:commons-io:jar:2.4:compile
[INFO] org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] commons-codec:commons-codec:jar:1.9:compile
[INFO] com.google.guava:guava:jar:16.0.1:compile
[INFO] junit:junit:jar:4.11:provided
[INFO] org.nuiton.i18n:nuiton-i18n:jar:3.0:compile
[INFO] org.nuiton:nuiton-utils:jar:2.7.1:compile
[INFO] org.nuiton:nuiton-config:jar:3.0-alpha-2:compile
[INFO] org.apache.shiro:shiro-core:jar:1.2.2:compile
[WARNING] Used undeclared dependencies found:
[WARNING] org.apache.commons:commons-collections4:jar:4.0:compile
[JENKINS] Archiving disabled
1
1