Loading src/main/java/es/redmic/exception/common/ExceptionType.java +10 −2 Original line number Diff line number Diff line Loading @@ -134,7 +134,11 @@ public enum ExceptionType implements ExceptionTypeItfc { REPORT_ERROR(Constants.REPORT_ERROR), NO_CONTENT(Constants.NO_CONTENT); NO_CONTENT(Constants.NO_CONTENT), // Settings SELECTION_CHANGE_NOT_ALLOWED(Constants.SELECTION_CHANGE_NOT_ALLOWED); // @formatter:on Loading Loading @@ -274,7 +278,11 @@ public enum ExceptionType implements ExceptionTypeItfc { REPORT_ERROR = "ReportError", NO_CONTENT = "NoContentException"; NO_CONTENT = "NoContentException", // Settings SELECTION_CHANGE_NOT_ALLOWED = "SelectionChangeNotAllowedException"; // @formatter:on } Loading src/main/java/es/redmic/exception/settings/SelectionChangeNotAllowedException.java 0 → 100644 +33 −0 Original line number Diff line number Diff line package es.redmic.exception.settings; /*- * #%L * Exceptions * %% * Copyright (C) 2019 REDMIC Project / Server * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import es.redmic.exception.common.ExceptionType; import es.redmic.exception.common.InternalException; public class SelectionChangeNotAllowedException extends InternalException { private static final long serialVersionUID = 1L; public SelectionChangeNotAllowedException() { super(ExceptionType.SELECTION_CHANGE_NOT_ALLOWED); } } src/main/resources/i18n/messages_en_EN.properties +3 −0 Original line number Diff line number Diff line Loading @@ -109,3 +109,6 @@ JobRunningStepNotAllowed=Error. Trying to execute a task without being initiated JobCompletedStepNotAllowed=Error. Trying to finish a task that has not been executed. ReportError=Error. Required report could not be generated. Type {0}. Ids {1}. #Settings SelectionChangeNotAllowedException=Error. Selection could not be changed. Try again. src/main/resources/i18n/messages_es_ES.properties +3 −0 Original line number Diff line number Diff line Loading @@ -109,3 +109,6 @@ JobRunningStepNotAllowed=Error. Intentando ejecutar una tarea sin estar iniciada JobCompletedStepNotAllowed=Error. Intentando finalizar una tarea que no se ha ejecutado. ReportError=Error. No se ha podido generar el report requerido. Tipo {0}. Ids {1}. #Settings SelectionChangeNotAllowedException=Error. No se ha podido cambiar la selección. Inténtelo de nuevo. src/test/java/es/redmic/test/unit/exception/settings/SelectionChangeNotAllowedExceptionTest.java 0 → 100644 +39 −0 Original line number Diff line number Diff line package es.redmic.test.unit.exception.settings; /*- * #%L * Exceptions * %% * Copyright (C) 2019 REDMIC Project / Server * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import java.io.IOException; import org.junit.Test; import es.redmic.exception.common.ExceptionType; import es.redmic.exception.settings.SelectionChangeNotAllowedException; import es.redmic.test.unit.exception.common.BaseExceptionTest; public class SelectionChangeNotAllowedExceptionTest extends BaseExceptionTest { @Test public void checkPattern_IsEqualToMessage_WhenNoLocaleSet() throws IOException { checkMessage(new SelectionChangeNotAllowedException(), ExceptionType.SELECTION_CHANGE_NOT_ALLOWED.toString(), null); } } Loading
src/main/java/es/redmic/exception/common/ExceptionType.java +10 −2 Original line number Diff line number Diff line Loading @@ -134,7 +134,11 @@ public enum ExceptionType implements ExceptionTypeItfc { REPORT_ERROR(Constants.REPORT_ERROR), NO_CONTENT(Constants.NO_CONTENT); NO_CONTENT(Constants.NO_CONTENT), // Settings SELECTION_CHANGE_NOT_ALLOWED(Constants.SELECTION_CHANGE_NOT_ALLOWED); // @formatter:on Loading Loading @@ -274,7 +278,11 @@ public enum ExceptionType implements ExceptionTypeItfc { REPORT_ERROR = "ReportError", NO_CONTENT = "NoContentException"; NO_CONTENT = "NoContentException", // Settings SELECTION_CHANGE_NOT_ALLOWED = "SelectionChangeNotAllowedException"; // @formatter:on } Loading
src/main/java/es/redmic/exception/settings/SelectionChangeNotAllowedException.java 0 → 100644 +33 −0 Original line number Diff line number Diff line package es.redmic.exception.settings; /*- * #%L * Exceptions * %% * Copyright (C) 2019 REDMIC Project / Server * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import es.redmic.exception.common.ExceptionType; import es.redmic.exception.common.InternalException; public class SelectionChangeNotAllowedException extends InternalException { private static final long serialVersionUID = 1L; public SelectionChangeNotAllowedException() { super(ExceptionType.SELECTION_CHANGE_NOT_ALLOWED); } }
src/main/resources/i18n/messages_en_EN.properties +3 −0 Original line number Diff line number Diff line Loading @@ -109,3 +109,6 @@ JobRunningStepNotAllowed=Error. Trying to execute a task without being initiated JobCompletedStepNotAllowed=Error. Trying to finish a task that has not been executed. ReportError=Error. Required report could not be generated. Type {0}. Ids {1}. #Settings SelectionChangeNotAllowedException=Error. Selection could not be changed. Try again.
src/main/resources/i18n/messages_es_ES.properties +3 −0 Original line number Diff line number Diff line Loading @@ -109,3 +109,6 @@ JobRunningStepNotAllowed=Error. Intentando ejecutar una tarea sin estar iniciada JobCompletedStepNotAllowed=Error. Intentando finalizar una tarea que no se ha ejecutado. ReportError=Error. No se ha podido generar el report requerido. Tipo {0}. Ids {1}. #Settings SelectionChangeNotAllowedException=Error. No se ha podido cambiar la selección. Inténtelo de nuevo.
src/test/java/es/redmic/test/unit/exception/settings/SelectionChangeNotAllowedExceptionTest.java 0 → 100644 +39 −0 Original line number Diff line number Diff line package es.redmic.test.unit.exception.settings; /*- * #%L * Exceptions * %% * Copyright (C) 2019 REDMIC Project / Server * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import java.io.IOException; import org.junit.Test; import es.redmic.exception.common.ExceptionType; import es.redmic.exception.settings.SelectionChangeNotAllowedException; import es.redmic.test.unit.exception.common.BaseExceptionTest; public class SelectionChangeNotAllowedExceptionTest extends BaseExceptionTest { @Test public void checkPattern_IsEqualToMessage_WhenNoLocaleSet() throws IOException { checkMessage(new SelectionChangeNotAllowedException(), ExceptionType.SELECTION_CHANGE_NOT_ALLOWED.toString(), null); } }