Skip to content

Commit 37f4e20

Browse files
Better class docs for new models: Busy, FreeBusy, FreeBusySpace.
1 parent b5bfa6f commit 37f4e20

3 files changed

Lines changed: 31 additions & 1 deletion

File tree

src/main/java/com/robinpowered/sdk/model/Busy.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
import java.util.List;
66

7+
/**
8+
* A period of time that a {@link Space} is unavailable for. <p>
9+
*
10+
* Contains a grouping of all events that occur within this unavailable block of time. When the
11+
* gap between events is shorter than the duration requested, the events will be grouped
12+
* together in a single Busy container.
13+
*/
714
public class Busy {
815

916
/**
@@ -26,6 +33,13 @@ public class Busy {
2633
* Methods
2734
*/
2835

36+
/**
37+
* Constructor.
38+
*
39+
* @param from The start of the busy period.
40+
* @param to The end of the busy period.
41+
* @param events The {@link Event Events} occurring throughout the busy period.
42+
*/
2943
public Busy(DateTime from, DateTime to, List<SimpleEvent> events) {
3044
this.from = from;
3145
this.to = to;

src/main/java/com/robinpowered/sdk/model/FreeBusy.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22

33
import java.util.List;
44

5+
/**
6+
* An interface for Free-busy information returned for different models.
7+
*/
58
public interface FreeBusy {
69

10+
/**
11+
* Returns a list of {@link Busy} intervals for which the given model is unavailable.
12+
*
13+
* @return A list of {@link Busy} intervals.
14+
*/
715
List<Busy> getBusy();
816

917
}

src/main/java/com/robinpowered/sdk/model/FreeBusySpace.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
import java.util.List;
44

5+
/**
6+
* Free-busy information returned for a given {@link Space} across a requested period of time. <p>
7+
*
8+
* Free-busy information describes the availability of a {@link Space} throughout a period of time
9+
* by returning a set of {@link Busy} intervals which contain all events which overlap the requested
10+
* period of time. The given space is available for the requested duration during any gaps between
11+
* {@link Busy} models.
12+
*/
513
public class FreeBusySpace implements ApiResponseModel, FreeBusy {
614

715
/**
@@ -35,7 +43,7 @@ public String getMimeType() {
3543
return MIME_TYPE;
3644
}
3745

38-
public boolean isHasPresence() {
46+
public boolean hasPresence() {
3947
return hasPresence;
4048
}
4149

0 commit comments

Comments
 (0)