Skip to content

Commit

Permalink
Implemented bioclipse.assumeOnline() (implements #1940)
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Jun 23, 2010
1 parent 935217c commit c50d15d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Expand Up @@ -23,7 +23,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import net.bioclipse.core.PublishedMethod;
import net.bioclipse.core.business.BioclipseException;
import net.bioclipse.managers.business.IBioclipseManager;

Expand Down Expand Up @@ -239,6 +238,13 @@ public void requireVersion( String version ) throws BioclipseException {
}
}

public void assumeOnline() throws BioclipseException {
if (!isOnline())
throw new BioclipseException(
"Bioclipse does not have internet access."
);
}

public void requireVersion( String lowerVersionBound,
String upperVersionBound )
throws BioclipseException {
Expand Down
Expand Up @@ -61,6 +61,12 @@ public String downloadAsFile(String url, String mimeType,
)
public boolean isOnline();

@PublishedMethod(
methodSummary=
"Throws an exception if Bioclipse does not have internet access."
)
public void assumeOnline() throws BioclipseException;

@PublishedMethod(
methodSummary="Returns a string representation of the current " +
"Bioclipse version")
Expand Down

0 comments on commit c50d15d

Please sign in to comment.