Package net.fortuna.ical4j.model
Class Property
- java.lang.Object
-
- net.fortuna.ical4j.model.Content
-
- net.fortuna.ical4j.model.Property
-
- All Implemented Interfaces:
Serializable
,Comparable<Property>
,FluentProperty
- Direct Known Subclasses:
Action
,Attach
,Attendee
,BusyType
,CalendarAddress
,CalScale
,Categories
,Clazz
,Color
,Comment
,Conference
,Contact
,Country
,DateListProperty
,DateProperty
,Description
,Duration
,ExRule
,ExtendedAddress
,FreeBusy
,Geo
,Image
,Locality
,Location
,LocationType
,Method
,Name
,Organizer
,ParticipantType
,PercentComplete
,Postalcode
,Priority
,ProdId
,Proximity
,RefreshInterval
,Region
,RelatedTo
,Repeat
,RequestStatus
,Resources
,ResourceType
,RRule
,Sequence
,Source
,Status
,StreetAddress
,StructuredData
,StyledDescription
,Summary
,Tel
,Transp
,TzId
,TzIdAliasOf
,TzName
,TzOffsetFrom
,TzOffsetTo
,TzUrl
,Uid
,Url
,Version
,XProperty
public abstract class Property extends Content implements Comparable<Property>, FluentProperty
Defines an iCalendar property. Subclasses of this class provide additional validation and typed values for specific iCalendar properties. Note that subclasses must provide a reference to the factory used to create the property to support property cloning (copy). If no factory is specified anUnsupportedOperationException
will be thrown by thecopy()
method.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.fortuna.ical4j.model.Content
Content.Factory
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACKNOWLEDGED
Acknowledged Property taken from http://tools.ietf.org/html/draft-daboo-valarm-extensions-04static String
ACTION
Alarm action property name.static String
ATTACH
Attachment property name.static String
ATTENDEE
Attendee property name.static String
BUSYTYPE
Busy type property name.static String
CALENDAR_ADDRESS
Participant cua property name.static String
CALSCALE
Calendar scale property name.static String
CATEGORIES
Categories property name.static String
CLASS
Classifier property name.static String
COMMENT
Comment property name.static String
COMPLETED
Completed date property name.static String
CONTACT
Contact property name.static String
COUNTRY
VVENUE country property name.static String
CREATED
Creation date property name.static String
DESCRIPTION
Description property name.static String
DTEND
End date property name.static String
DTSTAMP
Date-stamp property name.static String
DTSTART
Start date property name.static String
DUE
Due date property name.static String
DURATION
Duration property name.static String
EXDATE
Exclusion date property name.static String
EXPERIMENTAL_PREFIX
Prefix for non-standard properties.static String
EXRULE
Exclusion rule property name.static String
EXTENDED_ADDRESS
VVENUE extended address property name.static String
FREEBUSY
Free/busy property name.static String
GEO
Geographic location property name.static String
LAST_MODIFIED
Last modified date property name.static String
LOCALITY
VVENUE locality property name.static String
LOCATION
Location property name.static String
LOCATION_TYPE
Location type property name.static String
METHOD
iTIP method property name.static String
NAME
VVENUE name property name.static String
ORGANIZER
Organiser property name.static String
PARTICIPANT_TYPE
Participant type.static String
PERCENT_COMPLETE
Percentage complete property name.static String
POSTALCODE
VVENUE postal code property name.static String
PRIORITY
Prority property name.static String
PRODID
Product identifier property name.static String
PROXIMITY
static String
RDATE
Recurrence date property name.static String
RECURRENCE_ID
Recurrence identifier property name.static String
REGION
VVENUE region property name.static String
RELATED_TO
Relationship property name.static String
REPEAT
Repeat rule property name.static String
REQUEST_STATUS
Request status property name.static String
RESOURCE_TYPE
Resource type property name.static String
RESOURCES
Resources property name.static String
RRULE
Recurrence rule property name.static String
SEQUENCE
Sequence property name.static String
STATUS
Status property name.static String
STREET_ADDRESS
VVENUE street address property name.static String
STRUCTURED_DATA
Structured data property name.static String
STYLED_DESCRIPTION
Styled description property name.static String
SUMMARY
Summary property name.static String
TEL
VVENUE telephone property name.static String
TRANSP
Transparency property name.static String
TRIGGER
Alarm trigger property name.static String
TZID
Timezone identifier property name.static String
TZID_ALIAS_OF
static String
TZNAME
Timezone name property name.static String
TZOFFSETFROM
Prior timezone offset property name.static String
TZOFFSETTO
New timezone offset property name.static String
TZUNTIL
static String
TZURL
URL for timezone definition property name.static String
UID
Unique identifier property name.static String
URL
Uniform resource locator property name.static String
VERSION
iCalendar version property name.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Property(String aName)
Constructor.protected
Property(String aName, ParameterList aList)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T extends Property>
Tadd(Parameter parameter)
Add a parameter to the property's parameter list.int
compareTo(Property o)
Property
copy()
Create a (deep) copy of this property.boolean
equals(Object arg0)
<P extends Property>
PgetFluentTarget()
String
getName()
<P extends Parameter>
Optional<P>getParameter(String name)
Convenience method for retrieving a single parameter.ParameterList
getParameterList()
List<Parameter>
getParameters(String... name)
Convenience method for retrieving a list of named parameters.<P extends Parameter>
PgetRequiredParameter(String name)
Retrieve a single required parameter.int
hashCode()
protected abstract PropertyFactory<?>
newFactory()
Returns a new property factory used to create deep copies.<T extends Property>
Tremove(Parameter parameter)
Remove a parameter from the property's parameter list.<T extends Property>
TremoveAll(String... parameterName)
Remove all parameters with the specified name from the property's parameter list.<T extends Property>
Treplace(Parameter parameter)
Add a parameter to the property's parameter list whilst removing all other parameters with the same name.protected void
setParameters(ParameterList parameters)
abstract void
setValue(String aValue)
Sets the current value of the property.String
toString()
abstract ValidationResult
validate()
Perform validation on a property.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.fortuna.ical4j.model.FluentProperty
withParameter
-
-
-
-
Field Detail
-
PRODID
public static final String PRODID
Product identifier property name.- See Also:
- Constant Field Values
-
VERSION
public static final String VERSION
iCalendar version property name.- See Also:
- Constant Field Values
-
CALSCALE
public static final String CALSCALE
Calendar scale property name.- See Also:
- Constant Field Values
-
METHOD
public static final String METHOD
iTIP method property name.- See Also:
- Constant Field Values
-
BUSYTYPE
public static final String BUSYTYPE
Busy type property name.- See Also:
- Constant Field Values
-
CLASS
public static final String CLASS
Classifier property name.- See Also:
- Constant Field Values
-
CREATED
public static final String CREATED
Creation date property name.- See Also:
- Constant Field Values
-
DESCRIPTION
public static final String DESCRIPTION
Description property name.- See Also:
- Constant Field Values
-
DTSTART
public static final String DTSTART
Start date property name.- See Also:
- Constant Field Values
-
GEO
public static final String GEO
Geographic location property name.- See Also:
- Constant Field Values
-
LAST_MODIFIED
public static final String LAST_MODIFIED
Last modified date property name.- See Also:
- Constant Field Values
-
LOCATION
public static final String LOCATION
Location property name.- See Also:
- Constant Field Values
-
ORGANIZER
public static final String ORGANIZER
Organiser property name.- See Also:
- Constant Field Values
-
PERCENT_COMPLETE
public static final String PERCENT_COMPLETE
Percentage complete property name.- See Also:
- Constant Field Values
-
PRIORITY
public static final String PRIORITY
Prority property name.- See Also:
- Constant Field Values
-
DTSTAMP
public static final String DTSTAMP
Date-stamp property name.- See Also:
- Constant Field Values
-
SEQUENCE
public static final String SEQUENCE
Sequence property name.- See Also:
- Constant Field Values
-
STATUS
public static final String STATUS
Status property name.- See Also:
- Constant Field Values
-
SUMMARY
public static final String SUMMARY
Summary property name.- See Also:
- Constant Field Values
-
TRANSP
public static final String TRANSP
Transparency property name.- See Also:
- Constant Field Values
-
UID
public static final String UID
Unique identifier property name.- See Also:
- Constant Field Values
-
URL
public static final String URL
Uniform resource locator property name.- See Also:
- Constant Field Values
-
RECURRENCE_ID
public static final String RECURRENCE_ID
Recurrence identifier property name.- See Also:
- Constant Field Values
-
COMPLETED
public static final String COMPLETED
Completed date property name.- See Also:
- Constant Field Values
-
DUE
public static final String DUE
Due date property name.- See Also:
- Constant Field Values
-
FREEBUSY
public static final String FREEBUSY
Free/busy property name.- See Also:
- Constant Field Values
-
TZID
public static final String TZID
Timezone identifier property name.- See Also:
- Constant Field Values
-
TZNAME
public static final String TZNAME
Timezone name property name.- See Also:
- Constant Field Values
-
TZOFFSETFROM
public static final String TZOFFSETFROM
Prior timezone offset property name.- See Also:
- Constant Field Values
-
TZOFFSETTO
public static final String TZOFFSETTO
New timezone offset property name.- See Also:
- Constant Field Values
-
TZURL
public static final String TZURL
URL for timezone definition property name.- See Also:
- Constant Field Values
-
ACTION
public static final String ACTION
Alarm action property name.- See Also:
- Constant Field Values
-
REPEAT
public static final String REPEAT
Repeat rule property name.- See Also:
- Constant Field Values
-
TRIGGER
public static final String TRIGGER
Alarm trigger property name.- See Also:
- Constant Field Values
-
REQUEST_STATUS
public static final String REQUEST_STATUS
Request status property name.- See Also:
- Constant Field Values
-
DTEND
public static final String DTEND
End date property name.- See Also:
- Constant Field Values
-
DURATION
public static final String DURATION
Duration property name.- See Also:
- Constant Field Values
-
ATTACH
public static final String ATTACH
Attachment property name.- See Also:
- Constant Field Values
-
ATTENDEE
public static final String ATTENDEE
Attendee property name.- See Also:
- Constant Field Values
-
CATEGORIES
public static final String CATEGORIES
Categories property name.- See Also:
- Constant Field Values
-
COMMENT
public static final String COMMENT
Comment property name.- See Also:
- Constant Field Values
-
CONTACT
public static final String CONTACT
Contact property name.- See Also:
- Constant Field Values
-
EXDATE
public static final String EXDATE
Exclusion date property name.- See Also:
- Constant Field Values
-
EXRULE
public static final String EXRULE
Exclusion rule property name.- See Also:
- Constant Field Values
-
RELATED_TO
public static final String RELATED_TO
Relationship property name.- See Also:
- Constant Field Values
-
RESOURCE_TYPE
public static final String RESOURCE_TYPE
Resource type property name.- See Also:
- Constant Field Values
-
RESOURCES
public static final String RESOURCES
Resources property name.- See Also:
- Constant Field Values
-
RDATE
public static final String RDATE
Recurrence date property name.- See Also:
- Constant Field Values
-
RRULE
public static final String RRULE
Recurrence rule property name.- See Also:
- Constant Field Values
-
EXPERIMENTAL_PREFIX
public static final String EXPERIMENTAL_PREFIX
Prefix for non-standard properties.- See Also:
- Constant Field Values
-
COUNTRY
public static final String COUNTRY
VVENUE country property name.- See Also:
- Constant Field Values
-
EXTENDED_ADDRESS
public static final String EXTENDED_ADDRESS
VVENUE extended address property name.- See Also:
- Constant Field Values
-
LOCALITY
public static final String LOCALITY
VVENUE locality property name.- See Also:
- Constant Field Values
-
NAME
public static final String NAME
VVENUE name property name.- See Also:
- Constant Field Values
-
POSTALCODE
public static final String POSTALCODE
VVENUE postal code property name.- See Also:
- Constant Field Values
-
REGION
public static final String REGION
VVENUE region property name.- See Also:
- Constant Field Values
-
STREET_ADDRESS
public static final String STREET_ADDRESS
VVENUE street address property name.- See Also:
- Constant Field Values
-
TEL
public static final String TEL
VVENUE telephone property name.- See Also:
- Constant Field Values
-
ACKNOWLEDGED
public static final String ACKNOWLEDGED
Acknowledged Property taken from http://tools.ietf.org/html/draft-daboo-valarm-extensions-04- See Also:
- Constant Field Values
-
PROXIMITY
public static final String PROXIMITY
- See Also:
- Constant Field Values
-
CALENDAR_ADDRESS
public static final String CALENDAR_ADDRESS
Participant cua property name.- See Also:
- Constant Field Values
-
LOCATION_TYPE
public static final String LOCATION_TYPE
Location type property name.- See Also:
- Constant Field Values
-
PARTICIPANT_TYPE
public static final String PARTICIPANT_TYPE
Participant type.- See Also:
- Constant Field Values
-
STRUCTURED_DATA
public static final String STRUCTURED_DATA
Structured data property name.- See Also:
- Constant Field Values
-
STYLED_DESCRIPTION
public static final String STYLED_DESCRIPTION
Styled description property name.- See Also:
- Constant Field Values
-
TZUNTIL
public static final String TZUNTIL
- See Also:
- Constant Field Values
-
TZID_ALIAS_OF
public static final String TZID_ALIAS_OF
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Property
protected Property(String aName)
Constructor.- Parameters:
aName
- property name
-
Property
protected Property(String aName, ParameterList aList)
- Parameters:
aName
- a property identifieraList
- a list of initial parameters
-
-
Method Detail
-
getFluentTarget
public <P extends Property> P getFluentTarget()
- Specified by:
getFluentTarget
in interfaceFluentProperty
-
getName
public final String getName()
-
getParameterList
public final ParameterList getParameterList()
- Returns:
- Returns the underlying parameter list.
-
setParameters
protected void setParameters(ParameterList parameters)
-
add
public <T extends Property> T add(Parameter parameter)
Add a parameter to the property's parameter list.- Parameters:
parameter
- the parameter to add- Returns:
- a reference to the property to support method chaining
-
remove
public <T extends Property> T remove(Parameter parameter)
Remove a parameter from the property's parameter list.- Parameters:
parameter
- the parameter to remove- Returns:
- a reference to the property to support method chaining
-
removeAll
public <T extends Property> T removeAll(String... parameterName)
Remove all parameters with the specified name from the property's parameter list.- Parameters:
parameterName
- the name of parameters to remove- Returns:
- a reference to the property to support method chaining
-
replace
public <T extends Property> T replace(Parameter parameter)
Add a parameter to the property's parameter list whilst removing all other parameters with the same name.- Parameters:
parameter
- the parameter to add- Returns:
- a reference to the property to support method chaining
-
getParameters
public final List<Parameter> getParameters(String... name)
Convenience method for retrieving a list of named parameters.- Parameters:
name
- name of parameters to retrieve- Returns:
- a parameter list containing only parameters with the specified name
-
getParameter
public final <P extends Parameter> Optional<P> getParameter(String name)
Convenience method for retrieving a single parameter.- Parameters:
name
- name of the parameter to retrieve- Returns:
- the first parameter from the parameter list with the specified name
-
getRequiredParameter
public final <P extends Parameter> P getRequiredParameter(String name)
Retrieve a single required parameter.- Type Parameters:
P
-- Parameters:
name
-- Returns:
-
setValue
public abstract void setValue(String aValue)
Sets the current value of the property.- Parameters:
aValue
- a string representation of the property value- Throws:
IllegalArgumentException
- possibly thrown by setting the value of certain properties
-
validate
public abstract ValidationResult validate() throws ValidationException
Perform validation on a property.- Throws:
ValidationException
- where the property is not in a valid state
-
newFactory
protected abstract PropertyFactory<?> newFactory()
Returns a new property factory used to create deep copies.- Returns:
- a property factory instance
-
copy
public final Property copy()
Create a (deep) copy of this property.- Returns:
- the copy of the property
-
compareTo
public int compareTo(Property o)
- Specified by:
compareTo
in interfaceComparable<Property>
-
-