public class Status extends EnumProperty
Defines the status of the component that this property belongs to, such as a to-do task being "completed".
Code sample (creating):
VTodo todo = new VTodo(); Status status = Status.completed(); todo.setStatus(status);
Code sample (retrieving):
ICalendar ical = ... for (VTodo todo : ical.getTodos()) { Status status = todo.getStatus(); if (action.isCompleted()) { //... } else if (action.isDraft()) { //... } //etc. }
Modifier and Type | Field and Description |
---|---|
static String |
ACCEPTED |
static String |
CANCELLED |
static String |
COMPLETED |
static String |
CONFIRMED |
static String |
DECLINED |
static String |
DELEGATED |
static String |
DRAFT |
static String |
FINAL |
static String |
IN_PROGRESS |
static String |
NEEDS_ACTION |
static String |
SENT |
static String |
TENTATIVE |
value
parameters
Constructor and Description |
---|
Status(Status original)
Copy constructor.
|
Status(String status)
Creates a status property.
|
Modifier and Type | Method and Description |
---|---|
static Status |
accepted()
Creates an "accepted" status property (only valid in vCal 1.0 in
VTodo components). |
static Status |
cancelled()
|
static Status |
completed()
Creates a "completed" status property (only valid in
VTodo
components). |
static Status |
confirmed()
Creates a "confirmed" status property (only valid for event components).
|
Status |
copy()
Creates a copy of this property object.
|
static Status |
create(String status) |
static Status |
declined()
Creates a "declined" status property (only valid in vCal 1.0).
|
static Status |
delegated()
Creates a "delegated" status property (only valid in vCal 1.0).
|
static Status |
draft()
Creates a "draft" status property (only valid in iCalendar 2.0 in
VJournal components). |
static Status |
final_()
Creates a "final" status property (only valid in iCalendar 2.0 in
VJournal components). |
protected Collection<String> |
getStandardValues(ICalVersion version)
Gets the list of acceptable values for this property.
|
protected Collection<ICalVersion> |
getValueSupportedVersions()
Gets the iCalendar versions that this property's value is supported in.
|
static Status |
inProgress()
Creates a "in-progress" status property (only valid in iCalendar 2.0 in
VTodo components). |
boolean |
isAccepted()
Determines if the status is set to "accepted".
|
boolean |
isCancelled()
Determines if the status is set to "cancelled".
|
boolean |
isCompleted()
Determines if the status is set to "completed".
|
boolean |
isConfirmed()
Determines if the status is set to "confirmed".
|
boolean |
isDeclined()
Determines if the status is set to "declined".
|
boolean |
isDelegated()
Determines if the status is set to "delegated".
|
boolean |
isDraft()
Determines if the status is set to "draft".
|
boolean |
isFinal()
Determines if the status is set to "final".
|
boolean |
isInProgress()
Determines if the status is set to "in-progress".
|
boolean |
isNeedsAction()
Determines if the status is set to "needs-action".
|
boolean |
isSent()
Determines if the status is set to "sent".
|
boolean |
isTentative()
Determines if the status is set to "tentative".
|
static Status |
needsAction()
Creates a "needs-action" status property.
|
static Status |
sent()
Creates a "sent" status property (only valid in vCal 1.0).
|
static Status |
tentative()
Creates a "tentative" status property (only valid for event components).
|
equals, hashCode, is, validate
getValue, getValue, setValue, toStringValues, valueEquals, valueHashCode
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, toString, validate
public static final String CANCELLED
public static final String DRAFT
public static final String FINAL
public static final String IN_PROGRESS
public static final String ACCEPTED
public static final String DECLINED
public static final String DELEGATED
public static final String SENT
public static final String COMPLETED
public static final String CONFIRMED
public static final String NEEDS_ACTION
public static final String TENTATIVE
public Status(String status)
status
- the status (e.g. "TENTATIVE")public static Status tentative()
public boolean isTentative()
public static Status confirmed()
public boolean isConfirmed()
public static Status cancelled()
VEvent
, VTodo
, and VJournal
components).public boolean isCancelled()
public static Status needsAction()
public boolean isNeedsAction()
public static Status completed()
VTodo
components).public boolean isCompleted()
public static Status inProgress()
VTodo
components).public boolean isInProgress()
public static Status draft()
VJournal
components).public boolean isDraft()
public static Status final_()
VJournal
components).public boolean isFinal()
public static Status accepted()
VTodo
components).public boolean isAccepted()
public static Status declined()
public boolean isDeclined()
public static Status delegated()
public boolean isDelegated()
public static Status sent()
public boolean isSent()
protected Collection<String> getStandardValues(ICalVersion version)
EnumProperty
getStandardValues
in class EnumProperty
version
- the versionprotected Collection<ICalVersion> getValueSupportedVersions()
EnumProperty
getValueSupportedVersions
in class EnumProperty
public Status copy()
ICalProperty
Creates a copy of this property object.
The default implementation of this method uses reflection to look for a copy constructor. Child classes SHOULD override this method to avoid the performance overhead involved in using reflection.
The child class's copy constructor, if present, MUST invoke the
ICalProperty.ICalProperty(ICalProperty)
super constructor to ensure that the
parameters are also copied.
This method MUST be overridden by the child class if the child class does
not have a copy constructor. Otherwise, an
UnsupportedOperationException
will be thrown when an attempt is
made to copy the property (such as in the
ICalendar class's copy constructor
).
copy
in class ICalProperty
Copyright © 2013–2024 Michael Angstadt. All rights reserved.