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 Surfire Plugin
|
||||||
* Update Maven Cobertura Plugin
|
* Update Maven Cobertura Plugin
|
||||||
* Update Maven Liquibase Plugin
|
* Update Maven Liquibase Plugin
|
||||||
|
* Update Maven Tomcat Plugin
|
||||||
|
|
||||||
* Update Slf4j API
|
* Update Slf4j API
|
||||||
* Update Slf4j Simple
|
* 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}
|
* Converts a domain object into a {@link ITaskFundamentalProperties}
|
||||||
|
*
|
||||||
* @author Óscar González Fernández <ogonzalez@igalia.com>
|
* @author Óscar González Fernández <ogonzalez@igalia.com>
|
||||||
*/
|
*/
|
||||||
public interface IAdapterToTaskFundamentalProperties<T> {
|
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 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
|
* The position modifications must be wrapped inside this
|
||||||
*/
|
*/
|
||||||
public interface IModifications {
|
interface IModifications {
|
||||||
public void doIt(IUpdatablePosition position);
|
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
|
* The deadline associated to the task. It can return null if has no
|
||||||
* deadline associated
|
* 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();
|
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);
|
String updateTooltipText(String progressType);
|
||||||
|
|
||||||
boolean isManualAnyAllocation();
|
boolean isManualAnyAllocation();
|
||||||
|
|
||||||
public boolean belongsClosedProject();
|
boolean belongsClosedProject();
|
||||||
|
|
||||||
public boolean isRoot();
|
boolean isRoot();
|
||||||
|
|
||||||
boolean isUpdatedFromTimesheets();
|
boolean isUpdatedFromTimesheets();
|
||||||
|
|
||||||
|
|
@ -132,9 +133,9 @@ public interface ITaskFundamentalProperties {
|
||||||
|
|
||||||
Date getLastTimesheetDate();
|
Date getLastTimesheetDate();
|
||||||
|
|
||||||
public String getCode();
|
String getCode();
|
||||||
|
|
||||||
public String getProjectCode();
|
String getProjectCode();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates whether the project is within the estimated hours or not and
|
* 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> biggerOrEqualThanNow = biggerOrEqualThan(now);
|
||||||
|
|
||||||
private Constraint<Date> equalToNow = ConstraintOnComparableValues
|
private Constraint<Date> equalToNow = ConstraintOnComparableValues.equalTo(now);
|
||||||
.<Date> equalTo(now);
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void canCreateConstraintBiggerThan() {
|
public void canCreateConstraintBiggerThan() {
|
||||||
assertThat(biggerOrEqualThanNow.applyTo(now), equalTo(new Date(now
|
assertThat(biggerOrEqualThanNow.applyTo(now), equalTo(new Date(now.getTime())));
|
||||||
.getTime())));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void biggerOrEqualThanNullLeaveValuesUnmodified() {
|
public void biggerOrEqualThanNullLeaveValuesUnmodified() {
|
||||||
Constraint<Date> biggerThanNull = ConstraintOnComparableValues
|
Constraint<Date> biggerThanNull = ConstraintOnComparableValues.biggerOrEqualThan(null);
|
||||||
.<Date> biggerOrEqualThan(null);
|
|
||||||
Date eraStart = new Date(0);
|
Date eraStart = new Date(0);
|
||||||
assertThat(biggerThanNull.applyConstraintTo(new Date(0)),
|
|
||||||
equalTo(eraStart));
|
assertThat(biggerThanNull.applyConstraintTo(new Date(0)), equalTo(eraStart));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void applyingBiggerOrEqualThanConstraintToNullNotFails() {
|
public void applyingBiggerOrEqualThanConstraintToNullNotFails() {
|
||||||
assertThat(biggerOrEqualThanNow.applyTo(null), equalTo(new Date(now
|
assertThat(biggerOrEqualThanNow.applyTo(null), equalTo(new Date(now.getTime())));
|
||||||
.getTime())));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void canCreateConstraintEqualTo(){
|
public void canCreateConstraintEqualTo(){
|
||||||
assertThat(equalToNow.applyTo(new Date(now.getTime() + 1000)),
|
assertThat(equalToNow.applyTo(new Date(now.getTime() + 1000)), equalTo(now));
|
||||||
equalTo(now));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void equalToNullLeaveValuesUnmodified() {
|
public void equalToNullLeaveValuesUnmodified() {
|
||||||
Constraint<Date> equalToNull = ConstraintOnComparableValues
|
Constraint<Date> equalToNull = ConstraintOnComparableValues.equalTo(null);
|
||||||
.<Date> equalTo(null);
|
|
||||||
Date value = new Date(now.getTime() + 1000);
|
Date value = new Date(now.getTime() + 1000);
|
||||||
|
|
||||||
assertThat(equalToNull.applyTo(value), equalTo(value));
|
assertThat(equalToNull.applyTo(value), equalTo(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
2
pom.xml
2
pom.xml
|
|
@ -879,7 +879,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>tomcat-maven-plugin</artifactId>
|
<artifactId>tomcat-maven-plugin</artifactId>
|
||||||
<version>1.0-beta-1</version>
|
<version>1.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<url>${tomcatUrl}</url>
|
<url>${tomcatUrl}</url>
|
||||||
<server>${tomcatServer}</server>
|
<server>${tomcatServer}</server>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue