Avoid where possible to mark a method as throws Exception

FEA: ItEr74S04BugFixing
This commit is contained in:
Óscar González Fernández 2011-06-06 17:46:26 +02:00
parent 8671d73a8c
commit 8370d66ebb
112 changed files with 423 additions and 419 deletions

View file

@ -65,7 +65,7 @@ class CommandContextualized<T> {
result.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
doAction();
}
});

View file

@ -511,7 +511,7 @@ public class FunctionalityExposedForExtensions<T> implements IContext<T> {
Button printButton = (Button) printProperties.getFellow("printButton");
printButton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
printProperties.detach();
configuration.print(buildParameters(printProperties),planner);
}

View file

@ -107,7 +107,7 @@ public class LeftTasksTree extends HtmlMacroComponent {
Treeitem item) {
item.addEventListener("onOpen", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
OpenEvent openEvent = (OpenEvent) event;
taskBean.setExpanded(openEvent.isOpen());
}

View file

@ -316,7 +316,7 @@ public class LeftTasksTreeRow extends GenericForwardComposer {
textBox.addEventListener("onCtrlKey", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
userWantsToMove(textBox, (KeyEvent) event);
}
});
@ -326,7 +326,7 @@ public class LeftTasksTreeRow extends GenericForwardComposer {
component.addEventListener("onChange", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
updateBean(component);
}
});
@ -336,7 +336,7 @@ public class LeftTasksTreeRow extends GenericForwardComposer {
textBox.addEventListener("onOK", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
userWantsDateBox(textBox);
}
});
@ -346,7 +346,7 @@ public class LeftTasksTreeRow extends GenericForwardComposer {
datebox.addEventListener("onOK", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
datebox.setOpen(true);
}
});
@ -375,7 +375,7 @@ public class LeftTasksTreeRow extends GenericForwardComposer {
datebox.addEventListener("onBlur", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
dateBoxHasLostFocus(datebox);
}
});

View file

