Skip to content

Commit

Permalink
refactoring persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
witek committed Jul 12, 2015
1 parent 69325cc commit e3ab6a8
Show file tree
Hide file tree
Showing 35 changed files with 44 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public int compareTo(ProjectUserConfig other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GProjectUserConfig.class);

public static final String TYPE = "projectUserConfig";
public static final String TYPE = "ProjectUserConfig";

// -----------------------------------------------------------
// - project
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/admin/GSystemConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public int compareTo(SystemConfig other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GSystemConfig.class);

public static final String TYPE = "systemConfig";
public static final String TYPE = "SystemConfig";

// -----------------------------------------------------------
// - url
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/admin/GUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public final java.util.Set<scrum.server.collaboration.Emoticon> getEmoticonWithO

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GUser.class);

public static final String TYPE = "user";
public static final String TYPE = "User";


// -----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/calendar/GSimpleEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public int compareTo(SimpleEvent other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GSimpleEvent.class);

public static final String TYPE = "simpleEvent";
public static final String TYPE = "SimpleEvent";


// -----------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public int compareTo(ChatMessage other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GChatMessage.class);

public static final String TYPE = "chatMessage";
public static final String TYPE = "ChatMessage";

// -----------------------------------------------------------
// - project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public int compareTo(Comment other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GComment.class);

public static final String TYPE = "comment";
public static final String TYPE = "Comment";


// -----------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public int compareTo(Emoticon other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GEmoticon.class);

public static final String TYPE = "emoticon";
public static final String TYPE = "Emoticon";

// -----------------------------------------------------------
// - parent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public int compareTo(Subject other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GSubject.class);

public static final String TYPE = "subject";
public static final String TYPE = "Subject";


// -----------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public int compareTo(Wikipage other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GWikipage.class);

public static final String TYPE = "wikipage";
public static final String TYPE = "Wikipage";


// -----------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public int compareTo(RequirementEstimationVote other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GRequirementEstimationVote.class);

public static final String TYPE = "requirementEstimationVote";
public static final String TYPE = "RequirementEstimationVote";

// -----------------------------------------------------------
// - requirement
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/files/GFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public int compareTo(File other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GFile.class);

public static final String TYPE = "file";
public static final String TYPE = "File";


// -----------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public final java.util.Set<scrum.server.sprint.Task> getTasks() {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GImpediment.class);

public static final String TYPE = "impediment";
public static final String TYPE = "Impediment";


// -----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/issues/GIssue.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public final java.util.Set<scrum.server.project.Requirement> getRequirements() {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GIssue.class);

public static final String TYPE = "issue";
public static final String TYPE = "Issue";


// -----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/journal/GChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public int compareTo(Change other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GChange.class);

public static final String TYPE = "change";
public static final String TYPE = "Change";

// -----------------------------------------------------------
// - parent
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/journal/GProjectEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public int compareTo(ProjectEvent other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GProjectEvent.class);

public static final String TYPE = "projectEvent";
public static final String TYPE = "ProjectEvent";


// -----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/pr/GBlogEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public int compareTo(BlogEntry other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GBlogEntry.class);

public static final String TYPE = "blogEntry";
public static final String TYPE = "BlogEntry";


// -----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/pr/GSubscription.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public int compareTo(Subscription other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GSubscription.class);

public static final String TYPE = "subscription";
public static final String TYPE = "Subscription";

// -----------------------------------------------------------
// - subject
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/project/GProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public final java.util.Set<scrum.server.admin.User> getCurrentProjectUsers() {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GProject.class);

public static final String TYPE = "project";
public static final String TYPE = "Project";

// -----------------------------------------------------------
// - label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public int compareTo(ProjectSprintSnapshot other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GProjectSprintSnapshot.class);

public static final String TYPE = "projectSprintSnapshot";
public static final String TYPE = "ProjectSprintSnapshot";

// -----------------------------------------------------------
// - sprint
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/project/GQuality.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public final java.util.Set<scrum.server.project.Requirement> getRequirements() {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GQuality.class);

public static final String TYPE = "quality";
public static final String TYPE = "Quality";


// -----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/project/GRequirement.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public final java.util.Set<scrum.server.estimation.RequirementEstimationVote> ge

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GRequirement.class);

