Update Tomcat Maven plugin.
Code refactoring. Remove unused class.
This commit is contained in:
parent
1915c0ca67
commit
7cc62c9564
7 changed files with 408 additions and 470 deletions
1
NEWS.rst
1
NEWS.rst
|
|
@ -30,6 +30,7 @@ Changes
|
|||
* Update Maven Surfire Plugin
|
||||
* Update Maven Cobertura Plugin
|
||||
* Update Maven Liquibase Plugin
|
||||
* Update Maven Tomcat Plugin
|
||||
|
||||
* Update Slf4j API
|
||||
* Update Slf4j Simple
|
||||
|
|
|
|||
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
* This file is part of LibrePlan
|
||||
*
|
||||
* Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e
|
||||
* Desenvolvemento Tecnolóxico de Galicia
|
||||
* Copyright (C) 2010-2011 Igalia, S.L.
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.zkoss.ganttz.adapters;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.zkoss.ganttz.data.ITaskFundamentalProperties;
|
||||
|
||||
/**
|
||||
* @author Óscar González Fernández <ogonzalez@igalia.com>
|
||||
*/
|
||||
public class AutoAdapter implements
|
||||
IAdapterToTaskFundamentalProperties<ITaskFundamentalProperties> {
|
||||
|
||||
@Override
|
||||
public ITaskFundamentalProperties adapt(ITaskFundamentalProperties object) {
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DomainDependency<ITaskFundamentalProperties>> getOutcomingDependencies(
|
||||
ITaskFundamentalProperties object) {
|
||||
return new ArrayList<DomainDependency<ITaskFundamentalProperties>>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DomainDependency<ITaskFundamentalProperties>> getIncomingDependencies(
|
||||
ITaskFundamentalProperties object) {
|
||||
return new ArrayList<DomainDependency<ITaskFundamentalProperties>>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDependency(
|
||||
DomainDependency<ITaskFundamentalProperties> dependency) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAddDependency(
|
||||
DomainDependency<ITaskFundamentalProperties> dependency) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeDependency(
|
||||
DomainDependency<ITaskFundamentalProperties> dependency) {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRemovalOf(ITaskFundamentalProperties object) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -27,22 +27,23 @@ import org.zkoss.ganttz.data.ITaskFundamentalProperties;
|
|||
|
||||
/**
|
||||
* Converts a domain object into a {@link ITaskFundamentalProperties}
|
||||
*
|
||||
* @author Óscar González Fernández <ogonzalez@igalia.com>
|
||||
*/
|
||||
public interface IAdapterToTaskFundamentalProperties<T> {
|
||||
|
||||
public ITaskFundamentalProperties adapt(T object);
|
||||
ITaskFundamentalProperties adapt(T object);
|
||||
|
||||
public List<DomainDependency<T>> getOutcomingDependencies(T object);
|
||||
List<DomainDependency<T>> getOutcomingDependencies(T object);
|
||||
|
||||
public List<DomainDependency<T>> getIncomingDependencies(T object);
|
||||
List<DomainDependency<T>> getIncomingDependencies(T object);
|
||||
|
||||
public void doRemovalOf(T object);
|
||||
void doRemovalOf(T object);
|
||||
|
||||
public boolean canAddDependency(DomainDependency<T> dependency);
|
||||
boolean canAddDependency(DomainDependency<T> dependency);
|
||||
|
||||
public void addDependency(DomainDependency<T> dependency);
|
||||
void addDependency(DomainDependency<T> dependency);
|
||||
|
||||
public void removeDependency(DomainDependency<T> dependency);
|
||||
void removeDependency(DomainDependency<T> dependency);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,97 +34,98 @@ import org.zkoss.ganttz.data.constraint.Constraint;
|
|||
*/
|
||||
public interface ITaskFundamentalProperties {
|
||||
|
||||
public interface IUpdatablePosition {
|
||||
interface IUpdatablePosition {
|
||||
|
||||
public void setBeginDate(GanttDate beginDate);
|
||||
void setBeginDate(GanttDate beginDate);
|
||||
|
||||
public void setEndDate(GanttDate endDate);
|
||||
void setEndDate(GanttDate endDate);
|
||||
|
||||
public void resizeTo(GanttDate endDate);
|
||||
void resizeTo(GanttDate endDate);
|
||||
|
||||
public void moveTo(GanttDate newStart);
|
||||
void moveTo(GanttDate newStart);
|
||||
}
|
||||
|
||||
/**
|
||||
* The position modifications must be wrapped inside this
|
||||
*/
|
||||
public interface IModifications {
|
||||
public void doIt(IUpdatablePosition position);
|
||||
interface IModifications {
|
||||
void doIt(IUpdatablePosition position);
|
||||
}
|
||||
|
||||
public void doPositionModifications(IModifications modifications);
|
||||
|
||||
public String getName();
|
||||
void doPositionModifications(IModifications modifications);
|
||||
|
||||
public void setName(String name);
|
||||
String getName();
|
||||
|
||||
public GanttDate getBeginDate();
|
||||
void setName(String name);
|
||||
|
||||
GanttDate getBeginDate();
|
||||
|
||||
/**
|
||||
* The deadline associated to the task. It can return null if has no
|
||||
* deadline associated
|
||||
*/
|
||||
public Date getDeadline();
|
||||
Date getDeadline();
|
||||
|
||||
public void setDeadline(Date date);
|
||||
void setDeadline(Date date);
|
||||
|
||||
public GanttDate getConsolidatedline();
|
||||
GanttDate getConsolidatedline();
|
||||
|
||||
public GanttDate getEndDate();
|
||||
GanttDate getEndDate();
|
||||
|
||||
public String getNotes();
|
||||
String getNotes();
|
||||
|
||||
public void setNotes(String notes);
|
||||
void setNotes(String notes);
|
||||
|
||||
public GanttDate getHoursAdvanceBarEndDate();
|
||||
GanttDate getHoursAdvanceBarEndDate();
|
||||
|
||||
public GanttDate getMoneyCostBarEndDate();
|
||||
GanttDate getMoneyCostBarEndDate();
|
||||
|
||||
BigDecimal getMoneyCostBarPercentage();
|
||||
|
||||
public GanttDate getAdvanceBarEndDate();
|
||||
GanttDate getAdvanceBarEndDate();
|
||||
|
||||
public BigDecimal getHoursAdvanceBarPercentage();
|
||||
BigDecimal getHoursAdvanceBarPercentage();
|
||||
|
||||
public BigDecimal getAdvancePercentage();
|
||||
BigDecimal getAdvancePercentage();
|
||||
|
||||
public String getTooltipText();
|
||||
String getTooltipText();
|
||||
|
||||
public String getLabelsText();
|
||||
String getLabelsText();
|
||||
|
||||
public String getResourcesText();
|
||||
String getResourcesText();
|
||||
|
||||
public List<Constraint<GanttDate>> getStartConstraints();
|
||||
List<Constraint<GanttDate>> getStartConstraints();
|
||||
|
||||
public List<Constraint<GanttDate>> getEndConstraints();
|
||||
List<Constraint<GanttDate>> getEndConstraints();
|
||||
|
||||
public boolean isSubcontracted();
|
||||
boolean isSubcontracted();
|
||||
|
||||
public boolean isLimiting();
|
||||
boolean isLimiting();
|
||||
|
||||
public boolean isLimitingAndHasDayAssignments();
|
||||
boolean isLimitingAndHasDayAssignments();
|
||||
|
||||
public boolean hasConsolidations();
|
||||
boolean hasConsolidations();
|
||||
|
||||
public boolean canBeExplicitlyResized();
|
||||
boolean canBeExplicitlyResized();
|
||||
|
||||
public String getAssignedStatus();
|
||||
String getAssignedStatus();
|
||||
|
||||
public boolean isFixed();
|
||||
boolean isFixed();
|
||||
|
||||
public String updateTooltipText();
|
||||
String updateTooltipText();
|
||||
|
||||
public List<Constraint<GanttDate>> getCurrentLengthConstraint();
|
||||
List<Constraint<GanttDate>> getCurrentLengthConstraint();
|
||||
|
||||
public GanttDate getAdvanceBarEndDate(String progressType);
|
||||
GanttDate getAdvanceBarEndDate(String progressType);
|
||||
|
||||
String updateTooltipText(String progressType);
|
||||
|
||||
boolean isManualAnyAllocation();
|
||||
|
||||
public boolean belongsClosedProject();
|
||||
boolean belongsClosedProject();
|
||||
|
||||
public boolean isRoot();
|
||||
boolean isRoot();
|
||||
|
||||
boolean isUpdatedFromTimesheets();
|
||||
|
||||
|
|
@ -132,9 +133,9 @@ public interface ITaskFundamentalProperties {
|
|||
|
||||
Date getLastTimesheetDate();
|
||||
|
||||
public String getCode();
|
||||
String getCode();
|
||||
|
||||
public String getProjectCode();
|
||||
String getProjectCode();
|
||||
|
||||
/**
|
||||
* Calculates whether the project is within the estimated hours or not and
|
||||
|
|
|
|||
|
|
@ -34,41 +34,36 @@ public class ConstraintOnComparableValuesTest {
|
|||
|
||||
private Constraint<Date> biggerOrEqualThanNow = biggerOrEqualThan(now);
|
||||
|
||||
private Constraint<Date> equalToNow = ConstraintOnComparableValues
|
||||
.<Date> equalTo(now);
|
||||
private Constraint<Date> equalToNow = ConstraintOnComparableValues.equalTo(now);
|
||||
|
||||
@Test
|
||||
public void canCreateConstraintBiggerThan() {
|
||||
assertThat(biggerOrEqualThanNow.applyTo(now), equalTo(new Date(now
|
||||
.getTime())));
|
||||
assertThat(biggerOrEqualThanNow.applyTo(now), equalTo(new Date(now.getTime())));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void biggerOrEqualThanNullLeaveValuesUnmodified() {
|
||||
Constraint<Date> biggerThanNull = ConstraintOnComparableValues
|
||||
.<Date> biggerOrEqualThan(null);
|
||||
Constraint<Date> biggerThanNull = ConstraintOnComparableValues.biggerOrEqualThan(null);
|
||||
Date eraStart = new Date(0);
|
||||
assertThat(biggerThanNull.applyConstraintTo(new Date(0)),
|
||||
equalTo(eraStart));
|
||||
|
||||
assertThat(biggerThanNull.applyConstraintTo(new Date(0)), equalTo(eraStart));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void applyingBiggerOrEqualThanConstraintToNullNotFails() {
|
||||
assertThat(biggerOrEqualThanNow.applyTo(null), equalTo(new Date(now
|
||||
.getTime())));
|
||||
assertThat(biggerOrEqualThanNow.applyTo(null), equalTo(new Date(now.getTime())));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void canCreateConstraintEqualTo(){
|
||||
assertThat(equalToNow.applyTo(new Date(now.getTime() + 1000)),
|
||||
equalTo(now));
|
||||
assertThat(equalToNow.applyTo(new Date(now.getTime() + 1000)), equalTo(now));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void equalToNullLeaveValuesUnmodified() {
|
||||
Constraint<Date> equalToNull = ConstraintOnComparableValues
|
||||
.<Date> equalTo(null);
|
||||
Constraint<Date> equalToNull = ConstraintOnComparableValues.equalTo(null);
|
||||
Date value = new Date(now.getTime() + 1000);
|
||||
|
||||
assertThat(equalToNull.applyTo(value), equalTo(value));
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
4
pom.xml
4
pom.xml
|
|
@ -169,7 +169,7 @@
|
|||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>gettext-commons-site</id>
|
||||
<url>http://gettext-commons.googlecode.com/svn/maven-repository</url>
|
||||
|
|
@ -879,7 +879,7 @@
|
|||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>tomcat-maven-plugin</artifactId>
|
||||
<version>1.0-beta-1</version>
|
||||
<version>1.1</version>
|
||||
<configuration>
|
||||
<url>${tomcatUrl}</url>
|
||||
<server>${tomcatServer}</server>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue