Skip to content

Instantly share code, notes, and snippets.

@eric-wood
Created November 30, 2012 19:52
Show Gist options
  • Save eric-wood/4178127 to your computer and use it in GitHub Desktop.
Save eric-wood/4178127 to your computer and use it in GitHub Desktop.
final class GraffitiCom {
private static GraffitiClient singleton = null;
private GraffitiCom() {
}
public static void setHost(String hostname, boolean devserver) throws MalformedURLException {
singleton = new GraffitiClient(new URL(hostname), devserver);
}
public static void logIn(final String username, final String password,
final Callback<Boolean> completionCallback) {
singleton.logIn(username, password, completionCallback);
}
public static void uploadImage(final File imageFile,
final Callback<String> completionCallback) {
singleton.uploadImage(imageFile, completionCallback);
}
public static void storePositionedSketch(final PositionedSketch posSketch,
final Callback<PositionedSketch> completionCallback) {
singleton.storePositionedSketch(posSketch, completionCallback);
}
public static void getMyImages(final Callback<Collection<Image>> completionCallback) {
singleton.getMyImages(completionCallback);
}
public static void getMyPositionedSketches(
final Callback<Collection<PositionedSketch>> completionCallback) {
singleton.getMyPositionedSketches(completionCallback);
}
public static void getPublicPositionedSketches(
final Callback<Collection<PositionedSketch>> completionCallback) {
singleton.getPublicPositionedSketches(completionCallback);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment