|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectezvcard.property.VCardProperty
ezvcard.property.Agent
public class Agent
An embedded vCard or URL containing the information of someone who represents the person.
URL
VCard vcard = new VCard(); Agent agent = new Agent("http://mi5.gov.uk/007"); vcard.setAgent(agent);
vCard
VCard vcard = new VCard(); VCard agentVcard = new VCard(); agentVcard.setFormattedName("Agent 007"); Agent agent = new Agent(agentVcard); vcard.setAgent(agent);
Property name: AGENT
Supported versions: 2.1, 3.0
Field Summary |
---|
Fields inherited from class ezvcard.property.VCardProperty |
---|
group, parameters |
Constructor Summary | |
---|---|
Agent()
Creates an empty agent property. |
|
Agent(String url)
Creates an agent property. |
|
Agent(VCard vcard)
Creates an agent property. |
Method Summary | |
---|---|
Set<VCardVersion> |
_supportedVersions()
Gets the vCard versions that support this property. |
protected void |
_validate(List<Warning> warnings,
VCardVersion version,
VCard vcard)
Checks the property for data consistency problems or deviations from the spec. |
String |
getUrl()
Gets the URL to the agent's information. |
VCard |
getVCard()
Gets an embedded vCard with the agent's information. |
void |
setUrl(String url)
Sets the URL to the agent's information. |
void |
setVCard(VCard vcard)
Sets an embedded vCard with the agent's information. |
Methods inherited from class ezvcard.property.VCardProperty |
---|
addParameter, compareTo, getGroup, getParameter, getParameters, getParameters, getSupportedVersions, removeParameter, setGroup, setParameter, setParameters, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Agent()
public Agent(String url)
url
- a URL pointing to the agent's informationpublic Agent(VCard vcard)
vcard
- a vCard containing the agent's informationMethod Detail |
---|
public Set<VCardVersion> _supportedVersions()
VCardProperty
Gets the vCard versions that support this property.
This method should be overridden by child classes if the property does not support all vCard versions. The default implementation of this method returns all vCard versions.
_supportedVersions
in class VCardProperty
public String getUrl()
public void setUrl(String url)
url
- the URLpublic VCard getVCard()
public void setVCard(VCard vcard)
vcard
- the vCardprotected void _validate(List<Warning> warnings, VCardVersion version, VCard vcard)
VCardProperty
_validate
in class VCardProperty
warnings
- the list to add the warnings toversion
- the version to check the property againstvcard
- the vCard this property belongs to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |