X-Git-Url: https://juplo.de/gitweb/?p=website;a=blobdiff_plain;f=dist%2Ffacebook-utils-2.5.0%2Fxref%2Fde%2Fjuplo%2Ffacebook%2Fexceptions%2FPageMigratedException.html;fp=dist%2Ffacebook-utils-2.5.0%2Fxref%2Fde%2Fjuplo%2Ffacebook%2Fexceptions%2FPageMigratedException.html;h=ee492adbcc4979333237dc2e4af252800cece7dd;hp=0000000000000000000000000000000000000000;hb=a53595184bd6e57bdc45292cc92c393c4e2dfe6e;hpb=c48c9ee0e9faa89a4c0a5323b367b9f5a6abe602 diff --git a/dist/facebook-utils-2.5.0/xref/de/juplo/facebook/exceptions/PageMigratedException.html b/dist/facebook-utils-2.5.0/xref/de/juplo/facebook/exceptions/PageMigratedException.html new file mode 100644 index 00000000..ee492adb --- /dev/null +++ b/dist/facebook-utils-2.5.0/xref/de/juplo/facebook/exceptions/PageMigratedException.html @@ -0,0 +1,58 @@ + + +
++1 package de.juplo.facebook.exceptions; +2 +3 +4 import java.util.regex.Matcher; +5 import java.util.regex.Pattern; +6 +7 +8 +9 /** +10 * 21: Page ID (XXX) was migrated to page ID (YYY). +11 * @author Kai Moritz +12 */ +13 public class PageMigratedException extends OAuthException +14 { +15 private final static Pattern pattern = +16 Pattern.compile("Page ID ([0-9]+) was migrated to page ID ([0-9]+)"); +17 +18 private final Long oldId, newId; +19 +20 +21 protected PageMigratedException(FacebookErrorMessage error) +22 { +23 super(error); +24 Matcher matcher = pattern.matcher(error.message); +25 if (!matcher.find()) +26 { +27 String warning = "Could not parse migration-error: " + error.message; +28 LOG.error(warning); +29 throw new RuntimeException(warning); +30 } +31 oldId = Long.parseLong(matcher.group(1)); +32 newId = Long.parseLong(matcher.group(2)); +33 } +34 +35 +36 public Long getOldId() +37 { +38 return oldId; +39 } +40 +41 public Long getNewId() +42 { +43 return newId; +44 } +45 } ++