public void addSpecification(Specification specification) throws GreenPepperServerException
    {
        if(specifications.contains(specification) || specificationNameExists(specification.getName()))
            throw new GreenPepperServerException( GreenPepperServerErrorKey.SPECIFICATION_ALREADY_EXISTS, "Specification already exists");

        specification.setRepository(this);
        specifications.add(specification);
    }
public void addSpecification ( Specification specification ) throws GreenPepperServerException { if ( specifications . contains ( specification ) || specificationNameExists ( specification . getName ( ) ) ) throw new GreenPepperServerException ( GreenPepperServerErrorKey . SPECIFICATION_ALREADY_EXISTS , "Specification already exists" ) ; specification . setRepository ( this ) ; specifications . add ( specification ) ; }
<p>addSpecification.</p>

@param specification a {@link com.greenpepper.server.domain.Specification} object.
@throws com.greenpepper.server.GreenPepperServerException if any.