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 anUnsupportedOperationExceptionwill 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 StringACKNOWLEDGEDAcknowledged Property taken from http://tools.ietf.org/html/draft-daboo-valarm-extensions-04static StringACTIONAlarm action property name.static StringATTACHAttachment property name.static StringATTENDEEAttendee property name.static StringBUSYTYPEBusy type property name.static StringCALENDAR_ADDRESSParticipant cua property name.static StringCALSCALECalendar scale property name.static StringCATEGORIESCategories property name.static StringCLASSClassifier property name.static StringCOMMENTComment property name.static StringCOMPLETEDCompleted date property name.static StringCONTACTContact property name.static StringCOUNTRYVVENUE country property name.static StringCREATEDCreation date property name.static StringDESCRIPTIONDescription property name.static StringDTENDEnd date property name.static StringDTSTAMPDate-stamp property name.static StringDTSTARTStart date property name.static StringDUEDue date property name.static StringDURATIONDuration property name.static StringEXDATEExclusion date property name.static StringEXPERIMENTAL_PREFIXPrefix for non-standard properties.static StringEXRULEExclusion rule property name.static StringEXTENDED_ADDRESSVVENUE extended address property name.static StringFREEBUSYFree/busy property name.static StringGEOGeographic location property name.static StringLAST_MODIFIEDLast modified date property name.static StringLOCALITYVVENUE locality property name.static StringLOCATIONLocation property name.static StringLOCATION_TYPELocation type property name.static StringMETHODiTIP method property name.static StringNAMEVVENUE name property name.static StringORGANIZEROrganiser property name.static StringPARTICIPANT_TYPEParticipant type.static StringPERCENT_COMPLETEPercentage complete property name.static StringPOSTALCODEVVENUE postal code property name.static StringPRIORITYPrority property name.static StringPRODIDProduct identifier property name.static StringPROXIMITYstatic StringRDATERecurrence date property name.static StringRECURRENCE_IDRecurrence identifier property name.static StringREGIONVVENUE region property name.static StringRELATED_TORelationship property name.static StringREPEATRepeat rule property name.static StringREQUEST_STATUSRequest status property name.static StringRESOURCE_TYPEResource type property name.static StringRESOURCESResources property name.static StringRRULERecurrence rule property name.static StringSEQUENCESequence property name.static StringSTATUSStatus property name.static StringSTREET_ADDRESSVVENUE street address property name.static StringSTRUCTURED_DATAStructured data property name.static StringSTYLED_DESCRIPTIONStyled description property name.static StringSUMMARYSummary property name.static StringTELVVENUE telephone property name.static StringTRANSPTransparency property name.static StringTRIGGERAlarm trigger property name.static StringTZIDTimezone identifier property name.static StringTZID_ALIAS_OFstatic StringTZNAMETimezone name property name.static StringTZOFFSETFROMPrior timezone offset property name.static StringTZOFFSETTONew timezone offset property name.static StringTZUNTILstatic StringTZURLURL for timezone definition property name.static StringUIDUnique identifier property name.static StringURLUniform resource locator property name.static StringVERSIONiCalendar version property name.
-
Constructor Summary
Constructors Modifier Constructor Description protectedProperty(String aName)Constructor.protectedProperty(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.intcompareTo(Property o)Propertycopy()Create a (deep) copy of this property.booleanequals(Object arg0)<P extends Property>
PgetFluentTarget()StringgetName()<P extends Parameter>
Optional<P>getParameter(String name)Convenience method for retrieving a single parameter.ParameterListgetParameterList()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.inthashCode()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 voidsetParameters(ParameterList parameters)abstract voidsetValue(String aValue)Sets the current value of the property.StringtoString()abstract ValidationResultvalidate()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:
getFluentTargetin 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:
compareToin interfaceComparable<Property>
-
-