Commit aceb8f2e authored by Noel Alonso's avatar Noel Alonso
Browse files

Añade expc para imposibilidad de clonar/guardar

Estas excepciones se usarán cuando se va a clonar o guardar una configuración en base
 a un identificador y esta no se encuentra.

Añade tests
parent e613d08e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -138,7 +138,9 @@ public enum ExceptionType implements ExceptionTypeItfc {
	
	// Settings
	
	SELECTION_CHANGE_NOT_ALLOWED(Constants.SELECTION_CHANGE_NOT_ALLOWED);
	SELECTION_CHANGE_NOT_ALLOWED(Constants.SELECTION_CHANGE_NOT_ALLOWED),
	SETTINGS_TO_CLONE_NOT_FOUND_EXCEPTION(Constants.SETTINGS_TO_CLONE_NOT_FOUND_EXCEPTION),
	SETTINGS_TO_SAVE_NOT_FOUND_EXCEPTION(Constants.SETTINGS_TO_SAVE_NOT_FOUND_EXCEPTION);
	
	// @formatter:on

@@ -281,8 +283,9 @@ public enum ExceptionType implements ExceptionTypeItfc {
			NO_CONTENT = "NoContentException",
		
			// Settings
			SELECTION_CHANGE_NOT_ALLOWED = "SelectionChangeNotAllowedException";
		
			SELECTION_CHANGE_NOT_ALLOWED = "SelectionChangeNotAllowedException",
			SETTINGS_TO_CLONE_NOT_FOUND_EXCEPTION = "SettingsToCloneNotFoundException",
			SETTINGS_TO_SAVE_NOT_FOUND_EXCEPTION = "SettingsToSaveNotFoundException";
		// @formatter:on
	}

+34 −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.NotFoundException;

public class SettingsToCloneNotFoundException extends NotFoundException {

	private static final long serialVersionUID = 3658782399097632577L;

	public SettingsToCloneNotFoundException() {

		super(ExceptionType.SETTINGS_TO_CLONE_NOT_FOUND_EXCEPTION);
	}
}
+34 −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.NotFoundException;

public class SettingsToSaveNotFoundException extends NotFoundException {

	private static final long serialVersionUID = 3658782399097632577L;

	public SettingsToSaveNotFoundException() {

		super(ExceptionType.SETTINGS_TO_SAVE_NOT_FOUND_EXCEPTION);
	}
}
+2 −0
Original line number Diff line number Diff line
@@ -112,3 +112,5 @@ ReportError=Error. Required report could not be generated. Type {0}. Ids {1}.

#Settings
SelectionChangeNotAllowedException=Error. Selection could not be changed. Try again.
SettingsToCloneNotFoundException=Error. It is not possible to retrieve the configuration. It may not exist or be accessible.
SettingsToSaveNotFoundException=Error. It is not possible to save your settings. It may not be accessible.
+2 −0
Original line number Diff line number Diff line
@@ -112,3 +112,5 @@ 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.
SettingsToCloneNotFoundException=Error. No es posible recuperar la configuración especificada. Es posible que no exista o no esté accesible.
SettingsToSaveNotFoundException=Error. No es posible guardar su configuración. Es posible que no esté accesible.
Loading