Skip to content

Commit

Permalink
[JENKINS-22967] Polish new api
Browse files Browse the repository at this point in the history
  • Loading branch information
olivergondza committed May 12, 2014
1 parent a5ee2d1 commit 8fc60f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/main/java/hudson/model/DirectlyModifiableView.java
Expand Up @@ -27,6 +27,7 @@

import java.io.IOException;

import javax.annotation.Nonnull;
import javax.servlet.ServletException;

import org.kohsuke.stapler.HttpResponse;
Expand Down Expand Up @@ -54,15 +55,17 @@ public DirectlyModifiableView(String name, ViewGroup owner) {
*
* @return false if item not present in view, true if removed.
* @throws IOException Removal failed.
* @throws IllegalArgumentException View rejected to remove an item.
*/
public abstract boolean remove(TopLevelItem item) throws IOException;
public abstract boolean remove(@Nonnull TopLevelItem item) throws IOException, IllegalArgumentException;

/**
* Add item to this view.
*
* @throws IOException Adding failed.
* @throws IllegalArgumentException View rejected to add an item.
*/
public abstract void add(TopLevelItem item) throws IOException;
public abstract void add(@Nonnull TopLevelItem item) throws IOException, IllegalArgumentException;

/**
* Handle addJobToView web method.
Expand Down

0 comments on commit 8fc60f0

Please sign in to comment.