biweekly.property
Class Status

java.lang.Object
  extended by biweekly.property.ICalProperty
      extended by biweekly.property.ValuedProperty<String>
          extended by biweekly.property.TextProperty
              extended by biweekly.property.EnumProperty
                  extended by biweekly.property.Status

public class Status
extends EnumProperty

Defines the status of the component that this property belongs to, such as a to-do task being in a "completed" state.

Examples:

 //creating a new property
 Status status = Status.completed();
 
 if (status.isCompleted()) {
        //its value is "COMPLETED"
 }
 

Author:
Michael Angstadt
Specification Reference:
RFC 5545 p.92-3

Field Summary
 
Fields inherited from class biweekly.property.ValuedProperty
value
 
Fields inherited from class biweekly.property.ICalProperty
parameters
 
Constructor Summary
Status(String status)
          Creates a status property.
 
Method Summary
static Status cancelled()
          Creates a "cancelled" status property (only valid for event, to-do, and journal components).
static Status completed()
          Creates a "completed" status property (only valid for to-do components).
static Status confirmed()
          Creates a "confirmed" status property (only valid for event components).
static Status draft()
          Creates a "draft" status property (only valid for journal components).
static Status final_()
          Creates a "final" status property (only valid for journal components).
protected  Collection<String> getStandardValues()
          Gets the list of acceptable values for this property.
static Status inProgress()
          Creates a "in-progress" status property (only valid for to-do components).
 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 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 isTentative()
          Determines if the status is set to "tentative".
static Status needsAction()
          Creates a "needs-action" status property (only valid for to-do components).
static Status tentative()
          Creates a "tentative" status property (only valid for event components).
 
Methods inherited from class biweekly.property.EnumProperty
is, validate
 
Methods inherited from class biweekly.property.ValuedProperty
getValue, setValue
 
Methods inherited from class biweekly.property.ICalProperty
addParameter, getParameter, getParameters, getParameters, removeParameter, setParameter, setParameter, setParameters, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Status

public Status(String status)
Creates a status property. Use of this constructor is discouraged and may put the property in an invalid state. Use one of the static factory methods instead.

Parameters:
status - the status (e.g. "TENTATIVE")
Method Detail

tentative

public static Status tentative()
Creates a "tentative" status property (only valid for event components).

Returns:
the property

isTentative

public boolean isTentative()
Determines if the status is set to "tentative".

Returns:
true if set to "tentative", false if not

confirmed

public static Status confirmed()
Creates a "confirmed" status property (only valid for event components).

Returns:
the property

isConfirmed

public boolean isConfirmed()
Determines if the status is set to "confirmed".

Returns:
true if set to "confirmed", false if not

cancelled

public static Status cancelled()
Creates a "cancelled" status property (only valid for event, to-do, and journal components).

Returns:
the property

isCancelled

public boolean isCancelled()
Determines if the status is set to "cancelled".

Returns:
true if set to "cancelled", false if not

needsAction

public static Status needsAction()
Creates a "needs-action" status property (only valid for to-do components).

Returns:
the property

isNeedsAction

public boolean isNeedsAction()
Determines if the status is set to "needs-action".

Returns:
true if set to "needs-action", false if not

completed

public static Status completed()
Creates a "completed" status property (only valid for to-do components).

Returns:
the property

isCompleted

public boolean isCompleted()
Determines if the status is set to "completed".

Returns:
true if set to "completed", false if not

inProgress

public static Status inProgress()
Creates a "in-progress" status property (only valid for to-do components).

Returns:
the property

isInProgress

public boolean isInProgress()
Determines if the status is set to "in-progress".

Returns:
true if set to "in-progress", false if not

draft

public static Status draft()
Creates a "draft" status property (only valid for journal components).

Returns:
the property

isDraft

public boolean isDraft()
Determines if the status is set to "draft".

Returns:
true if set to "draft", false if not

final_

public static Status final_()
Creates a "final" status property (only valid for journal components).

Returns:
the property

isFinal

public boolean isFinal()
Determines if the status is set to "final".

Returns:
true if set to "final", false if not

getStandardValues

protected Collection<String> getStandardValues()
Description copied from class: EnumProperty
Gets the list of acceptable values for this property.

Specified by:
getStandardValues in class EnumProperty
Returns:
the list of acceptable values


Copyright © 2013 Michael Angstadt. All Rights Reserved.