public static final String TYPE = "requirement";
public static final String TYPE = "Requirement";


// -----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/release/GRelease.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public final java.util.Set<scrum.server.pr.BlogEntry> getBlogEntrys() {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GRelease.class);

public static final String TYPE = "release";
public static final String TYPE = "Release";


// -----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/risks/GRisk.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public int compareTo(Risk other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GRisk.class);

public static final String TYPE = "risk";
public static final String TYPE = "Risk";


// -----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/sprint/GSprint.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public final scrum.server.project.ProjectSprintSnapshot getProjectSprintSnapshot

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GSprint.class);

public static final String TYPE = "sprint";
public static final String TYPE = "Sprint";


// -----------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public int compareTo(SprintDaySnapshot other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GSprintDaySnapshot.class);

public static final String TYPE = "sprintDaySnapshot";
public static final String TYPE = "SprintDaySnapshot";

// -----------------------------------------------------------
// - sprint
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/sprint/GSprintReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public int compareTo(SprintReport other) {

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GSprintReport.class);

public static final String TYPE = "sprintReport";
public static final String TYPE = "SprintReport";

// -----------------------------------------------------------
// - sprint
Expand Down
2 changes: 1 addition & 1 deletion src/generated/java/scrum/server/sprint/GTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public final java.util.Set<scrum.server.sprint.SprintReport> getSprintReportWith

private static final ilarkesto.core.logging.Log LOG = ilarkesto.core.logging.Log.get(GTask.class);

public static final String TYPE = "task";
public static final String TYPE = "Task";


// -----------------------------------------------------------
Expand Down
12 changes: 3 additions & 9 deletions src/main/java/scrum/server/WebSession.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
package scrum.server;

import ilarkesto.base.Tm;
import ilarkesto.core.scope.In;
import ilarkesto.core.time.TimePeriod;
import ilarkesto.di.Context;
import ilarkesto.gwt.server.AGwtConversation;
import ilarkesto.persistence.TransactionService;
import ilarkesto.webapp.AWebSession;

import javax.servlet.http.HttpServletRequest;
Expand All @@ -28,9 +26,6 @@

public class WebSession extends AWebSession {

@In
private TransactionService transactionService;

private TimePeriod TIMEOUT = new TimePeriod(Tm.HOUR);
private User user;

Expand All @@ -47,7 +42,6 @@ public GwtConversation getGwtConversation(int conversationNumber) {
public AGwtConversation createGwtConversation() {
GwtConversation gwtConversation = new GwtConversation(this, nextGwtConversationNumber());
gwtConversation.setEmoticonDao(ScrumWebApplication.get().getEmoticonDao());
gwtConversation.setTransactionService(transactionService);

if (user != null) gwtConversation.sendUserScopeDataToClient(user);

Expand Down
12 changes: 3 additions & 9 deletions src/main/java/scrum/server/admin/DeleteDisabledUsersTask.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand All @@ -17,7 +17,6 @@
import ilarkesto.concurrent.ACollectionTask;
import ilarkesto.core.logging.Log;
import ilarkesto.persistence.Transaction;
import ilarkesto.persistence.TransactionService;

import java.util.Collection;

Expand All @@ -28,16 +27,11 @@ public class DeleteDisabledUsersTask extends ACollectionTask<User> {
// --- dependencies ---

private UserDao userDao;
private TransactionService transactionService;

public void setUserDao(UserDao userDao) {
this.userDao = userDao;
}

public void setTransactionService(TransactionService transactionService) {
this.transactionService = transactionService;
}

// --- ---

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright 2011 Witoslaw Koczewsi <[email protected]>, Artjom Kochtchi
*
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero
* General Public License as published by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
*
* You should have received a copy of the GNU General Public License along with this program. If not, see
* <http://www.gnu.org/licenses/>.
*/
Expand All @@ -17,7 +17,6 @@
import ilarkesto.concurrent.ACollectionTask;
import ilarkesto.core.logging.Log;
import ilarkesto.persistence.Transaction;
import ilarkesto.persistence.TransactionService;

import java.util.Collection;

Expand Down
Loading

0 comments on commit e3ab6a8

Please sign in to comment.