Refactoring: renamed package de.juplo.facebook.exceptions to errors
[facebook-utils] / src / main / java / de / juplo / facebook / exceptions / PageMigratedException.java
diff --git a/src/main/java/de/juplo/facebook/exceptions/PageMigratedException.java b/src/main/java/de/juplo/facebook/exceptions/PageMigratedException.java
deleted file mode 100644 (file)
index 88917dc..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-package de.juplo.facebook.exceptions;
-
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-
-
-/**
- * 21: Page ID (XXX) was migrated to page ID (YYY).
- * @author Kai Moritz
- */
-public class PageMigratedException extends OAuthException
-{
-  private final static Pattern pattern =
-      Pattern.compile("Page ID ([0-9]+) was migrated to page ID ([0-9]+)");
-
-  private final Long oldId, newId;
-
-
-  protected PageMigratedException(FacebookErrorMessage error)
-  {
-    super(error);
-    Matcher matcher = pattern.matcher(error.message);
-    if (!matcher.find())
-    {
-      String warning = "Could not parse migration-error: " + error.message;
-      LOG.error(warning);
-      throw new RuntimeException(warning);
-    }
-    oldId = Long.parseLong(matcher.group(1));
-    newId = Long.parseLong(matcher.group(2));
-  }
-
-
-  public Long getOldId()
-  {
-    return oldId;
-  }
-
-  public Long getNewId()
-  {
-    return newId;
-  }
-}