Skip to content

Commit

Permalink
Rework JavaDoc documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mkellnhofer committed Feb 22, 2018
1 parent 02b4994 commit b0f8072
Show file tree
Hide file tree
Showing 26 changed files with 136 additions and 137 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/dracoon/sdk/DracoonAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* <br>
* Following three modes are supported:<br>
* <br>
* - Authorization Code Mode: ({@link DracoonAuth#DracoonAuth(String clientId, String clientSecret,
* - Authorization Code Mode: ({@link #DracoonAuth(String clientId, String clientSecret,
* String authorizationCode)})<br>
* This is the most common mode. Your application must request authorization and obtain an
* authorization code and the retrieval of the access and refresh tokens with the authorization
Expand All @@ -28,11 +28,11 @@
* (You can use {@link OAuthHelper} to create the Authorization URL which must be opened in the
* user's browser or web view and to extract the state and code from the redirect URI.)<br>
* <br>
* - Access Token Mode: ({@link DracoonAuth#DracoonAuth(String accessToken)})<br>
* - Access Token Mode: ({@link #DracoonAuth(String accessToken)})<br>
* This is a simple mode. You can use it at the development or for terminal applications and
* scripts where a specific user account is used.<br>
* <br>
* - Access and Refresh Token Mode: ({@link DracoonAuth#DracoonAuth(String clientId,
* - Access and Refresh Token Mode: ({@link #DracoonAuth(String clientId,
* String clientSecret, String accessToken, String refreshToken)})<br>
* This mode can be used to obtain access and refresh token yourself.
*/
Expand Down
24 changes: 12 additions & 12 deletions src/main/java/com/dracoon/sdk/DracoonClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* upload/download files, ...<br>
* - {@link Shares Shares}: Not implemented yet<br>
* <br>
* New client instances can be created via {@link Builder Builder}.
* New client instances can be created via {@link Builder}.
*/
@SuppressWarnings("unused")
public abstract class DracoonClient {
Expand Down Expand Up @@ -155,7 +155,7 @@ public interface Nodes {
/**
* Retrieves child nodes of a node.<br>
* <br>
* Use parent node ID <code>0</code> to retrieve root nodes.
* Use parent node ID 0 to retrieve root nodes.
*
* @param parentNodeId The ID of the parent node. (ID must be 0 or positive.)
*
Expand All @@ -170,7 +170,7 @@ public interface Nodes {
* Retrieves child nodes of a node. The arguments {@code offset} and {@code limit} restrict
* the result to a specific range.<br>
* <br>
* Use parent node ID <code>0</code> to retrieve root nodes.
* Use parent node ID 0 to retrieve root nodes.
*
* @param parentNodeId The ID of the parent node. (ID must be 0 or positive.)
* @param offset The range offset. (Zero-based index; must be 0 or positive.)
Expand Down Expand Up @@ -313,7 +313,7 @@ void deleteNodes(DeleteNodesRequest request) throws DracoonNetIOException,
* @param request The request with information about the file.
* @param file The source file.
* @param callback A callback which get called when the upload was started, finished and
* so on. (Null, if not needed.)
* so on. (<code>null</code>, if not needed.)
*
* @return the new node
*
Expand All @@ -333,7 +333,7 @@ Node uploadFile(String id, FileUploadRequest request, File file,
* @param request The request with information about the file.
* @param file The source file.
* @param callback A callback which get called when the upload was started, finished and
* so on. (Null, if not needed.)
* so on. (<code>null</code>, if not needed.)
*
* @throws DracoonFileIOException If a file error occurred.
* @throws DracoonCryptoException If the encryption failed.
Expand All @@ -358,7 +358,7 @@ void startUploadFileAsync(String id, FileUploadRequest request, File file,
* @param nodeId The ID of the node.
* @param file The target file.
* @param callback A callback which get called when the download was started, finished and
* so on. (Null, if not needed.)
* so on. (<code>null</code>, if not needed.)
*
* @throws DracoonNetIOException If a network error occurred.
* @throws DracoonApiException If the API responded with an error.
Expand All @@ -376,7 +376,7 @@ void downloadFile(String id, long nodeId, File file,
* @param nodeId The ID of the node.
* @param file The target file.
* @param callback A callback which get called when the download was started, finished and
* so on. (Null, if not needed.)
* so on. (<code>null</code>, if not needed.)
*
* @throws DracoonNetIOException If a network error occurred.
* @throws DracoonApiException If the API responded with an error.
Expand Down Expand Up @@ -611,11 +611,11 @@ public void setEncryptionPassword(String encryptionPassword) {
* This builder creates new instances of {@link DracoonClient}.<br>
* <br>
* Following properties can be set:<br>
* - Server URL (mandatory): {@link Builder#Builder(URL)}<br>
* - Logger: {@link Builder#log(Log)}<br>
* - Authorization data: {@link Builder#auth(DracoonAuth)}<br>
* - Encryption password: {@link Builder#encryptionPassword(String)}<br>
* - HTTP configuration: {@link Builder#httpConfig(DracoonHttpConfig)}
* - Server URL (mandatory): {@link #Builder(URL)}<br>
* - Logger: {@link #log(Log)}<br>
* - Authorization data: {@link #auth(DracoonAuth)}<br>
* - Encryption password: {@link #encryptionPassword(String)}<br>
* - HTTP configuration: {@link #httpConfig(DracoonHttpConfig)}
*/
public static class Builder {

Expand Down
16 changes: 8 additions & 8 deletions src/main/java/com/dracoon/sdk/OAuthHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
* <br>
* The class provides methods to:<br>
* - Create the authorization URL (Which must be opened user's browser.)
* ({@link OAuthHelper#createAuthorizationUrl(URL, String, String)})<br>
* - Extract authorization state from redirect URL
* ({@link OAuthHelper#extractAuthorizationStateFromUri(URI)})<br>
* - Extract authorization code from redirect URL
* ({@link OAuthHelper#extractAuthorizationCodeFromUri(URI)})<br>
* ({@link #createAuthorizationUrl(URL serverUrl, String clientId, String state)})<br>
* - Extract authorization state from redirect URI
* ({@link #extractAuthorizationStateFromUri(URI uri)})<br>
* - Extract authorization code from redirect URI
* ({@link #extractAuthorizationCodeFromUri(URI uri)})<br>
*/
@SuppressWarnings("unused")
public class OAuthHelper {
Expand All @@ -34,9 +34,9 @@ private OAuthHelper() {
/**
* Creates the authorization URL which must be open in the user's browser.
*
* @param serverUrl The URL of the Dracoon server.
* @param clientId The ID of the OAuth client.
* @param state The state identifier which is used to track running authorizations.
* @param serverUrl The URL of the Dracoon server.
* @param clientId The ID of the OAuth client.
* @param state The state identifier which is used to track running authorizations.
*
* @return the authorization URL
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public DracoonCryptoException(DracoonCryptoCode code) {
*
* @param code The error code.
* @param cause The cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is permitted, and
* {@link #getCause()} method). (A <code>null</code> value is permitted, and
* indicates that the cause is nonexistent or unknown.)
*/
public DracoonCryptoException(DracoonCryptoCode code, Throwable cause) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/dracoon/sdk/error/DracoonException.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class DracoonException extends Exception {
private static final long serialVersionUID = 5642720416433996541L;

/**
* Constructs a new exception with {@code null} as its detail message. The cause is not
* Constructs a new exception with <code>null</code> as its detail message. The cause is not
* initialized, and may subsequently be initialized by a call to {@link #initCause}.
*/
public DracoonException() {
Expand All @@ -37,7 +37,7 @@ public DracoonException(String message) {
* @param message The detail message (which is saved for later retrieval by the
* {@link #getMessage()} method).
* @param cause The cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is permitted, and
* {@link #getCause()} method). (A <code>null</code> value is permitted, and
* indicates that the cause is nonexistent or unknown.)
*/
public DracoonException(String message, Throwable cause) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class DracoonFileIOException extends DracoonException {
private static final long serialVersionUID = 2534557880347011715L;

/**
* Constructs a new exception with {@code null} as its detail message. The cause is not
* Constructs a new exception with <code>null</code> as its detail message. The cause is not
* initialized, and may subsequently be initialized by a call to {@link #initCause}.
*/
public DracoonFileIOException() {
Expand All @@ -32,7 +32,7 @@ public DracoonFileIOException(String message) {
* @param message The detail message (which is saved for later retrieval by the
* {@link #getMessage()} method).
* @param cause The cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is permitted, and
* {@link #getCause()} method). (A <code>null</code> value is permitted, and
* indicates that the cause is nonexistent or unknown.)
*/
public DracoonFileIOException(String message, Throwable cause) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class DracoonFileNotFoundException extends DracoonFileIOException {
private static final long serialVersionUID = -8826376459563710187L;

/**
* Constructs a new exception with {@code null} as its detail message. The cause is not
* Constructs a new exception with <code>null</code> as its detail message. The cause is not
* initialized, and may subsequently be initialized by a call to {@link #initCause}.
*/
public DracoonFileNotFoundException() {
Expand All @@ -32,7 +32,7 @@ public DracoonFileNotFoundException(String message) {
* @param message The detail message (which is saved for later retrieval by the
* {@link #getMessage()} method).
* @param cause The cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is permitted, and
* {@link #getCause()} method). (A <code>null</code> value is permitted, and
* indicates that the cause is nonexistent or unknown.)
*/
public DracoonFileNotFoundException(String message, Throwable cause) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class DracoonNetIOException extends DracoonException {
private static final long serialVersionUID = -1497143863572050306L;

/**
* Constructs a new exception with {@code null} as its detail message. The cause is not
* Constructs a new exception with <code>null</code> as its detail message. The cause is not
* initialized, and may subsequently be initialized by a call to {@link #initCause}.
*/
public DracoonNetIOException() {
Expand All @@ -32,7 +32,7 @@ public DracoonNetIOException(String message) {
* @param message The detail message (which is saved for later retrieval by the
* {@link #getMessage()} method).
* @param cause The cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is permitted, and
* {@link #getCause()} method). (A <code>null</code> value is permitted, and
* indicates that the cause is nonexistent or unknown.)
*/
public DracoonNetIOException(String message, Throwable cause) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class DracoonNetIOInterruptedException extends DracoonNetIOException {
private static final long serialVersionUID = 4537171225954265678L;

/**
* Constructs a new exception with {@code null} as its detail message. The cause is not
* Constructs a new exception with <code>null</code> as its detail message. The cause is not
* initialized, and may subsequently be initialized by a call to {@link #initCause}.
*/
public DracoonNetIOInterruptedException() {
Expand All @@ -32,7 +32,7 @@ public DracoonNetIOInterruptedException(String message) {
* @param message The detail message (which is saved for later retrieval by the
* {@link #getMessage()} method).
* @param cause The cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is permitted, and
* {@link #getCause()} method). (A <code>null</code> value is permitted, and
* indicates that the cause is nonexistent or unknown.)
*/
public DracoonNetIOInterruptedException(String message, Throwable cause) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class DracoonNetInsecureException extends DracoonNetIOException {
private static final long serialVersionUID = -7328327402956962496L;

/**
* Constructs a new exception with {@code null} as its detail message. The cause is not
* Constructs a new exception with <code>null</code> as its detail message. The cause is not
* initialized, and may subsequently be initialized by a call to {@link #initCause}.
*/
public DracoonNetInsecureException() {
Expand All @@ -32,7 +32,7 @@ public DracoonNetInsecureException(String message) {
* @param message The detail message (which is saved for later retrieval by the
* {@link #getMessage()} method).
* @param cause The cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is permitted, and
* {@link #getCause()} method). (A <code>null</code> value is permitted, and
* indicates that the cause is nonexistent or unknown.)
*/
public DracoonNetInsecureException(String message, Throwable cause) {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/dracoon/sdk/model/CopyNodesRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Request to copy nodes.<br>
* <br>
* A new instance can be created with {@link CopyNodesRequest.Builder Builder}.
* A new instance can be created with {@link Builder}.
*/
@SuppressWarnings("unused")
public class CopyNodesRequest {
Expand Down Expand Up @@ -50,10 +50,10 @@ public ResolutionStrategy getResolutionStrategy() {
* This builder creates new instances of {@link CopyNodesRequest}.<br>
* <br>
* Following properties can be set:<br>
* - Target node ID (mandatory): {@link Builder#Builder(Long)}<br>
* - Source node IDs {@link Builder#addSourceNodeId(Long)}<br>
* - Conflict resolution strategy: {@link Builder#resolutionStrategy(ResolutionStrategy)}<br>
* (Default: AUTO_RENAME)
* - Target node ID (mandatory): {@link #Builder(Long)}<br>
* - Source node IDs {@link #addSourceNodeId(Long)}<br>
* - Conflict resolution strategy: {@link #resolutionStrategy(ResolutionStrategy)}<br>
* (Default: <code>AUTO_RENAME</code>)
*/
public static class Builder {

Expand Down
26 changes: 13 additions & 13 deletions src/main/java/com/dracoon/sdk/model/CreateDownloadShareRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Request to create a new download share.<br>
* <br>
* A new instance can be created with {@link CreateDownloadShareRequest.Builder Builder}.
* A new instance can be created with {@link Builder}.
*/
@SuppressWarnings("unused")
public class CreateDownloadShareRequest {
Expand Down Expand Up @@ -180,18 +180,18 @@ public List<String> getSmsRecipients() {
* This builder creates new instances of {@link CreateDownloadShareRequest}.<br>
* <br>
* Following properties can be set:<br>
* - Node ID (mandatory): {@link Builder#Builder(Long)}<br>
* - Name: {@link Builder#name(String)}<br>
* - Notes: {@link Builder#notes(String)}<br>
* - Expiration date: {@link Builder#expirationDate(Date)}<br>
* - Show creator name: {@link Builder#showCreatorName(Boolean)}<br>
* - Show creator user name: {@link Builder#showCreatorUserName(Boolean)}<br>
* - Notify creator: {@link Builder#notifyCreator(Boolean)}<br>
* - Max downloads: {@link Builder#maxDownloads(Integer)}<br>
* - Access Password: {@link Builder#accessPassword(String)}<br>
* - Encryption Password: {@link Builder#encryptionPassword(String)}<br>
* - Email notification data: {@link Builder#sendEmail(List, String, String)}<br>
* - SMS notification data: {@link Builder#sendSms(List)}
* - Node ID (mandatory): {@link #Builder(Long)}<br>
* - Name: {@link #name(String)}<br>
* - Notes: {@link #notes(String)}<br>
* - Expiration date: {@link #expirationDate(Date)}<br>
* - Show creator name: {@link #showCreatorName(Boolean)}<br>
* - Show creator user name: {@link #showCreatorUserName(Boolean)}<br>
* - Notify creator: {@link #notifyCreator(Boolean)}<br>
* - Max downloads: {@link #maxDownloads(Integer)}<br>
* - Access Password: {@link #accessPassword(String)}<br>
* - Encryption Password: {@link #encryptionPassword(String)}<br>
* - Email notification data: {@link #sendEmail(List, String, String)}<br>
* - SMS notification data: {@link #sendSms(List)}
*/
public static class Builder {

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/dracoon/sdk/model/CreateFolderRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Request to create a new folder.<br>
* <br>
* A new instance can be created with {@link CreateFolderRequest.Builder Builder}.
* A new instance can be created with {@link Builder}.
*/
@SuppressWarnings("unused")
public class CreateFolderRequest {
Expand Down Expand Up @@ -47,9 +47,9 @@ public String getNotes() {
* This builder creates new instances of {@link CreateFolderRequest}.<br>
* <br>
* Following properties can be set:<br>
* - Parent node ID (mandatory): {@link Builder#Builder(Long, String)}<br>
* - Name (mandatory): {@link Builder#Builder(Long, String)}<br>
* - Notes: {@link Builder#notes(String)}
* - Parent node ID (mandatory): {@link #Builder(Long, String)}<br>
* - Name (mandatory): {@link #Builder(Long, String)}<br>
* - Notes: {@link #notes(String)}
*/
public static class Builder {

Expand Down
Loading

0 comments on commit b0f8072

Please sign in to comment.