/** * Creates an URL factory targeted to a server. * * As long as you don't need to connect to a nonstandard * URL, different from {@value #DEFAULT_BASE_URL}, you should * consider calling {@link #getDefault()} instead. * * @param url an URL used as a base for the generated URLs * @throws MalformedURLException */ public FeedURLFactory(String url) throws MalformedURLException { init(url); }
/** * Gets an URL for querying the item types Google suggest using * for a given locale. * The feed is read-only and unauthenticated. * * @param locale a locale, for example "de_DE", "en_GB", "en_US" * @return an URL of a feed containing item types * @throws MalformedURLException */ public URL getItemTypesFeedURL(String locale) throws MalformedURLException { if (locale == null) { throw new NullPointerException("locale is null"); } return new URL(baseUrl, "feeds/itemtypes/" + encode(locale)); }
/** * Gets an URL for querying the item types Google suggest using * for a given locale. * The feed is read-only and unauthenticated. * * @param locale a locale, for example "de_DE", "en_GB", "en_US" * @return an URL of a feed containing item types * @throws MalformedURLException */ public URL getItemTypesFeedURL(String locale) throws MalformedURLException { if (locale == null) { throw new NullPointerException("locale is null"); } return new URL(baseUrl, "feeds/itemtypes/" + encode(locale)); }
/** * Gets an URL for accessing a snippet. * * @see #getSnippetsFeedURL() * @param id the id of the snippet * @return an URL to be used when reading a snippet of an item with a * {@link GoogleBaseService} * @throws MalformedURLException */ public URL getSnippetsEntryURL(String id) throws MalformedURLException { if (id == null) { throw new NullPointerException("entryId is null"); } return new URL(feedSnippets, encode(id)); }
/** * Creates an URL factory targeted to a server. * * As long as you don't need to connect to a nonstandard * URL, different from {@value #DEFAULT_BASE_URL}, you should * consider calling {@link #getDefault()} instead. * * @param url an URL used as a base for the generated URLs * @throws MalformedURLException */ public FeedURLFactory(String url) throws MalformedURLException { init(url); }
/** * Gets an URL for accessing a snippet. * * @see #getSnippetsFeedURL() * @param id the id of the snippet * @return an URL to be used when reading a snippet of an item with a * {@link GoogleBaseService} * @throws MalformedURLException */ public URL getSnippetsEntryURL(String id) throws MalformedURLException { if (id == null) { throw new NullPointerException("entryId is null"); } return new URL(feedSnippets, encode(id)); }
/** * Creates an URL factory targeted to {@value #DEFAULT_BASE_URL}. * * Access it using {@link #getDefault()}. */ private FeedURLFactory() { try { init(DEFAULT_BASE_URL); } catch (MalformedURLException e) { throw new RuntimeException("Unexpected malformed URL", e); } }
/** * Gets an URL for accessing an item. * * @see #getItemsFeedURL() * @param entryId * @return an URL to be used when reading an item or when * performing an update or delete operation with a * {@link GoogleBaseService} * @throws MalformedURLException */ public URL getItemsEntryURL(String entryId) throws MalformedURLException { if (entryId == null) { throw new NullPointerException("entryId is null"); } return new URL(feedItems, encode(entryId)); }
/** * Creates an URL factory targeted to {@value #DEFAULT_BASE_URL}. * * Access it using {@link #getDefault()}. */ private FeedURLFactory() { try { init(DEFAULT_BASE_URL); } catch (MalformedURLException e) { throw new RuntimeException("Unexpected malformed URL", e); } }
/** * Gets an URL for accessing an item. * * @see #getItemsFeedURL() * @param entryId * @return an URL to be used when reading an item or when * performing an update or delete operation with a * {@link GoogleBaseService} * @throws MalformedURLException */ public URL getItemsEntryURL(String entryId) throws MalformedURLException { if (entryId == null) { throw new NullPointerException("entryId is null"); } return new URL(feedItems, encode(entryId)); }
/** * Gets an URL for getting the item types Google suggest using * for a given itemtype for a given locale. * The feed is read-only and unauthenticated. * * @param locale a locale, for example "de_DE", "en_GB", "en_US" * @param itemType the item type to be analysed * @return an URL of a feed containing item types * @throws MalformedURLException */ public URL getItemTypesEntryURL(String locale, String itemType) throws MalformedURLException { if (locale == null) { throw new NullPointerException("locale is null"); } if (itemType == null) { throw new NullPointerException("itemType is null"); } return new URL(baseUrl, "feeds/itemtypes/" + encode(locale) + "/" + encode(itemType)); }
/** * Gets an URL for getting the item types Google suggest using * for a given itemtype for a given locale. * The feed is read-only and unauthenticated. * * @param locale a locale, for example "de_DE", "en_GB", "en_US" * @param itemType the item type to be analysed * @return an URL of a feed containing item types * @throws MalformedURLException */ public URL getItemTypesEntryURL(String locale, String itemType) throws MalformedURLException { if (locale == null) { throw new NullPointerException("locale is null"); } if (itemType == null) { throw new NullPointerException("itemType is null"); } return new URL(baseUrl, "feeds/itemtypes/" + encode(locale) + "/" + encode(itemType)); }