From 76d05768244ea9a1801aa3a4c0caffb16358f3b6 Mon Sep 17 00:00:00 2001 From: Vova Perebykivskiy Date: Fri, 18 Dec 2015 15:34:13 +0200 Subject: [PATCH] Optimizing imports. Refactoring. --- .../business/common/daos/ILimitsDAO.java | 19 +++++++++++++++++++ .../business/common/daos/LimitsDAO.java | 19 +++++++++++++++++++ .../business/common/entities/Limits.java | 19 +++++++++++++++++++ .../libreplan/web/common/ILimitsModel.java | 19 +++++++++++++++++++ .../org/libreplan/web/common/LimitsModel.java | 19 +++++++++++++++++++ .../machine/MachineCRUDController.java | 6 +++++- .../worker/WorkerCRUDController.java | 8 +++++++- .../ws/workreports/WorkReportServiceTest.java | 5 +---- 8 files changed, 108 insertions(+), 6 deletions(-) diff --git a/libreplan-business/src/main/java/org/libreplan/business/common/daos/ILimitsDAO.java b/libreplan-business/src/main/java/org/libreplan/business/common/daos/ILimitsDAO.java index 72229644c..f6689d3a4 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/common/daos/ILimitsDAO.java +++ b/libreplan-business/src/main/java/org/libreplan/business/common/daos/ILimitsDAO.java @@ -1,3 +1,22 @@ +/* + * This file is part of LibrePlan + * + * Copyright (C) 2015 LibrePlan + * + * 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 Affero General Public License + * along with this program. If not, see . + */ + package org.libreplan.business.common.daos; import org.libreplan.business.common.entities.Limits; diff --git a/libreplan-business/src/main/java/org/libreplan/business/common/daos/LimitsDAO.java b/libreplan-business/src/main/java/org/libreplan/business/common/daos/LimitsDAO.java index 79a657017..e51dd983a 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/common/daos/LimitsDAO.java +++ b/libreplan-business/src/main/java/org/libreplan/business/common/daos/LimitsDAO.java @@ -1,3 +1,22 @@ +/* + * This file is part of LibrePlan + * + * Copyright (C) 2015 LibrePlan + * + * 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 Affero General Public License + * along with this program. If not, see . + */ + package org.libreplan.business.common.daos; import org.libreplan.business.common.entities.Limits; diff --git a/libreplan-business/src/main/java/org/libreplan/business/common/entities/Limits.java b/libreplan-business/src/main/java/org/libreplan/business/common/entities/Limits.java index bd746735e..b2d810d18 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/common/entities/Limits.java +++ b/libreplan-business/src/main/java/org/libreplan/business/common/entities/Limits.java @@ -1,3 +1,22 @@ +/* + * This file is part of LibrePlan + * + * Copyright (C) 2015 LibrePlan + * + * 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 Affero General Public License + * along with this program. If not, see . + */ + package org.libreplan.business.common.entities; import org.libreplan.business.common.BaseEntity; diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/common/ILimitsModel.java b/libreplan-webapp/src/main/java/org/libreplan/web/common/ILimitsModel.java index b0146b46e..8b525cff0 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/common/ILimitsModel.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/common/ILimitsModel.java @@ -1,3 +1,22 @@ +/* + * This file is part of LibrePlan + * + * Copyright (C) 2015 LibrePlan + * + * 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 Affero General Public License + * along with this program. If not, see . + */ + package org.libreplan.web.common; import org.libreplan.business.common.entities.Limits; diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/common/LimitsModel.java b/libreplan-webapp/src/main/java/org/libreplan/web/common/LimitsModel.java index 3338a3936..4eb8666b7 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/common/LimitsModel.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/common/LimitsModel.java @@ -1,3 +1,22 @@ +/* + * This file is part of LibrePlan + * + * Copyright (C) 2015 LibrePlan + * + * 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 Affero General Public License + * along with this program. If not, see . + */ + package org.libreplan.web.common; import org.libreplan.business.common.daos.ILimitsDAO; diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/resources/machine/MachineCRUDController.java b/libreplan-webapp/src/main/java/org/libreplan/web/resources/machine/MachineCRUDController.java index 88d255c76..2c29bde9b 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/resources/machine/MachineCRUDController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/resources/machine/MachineCRUDController.java @@ -37,7 +37,11 @@ import org.libreplan.business.common.exceptions.ValidationException; import org.libreplan.business.resources.entities.Machine; import org.libreplan.web.calendars.BaseCalendarEditionController; import org.libreplan.web.calendars.IBaseCalendarModel; -import org.libreplan.web.common.*; +import org.libreplan.web.common.BaseCRUDController; +import org.libreplan.web.common.ConstraintChecker; +import org.libreplan.web.common.Level; +import org.libreplan.web.common.Util; +import org.libreplan.web.common.ILimitsModel; import org.libreplan.web.common.components.bandboxsearch.BandboxMultipleSearch; import org.libreplan.web.common.components.finders.FilterPair; import org.libreplan.web.costcategories.ResourcesCostCategoryAssignmentController; diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/resources/worker/WorkerCRUDController.java b/libreplan-webapp/src/main/java/org/libreplan/web/resources/worker/WorkerCRUDController.java index aee8b78b0..722db4f45 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/resources/worker/WorkerCRUDController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/resources/worker/WorkerCRUDController.java @@ -45,7 +45,13 @@ import org.libreplan.business.users.entities.User; import org.libreplan.business.users.entities.UserRole; import org.libreplan.web.calendars.BaseCalendarEditionController; import org.libreplan.web.calendars.IBaseCalendarModel; -import org.libreplan.web.common.*; +import org.libreplan.web.common.ConstraintChecker; +import org.libreplan.web.common.IMessagesForUser; +import org.libreplan.web.common.Level; +import org.libreplan.web.common.MessagesForUser; +import org.libreplan.web.common.OnlyOneVisible; +import org.libreplan.web.common.Util; +import org.libreplan.web.common.ILimitsModel; import org.libreplan.web.common.BaseCRUDController.CRUDControllerState; import org.libreplan.web.common.components.bandboxsearch.BandboxMultipleSearch; import org.libreplan.web.common.components.bandboxsearch.BandboxSearch; diff --git a/libreplan-webapp/src/test/java/org/libreplan/web/test/ws/workreports/WorkReportServiceTest.java b/libreplan-webapp/src/test/java/org/libreplan/web/test/ws/workreports/WorkReportServiceTest.java index 3eaac7fc3..d54ef6e30 100644 --- a/libreplan-webapp/src/test/java/org/libreplan/web/test/ws/workreports/WorkReportServiceTest.java +++ b/libreplan-webapp/src/test/java/org/libreplan/web/test/ws/workreports/WorkReportServiceTest.java @@ -32,7 +32,6 @@ import static org.libreplan.web.test.WebappGlobalNames.WEBAPP_SPRING_SECURITY_CO import java.lang.reflect.Method; import java.math.BigDecimal; -import java.sql.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -45,12 +44,9 @@ import java.util.UUID; import javax.annotation.Resource; import javax.xml.datatype.XMLGregorianCalendar; -import org.hibernate.CacheMode; -import org.hibernate.Hibernate; import org.hibernate.SessionFactory; import org.hibernate.StatelessSession; import org.hibernate.criterion.Order; -import org.hibernate.criterion.Projections; import org.hibernate.criterion.Restrictions; import org.joda.time.LocalDate; import org.joda.time.LocalTime; @@ -99,6 +95,7 @@ import org.springframework.transaction.annotation.Transactional; * Tests for {@link IWorkReportService}. * * @author Manuel Rego Casasnovas + * @author Vova Perebykivskiy */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { BUSINESS_SPRING_CONFIG_FILE,