mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-16 12:31:59 +01:00
Fix Javadoc on PasteService interface
This commit is contained in:
parent
df5bfdde80
commit
6fd7c84276
@ -2,12 +2,24 @@ package com.onarandombox.MultiverseCore.utils.webpaste;
|
|||||||
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An interface to a web-based text-pasting service. Classes implementing this
|
||||||
|
* interface should implement its methods to send data to an online text-sharing
|
||||||
|
* service, such as pastebin.com. Conventionally, a paste is accomplished by (given
|
||||||
|
* some PasteService instance ps):
|
||||||
|
*
|
||||||
|
* {@code ps.postData(ps.encodeData(someString), ps.getPostURL());}
|
||||||
|
*
|
||||||
|
* Services that provide a distinction between "public" and "private" pastes
|
||||||
|
* should implement a custom constructor that specifies which kind the PasteService
|
||||||
|
* instance is submitting; an example of this is the PastiePasteService class.
|
||||||
|
*/
|
||||||
public interface PasteService {
|
public interface PasteService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode the given String data into a format suitable for transmission in an HTTP request.
|
* Encode the given String data into a format suitable for transmission in an HTTP request.
|
||||||
*
|
*
|
||||||
* @param data The raw data to encode.
|
* @param data The raw data to encode.
|
||||||
* @param isPrivate Whether the paste is desired to be private.
|
|
||||||
* @return A URL-encoded string.
|
* @return A URL-encoded string.
|
||||||
*/
|
*/
|
||||||
public String encodeData(String data);
|
public String encodeData(String data);
|
||||||
@ -15,7 +27,6 @@ public interface PasteService {
|
|||||||
/**
|
/**
|
||||||
* Get the URL to which this paste service sends new pastes.
|
* Get the URL to which this paste service sends new pastes.
|
||||||
*
|
*
|
||||||
* @param isPrivate Whether the paste is desired to be private.
|
|
||||||
* @return The URL that will be accessed to complete the paste.
|
* @return The URL that will be accessed to complete the paste.
|
||||||
*/
|
*/
|
||||||
public URL getPostURL();
|
public URL getPostURL();
|
||||||
@ -26,8 +37,8 @@ public interface PasteService {
|
|||||||
* @param encodedData A URL-encoded String containing the full request to post to
|
* @param encodedData A URL-encoded String containing the full request to post to
|
||||||
* the given URL. Can be the result of calling #encodeData().
|
* the given URL. Can be the result of calling #encodeData().
|
||||||
* @param url The URL to which to paste. Can be the result of calling #getPostURL().
|
* @param url The URL to which to paste. Can be the result of calling #getPostURL().
|
||||||
* @param isPrivate Whether the paste is desired to be private.
|
|
||||||
* @return The URL at which the new paste is visible.
|
* @return The URL at which the new paste is visible.
|
||||||
*/
|
*/
|
||||||
public String postData(String encodedData, URL url) throws PasteFailedException;
|
public String postData(String encodedData, URL url) throws PasteFailedException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user