Project

General

Profile

« Previous | Next » 

Revision c4a57e04

Added by Andreas Müller almost 2 years ago

cleanup and rename RegistrationValidationException to TypeDesignationSetException

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetContainer.java
22 22
import java.util.Set;
23 23
import java.util.UUID;
24 24

  
25
import eu.etaxonomy.cdm.api.service.exception.RegistrationValidationException;
25
import eu.etaxonomy.cdm.api.service.exception.TypeDesignationSetException;
26 26
import eu.etaxonomy.cdm.api.service.name.TypeDesignationSet.TypeDesignationSetType;
27 27
import eu.etaxonomy.cdm.compare.name.NullTypeDesignationStatus;
28 28
import eu.etaxonomy.cdm.compare.name.TypeDesignationStatusComparator;
......
130 130
// **************************** CONSTRUCTOR ***********************************/
131 131

  
132 132
    public TypeDesignationSetContainer(@SuppressWarnings("rawtypes") Collection<TypeDesignationBase> typeDesignations)
133
            throws RegistrationValidationException{
133
            throws TypeDesignationSetException{
134 134
    	this(typeDesignations, null);
135 135
    }
136 136

  
137 137
    public TypeDesignationSetContainer(@SuppressWarnings("rawtypes") Collection<TypeDesignationBase> typeDesignations,
138 138
            TaxonName typifiedName)
139
            throws RegistrationValidationException  {
139
            throws TypeDesignationSetException  {
140 140
        for (TypeDesignationBase<?> typeDes:typeDesignations){
141 141
            this.typeDesignations.put(typeDes.getUuid(), typeDes);
142 142
        }
143 143
        try {
144 144
        	findTypifiedName();
145
        }catch (RegistrationValidationException e) {
145
        }catch (TypeDesignationSetException e) {
146 146
        	if (typifiedName == null) {
147 147
        		throw e;
148 148
        	}
......
277 277
    }
278 278

  
279 279
    //TODO maybe not needed anymore
280
    protected static TypedEntityReference<? extends VersionableEntity> makeEntityReference(VersionableEntity baseEntity) {
280
    private static TypedEntityReference<? extends VersionableEntity> makeEntityReference(VersionableEntity baseEntity) {
281 281

  
282 282
        baseEntity = CdmBase.deproxy(baseEntity);
283 283
        String label = TypeDesignationSetFormatter.entityLabel(baseEntity);
......
321 321
    /**
322 322
     * FIXME use the validation framework validators to store the validation problems!!!
323 323
     *
324
     * @return
325
     * @throws RegistrationValidationException
324
     * @throws TypeDesignationSetException
326 325
     */
327
    private void findTypifiedName() throws RegistrationValidationException {
326
    private void findTypifiedName() throws TypeDesignationSetException {
328 327

  
329 328
        List<String> problems = new ArrayList<>();
330 329

  
......
357 356
        }
358 357
        if(!problems.isEmpty()){
359 358
            // FIXME use the validation framework
360
            throw new RegistrationValidationException("Inconsistent type designations", problems);
359
            throw new TypeDesignationSetException("Inconsistent type designations", problems);
361 360
        }
362 361

  
363 362
        if(typifiedName != null){

Also available in: Unified diff