public void addRepository ( UpdateRepository newRepo ) { for ( UpdateRepository ur : repositories ) { if ( ur . getId ( ) . equals ( newRepo . getId ( ) ) ) { throw new RuntimeException ( "Repository with id " + newRepo . getId ( ) + " already exists" ) ; } } newRepo . refresh ( ) ; repositories . add ( newRepo ) ; }
Add a repo that was created by client .