Skip to content

Commit

Permalink
Javadoc cleanup (#346)
Browse files Browse the repository at this point in the history
* [javadoc-cleans] javadoc cleanup

* [javadoc-cleans] restricted annotations

* [javadoc-cleans] more feedback
  • Loading branch information
marc-scig authored and rlepinski committed Feb 2, 2018
1 parent 9b58559 commit ec2a547
Show file tree
Hide file tree
Showing 43 changed files with 141 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* ChannelCapture checks the device clipboard for a String that is prefixed by
* {@link #generateToken()} on app foreground and posts a notification
* an expected token on app foreground and posts a notification
* that allows the user to copy the Channel or optionally open a url with the channel as
* an argument.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
import android.database.ContentObserver;
import android.database.Cursor;
import android.net.Uri;
import android.support.annotation.RestrictTo;

/**
* An ContentResolver wrapper used to access data from the
* A ContentResolver wrapper used to access data from the
* {@link com.urbanairship.UrbanAirshipProvider}.
*
* @hide
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public class UrbanAirshipResolver {

private final Context context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.os.Build;
import android.provider.Settings;
import android.support.annotation.NonNull;
import android.support.annotation.RestrictTo;
import android.support.annotation.VisibleForTesting;

import com.urbanairship.Logger;
Expand All @@ -32,7 +33,10 @@

/**
* A client that handles uploading analytic events
*
* @hide
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public class EventApiClient {

static final String SYSTEM_LOCATION_DISABLED = "SYSTEM_LOCATION_DISABLED";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

/**
* Performs event database operations.
*
* @hide
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public class EventResolver extends UrbanAirshipResolver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.concurrent.TimeUnit;

/**
* Edits for an action schedules.
* Edits for an action schedule.
*/
public class ActionScheduleEdits implements ScheduleEdits {

Expand Down Expand Up @@ -111,7 +111,7 @@ public Map<String, JsonValue> getActions() {


/**
* Create a new builder.
* Creates a new builder.
*
* @return A new builder instance.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public long getInterval() {
* - "group": Optional. Group identifier. Useful to cancel schedules for a specific campaign.
* - "start": Optional. Start time as an ISO 8601 timestamp. Time before the schedule starts listening for events.
* - "end": Optional. End time as an ISO 8601 timestamp. After the schedule is past the end time it will automatically be canceled.
* - "triggers": Required. An array of triggers. Trigger payload as defined by {@link Trigger#predicate}.
* - "triggers": Required. An array of triggers.
* - "limit": Optional, defaults to 1. Number of times to trigger the actions payload before cancelling the schedule.
* - "priority": Optional, defaults to 0. In case of conflict, schedules will be executed by priority in ascending order.
* - "actions": Required. Actions payload to run when one or more of the triggers meets its goal.
Expand Down Expand Up @@ -357,9 +357,9 @@ public Builder setGroup(String group) {
}

/**
* Sets the start time in MS.
* Sets the start time in ms.
*
* @param start The start time in MS.
* @param start The start time in ms.
* @return The Builder instance.
*/
public Builder setStart(long start) {
Expand All @@ -368,9 +368,9 @@ public Builder setStart(long start) {
}

/**
* Sets the end time in MS.
* Sets the end time in ms.
*
* @param end The end time in MS.
* @param end The end time in ms.
* @return The Builder instance.
*/
public Builder setEnd(long end) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

/**
* {@link DataManager} class for automation schedules.
*
* @hide
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public class AutomationDataManager extends DataManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import android.support.annotation.NonNull;

/**
* Driver for AutomationEngine. Handles executing, and converting generic ScheduleInfo into the proper
* Driver for AutomationEngine. Handles executing and converting generic ScheduleInfo into the proper
* Schedule class.
*
* @param <T> The schedule type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.List;

/**
* Defines a conditions that might delay the execution of a schedule.
* Defines conditions that might delay the execution of a schedule.
*/
public class ScheduleDelay implements Parcelable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,33 @@ public interface ScheduleEdits {
Integer getPriority();

/**
* Gets the schedule start time in MS.
* Gets the schedule start time in ms.
*
* @return The schedule start time in MS.
* @return The schedule start time in ms.
*/
@Nullable
Long getStart();

/**
* Gets the schedule end time in MS.
* Gets the schedule end time in ms.
*
* @return The schedule end time in MS.
* @return The schedule end time in ms.
*/
@Nullable
Long getEnd();

/**
* Gets the schedule interval in MS.
* Gets the schedule interval in ms.
*
* @return The schedule interval in MS.
* @return The schedule interval in ms.
*/
@Nullable
Long getInterval();

/**
* Gets the schedule edit grace period in MS.
* Gets the schedule edit grace period in ms.
*
* @return The schedule edit grace period in MS.
* @return The schedule edit grace period in ms.
*/
@Nullable
Long getEditGracePeriod();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public interface ScheduleInfo {
List<Trigger> getTriggers();

/**
* Gets the schedules data.
* Gets the schedule data.
*
* @return Schedules data.
* @return Schedule data.
*/
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
JsonSerializable getData();
Expand All @@ -61,16 +61,16 @@ public interface ScheduleInfo {
String getGroup();

/**
* Gets the schedule start time in MS.
* Gets the schedule start time in ms.
*
* @return The schedule start time in MS.
* @return The schedule start time in ms.
*/
long getStart();

/**
* Gets the schedule end time in MS.
* Gets the schedule end time in ms.
*
* @return The schedule end time in MS.
* @return The schedule end time in ms.
*/
long getEnd();

Expand All @@ -82,16 +82,16 @@ public interface ScheduleInfo {
ScheduleDelay getDelay();

/**
* Gets the edit grace period in MS.
* Gets the edit grace period in ms.
*
* @return The edit grace period in MS.
* @return The edit grace period in ms.
*/
long getEditGracePeriod();

/**
* Gets the schedule execution interval in MS.
* Gets the schedule execution interval in ms.
*
* @return The interval in MS.
* @return The interval in ms.
*/
long getInterval();
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class Trigger implements Parcelable {

/**
* Trigger type for version. Version triggers can be create with
* {@link Triggers#newVersionTriggerBuilder(JsonPredicate)}
* {@link Triggers#newVersionTriggerBuilder(com.urbanairship.json.ValueMatcher)}
*/
public static final int VERSION = 10;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

/**
* Factory methods for creating compound trigger observables
*
* @hide
*/
class TriggerObservables {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* Audience conditions for an in-app message. Audiences are normally only validated at display time,
* and if the audience is not met, the in-app message will be canceled.
* and if the audience is not met, the in-app message will not be displayed.
*/
public class Audience implements JsonSerializable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public static ButtonInfo parseJson(JsonValue jsonValue) throws JsonException {
*
* @param jsonList The json list..
* @return The list of parsed button info.
* @throws JsonException If list was unable to be parsed.
* @throws JsonException If the list was unable to be parsed.
*/
public static List<ButtonInfo> parseJson(JsonList jsonList) throws JsonException {
if (jsonList == null || jsonList.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public interface DisplayContent extends JsonSerializable {
@interface ButtonLayout {}

/**
* Buttons are displays with a space between them.
* Buttons are displayed with a space between them.
*/
String BUTTON_LAYOUT_SEPARATE = "separate";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import android.support.annotation.RestrictTo;

/**
* Display in-app message event.
* In-app message display event.
*
* @hide
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.Map;

/**
* Actions utils for in-app messaging.
* Action utils for in-app messaging.
*/
public abstract class InAppActionUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public String getType() {
* {@link #TYPE_CUSTOM}: a {@link com.urbanairship.iam.custom.CustomDisplayContent},
* {@link #TYPE_FULLSCREEN}: a {@link com.urbanairship.iam.fullscreen.FullScreenDisplayContent}
*
* @param <T> The expected content type.
* @return The display content.
*/
public <T extends DisplayContent> T getDisplayContent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ interface Factory {
int OK = 0;

/***
* Indicates a failure result that needs to be retried.
* Indicates that the the prepare step should be retried.
*/
int RETRY = 1;

/***
* Indicates a failure result and the schedule should be cancelled.
* Indicates that the prepare step failed and the schedule should be canceled.
*/
int CANCEL = 2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public interface InAppMessageListener {

/**
* Called when an in-app message finished displaying.
*
* @param scheduleId The schedule ID.
* @param message The in-app message.
* @param resolutionInfo The resolution info.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public InAppMessage getMessage() {


/**
* Parses a json value for an in-app message edits.
* Parses a json value for in-app message edits.
*
* @param value The json value.
* @return The edit info.
Expand Down Expand Up @@ -230,9 +230,9 @@ public Builder setMessage(InAppMessage message) {
}

/**
* Sets the start time in MS.
* Sets the start time in ms.
*
* @param start The start time in MS.
* @param start The start time in ms.
* @return The Builder instance.
*/
public Builder setStart(long start) {
Expand All @@ -241,9 +241,9 @@ public Builder setStart(long start) {
}

/**
* Sets the end time in MS.
* Sets the end time in ms.
*
* @param end The end time in MS.
* @param end The end time in ms.
* @return The Builder instance.
*/
public Builder setEnd(long end) {
Expand Down Expand Up @@ -287,9 +287,9 @@ public Builder setInterval(@IntRange(from = 0) long duration, @NonNull TimeUnit
}

/**
* Builds the in-app message schedule edit.
* Builds the in-app message schedule edits.
*
* @return The schedule edit.
* @return The schedule edits.
*/
public InAppMessageScheduleEdits build() {
return new InAppMessageScheduleEdits(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ public Builder setMessage(InAppMessage message) {
}

/**
* Sets the start time in MS.
* Sets the start time in ms.
*
* @param start The start time in MS.
* @param start The start time in ms.
* @return The Builder instance.
*/
public Builder setStart(long start) {
Expand All @@ -290,9 +290,9 @@ public Builder setStart(long start) {
}

/**
* Sets the end time in MS.
* Sets the end time in ms.
*
* @param end The end time in MS.
* @param end The end time in ms.
* @return The Builder instance.
*/
public Builder setEnd(long end) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

/**
* Subscriber for {@link com.urbanairship.remotedata.RemoteData}.
*
* @hide
*/
class InAppRemoteDataObserver {

Expand Down
Loading

0 comments on commit ec2a547

Please sign in to comment.