@ -286,7 +286,7 @@ public class Planner extends HtmlMacroComponent {
}
@Override
public void doAction() throws Exception {
public void doAction() {
ganttPanel.zoomIncrease();
}
});
@ -303,7 +303,7 @@ public class Planner extends HtmlMacroComponent {
}
@Override
public void doAction() throws Exception {
public void doAction() {
ganttPanel.zoomDecrease();
}
});
@ -497,7 +497,7 @@ public class Planner extends HtmlMacroComponent {
westContainer.addEventListener(Events.ON_SIZE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Clients.evalJavaScript("zkTaskContainer.legendResize();");
}

View file

@ -117,7 +117,7 @@ public class TabsRegistry {
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (_("Limiting resources").equals(t.getName())) {
Executions.sendRedirect("/planner/index.zul;limiting_resources");
} else {

View file

@ -180,7 +180,7 @@ public class TaskList extends XulElement implements AfterCompose {
taskComponent.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
doubleClickCommand.doAction(taskComponent);
}
});
@ -190,7 +190,7 @@ public class TaskList extends XulElement implements AfterCompose {
taskComponent.addEventListener("onRightClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
try {
getContextMenuFor(taskComponent).open(taskComponent);
} catch (Exception e) {

View file

@ -97,7 +97,7 @@ public class ResourceLoadComponent extends XulElement {
private void addDoubleClickAction(final Div div, final LoadTimeLine loadLine) {
div.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
schedule(loadLine);
}
});
@ -107,7 +107,7 @@ public class ResourceLoadComponent extends XulElement {
final LoadTimeLine loadLine) {
div.addEventListener("onRightClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
try {
getContextMenuFor(divs, div, loadLine).open(div);
} catch (Exception e) {

View file

@ -74,7 +74,7 @@ MutableTreeModel<LoadTimeLine> modelForTree,
return new TreeitemRenderer() {
@Override
public void render(Treeitem item, Object data)
throws Exception {
{
LoadTimeLine line = (LoadTimeLine) data;
item.setOpen(false);
item.setValue(line);
@ -111,7 +111,7 @@ MutableTreeModel<LoadTimeLine> modelForTree,
buttonPlan.setTooltiptext(_("See scheduling"));
buttonPlan.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
schedule(taskLine);
}
});
@ -134,7 +134,7 @@ MutableTreeModel<LoadTimeLine> modelForTree,
final LoadTimeLine line) {
item.addEventListener("onOpen", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
OpenEvent openEvent = (OpenEvent) event;
if (openEvent.isOpen()) {
List<LoadTimeLine> closed = calculatedClosedItems(item);

View file

@ -158,7 +158,7 @@ public class ResourcesLoadPanel extends HtmlMacroComponent {
new ILongOperation() {
@Override
public void doAction() throws Exception {
public void doAction() {
applyFilter();
}
@ -252,7 +252,7 @@ public class ResourcesLoadPanel extends HtmlMacroComponent {
Button result = new Button();
result.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
c.doAction();
}
});
@ -506,7 +506,7 @@ public class ResourcesLoadPanel extends HtmlMacroComponent {
new ILongOperation() {
@Override
public void doAction() throws Exception {
public void doAction() {
if(paginationType == PaginationType.INTERNAL_PAGINATION) {
//if the pagination is internal, we are in charge of repainting the graph
treeModel = createModelForTree();

View file

@ -111,7 +111,7 @@ public class TimeTrackedTableWithLeftPane<A, B> {
return new Callable<List<B>>() {
@Override
public List<B> call() throws Exception {
public List<B> call() {
return loadPairOfListsFromCallable().getSecond();
}
};

View file

@ -234,7 +234,7 @@ public class TimeTracker {
new ILongOperation() {
@Override
public void doAction() throws Exception {
public void doAction() {
invalidatingChangeHappened();
}

View file

@ -31,12 +31,13 @@ public class GanttUtils {
private GanttUtils() {
}
public static int getIntFromStylePosition(String position) throws Exception {
public static int getIntFromStylePosition(String position) {
String[] tokens = position.split("px");
if (tokens.length != 1) {
throw new Exception("Bad formatting for input parameter");
throw new IllegalArgumentException(
"Bad formatting for input parameter");
}
return Integer.parseInt(tokens[0]);

View file

@ -95,7 +95,7 @@ public class LongOperationFeedback {
component.addEventListener(eventName, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
try {
runnable.run();
} finally {

View file

@ -116,7 +116,7 @@ public class MenuBuilder<T extends XulElement> {
result.addEventListener("onOpen", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
OpenEvent openEvent = (OpenEvent) event;
referenced = (T) openEvent.getReference();
}
@ -126,7 +126,7 @@ public class MenuBuilder<T extends XulElement> {
Menuitem menuItem = item.createMenuItem();
menuItem.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
ItemAction<T> action = item.action;
action.onEvent(referenced, event);
}

View file

@ -243,8 +243,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<SortedMap<CriterionType, List<Criterion>>> calculateCriterionsMap() {
return new Callable<SortedMap<CriterionType, List<Criterion>>>() {
@Override
public SortedMap<CriterionType, List<Criterion>> call()
throws Exception {
public SortedMap<CriterionType, List<Criterion>> call() {
SortedMap<CriterionType, List<Criterion>> result = new TreeMap<CriterionType, List<Criterion>>(
getComparatorByName());
for (CriterionType criterionType : criterionTypeDAO
@ -278,7 +277,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<Map<LabelType, List<Label>>> calculateLabelsMap() {
return new Callable<Map<LabelType,List<Label>>>() {
@Override
public Map<LabelType, List<Label>> call() throws Exception {
public Map<LabelType, List<Label>> call() {
Map<LabelType, List<Label>> result = new HashMap<LabelType, List<Label>>();
for (LabelType labelType : labelTypeDAO.getAll()) {
List<Label> labels = new ArrayList<Label>(
@ -297,7 +296,7 @@ public class PredefinedDatabaseSnapshots {
return new Callable<List<Worker>>() {
@Override
public List<Worker> call() throws Exception {
public List<Worker> call() {
return workerDAO.getAll();
}
};
@ -309,7 +308,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<List<CostCategory>> calculateListCostCategories() {
return new Callable<List<CostCategory>>() {
@Override
public List<CostCategory> call() throws Exception {
public List<CostCategory> call() {
return costCategoryDAO.findActive();
}
};
@ -318,7 +317,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<List<Criterion>> calculateListCriterion() {
return new Callable<List<Criterion>>() {
@Override
public List<Criterion> call() throws Exception {
public List<Criterion> call() {
return criterionDAO.getAll();
}
};
@ -331,7 +330,7 @@ public class PredefinedDatabaseSnapshots {
return new Callable<Map<Class<?>, List<Resource>>>() {
@Override
public Map<Class<?>, List<Resource>> call() throws Exception {
public Map<Class<?>, List<Resource>> call() {
Map<Class<?>, List<Resource>> result = new HashMap<Class<?>, List<Resource>>();
result.put(Worker.class, Resource
.sortByName(new ArrayList<Resource>(resourceDAO
@ -354,7 +353,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<List<ExternalCompany>> calculateExternalCompanies() {
return new Callable<List<ExternalCompany>>() {
@Override
public List<ExternalCompany> call() throws Exception {
public List<ExternalCompany> call() {
return externalCompanyDAO.getExternalCompaniesAreClient();
}
};
@ -366,7 +365,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<List<String>> calculateCustomerReferences() {
return new Callable<List<String>>() {
@Override
public List<String> call() throws Exception {
public List<String> call() {
// FIXME replace by a HQL query, for god's sake!
List<String> result = new ArrayList<String>();
for (Order order : orderDAO.getOrders()) {
@ -383,7 +382,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<List<String>> calculateOrdersCodes() {
return new Callable<List<String>>() {
@Override
public List<String> call() throws Exception {
public List<String> call() {
List<String> result = new ArrayList<String>();
for (Order order : orderDAO.getOrders()) {
result.add(order.getCode());
@ -402,8 +401,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<ResourceLoadChartData> calculateResourceLoadChartData() {
return new Callable<ResourceLoadChartData>() {
@Override
public ResourceLoadChartData call()
throws Exception {
public ResourceLoadChartData call() {
List<DayAssignment> dayAssignments = dayAssignmentDAO.getAllFor(
scenarioManager.getCurrent(), null, null);
@ -420,8 +418,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<List<WorkReportLine>> calculateWorkReportLines() {
return new Callable<List<WorkReportLine>>() {
@Override
public List<WorkReportLine> call()
throws Exception {
public List<WorkReportLine> call() {
return workReportLineDAO.list(WorkReportLine.class);
}
};
@ -436,8 +433,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<Map<TaskElement, SortedMap<LocalDate, BigDecimal>>> calculateEstimatedCostPerTask() {
return new Callable<Map<TaskElement, SortedMap<LocalDate, BigDecimal>>>() {
@Override
public Map<TaskElement, SortedMap<LocalDate, BigDecimal>> call()
throws Exception {
public Map<TaskElement, SortedMap<LocalDate, BigDecimal>> call() {
Map<TaskElement, SortedMap<LocalDate, BigDecimal>> map =
new HashMap<TaskElement, SortedMap<LocalDate,BigDecimal>>();
for(TaskElement task : taskElementDAO.list(TaskElement.class)) {
@ -453,8 +449,7 @@ public class PredefinedDatabaseSnapshots {
private Callable<Map<TaskElement, SortedMap<LocalDate, BigDecimal>>> calculateAdvanceCostPerTask() {
return new Callable<Map<TaskElement, SortedMap<LocalDate, BigDecimal>>>() {
@Override
public Map<TaskElement, SortedMap<LocalDate, BigDecimal>> call()
throws Exception {
public Map<TaskElement, SortedMap<LocalDate, BigDecimal>> call() {
Map<TaskElement, SortedMap<LocalDate, BigDecimal>> map =
new HashMap<TaskElement, SortedMap<LocalDate,BigDecimal>>();
for(TaskElement task : taskElementDAO.list(TaskElement.class)) {

View file

@ -67,7 +67,7 @@ public class EntitySequenceTest {
}
@Test
public void testCreateActiveEntitySequence() throws Exception {
public void testCreateActiveEntitySequence() {
try {
entitySequenceDAO.save(givenEntitySequence("prefix-"
+ UUID.randomUUID(), EntityNameEnum.CALENDAR, true));
@ -80,7 +80,7 @@ public class EntitySequenceTest {
}
@Test
public void testCreateEntitySequenceWithEmptyPrefix() throws Exception {
public void testCreateEntitySequenceWithEmptyPrefix() {
try {
entitySequenceDAO.save(givenEntitySequence("",
EntityNameEnum.CALENDAR, true));
@ -92,8 +92,7 @@ public class EntitySequenceTest {
}
@Test
public void testCreateEntitySequenceWithPrefixWithWhiteSpace()
throws Exception {
public void testCreateEntitySequenceWithPrefixWithWhiteSpace() {
try {
entitySequenceDAO.save(givenEntitySequence(
"prefix with white spaces", EntityNameEnum.CALENDAR, true));
@ -105,7 +104,7 @@ public class EntitySequenceTest {
}
@Test
public void testCreateEntitySequenceWithEmptyEntityName() throws Exception {
public void testCreateEntitySequenceWithEmptyEntityName() {
try {
entitySequenceDAO.save(givenEntitySequence("prefix-"
+ UUID.randomUUID(), null, false));
@ -117,8 +116,7 @@ public class EntitySequenceTest {
}
@Test
public void testCreateEntitySequenceWithNumberOfDigitsNotSpecified()
throws Exception {
public void testCreateEntitySequenceWithNumberOfDigitsNotSpecified() {
try {
EntitySequence entitySequence = givenEntitySequence("prefix-"
+ UUID.randomUUID(), EntityNameEnum.CRITERION, true);
@ -132,8 +130,7 @@ public class EntitySequenceTest {
}
@Test
public void testCreateEntitySequenceWithNumberOfDigitsOutRange()
throws Exception {
public void testCreateEntitySequenceWithNumberOfDigitsOutRange() {
try {
EntitySequence entitySequence = givenEntitySequence("prefix-"
+ UUID.randomUUID(), EntityNameEnum.CRITERION, true);

View file

@ -30,6 +30,7 @@ import javax.sql.DataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.dbunit.DatabaseUnitException;
import org.dbunit.database.DatabaseConfig;
import org.dbunit.database.DatabaseConnection;
import org.dbunit.database.IDatabaseConnection;
@ -77,7 +78,7 @@ public class DBUnitTestExecutionListener extends
}
}
private DataSource getDataSource(TestContext context) throws Exception {
private DataSource getDataSource(TestContext context) {
DataSource dataSource;
Map beans = context.getApplicationContext().getBeansOfType(
DataSource.class);
@ -94,7 +95,8 @@ public class DBUnitTestExecutionListener extends
}
private IDatabaseConnection getDBUnitConnection(Connection c)
throws Exception {
throws DatabaseUnitException
{
IDatabaseConnection conn = new DatabaseConnection(c);
DatabaseConfig config = conn.getConfig();
config.setFeature("http://www.dbunit.org/features/qualifiedTableNames",

View file

@ -158,7 +158,9 @@ public class AddAdvanceAssignmentsToOrderElementTest {
}
@Test
public void savingTheOrderSavesAlsoTheAddedAssignments() throws Exception {
public void savingTheOrderSavesAlsoTheAddedAssignments()
throws DuplicateValueTrueReportGlobalAdvanceException,
DuplicateAdvanceAssignmentForOrderElementException {
Order order = createValidOrder();
OrderElement orderLine = createValidLeaf("OrderLineA", "1k1k1k1k");
@ -188,7 +190,9 @@ public class AddAdvanceAssignmentsToOrderElementTest {
}
@Test
public void addingSeveralAssignmentsOfDifferentTypes() throws Exception {
public void addingSeveralAssignmentsOfDifferentTypes()
throws DuplicateValueTrueReportGlobalAdvanceException,
DuplicateAdvanceAssignmentForOrderElementException {
Order order = createValidOrder();
OrderLine orderLine = createValidLeaf("OrderLineA", "1111111");
@ -210,7 +214,8 @@ public class AddAdvanceAssignmentsToOrderElementTest {
@Test
public void cannotAddDuplicatedAssignment()
throws Exception {
throws DuplicateValueTrueReportGlobalAdvanceException,
DuplicateAdvanceAssignmentForOrderElementException {
OrderLine orderLine = createValidLeaf("OrderLineA", "22222222");
AdvanceType advanceTypeA = createAndSaveType("tipoA");
@ -232,7 +237,9 @@ public class AddAdvanceAssignmentsToOrderElementTest {
}
@Test
public void cannotAddTwoAssignmetsWithGlobalReportValue() throws Exception {
public void cannotAddTwoAssignmetsWithGlobalReportValue()
throws DuplicateAdvanceAssignmentForOrderElementException,
DuplicateValueTrueReportGlobalAdvanceException {
OrderLine orderLine = createValidLeaf("OrderLineA", "101010101");
AdvanceType advanceTypeA = createAndSaveType("tipoA");
@ -255,7 +262,9 @@ public class AddAdvanceAssignmentsToOrderElementTest {
}
@Test
public void addingAssignmentsOfAnotherTypeToSon() throws Exception {
public void addingAssignmentsOfAnotherTypeToSon()
throws DuplicateValueTrueReportGlobalAdvanceException,
DuplicateAdvanceAssignmentForOrderElementException {
Order validOrder = createValidOrder();
OrderLineGroup container = OrderLineGroup.create();
validOrder.add(container);
@ -286,7 +295,8 @@ public class AddAdvanceAssignmentsToOrderElementTest {
@Test
public void addingAnAdvanceAssignmentIncreasesTheNumberOfAdvanceAssignments()
throws Exception {
throws DuplicateValueTrueReportGlobalAdvanceException,
DuplicateAdvanceAssignmentForOrderElementException {
Order validOrder = createValidOrder();
final OrderLineGroup container = OrderLineGroup.create();
validOrder.add(container);
@ -306,7 +316,9 @@ public class AddAdvanceAssignmentsToOrderElementTest {
}
@Test
public void cannotAddDuplicatedAssignmentToSon() throws Exception {
public void cannotAddDuplicatedAssignmentToSon()
throws DuplicateValueTrueReportGlobalAdvanceException,
DuplicateAdvanceAssignmentForOrderElementException {
Order validOrder = createValidOrder();
final OrderLineGroup father = OrderLineGroup.create();
validOrder.add(father);
@ -334,7 +346,9 @@ public class AddAdvanceAssignmentsToOrderElementTest {
}
@Test
public void cannotAddDuplicateAssignmentToGrandParent() throws Exception {
public void cannotAddDuplicateAssignmentToGrandParent()
throws DuplicateValueTrueReportGlobalAdvanceException,
DuplicateAdvanceAssignmentForOrderElementException {
Order validOrder = createValidOrder();
OrderLineGroup parent = OrderLineGroup.create();
validOrder.add(parent);
@ -369,7 +383,8 @@ public class AddAdvanceAssignmentsToOrderElementTest {
@Test(expected = DuplicateAdvanceAssignmentForOrderElementException.class)
public void addingAnotherAdvanceAssignmentWithAnEquivalentTypeButDifferentInstance()
throws Exception {
throws DuplicateValueTrueReportGlobalAdvanceException,
DuplicateAdvanceAssignmentForOrderElementException {
final Order order = createValidOrder();
final OrderLine line = createValidLeaf("GranSon", "75757");
@ -406,7 +421,8 @@ public class AddAdvanceAssignmentsToOrderElementTest {
@Test(expected = DuplicateValueTrueReportGlobalAdvanceException.class)
public void cannotAddTwoAssignmetsDirectAndIndirectWithGlobalReportValue()
throws Exception {
throws DuplicateValueTrueReportGlobalAdvanceException,
DuplicateAdvanceAssignmentForOrderElementException {
OrderLineGroup orderLineGroup = OrderLineGroup.create();
orderLineGroup.setName("test");
orderLineGroup.setCode("1");

View file

@ -63,7 +63,7 @@ public class OrderTest {
}
@Test
public void testAddingOrderElement() throws Exception {
public void testAddingOrderElement() {
Order order = Order.create();
order.useSchedulingDataFor(mockedOrderVersion);
OrderLineGroup container = OrderLineGroup.create();
@ -74,7 +74,7 @@ public class OrderTest {
}
@Test
public void testPreservesOrder() throws Exception {
public void testPreservesOrder() {
OrderLineGroup container = OrderLineGroup.create();
container.useSchedulingDataFor(mockedOrderVersion);
OrderLine[] created = new OrderLine[100];

View file

@ -66,7 +66,7 @@ public class CriterionsBootstrapTest {
}
@Test
public void testBootstrap() throws Exception {
public void testBootstrap() {
givenNoSomePredefinedCriterionExists();
criterionsBootstrap.loadRequiredData();
thenAllSomePredefinedCriterionsExist();

View file

@ -114,7 +114,7 @@ public class CriterionDAOTest {
}
@Test
public void afterSavingACriterionItExists() throws Exception {
public void afterSavingACriterionItExists() {
givenACriterionWithAnExistentType();
criterionDAO.save(criterion);
assertTrue(criterionDAO.exists(criterion.getId()));

View file

@ -69,7 +69,7 @@ public class CriterionSatisfactionDAOTest {
private IWorkerDAO workerDAO;
@Test
public void testSaveCriterions() throws Exception {
public void testSaveCriterions() {
CriterionSatisfaction criterionSatisfaction = createValidCriterionSatisfaction(2007);
satisfactionDAO.save(criterionSatisfaction);
assertNotNull(criterionSatisfaction.getId());

View file

@ -82,7 +82,7 @@ public class CriterionTypeDAOTest {
}
@Test
public void testSaveCriterionType() throws Exception {
public void testSaveCriterionType() {
CriterionType criterionType = createValidCriterionType();
criterionTypeDAO.save(criterionType);
assertTrue(criterionTypeDAO.exists(criterionType.getId()));

View file

@ -58,7 +58,7 @@ public class CriterionSatisfactionTest {
}
@Test
public void canFinishWhenItStarted() throws Exception {
public void canFinishWhenItStarted() {
final Criterion criterion = CriterionDAOTest.createValidCriterion();
Worker worker = Worker.create("firstName", "surName", "2333232");
LocalDate start = year(2000);

View file

@ -47,7 +47,7 @@ import org.navalplanner.business.resources.entities.Worker;
public class CriterionTest {
@Test
public void testCreateWithAType() throws Exception {
public void testCreateWithAType() {
Criterion firedCriterion = PredefinedCriterionTypes.WORK_RELATIONSHIP
.createCriterion("fired");
assertTrue(PredefinedCriterionTypes.WORK_RELATIONSHIP
@ -55,7 +55,7 @@ public class CriterionTest {
}
@Test
public void testCompounding() throws Exception {
public void testCompounding() {
Worker worker1 = Worker.create();
Worker worker2 = Worker.create();
@ -122,12 +122,12 @@ public class CriterionTest {
}
@Test
public void testEmptyMatchesAll() throws Exception {
public void testEmptyMatchesAll() {
assertTrue(build().getResult().isSatisfiedBy(Worker.create()));
}
@Test
public void testSimpleNegation() throws Exception {
public void testSimpleNegation() {
Worker worker1 = Worker.create();
Worker worker2 = Worker.create();
Worker worker3 = Worker.create();
@ -144,7 +144,7 @@ public class CriterionTest {
}
@Test
public void testNegateAnd() throws Exception {
public void testNegateAnd() {
Worker worker1 = Worker.create();
Worker worker2 = Worker.create();
Worker worker3 = Worker.create();
@ -157,7 +157,7 @@ public class CriterionTest {
}
@Test
public void testOr() throws Exception {
public void testOr() {
Worker worker1 = Worker.create();
Worker worker2 = Worker.create();
Worker worker3 = Worker.create();
@ -173,7 +173,7 @@ public class CriterionTest {
}
@Test
public void testOrHasLessPrecendenceThanAnd() throws Exception {
public void testOrHasLessPrecendenceThanAnd() {
Worker worker1 = Worker.create();
Worker worker2 = Worker.create();
Worker worker3 = Worker.create();
@ -189,7 +189,7 @@ public class CriterionTest {
}
@Test
public void testCanBeRelatedTo() throws Exception {
public void testCanBeRelatedTo() {
assertTrue(PredefinedCriterionTypes.LOCATION_GROUP
.criterionCanBeRelatedTo(Worker.class));
assertTrue(PredefinedCriterionTypes.WORK_RELATIONSHIP

View file

@ -33,18 +33,18 @@ import org.navalplanner.business.test.resources.daos.CriterionSatisfactionDAOTes
public class IntervalTest {
@Test(expected = IllegalArgumentException.class)
public void testStartDateMustBeBeforeThanEndDate() throws Exception {
public void testStartDateMustBeBeforeThanEndDate() {
Interval.range(CriterionSatisfactionDAOTest.year(2000),
CriterionSatisfactionDAOTest.year(1999));
}
@Test(expected = IllegalArgumentException.class)
public void testStartDateMustBeNotNull() throws Exception {
public void testStartDateMustBeNotNull() {
Interval.range(null, CriterionSatisfactionDAOTest.year(1999));
}
@Test
public void intervalCanBeOpenEnded() throws Exception {
public void intervalCanBeOpenEnded() {
Interval.range(CriterionSatisfactionDAOTest.year(1990), null);
}
@ -68,7 +68,7 @@ public class IntervalTest {
}
@Test
public void testPointsOnlyContainsThemselves() throws Exception {
public void testPointsOnlyContainsThemselves() {
Interval point = Interval
.point(CriterionSatisfactionDAOTest.year(1990));
assertTrue(point.contains(CriterionSatisfactionDAOTest.year(1990)));
@ -77,7 +77,7 @@ public class IntervalTest {
@Test
public void testIntervalsAreStartInclusiveAndEndExclusive()
throws Exception {
{
Interval range = Interval.range(year(1990), year(2000));
assertTrue(range.contains(year(1990)));
assertFalse(range.contains(year(2000)));
@ -86,7 +86,7 @@ public class IntervalTest {
}
@Test
public void testIncludes() throws Exception {
public void testIncludes() {
Interval bigRange = Interval.range(year(1990), year(2000));
Interval included = Interval.range(year(1990), year(1998));
Interval point = Interval.point(year(1996));
@ -96,7 +96,7 @@ public class IntervalTest {
}
@Test
public void testStartPointDoesntOverlapsWithRange() throws Exception {
public void testStartPointDoesntOverlapsWithRange() {
Interval range = Interval.range(year(1990), year(2005));
Interval openEndedRange = Interval.from(year(1990));
Interval point = Interval.point(year(1990));
@ -136,7 +136,7 @@ public class IntervalTest {
@Test
public void testIntervalFinishingAtTheStartOfOtherDontOverlap()
throws Exception {
{
Interval range = Interval.range(year(2000), year(2005));
Interval from = Interval.from(year(2000));
Interval before = Interval.range(year(1995), year(2000));
@ -159,7 +159,7 @@ public class IntervalTest {
}
@Test
public void testCreatingPointWithRange() throws Exception {
public void testCreatingPointWithRange() {
Interval point = Interval.point(year(1990));
Interval range = Interval.range(year(1990), year(1990));
assertEquals(point, range);

View file

@ -116,7 +116,7 @@ public class ResourceTest {
}
@Test
public void testRetrieveActiveCriterionsForCriterionType() throws Exception {
public void testRetrieveActiveCriterionsForCriterionType() {
final Criterion criterion = CriterionDAOTest.createValidCriterion();
Criterion otherCriterion = CriterionDAOTest.createValidCriterion();
ICriterionType<Criterion> criterionType = createTypeThatMatches(criterion);
@ -136,7 +136,7 @@ public class ResourceTest {
}
@Test
public void testActiveCriterions() throws Exception {
public void testActiveCriterions() {
final Criterion criterion = CriterionDAOTest.createValidCriterion();
Criterion otherCriterion = CriterionDAOTest.createValidCriterion();
ICriterionType<Criterion> type = createTypeThatMatches(criterion,
@ -196,7 +196,7 @@ public class ResourceTest {
@Test
public void testRetrieveSatisfactionsInIntervalForCriterionType()
throws Exception {
{
Criterion criterion = CriterionDAOTest.createValidCriterion();
ICriterionType<Criterion> criterionType = createTypeThatMatches(criterion);
CriterionWithItsType criterionWithItsType = new CriterionWithItsType(
@ -226,7 +226,7 @@ public class ResourceTest {
}
@Test(expected = IllegalArgumentException.class)
public void invalidadCriterionWithItsTypeNotAllowd() throws Exception {
public void invalidadCriterionWithItsTypeNotAllowd() {
Criterion criterion = CriterionDAOTest.createValidCriterion();
Criterion otherCriterion = CriterionDAOTest.createValidCriterion();
ICriterionType<Criterion> criterionType = createTypeThatMatches(criterion);
@ -272,7 +272,7 @@ public class ResourceTest {
}
@Test
public void testAddAtDate() throws Exception {
public void testAddAtDate() {
Criterion criterion = CriterionDAOTest.createValidCriterion();
Criterion otherCriterion = CriterionDAOTest.createValidCriterion();
Worker worker = Worker.create("firstName", "surName", "2333232");
@ -441,7 +441,7 @@ public class ResourceTest {
criterionType, criterion), intervalE));
}
public void testAddCriterionSatisfaction() throws Exception {
public void testAddCriterionSatisfaction() {
Criterion criterion = CriterionDAOTest.createValidCriterion();
Worker worker = Worker.create("firstName", "surName", "2333232");
ICriterionType<Criterion> criterionType = createTypeThatMatches(false,

View file

@ -285,7 +285,7 @@ public class AdvanceTypeCRUDController extends GenericForwardComposer {
return new RowRenderer() {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
final AdvanceType advanceType = (AdvanceType) data;
appendLabelName(row, advanceType);
appendCheckboxEnabled(row, advanceType);
@ -293,7 +293,7 @@ public class AdvanceTypeCRUDController extends GenericForwardComposer {
appendOperations(row, advanceType);
row.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditForm(advanceType);
}
});
@ -324,7 +324,7 @@ public class AdvanceTypeCRUDController extends GenericForwardComposer {
hbox.appendChild(Util.createEditButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditForm(advanceType);
}
}));
@ -333,7 +333,7 @@ public class AdvanceTypeCRUDController extends GenericForwardComposer {
.createRemoveButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
confirmRemove(advanceType);
}
});

View file

@ -280,7 +280,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
public class BaseCalendarsTreeitemRenderer implements TreeitemRenderer {
@Override
public void render(Treeitem item, Object data) throws Exception {
public void render(Treeitem item, Object data) {
SimpleTreeNode simpleTreeNode = (SimpleTreeNode) data;
final BaseCalendar baseCalendar = (BaseCalendar) simpleTreeNode
.getData();
@ -305,7 +305,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToCreateDerivedForm(baseCalendar);
}
@ -321,7 +321,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToCreateCopyForm(baseCalendar);
}
@ -337,7 +337,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
editButton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditForm(baseCalendar);
}
@ -353,7 +353,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
removeButton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
confirmRemove(baseCalendar);
}

View file

@ -233,7 +233,7 @@ public abstract class BaseCalendarEditionController extends
exceptionTypes.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Comboitem selectedItem = getSelectedItem((SelectEvent) event);
if (selectedItem != null) {
updateWithCapacityFrom(getValue(selectedItem));
@ -301,7 +301,7 @@ public abstract class BaseCalendarEditionController extends
parentCalendars.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
BaseCalendar selected = (BaseCalendar) parentCalendars
.getSelectedItem().getValue();
baseCalendarModel.setParent(selected);
@ -341,7 +341,7 @@ public abstract class BaseCalendarEditionController extends
public class HoursPerDayRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
final Days day = (Days) data;
addLabelCell(item, day);
@ -396,7 +396,7 @@ public abstract class BaseCalendarEditionController extends
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
reloadCurrentWindow();
}
@ -710,7 +710,7 @@ public abstract class BaseCalendarEditionController extends
public class HistoryVersionsRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
CalendarData calendarData = (CalendarData) data;
item.setValue(calendarData);
@ -786,7 +786,7 @@ public abstract class BaseCalendarEditionController extends
_("Delete"), "/common/img/ico_borrar.png", "icono",
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
baseCalendarModel.removeCalendarData(calendarData);
reloadCurrentWindow();
}
@ -814,7 +814,7 @@ public abstract class BaseCalendarEditionController extends
private void addEventListener(Listitem item) {
item.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Listitem item = (Listitem) event.getTarget();
CalendarData calendarData = (CalendarData) item.getValue();
@ -928,7 +928,7 @@ public abstract class BaseCalendarEditionController extends
public class CalendarExceptionRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
CalendarException calendarException = (CalendarException) data;
item.setValue(calendarException);
@ -1044,7 +1044,7 @@ public abstract class BaseCalendarEditionController extends
_("Delete"), "/common/img/ico_borrar.png", "icono",
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
baseCalendarModel
.removeException(calendarException
.getDate());
@ -1144,7 +1144,7 @@ public abstract class BaseCalendarEditionController extends
public class CalendarAvailabilityRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
CalendarAvailability calendarAvailability = (CalendarAvailability) data;
item.setValue(calendarAvailability);
@ -1295,7 +1295,7 @@ public abstract class BaseCalendarEditionController extends
_("Delete"), "/common/img/ico_borrar.png", "icono",
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
baseCalendarModel
.removeCalendarAvailability(calendarAvailability);
reloadDayInformation();

View file

@ -108,7 +108,7 @@ public class ConfigurationController extends GenericForwardComposer {
defaultCalendarBandboxSearch.setListboxEventListener(Events.ON_SELECT,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Listitem selectedItem = (Listitem) ((SelectEvent) event)
.getSelectedItems().iterator().next();
setDefaultCalendar((BaseCalendar) selectedItem
@ -131,7 +131,7 @@ public class ConfigurationController extends GenericForwardComposer {
lbTypeProgress.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Listitem selectedItem = getSelectedItem((SelectEvent) event);
if (selectedItem != null) {
ProgressType progressType = (ProgressType) selectedItem.getValue();
@ -447,7 +447,7 @@ public class ConfigurationController extends GenericForwardComposer {
private static class ProgressTypeRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
ProgressType progressType = (ProgressType) data;
item.setLabel(_(progressType.getValue()));
}
@ -456,7 +456,7 @@ public class ConfigurationController extends GenericForwardComposer {
public class EntitySequenceGroupRenderer implements RowRenderer {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
EntitySequence entitySequence = (EntitySequence) data;
final EntityNameEnum entityName = entitySequence.getEntityName();
@ -472,7 +472,7 @@ public class ConfigurationController extends GenericForwardComposer {
.getSequenceLiteral())));
group.addEventListener(Events.ON_OPEN, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
onOpenGroup(entityName, group.isOpen());
}
});
@ -607,7 +607,7 @@ public class ConfigurationController extends GenericForwardComposer {
.createRemoveButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (isLastOne(entitySequence)) {
showMessageNotDelete();
} else {

View file

@ -41,7 +41,7 @@ import org.zkoss.zul.ListitemRenderer;
public class EnumsListitemRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
item.setValue(data);
item.appendChild(new Listcell(_(data.toString())));
}

View file

@ -165,7 +165,7 @@ public class MessagesForUser extends GenericForwardComposer implements
messageEntry.addEventListener(DETACH_EVENT_NAME, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
pendingToDetach.offer(new ComponentHolderTimestamped(
messageEntry));
}

View file

@ -52,7 +52,7 @@ public class OnTabSelection {
tabBox.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
SelectEvent e = (SelectEvent) event;
for (Object each : e.getSelectedItems()) {
if (tabs.get(each) != null) {

View file

@ -161,7 +161,7 @@ public class Util {
textBox.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
InputEvent newInput = (InputEvent) event;
String value = newInput.getValue();
setter.set(value);
@ -205,7 +205,7 @@ public class Util {
comboBox.addEventListener("onSelect", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
setter.set(comboBox.getSelectedItem());
comboBox.setSelectedItem(getter.get());
}
@ -247,7 +247,7 @@ public class Util {
intBox.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
InputEvent newInput = (InputEvent) event;
String value = newInput.getValue().trim();
if (value.isEmpty()) {
@ -294,7 +294,7 @@ public class Util {
dateBox.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
setter.set(dateBox.getValue());
dateBox.setValue(getter.get());
}
@ -336,7 +336,7 @@ public class Util {
timeBox.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
setter.set(timeBox.getValue());
timeBox.setValue(getter.get());
}
@ -380,7 +380,7 @@ public class Util {
decimalBox.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
setter.set(decimalBox.getValue());
decimalBox.setValue(getter.get());
}
@ -423,7 +423,7 @@ public class Util {
checkBox.addEventListener(Events.ON_CHECK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
setter.set(checkBox.isChecked());
checkBox.setChecked(getter.get());
}
@ -466,7 +466,7 @@ public class Util {
radio.addEventListener(Events.ON_CHECK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
setter.set(radio.isSelected());
radio.setChecked(getter.get());
}
@ -510,7 +510,7 @@ public class Util {
bandBox.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
InputEvent newInput = (InputEvent) event;
String value = newInput.getValue();
setter.set(value);

View file

@ -49,7 +49,7 @@ public class ViewSwitcher implements Composer {
private boolean isInPlanningOrder = false;
@Override
public void doAfterCompose(org.zkoss.zk.ui.Component comp) throws Exception {
public void doAfterCompose(org.zkoss.zk.ui.Component comp) {
this.parent = comp;
isInPlanningOrder = true;
}

View file

@ -81,7 +81,7 @@ public class Autocomplete extends Combobox {
autocomplete.addEventListener("onChange", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
String text = autocomplete.getValue();
Object object = getItemByText(text);
autocomplete.setSelectedItem(object);

View file

@ -137,7 +137,7 @@ public class EffortDurationPicker extends Hbox {
Spinner... spinners) {
EventListener listener = new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
notifySetterOfChange(setter);
}
};

View file

@ -50,7 +50,7 @@ public class NewDataSortableGrid extends Grid implements AfterCompose {
public NewDataSortableGrid() {
addEventListener(Events.ON_SORT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
sortByLastColumn();
}
});

View file

@ -96,14 +96,14 @@ public class BandboxMultipleSearch extends HtmlMacroComponent {
listbox.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
pickElementFromListAndCloseBandbox();
}
});
listbox.addEventListener(Events.ON_OK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
pickElementFromListAndCloseBandbox();
}
});
@ -116,7 +116,7 @@ public class BandboxMultipleSearch extends HtmlMacroComponent {
bandbox.addEventListener("onChanging", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
final String inputText = ((InputEvent) event).getValue();
if ((inputText == null) || (inputText.isEmpty())) {
clear();
@ -130,7 +130,7 @@ public class BandboxMultipleSearch extends HtmlMacroComponent {
bandbox.addEventListener(Events.ON_CTRL_KEY, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
List<Listitem> items = listbox.getItems();
if (!items.isEmpty()) {
listbox.setSelectedIndex(0);

View file

@ -94,7 +94,7 @@ public class BandboxSearch extends HtmlMacroComponent {
bandbox.addEventListener("onChanging", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
clearSelectedElement();
final String inputText = ((InputEvent) event).getValue();
listbox.setModel(getSubModel(inputText));
@ -106,7 +106,7 @@ public class BandboxSearch extends HtmlMacroComponent {
bandbox.addEventListener(Events.ON_CTRL_KEY, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
int selectedItemIndex = listbox.getSelectedIndex();
if (selectedItemIndex != -1) {
listbox.getItemAtIndexApi(selectedItemIndex).setFocus(true);
@ -127,7 +127,7 @@ public class BandboxSearch extends HtmlMacroComponent {
listbox.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
pickElementFromList();
}
});
@ -136,14 +136,14 @@ public class BandboxSearch extends HtmlMacroComponent {
listbox.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
close();
}
});
listbox.addEventListener(Events.ON_OK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
pickElementFromList();
close();
}

View file

@ -78,7 +78,7 @@ public abstract class BandboxFinder implements IBandboxFinder {
private final ListitemRenderer _defRend = new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
item.setLabel(objectToString(data));
item.setValue(data);
}

View file

@ -91,7 +91,7 @@ public class BaseCalendarBandboxFinder extends BandboxFinder implements IBandbox
private final ListitemRenderer baseCalendarRenderer = new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
BaseCalendar baseCalendar = (BaseCalendar) data;
item.setValue(baseCalendar);

View file

@ -98,7 +98,7 @@ public class CriterionBandboxFinder extends BandboxFinder implements IBandboxFin
private final ListitemRenderer orderRenderer = new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
Criterion criterion = (Criterion)data;
item.setValue(criterion);

View file

@ -107,7 +107,7 @@ public class ExternalCompanyBandboxFinder extends BandboxFinder implements
private final ListitemRenderer externalCompanyRenderer = new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
ExternalCompany externalCompany = (ExternalCompany) data;
item.setValue(data);

View file

@ -84,7 +84,7 @@ public abstract class Finder implements IFinder {
private class ComboWorkerRenderer implements ComboitemRenderer {
@Override
public void render(Comboitem item, Object data) throws Exception {
public void render(Comboitem item, Object data) {
item.setLabel(_toString(data));
item.setValue(data);
}

View file

@ -108,7 +108,7 @@ public class LabelBandboxFinder extends BandboxFinder implements IBandboxFinder
private final ListitemRenderer labelRenderer = new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
Label label = (Label) data;
item.setValue(data);

View file

@ -195,7 +195,7 @@ public abstract class MultipleFiltersFinder implements IMultipleFiltersFinder {
private final ListitemRenderer filterPairRenderer = new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
FilterPair filterPair = (FilterPair) data;
item.setValue(data);

View file

@ -85,7 +85,7 @@ public class OrderBandboxFinder extends BandboxFinder implements IBandboxFinder
private final ListitemRenderer orderRenderer = new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
Order order = (Order) data;
item.setValue(order);

View file

@ -105,7 +105,7 @@ public class OrderElementBandboxFinder extends BandboxFinder implements IBandbox
private final ListitemRenderer orderElementRenderer = new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
OrderElement orderElement = (OrderElement) data;
item.setValue(orderElement);

View file

@ -112,7 +112,7 @@ public class QualityFormBandboxFinder extends BandboxFinder implements
private final ListitemRenderer qualityFormRenderer = new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
QualityForm qualityForm = (QualityForm) data;
item.setValue(data);

View file

@ -91,7 +91,7 @@ public class ScenarioBandboxFinder extends BandboxFinder implements IBandboxFind
private final ListitemRenderer scenarioRenderer = new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
Scenario scenario = (Scenario) data;
item.setValue(scenario);

View file

@ -55,7 +55,7 @@ public abstract class TemplateFinder<T extends OrderElementTemplate> extends
return new ListitemRenderer() {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
T template = type.cast(data);
item.setValue(data);
generateColumnsForRenderer(item, template);

View file

@ -312,7 +312,7 @@ public class EntryPointsHandler<T> {
page.addEventListener("onBookmarkChange", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
BookmarkEvent bookmarkEvent = (BookmarkEvent) event;
String bookmark = bookmarkEvent.getBookmark();
applyIfMatches(controller, bookmark);

View file

@ -114,7 +114,7 @@ public class CostCategoryCRUDController extends GenericForwardComposer
listCostCategories.addEventListener("onInitRender", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
listCostCategories.renderAll();
final Rows rows = listCostCategories.getRows();
@ -320,7 +320,7 @@ public class CostCategoryCRUDController extends GenericForwardComposer
lbHoursType.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Listitem item = lbHoursType.getSelectedItem();
if (item != null) {
setHoursType((HourCost) row.getValue(), item);
@ -362,7 +362,7 @@ public class CostCategoryCRUDController extends GenericForwardComposer
delete.setTooltiptext(_("Delete"));
delete.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
confirmRemove((HourCost) row.getValue());
}
});
@ -422,7 +422,7 @@ public class CostCategoryCRUDController extends GenericForwardComposer
initDateBox.addEventListener("onChange", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
// Updates the constraint of the endDate box with the new date
LocalDate initDate = ((HourCost)row.getValue()).getInitDate();
Datebox endDateBox = (Datebox) row.getChildren().get(4);
@ -602,7 +602,7 @@ public class CostCategoryCRUDController extends GenericForwardComposer
public class HourCostListRenderer implements RowRenderer {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
HourCost hourCost = (HourCost) data;
row.setValue(hourCost);

View file

@ -123,7 +123,7 @@ public class ResourcesCostCategoryAssignmentController extends GenericForwardCom
autocomplete.addEventListener("onSelect", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
final Comboitem comboitem = autocomplete.getSelectedItem();
if(comboitem != null) {
@ -163,7 +163,7 @@ public class ResourcesCostCategoryAssignmentController extends GenericForwardCom
delete.setTooltiptext(_("Delete"));
delete.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
confirmRemove((ResourcesCostCategoryAssignment) row.getValue());
}
});
@ -184,7 +184,7 @@ public class ResourcesCostCategoryAssignmentController extends GenericForwardCom
initDateBox.addEventListener("onChange", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
// Updates the constraint of the endDate box with the new date
LocalDate initDate = ((ResourcesCostCategoryAssignment)row.getValue()).getInitDate();
Datebox endDateBox = (Datebox) row.getChildren().get(2);
@ -297,7 +297,7 @@ public class ResourcesCostCategoryAssignmentController extends GenericForwardCom
public class CostCategoryAssignmentRenderer implements RowRenderer {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
ResourcesCostCategoryAssignment assignment =
(ResourcesCostCategoryAssignment) data;

View file

@ -107,7 +107,7 @@ public class LabelTypeCRUDController extends GenericForwardComposer {
gridLabels.addEventListener("onInitRender", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
gridLabels.renderAll();
final Rows rows = gridLabels.getRows();
@ -141,7 +141,7 @@ public class LabelTypeCRUDController extends GenericForwardComposer {
gridLabelTypes.addEventListener("onInitRender", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
gridLabelTypes.renderAll();
final Rows rows = gridLabelTypes.getRows();

View file

@ -415,7 +415,7 @@ public class LimitingResourcesController extends GenericForwardComposer {
private class LimitingResourceQueueElementsRenderer implements RowRenderer {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
LimitingResourceQueueElementDTO element = (LimitingResourceQueueElementDTO) data;
row.setValue(data);
@ -446,7 +446,7 @@ public class LimitingResourcesController extends GenericForwardComposer {
result.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
LimitingResourceQueueElement queueElement = element.getOriginal();
editResourceAllocation(queueElement);
@ -465,7 +465,7 @@ public class LimitingResourcesController extends GenericForwardComposer {
result.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
showManualAllocationWindow(element.getOriginal());
}
});
@ -480,7 +480,7 @@ public class LimitingResourcesController extends GenericForwardComposer {
result.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
removeUnassignedLimitingResourceQueueElement(element);
}
});
@ -504,7 +504,7 @@ public class LimitingResourcesController extends GenericForwardComposer {
result.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
assignLimitingResourceQueueElement(element);
}
});

View file

@ -53,7 +53,7 @@ public class LimitingResourcesLeftPane extends HtmlMacroComponent {
return new TreeitemRenderer() {
@Override
public void render(Treeitem item, Object data)
throws Exception {
{
LimitingResourceQueue line = (LimitingResourceQueue) data;
item.setOpen(false);
item.setValue(line);

View file

@ -213,7 +213,7 @@ public class LimitingResourcesPanel extends HtmlMacroComponent {
Button result = new Button();
result.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
c.doAction();
}
});

View file

@ -103,7 +103,7 @@ public class ManualAllocationController extends GenericForwardComposer {
}
@Override
public void doAfterCompose(org.zkoss.zk.ui.Component comp) throws Exception {
public void doAfterCompose(org.zkoss.zk.ui.Component comp) {
this.self = comp;
self.setVariable("manualAllocationController", this, true);
listAssignableQueues = (Listbox) self.getFellowIfAny("listAssignableQueues");
@ -234,7 +234,7 @@ public class ManualAllocationController extends GenericForwardComposer {
listAssignableQueues.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
SelectEvent se = (SelectEvent) event;
LimitingResourceQueue queue = getSelectedQueue(se);
@ -476,7 +476,7 @@ public class ManualAllocationController extends GenericForwardComposer {
private static class CandidateGapRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
Gap gap = (Gap) data;
item.setValue(gap);
@ -532,7 +532,7 @@ public class ManualAllocationController extends GenericForwardComposer {
private static class QueueRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
final LimitingResourceQueue queue = (LimitingResourceQueue) data;
item.setValue(queue);
// item.setLabel("test1");

View file

@ -58,7 +58,7 @@ public class QueueTask extends Div {
final String taskUid = this.getUuid();
this.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Clients
.evalJavaScript("zkLimitingDependencies.toggleDependenciesForQueueElement('"
+ taskUid + "')");

View file

@ -113,7 +113,7 @@ public class MaterialsController extends
gridMaterials.addEventListener("onInitRender", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
gridMaterials.renderAll();
final Rows rows = gridMaterials.getRows();
@ -177,21 +177,21 @@ public class MaterialsController extends
* Copied verbatim from org.zkoss.zul.Tree;
*/
@Override
public void render(Treeitem ti, Object node) throws Exception {
public void render(Treeitem ti, Object node) {
final MaterialCategory materialCategory = (MaterialCategory) node;
final Textbox tb = new Textbox(materialCategory.getName());
tb.setWidth("90%");
tb.addEventListener("onChange", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
final InputEvent ie = (InputEvent) event;
materialCategory.setName(ie.getValue());
}
});
tb.addEventListener("onFocus", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
((Treeitem)tb.getParent().getParent().getParent()).setSelected(true);
refreshMaterials();
}
@ -216,14 +216,14 @@ public class MaterialsController extends
codeTb.setDisabled(materialCategory.isCodeAutogenerated());
codeTb.addEventListener("onChange", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
final InputEvent ie = (InputEvent) event;
materialCategory.setCode(ie.getValue());
}
});
codeTb.addEventListener("onFocus", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
((Treeitem)codeTb.getParent().getParent().getParent()).setSelected(true);
refreshMaterials();
}
@ -236,7 +236,7 @@ public class MaterialsController extends
cb.setChecked(materialCategory.isCodeAutogenerated());
cb.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
final CheckEvent ce = (CheckEvent) event;
materialCategory.setCodeAutogenerated(ce.isChecked());
if (ce.isChecked()) {
@ -271,7 +271,7 @@ public class MaterialsController extends
btnDelete.setTooltiptext(_("Delete"));
btnDelete.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
confirmRemove(materialCategory);
}
});
@ -537,7 +537,7 @@ public class MaterialsController extends
*/
public static class UnitTypeListRenderer implements ListitemRenderer {
@Override
public void render(Listitem listItem, Object data) throws Exception {
public void render(Listitem listItem, Object data) {
final UnitType unitType = (UnitType) data;
listItem.setValue(unitType);

View file

@ -95,14 +95,14 @@ public class UnitTypeController extends GenericForwardComposer {
return new RowRenderer() {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
final UnitType unitType = (UnitType) data;
appendUnitTypeName(row, unitType);
appendOperations(row, unitType);
row.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditFormInEditionMode(unitType);
}
});
@ -118,7 +118,7 @@ public class UnitTypeController extends GenericForwardComposer {
hbox.appendChild(Util.createEditButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditFormInEditionMode(unitType);
}
}));
@ -126,7 +126,7 @@ public class UnitTypeController extends GenericForwardComposer {
hbox.appendChild(Util.createRemoveButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
confirmRemove(unitType);
}
}));
@ -184,8 +184,7 @@ public class UnitTypeController extends GenericForwardComposer {
return new Constraint() {
@Override
public void validate(Component comp, Object value)
throws WrongValueException {
public void validate(Component comp, Object value) {
String strValue = (String) value;
if (StringUtils.isBlank(strValue)) {
throw new WrongValueException(comp,
@ -207,8 +206,7 @@ public class UnitTypeController extends GenericForwardComposer {
return new Constraint() {
@Override
public void validate(Component comp, Object value)
throws WrongValueException {
public void validate(Component comp, Object value) {
String strValue = (String) value;
if (StringUtils.isBlank(strValue)) {
throw new WrongValueException(comp,

View file

@ -104,7 +104,7 @@ public class MonteCarloController extends GenericForwardComposer {
lbCriticalPaths.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
reloadGridCritialPathTasks();
}
@ -113,7 +113,7 @@ public class MonteCarloController extends GenericForwardComposer {
btnRunMonteCarlo.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
validateRowsPercentages();
IBackGroundOperation<IDesktopUpdate> operation = new IBackGroundOperation<IDesktopUpdate>() {
@ -306,7 +306,7 @@ public class MonteCarloController extends GenericForwardComposer {
private static class CriticalPathTasksRender implements RowRenderer {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
row.setValue(data);
MonteCarloTask task = (MonteCarloTask) data;

View file

@ -269,7 +269,7 @@ public class AssignedTaskQualityFormsToOrderElementController extends
public class TaskQualityFormsRowRenderer implements RowRenderer {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
TaskQualityForm taskQualityForm = (TaskQualityForm) data;
row.setValue(taskQualityForm);
@ -406,7 +406,7 @@ public class AssignedTaskQualityFormsToOrderElementController extends
buttonRemove.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
confirmRemove((TaskQualityForm) row.getValue());
}
});
@ -419,7 +419,7 @@ public class AssignedTaskQualityFormsToOrderElementController extends
public class TaskQualityFormItemsRowRenderer implements RowRenderer {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
TaskQualityFormItem item = (TaskQualityFormItem) data;
row.setValue(item);
@ -490,7 +490,7 @@ public class AssignedTaskQualityFormsToOrderElementController extends
if (!taskQualityForm.isByItems()) {
checkbox.addEventListener(Events.ON_CHECK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
assignedTaskQualityFormsToOrderElementModel
.updatePassedTaskQualityFormItems(taskQualityForm);
Grid gridItems = row.getGrid();

View file

@ -149,7 +149,7 @@ public class DynamicDatebox extends GenericForwardComposer {
component.addEventListener("onChange", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
updateBean();
updateComponents();
}
@ -160,7 +160,7 @@ public class DynamicDatebox extends GenericForwardComposer {
textBox.addEventListener("onOK", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
userWantsDateBox(textBox);
}
});
@ -170,7 +170,7 @@ public class DynamicDatebox extends GenericForwardComposer {
currentDatebox.addEventListener("onOK", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
currentDatebox.setOpen(true);
}
});
@ -180,7 +180,7 @@ public class DynamicDatebox extends GenericForwardComposer {
currentDatebox.addEventListener("onBlur", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
dateBoxHasLostFocus(currentDatebox);
}
});

View file

@ -356,7 +356,7 @@ public class ManageOrderElementAdvancesController extends
public class AdvanceTypeListRenderer implements ListitemRenderer {
@Override
public void render(Listitem listItem, Object data) throws Exception {
public void render(Listitem listItem, Object data) {
final AdvanceAssignment advance = (AdvanceAssignment) data;
listItem.setValue(advance);
listItem.setDraggable("true");
@ -414,7 +414,7 @@ public class ManageOrderElementAdvancesController extends
comboAdvanceTypes.addEventListener(Events.ON_SELECT,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
setMaxValue(listItem, comboAdvanceTypes);
cleanFields(advance);
setPercentage();
@ -495,7 +495,7 @@ public class ManageOrderElementAdvancesController extends
maxValue.addEventListener(Events.ON_CHANGE,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (manageOrderElementAdvancesModel
.hasConsolidatedAdvances(advanceAssignment)) {
showMessagesConsolidation(1);
@ -653,7 +653,7 @@ public class ManageOrderElementAdvancesController extends
chartCheckbox.setChecked(selectedAdvances.contains(advance));
chartCheckbox.addEventListener(Events.ON_CHECK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (chartCheckbox.isChecked()) {
selectedAdvances.add(advance);
} else {
@ -686,7 +686,7 @@ public class ManageOrderElementAdvancesController extends
addMeasurementButton.addEventListener(Events.ON_CLICK,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (!listItem.equals(editAdvances.getSelectedItem())) {
selectAdvanceLine(listItem);
}
@ -716,7 +716,7 @@ public class ManageOrderElementAdvancesController extends
removeButton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToRemoveLineAdvanceAssignment(listItem);
}
});
@ -1024,7 +1024,7 @@ public class ManageOrderElementAdvancesController extends
private class AdvanceMeasurementRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
AdvanceMeasurement advanceMeasurement = (AdvanceMeasurement) data;
item.setValue(advanceMeasurement);
@ -1048,7 +1048,7 @@ public class ManageOrderElementAdvancesController extends
value.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (manageOrderElementAdvancesModel
.canRemoveOrChange(advanceMeasurement)) {
updatesValue(value);
@ -1104,7 +1104,7 @@ public class ManageOrderElementAdvancesController extends
date.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (manageOrderElementAdvancesModel
.canRemoveOrChange(advanceMeasurement)) {
validateMeasurementDate(date, date.getValue());
@ -1180,7 +1180,7 @@ public class ManageOrderElementAdvancesController extends
removeButton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToRemoveLineAdvanceMeasurement(listItem);
}
});

View file

@ -332,7 +332,7 @@ public class OrderCRUDController extends GenericForwardComposer {
schedulingMode.addEventListener(Events.ON_SELECT,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
SchedulingMode chosen = (SchedulingMode) schedulingMode
.getSelectedItem().getValue();
if (chosen != null) {
@ -372,7 +372,7 @@ public class OrderCRUDController extends GenericForwardComposer {
.getFellow("listOrderStatus");
listOrderStatus.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
updateDisabilitiesOnInterface();
}
});
@ -416,7 +416,7 @@ public class OrderCRUDController extends GenericForwardComposer {
tree.setModel(orderElementTreeController.getTreeModel());
tree.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
//undo the work done by this event
//to be able to control it from the ON_CLICK event
tree.clearSelection();
@ -454,7 +454,7 @@ public class OrderCRUDController extends GenericForwardComposer {
private AssignedHoursToOrderElementController assignedHoursController;
public void setupAssignedHoursToOrderElementController() throws Exception {
public void setupAssignedHoursToOrderElementController() {
if (!confirmLastTab()) {
return;
}
@ -473,7 +473,7 @@ public class OrderCRUDController extends GenericForwardComposer {
private ManageOrderElementAdvancesController manageOrderElementAdvancesController;
public void setupManageOrderElementAdvancesController() throws Exception {
public void setupManageOrderElementAdvancesController() {
if (!confirmLastTab()) {
return;
}
@ -495,8 +495,7 @@ public class OrderCRUDController extends GenericForwardComposer {
private AssignedLabelsToOrderElementController assignedLabelsController;
public void setupAssignedLabelsToOrderElementController()
throws Exception {
public void setupAssignedLabelsToOrderElementController() {
if (!confirmLastTab()) {
return;
}
@ -514,8 +513,7 @@ public class OrderCRUDController extends GenericForwardComposer {
private AssignedCriterionRequirementToOrderElementController assignedCriterionRequirementController;
public void setupAssignedCriterionRequirementsToOrderElementController()
throws Exception {
public void setupAssignedCriterionRequirementsToOrderElementController() {
if (!confirmLastTab()) {
return;
}
@ -537,8 +535,7 @@ public class OrderCRUDController extends GenericForwardComposer {
private AssignedMaterialsToOrderElementController assignedMaterialsController;
public void setupAssignedMaterialsToOrderElementController()
throws Exception {
public void setupAssignedMaterialsToOrderElementController() {
if (!confirmLastTab()) {
return;
}
@ -557,7 +554,7 @@ public class OrderCRUDController extends GenericForwardComposer {
private AssignedTaskQualityFormsToOrderElementController assignedTaskQualityFormController;
public void setupAssignedTaskQualityFormsToOrderElementController() throws Exception {
public void setupAssignedTaskQualityFormsToOrderElementController() {
if (!confirmLastTab()) {
return;
}
@ -995,7 +992,7 @@ public class OrderCRUDController extends GenericForwardComposer {
bdExternalCompanies.setListboxEventListener(
Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
final Object object = bdExternalCompanies
.getSelectedElement();
orderModel.setExternalCompany((ExternalCompany) object);
@ -1004,7 +1001,7 @@ public class OrderCRUDController extends GenericForwardComposer {
bdExternalCompanies.setListboxEventListener(Events.ON_OK,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
final Object object = bdExternalCompanies
.getSelectedElement();
orderModel.setExternalCompany((ExternalCompany) object);
@ -1128,7 +1125,7 @@ public class OrderCRUDController extends GenericForwardComposer {
private class BaseCalendarsComboitemRenderer implements ComboitemRenderer {
@Override
public void render(Comboitem item, Object data) throws Exception {
public void render(Comboitem item, Object data) {
BaseCalendar calendar = (BaseCalendar) data;
item.setLabel(calendar.getName());
item.setValue(calendar);
@ -1181,7 +1178,7 @@ public class OrderCRUDController extends GenericForwardComposer {
public class OrdersRowRenderer implements RowRenderer {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
final Order order = (Order) data;
row.setValue(order);
@ -1199,7 +1196,7 @@ public class OrderCRUDController extends GenericForwardComposer {
row.setTooltiptext(getTooltipText(order));
row.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditForm(order);
}
});
@ -1252,7 +1249,7 @@ public class OrderCRUDController extends GenericForwardComposer {
buttonEdit.setTooltiptext(_("Edit"));
buttonEdit.addEventListener("onClick",new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditForm(order);
}
});
@ -1268,7 +1265,7 @@ public class OrderCRUDController extends GenericForwardComposer {
buttonDelete.setTooltiptext(_("Delete"));
buttonDelete.addEventListener("onClick",new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
confirmRemove(order);
}
});
@ -1284,7 +1281,7 @@ public class OrderCRUDController extends GenericForwardComposer {
buttonPlan.setTooltiptext(_("See scheduling"));
buttonPlan.addEventListener("onClick",new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
schedule(order);
}
});
@ -1299,7 +1296,7 @@ public class OrderCRUDController extends GenericForwardComposer {
buttonDerived.setTooltiptext(_("Create Template"));
buttonDerived.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
createTemplate(order);
}
});

View file

@ -92,7 +92,7 @@ public class OrderElementController extends GenericForwardComposer {
setupDetailsOrderElementController();
}
private void setupDetailsOrderElementController() throws Exception {
private void setupDetailsOrderElementController() {
detailsController = (DetailsOrderElementController)
orderElementDetails.getVariable("detailsController", true);
}
@ -102,7 +102,7 @@ public class OrderElementController extends GenericForwardComposer {
Util.reloadBindings(comp);
}
public void setupAssignedHoursToOrderElementController() throws Exception {
public void setupAssignedHoursToOrderElementController() {
if (assignedHoursToOrderElementController == null) {
assignedHoursToOrderElementController = (AssignedHoursToOrderElementController) orderElementHours
.getVariable("assignedHoursToOrderElementController", true);
@ -122,7 +122,7 @@ public class OrderElementController extends GenericForwardComposer {
}
public void setupManageOrderElementAdvancesController()
throws Exception {
{
if (manageOrderElementAdvancesController == null) {
manageOrderElementAdvancesController = (ManageOrderElementAdvancesController) orderElementAdvances
.getVariable("manageOrderElementAdvancesController", true);
@ -135,7 +135,7 @@ public class OrderElementController extends GenericForwardComposer {
}
}
public void setupAssignedLabelsToOrderElementController()throws Exception {
public void setupAssignedLabelsToOrderElementController(){
if (assignedLabelsController == null) {
assignedLabelsController = orderElementLabels.getController();
assignedLabelsController.openWindow(orderElementModel);
@ -145,7 +145,7 @@ public class OrderElementController extends GenericForwardComposer {
}
public void setupAssignedCriterionRequirementToOrderElementController()
throws Exception {
{
if (assignedCriterionRequirementController == null) {
assignedCriterionRequirementController = (AssignedCriterionRequirementToOrderElementController) orderElementCriterionRequirements
.getVariable("assignedCriterionRequirementController", true);
@ -157,7 +157,7 @@ public class OrderElementController extends GenericForwardComposer {
}
public void setupAssignedMaterialsToOrderElementController()
throws Exception {
{
if (assignedMaterialsController == null) {
assignedMaterialsController = orderElementMaterials.getController();
assignedMaterialsController.openWindow(getOrderElement());
@ -167,7 +167,7 @@ public class OrderElementController extends GenericForwardComposer {
}
public void setupAssignedTaskQualityFormsToOrderElementController()
throws Exception {
{
if (assignedTaskQualityFormsController == null) {
assignedTaskQualityFormsController = (AssignedTaskQualityFormsToOrderElementController) orderElementTaskQualityForms
.getVariable("assignedTaskQualityFormsController", true);

View file

@ -282,7 +282,7 @@ public class OrderElementTreeController extends TreeController<OrderElement> {
expandAllButton.setImage("/common/img/ico_expand.png");
expandAllButton.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (expandAllButton.getSclass().equals("planner-command")) {
expandAll();
expandAllButton.setSclass("planner-command clicked");
@ -472,7 +472,7 @@ public class OrderElementTreeController extends TreeController<OrderElement> {
_("Edit"), "/common/img/ico_editar.png", "icono",
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
showEditionOrderElement(item);
}
});

View file

@ -238,7 +238,7 @@ public class ProjectDetailsController extends GenericForwardComposer {
bdExternalCompanies.setListboxEventListener(Events.ON_SELECT,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
final Object object = bdExternalCompanies
.getSelectedElement();
getOrder().setCustomer((ExternalCompany) object);
@ -247,7 +247,7 @@ public class ProjectDetailsController extends GenericForwardComposer {
bdExternalCompanies.setListboxEventListener(Events.ON_OK,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
final Object object = bdExternalCompanies
.getSelectedElement();
getOrder().setCustomer((ExternalCompany) object);
@ -256,7 +256,7 @@ public class ProjectDetailsController extends GenericForwardComposer {
});
txtName.addEventListener(Events.ON_OK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
accept();
}
});

View file

@ -145,7 +145,7 @@ public class TemplateFinderPopup extends
acceptButton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
onAccept();
}
});
@ -154,7 +154,7 @@ public class TemplateFinderPopup extends
cancelButton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
onCancel();
}
});

View file

@ -619,7 +619,7 @@ public abstract class AssignedCriterionRequirementController<T, M> extends
public class HoursGroupListitemRender implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
final HoursGroup hoursGroup = (HoursGroup) data;
// Criterion Requirements hours Group

View file

@ -293,7 +293,7 @@ public abstract class AssignedMaterialsController<T, A> extends GenericForwardCo
* Copied verbatim from org.zkoss.zul.Tree;
*/
@Override
public void render(Treeitem ti, Object node) throws Exception {
public void render(Treeitem ti, Object node) {
final MaterialCategory materialCategory = (MaterialCategory) node;
Label lblName = new Label(materialCategory.getName());
@ -313,7 +313,7 @@ public abstract class AssignedMaterialsController<T, A> extends GenericForwardCo
cellName.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
getModel().searchMaterials("", materialCategory);
Util.reloadBindings(lbFoundMaterials);
}
@ -333,7 +333,7 @@ public abstract class AssignedMaterialsController<T, A> extends GenericForwardCo
* Copied verbatim from org.zkoss.zul.Tree;
*/
@Override
public void render(Treeitem ti, Object node) throws Exception {
public void render(Treeitem ti, Object node) {
final MaterialCategory materialCategory = (MaterialCategory) node;
Label lblName = new Label(materialCategory.getName());
@ -537,7 +537,7 @@ public abstract class AssignedMaterialsController<T, A> extends GenericForwardCo
*/
public class UnitTypeListRenderer implements ListitemRenderer {
@Override
public void render(Listitem listItem, Object data) throws Exception {
public void render(Listitem listItem, Object data) {
final UnitType unitType = (UnitType) data;
listItem.setValue(unitType);

View file

@ -1001,7 +1001,7 @@ public class AdvancedAllocationController extends GenericForwardComposer {
return new Callable<PairOfLists<Row, Row>>() {
@Override
public PairOfLists<Row, Row> call() throws Exception {
public PairOfLists<Row, Row> call() {
List<Row> rows = getRows();
return new PairOfLists<Row, Row>(rows, rows);
}
@ -1183,7 +1183,7 @@ class Row {
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
EffortDuration value = effortDurationBox
.getEffortDurationValue();
@ -1252,7 +1252,8 @@ class Row {
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event)
throws InterruptedException {
final String currentValue = assignmentFunctionsCombo.getValue();
if (currentValue.equals(getPreviousValue())) {
return;
@ -1467,7 +1468,7 @@ class Row {
button.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
IAssignmentFunctionConfiguration configuration = (IAssignmentFunctionConfiguration) assignmentFunctionsCombo
.getSelectedItem().getValue();
configuration.goToConfigure();
@ -1558,7 +1559,7 @@ class Row {
component.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
EffortDuration value = effortBox.getEffortDurationValue();
LocalDate startDate = restriction.limitStartDate(item
.getStartDate().toLocalDate());

View file

@ -74,7 +74,7 @@ public class AllocationConfiguration extends HtmlMacroComponent {
calculationTypeSelector.addEventListener(Events.ON_CHECK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
taskWorkableDays.clearErrorMessage(true);
setCalculationTypeSelected(calculationTypeSelector
.getSelectedItem().getValue());

View file

@ -99,7 +99,7 @@ public class FormBinder {
private EventListener onChangeEnableApply = new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Component target = event.getTarget();
if (target instanceof InputElement) {
InputElement inputElement = (InputElement) target;
@ -137,7 +137,7 @@ public class FormBinder {
private EventListener hoursRowInputChange = new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (effortInput.isDisabled()) {
effortInput.setValue(sumAllEffortFromInputs(rows));
}
@ -147,7 +147,7 @@ public class FormBinder {
private EventListener resourcesPerDayRowInputChange = new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (allResourcesPerDay.isDisabled()) {
sumResourcesPerDayFromRowsAndAssignToAllResourcesPerDay();
}
@ -157,7 +157,7 @@ public class FormBinder {
private EventListener allHoursInputChange = new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (!effortInput.isDisabled()) {
distributeHoursFromTotalToRows();
}
@ -167,7 +167,7 @@ public class FormBinder {
private EventListener allResourcesPerDayChange = new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (!allResourcesPerDay.isDisabled()) {
distributeResourcesPerDayToRows();
}
@ -295,7 +295,7 @@ public class FormBinder {
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Task task = getTask();
Integer workableDays = taskWorkableDays.getValue();
if (allocationRowsHandler.isForwardsAllocation()) {
@ -550,7 +550,7 @@ public class FormBinder {
applyButtonListener = new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
doApply();
FormBinder.this.applyButton.setDisabled(true);
}
@ -575,7 +575,7 @@ public class FormBinder {
deleteButton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
applyButton.setDisabled(false);
}
});
@ -661,7 +661,7 @@ public class FormBinder {
Util.ensureUniqueListener(recommendedAllocation, Events.ON_CLICK,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
activatingRecommendedAllocation();
}
});
@ -670,7 +670,7 @@ public class FormBinder {
public EventListener getRecommendedAllocationListener() {
return new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
activatingRecommendedAllocation();
}
};

View file

@ -616,7 +616,7 @@ public class ResourceAllocationController extends GenericForwardComposer {
private class ResourceAllocationRenderer implements RowRenderer {
@Override
public void render(Row item, Object data) throws Exception {
public void render(Row item, Object data) {
if (data instanceof AllocationRow) {
AllocationRow row = (AllocationRow) data;
renderResourceAllocation(item, row);
@ -626,7 +626,7 @@ public class ResourceAllocationController extends GenericForwardComposer {
}
private void renderResourceAllocation(Row row, final AllocationRow data)
throws Exception {
{
row.setValue(data);
append(row, data.createDetail());
append(row, new Label(data.getName()));
@ -653,7 +653,7 @@ public class ResourceAllocationController extends GenericForwardComposer {
deleteButton.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
removeAllocation(data);
}
});

View file

@ -270,7 +270,7 @@ public class StretchesFunctionController extends GenericForwardComposer {
private final BigDecimal ONE_HUNDRED = BigDecimal.valueOf(100);
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
Stretch stretch = (Stretch) data;
item.setValue(stretch);
@ -409,7 +409,7 @@ public class StretchesFunctionController extends GenericForwardComposer {
button.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
stretchesFunctionModel.removeStretch(stretch);
reloadStretchesListAndCharts();
}

View file

@ -159,7 +159,7 @@ public class CompanyPlanningController implements Composer {
cbProgressTypes.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
planner.updateCompletion(getSelectedProgressType().toString());
}
@ -175,7 +175,7 @@ public class CompanyPlanningController implements Composer {
private static class ProgressTypeRenderer implements ComboitemRenderer {
@Override
public void render(Comboitem item, Object data) throws Exception {
public void render(Comboitem item, Object data) {
ProgressType progressType = (ProgressType) data;
item.setValue(progressType);
item.setLabel(_(progressType.getValue()));

View file

@ -303,7 +303,7 @@ public abstract class CompanyPlanningModel implements ICompanyPlanningModel {
((South) planner.getFellow("graphics")).addEventListener("onOpen",
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
transactionService
.runOnReadOnlyTransaction(new IOnTransaction<Void>() {
@Override
@ -378,7 +378,7 @@ public abstract class CompanyPlanningModel implements ICompanyPlanningModel {
datebox.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
LocalDate date = new LocalDate(datebox.getValue());
org.zkoss.zk.ui.Component child = vbox
.getFellow("indicatorsTable");
@ -559,7 +559,7 @@ public abstract class CompanyPlanningModel implements ICompanyPlanningModel {
checkbox.addEventListener(Events.ON_CHECK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
transactionService
.runOnReadOnlyTransaction(new IOnTransaction<Void>() {
@Override

View file

@ -181,7 +181,7 @@ public class LimitingResourceAllocationController extends GenericForwardComposer
public class GridLimitingAllocationRenderer implements RowRenderer {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
LimitingAllocationRow resourceAllocation = (LimitingAllocationRow) data;
row.appendChild(label(resourceAllocation.getAllocationTypeStr()));
@ -248,7 +248,7 @@ public class LimitingResourceAllocationController extends GenericForwardComposer
listbox.addEventListener("onSelect", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
String priority = getSelectedValue((Listbox) event.getTarget());
resourceAllocation.setPriorityStr(priority);
}

View file

@ -157,7 +157,7 @@ public class OrderPlanningController implements Composer {
}
@Override
public void doAfterCompose(org.zkoss.zk.ui.Component comp) throws Exception {
public void doAfterCompose(org.zkoss.zk.ui.Component comp) {
this.planner = (Planner) comp;
String zoomLevelParameter = null;
if ((parameters != null) && (parameters.get("zoom") != null)
@ -245,7 +245,7 @@ public class OrderPlanningController implements Composer {
LongOperationFeedback.execute(orderElementFilter, new ILongOperation() {
@Override
public void doAction() throws Exception {
public void doAction() {
model.forceLoadLabelsAndCriterionRequirements();
final IContext<?> context = planner.getContext();

View file

@ -788,7 +788,7 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
datebox.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
LocalDate date = new LocalDate(datebox.getValue());
org.zkoss.zk.ui.Component child = vbox
.getFellow("indicatorsTable");
@ -897,7 +897,7 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
checkbox.addEventListener(Events.ON_CHECK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
transactionService
.runOnReadOnlyTransaction(new IOnTransaction<Void>() {
@Override

View file

@ -133,7 +133,7 @@ public class ReassignCommand implements IReassignCommand {
new Callable<String>() {
@Override
public String call() throws Exception {
public String call() {
return _("{0} reassignations finished",
reassignations.size());
}
@ -144,7 +144,7 @@ public class ReassignCommand implements IReassignCommand {
new Callable<String>() {
@Override
public String call() throws Exception {
public String call() {
return _("It couldn't complete all the reassignations");
}
})));
@ -248,7 +248,7 @@ public class ReassignCommand implements IReassignCommand {
relativeTo.addEventListener(eventName, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
relativeTo.removeEventListener(eventName, this);
try {
Messagebox.show(resolve(message),

View file

@ -118,7 +118,7 @@ public class ReassignController extends GenericForwardComposer {
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Radio selectedItem = reassigningTypeSelector
.getSelectedItem();
newTypeChoosen(Type.fromRadio(selectedItem));

View file

@ -107,7 +107,7 @@ public class MultipleTabsPlannerController implements Composer,
}
@Override
public void doAction() throws Exception {
public void doAction() {
proxiedTab.show();
}
});
@ -313,7 +313,7 @@ public class MultipleTabsPlannerController implements Composer,
private EventListener showPlanningTab() {
return new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
getTabsRegistry().show(planningTab);
}
};
@ -367,7 +367,7 @@ public class MultipleTabsPlannerController implements Composer,
@Override
@Transactional(readOnly=true)
public void doAfterCompose(org.zkoss.zk.ui.Component comp) throws Exception {
public void doAfterCompose(org.zkoss.zk.ui.Component comp) {
Planner.registerNeededScripts();
tabsSwitcher = (TabSwitcher) comp;
breadcrumbs = comp.getPage().getFellow("breadcrumbs");

View file

@ -33,7 +33,6 @@ import org.navalplanner.business.planner.entities.Task;
import org.navalplanner.business.planner.entities.TaskElement;
import org.navalplanner.business.workingday.EffortDuration;
import org.navalplanner.business.workingday.IntraDayDate;
import org.navalplanner.web.common.EffortDurationBox;
import org.navalplanner.web.common.IMessagesForUser;
import org.navalplanner.web.common.Level;
import org.navalplanner.web.common.MessagesForUser;

View file

@ -293,7 +293,7 @@ public class TaskPropertiesController extends GenericForwardComposer {
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
PositionConstraintType constraint = (PositionConstraintType) startConstraintTypes
.getSelectedItemApi().getValue();
constraintTypeChoosen(constraint);
@ -303,7 +303,7 @@ public class TaskPropertiesController extends GenericForwardComposer {
lbResourceAllocationType.addEventListener(Events.ON_SELECT, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
SelectEvent se = (SelectEvent) event;
final ResourceAllocationTypeEnum oldState = getOldState();

View file

@ -173,7 +173,7 @@ public class HoursWorkedPerWorkerController extends NavalplannerReportController
public class ResourceListRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
final Resource resource = (Resource) data;
item.setValue(resource);
@ -233,7 +233,7 @@ public class HoursWorkedPerWorkerController extends NavalplannerReportController
delete.setTooltiptext(_("Delete"));
delete.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
onRemoveResource((Resource) item.getValue());
}
});

View file

@ -258,7 +258,7 @@ public class TimeLineRequiredMaterialController extends
* Copied verbatim from org.zkoss.zul.Tree;
*/
@Override
public void render(Treeitem ti, Object node) throws Exception {
public void render(Treeitem ti, Object node) {
Label lblName = null;
if (node instanceof MaterialCategory) {
final MaterialCategory materialCategory = (MaterialCategory) node;

View file

@ -151,7 +151,7 @@ public class ResourceLoadController implements Composer {
}
@Override
public void doAfterCompose(org.zkoss.zk.ui.Component comp) throws Exception {
public void doAfterCompose(org.zkoss.zk.ui.Component comp) {
this.parent = comp;
}
@ -328,7 +328,7 @@ public class ResourceLoadController implements Composer {
button.setTooltip(_("Filter by worker"));
button.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if(currentFilterByResources) {
filterResourcesFromBandbox();
}
@ -354,7 +354,7 @@ public class ResourceLoadController implements Composer {
initDate.setWidth("75px");
initDate.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
resourceLoadModel.setInitDateFilter(LocalDate
.fromDateFields(initDate.getValue()));
reload(currentFilterByResources);
@ -365,7 +365,7 @@ public class ResourceLoadController implements Composer {
endDate.setWidth("75px");
endDate.addEventListener(Events.ON_CHANGE, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
resourceLoadModel.setEndDateFilter(LocalDate
.fromDateFields(endDate.getValue()));
reload(currentFilterByResources);

View file

@ -107,7 +107,7 @@ public class CriterionTreeController extends GenericForwardComposer {
}
@Override
public void render(Treeitem item, Object data) throws Exception {
public void render(Treeitem item, Object data) {
final CriterionDTO criterionForThisRow = (CriterionDTO) data;
item.setValue(data);
@ -156,7 +156,7 @@ public class CriterionTreeController extends GenericForwardComposer {
checkboxActive.addEventListener(Events.ON_CHECK,new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
getModel().updateEnabledCriterions(criterionForThisRow.isActive(),criterionForThisRow);
reloadTree();
}
@ -210,7 +210,7 @@ public class CriterionTreeController extends GenericForwardComposer {
upbutton.setSclass("icono");
upbutton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
getModel().down(criterionForThisRow);
reloadTree();
}
@ -222,7 +222,7 @@ public class CriterionTreeController extends GenericForwardComposer {
downbutton.setSclass("icono");
downbutton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
getModel().up(criterionForThisRow);
reloadTree();
}
@ -233,7 +233,7 @@ public class CriterionTreeController extends GenericForwardComposer {
if(getModel().getCriterionType().allowHierarchy()){
indentbutton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
getModel().indent(criterionForThisRow);
reloadTree();
}
@ -246,7 +246,7 @@ public class CriterionTreeController extends GenericForwardComposer {
unindentbutton.addEventListener(Events.ON_CLICK,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
getModel().unindent(criterionForThisRow);
reloadTree();
}
@ -258,7 +258,7 @@ public class CriterionTreeController extends GenericForwardComposer {
if (criterionsModel.isDeletable(criterionForThisRow.getCriterion())) {
removebutton.addEventListener(Events.ON_CLICK, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
getModel().removeNode(criterionForThisRow);
if (!criterionForThisRow.isNewObject()) {
criterionsModel
@ -275,7 +275,7 @@ public class CriterionTreeController extends GenericForwardComposer {
@Override
public void onEvent(org.zkoss.zk.ui.event.Event arg0)
throws Exception {
{
DropEvent dropEvent = (DropEvent) arg0;
move((Component) dropEvent.getTarget(),
(Component) dropEvent.getDragged());
@ -407,7 +407,7 @@ public class CriterionTreeController extends GenericForwardComposer {
Util.reloadBindings(tree);
}
private String getName() throws ValidationException{
private String getName() {
String name = criterionName.getValue();
getModel().thereIsOtherWithSameNameAndType(name);
getModel().validateNameNotEmpty(name);

View file

@ -178,14 +178,14 @@ public class MachineCRUDController extends GenericForwardComposer {
criterionsController.doAfterCompose(comp);
}
private void setupConfigurationController() throws Exception {
private void setupConfigurationController() {
configurationUnits = editWindow.getFellow("configurationUnits");
configurationController = (MachineConfigurationController) configurationUnits
.getVariable("configurationController", true);
}
private void setupResourcesCostCategoryAssignmentController(Component comp)
throws Exception {
{
Component costCategoryAssignmentContainer =
editWindow.getFellowIfAny("costCategoryAssignmentContainer");
resourcesCostCategoryAssignmentController = (ResourcesCostCategoryAssignmentController)
@ -459,7 +459,7 @@ public class MachineCRUDController extends GenericForwardComposer {
private class BaseCalendarsComboitemRenderer implements ComboitemRenderer {
@Override
public void render(Comboitem item, Object data) throws Exception {
public void render(Comboitem item, Object data) {
BaseCalendar calendar = (BaseCalendar) data;
item.setLabel(calendar.getName());
item.setValue(calendar);
@ -649,14 +649,14 @@ public class MachineCRUDController extends GenericForwardComposer {
return new RowRenderer() {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
final Machine machine = (Machine) data;
row.setValue(machine);
row.addEventListener(Events.ON_CLICK,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditForm(machine);
}
});
@ -670,13 +670,13 @@ public class MachineCRUDController extends GenericForwardComposer {
Hbox hbox = new Hbox();
hbox.appendChild(Util.createEditButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditForm(machine);
}
}));
hbox.appendChild(Util.createRemoveButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
confirmRemove(machine);
}
}));

View file

@ -112,7 +112,7 @@ public class NewAllocationSelectorController extends
// Whenever an element of the tree is selected, a search query
// is executed, refreshing the results into the workers listbox
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
searchResources("", getSelectedCriterions());
showSelectedAllocations();
}
@ -127,7 +127,7 @@ public class NewAllocationSelectorController extends
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
if (isGenericType()) {
returnToSpecificDueToResourceSelection();
}
@ -144,7 +144,7 @@ public class NewAllocationSelectorController extends
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Radio radio = (Radio) event.getTarget();
if (radio == null) {
return;
@ -474,7 +474,7 @@ public class NewAllocationSelectorController extends
private static class ResourceListRenderer implements ListitemRenderer {
@Override
public void render(Listitem item, Object data) throws Exception {
public void render(Listitem item, Object data) {
item.setValue((Resource) data);
appendLabelResource(item);
@ -517,7 +517,7 @@ public class NewAllocationSelectorController extends
* Copied verbatim from org.zkoss.zul.Tree;
*/
@Override
public void render(Treeitem ti, Object node) throws Exception {
public void render(Treeitem ti, Object node) {
Treecell tc = new Treecell(Objects.toString(node));
Treerow tr = null;
ti.setValue(node);

View file

@ -92,7 +92,7 @@ public class LocalizationsController extends GenericForwardComposer {
unassignButton.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
workerModel.unassignSatisfactions(
extractValuesOf(activeSatisfactions.getSelectedItems(),
CriterionSatisfaction.class));
@ -103,7 +103,7 @@ public class LocalizationsController extends GenericForwardComposer {
assignButton.addEventListener("onClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
Set<Listitem> selectedItems = criterionsNotAssigned
.getSelectedItems();
workerModel.assignCriteria(

View file

@ -47,8 +47,8 @@ import org.navalplanner.web.common.OnlyOneVisible;
import org.navalplanner.web.common.Util;
import org.navalplanner.web.common.components.bandboxsearch.BandboxMultipleSearch;
import org.navalplanner.web.common.components.finders.FilterPair;
import org.navalplanner.web.common.entrypoints.IURLHandlerRegistry;
import org.navalplanner.web.common.entrypoints.EntryPointsHandler;
import org.navalplanner.web.common.entrypoints.IURLHandlerRegistry;
import org.navalplanner.web.costcategories.ResourcesCostCategoryAssignmentController;
import org.navalplanner.web.resources.search.ResourcePredicate;
import org.zkoss.zk.ui.Component;
@ -365,15 +365,14 @@ public class WorkerCRUDController extends GenericForwardComposer implements
clearFilterDates();
}
private void setupResourcesCostCategoryAssignmentController(Component comp)
throws Exception {
private void setupResourcesCostCategoryAssignmentController(Component comp) {
Component costCategoryAssignmentContainer =
editWindow.getFellowIfAny("costCategoryAssignmentContainer");
resourcesCostCategoryAssignmentController = (ResourcesCostCategoryAssignmentController)
costCategoryAssignmentContainer.getVariable("assignmentController", true);
}
private void editAsignedCriterions(){
private void editAsignedCriterions() {
try{
setupCriterionsController();
criterionsController.prepareForEdit( workerModel.getWorker());
@ -391,7 +390,7 @@ public class WorkerCRUDController extends GenericForwardComposer implements
}
}
private void setupCriterionsController()throws Exception {
private void setupCriterionsController() throws Exception {
criterionsController = new CriterionsController(workerModel);
criterionsController.doAfterCompose(getCurrentWindow().
getFellow("criterionsContainer"));
@ -543,7 +542,7 @@ public class WorkerCRUDController extends GenericForwardComposer implements
private class BaseCalendarsComboitemRenderer implements ComboitemRenderer {
@Override
public void render(Comboitem item, Object data) throws Exception {
public void render(Comboitem item, Object data) {
BaseCalendar calendar = (BaseCalendar) data;
item.setLabel(calendar.getName());
item.setValue(calendar);
@ -842,14 +841,14 @@ public class WorkerCRUDController extends GenericForwardComposer implements
return new RowRenderer() {
@Override
public void render(Row row, Object data) throws Exception {
public void render(Row row, Object data) {
final Worker worker = (Worker) data;
row.setValue(worker);
row.addEventListener(Events.ON_CLICK,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditForm(worker);
}
});
@ -864,13 +863,13 @@ public class WorkerCRUDController extends GenericForwardComposer implements
Hbox hbox = new Hbox();
hbox.appendChild(Util.createEditButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditForm(worker);
}
}));
hbox.appendChild(Util.createRemoveButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
confirmRemove(worker);
}
}));

View file

@ -156,7 +156,7 @@ public class ScenarioCRUDController extends GenericForwardComposer {
public class ScenariosTreeitemRenderer implements TreeitemRenderer {
@Override
public void render(final Treeitem item, Object data) throws Exception {
public void render(final Treeitem item, Object data) {
SimpleTreeNode simpleTreeNode = (SimpleTreeNode) data;
final Scenario scenario = (Scenario) simpleTreeNode.getData();
item.setValue(data);
@ -184,7 +184,7 @@ public class ScenarioCRUDController extends GenericForwardComposer {
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToCreateDerivedForm(scenario);
}
@ -194,7 +194,7 @@ public class ScenarioCRUDController extends GenericForwardComposer {
Button editButton = Util.createEditButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
goToEditForm(scenario);
}
@ -204,7 +204,7 @@ public class ScenarioCRUDController extends GenericForwardComposer {
Button removeButton = Util.createRemoveButton(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
scenarioModel.remove(scenario);
Util.reloadBindings(listWindow);
}
@ -226,7 +226,7 @@ public class ScenarioCRUDController extends GenericForwardComposer {
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
public void onEvent(Event event) {
connectTo(scenario);
}

Some files were not shown because too many files have changed in this diff Show more