@Deprecated public final class Address extends SlingAdaptable implements java.lang.Comparable<Address>
AddressManager
to create address objects.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CITY
Deprecated.
Property describing the address city.
|
static java.lang.String |
COUNTRY
Deprecated.
Property describing the country.
|
static java.lang.String |
FIRST_NAME
Deprecated.
Property describing the address first name.
|
static java.lang.String |
LABEL
Deprecated.
Property describing the address label.
|
static java.lang.String |
LAST_NAME
Deprecated.
Property describing the address last name.
|
static java.lang.String |
PARAM_ADDRESS_PATH
Deprecated.
Address path parameter name.
|
static java.lang.String |
STATE
Deprecated.
Property describing the state (mainly used in the U.S.)
|
static java.lang.String |
STREET_LINE1
Deprecated.
Property describing the 1st line of the address street.
|
static java.lang.String |
STREET_LINE2
Deprecated.
Property describing the 2nd line of the address street.
|
static java.lang.String |
TITLE
Deprecated.
Property describing the address title.
|
static java.lang.String |
ZIP_CODE
Deprecated.
Property describing the zip code.
|
Constructor and Description |
---|
Address(Resource res)
Deprecated.
Creates an address object.
|
Modifier and Type | Method and Description |
---|---|
<AdapterType> |
adaptTo(java.lang.Class<AdapterType> type)
Deprecated.
Calls into the registered
AdapterManager to adapt this object to
the desired type . |
int |
compareTo(Address address)
Deprecated.
Compares the current address with another one for sorting.
|
java.lang.String |
getCity()
Deprecated.
Returns the address city.
|
java.lang.String |
getCountry()
Deprecated.
Returns the address country.
|
java.lang.String |
getFirstName()
Deprecated.
Returns the address first name.
|
java.lang.String |
getLabel()
Deprecated.
Returns the address label.
|
java.lang.String |
getLastName()
Deprecated.
Returns the address last name.
|
java.lang.String |
getPath()
Deprecated.
Returns the address path in the repository.
|
ValueMap |
getProperties()
Deprecated.
Returns the address properties.
|
<T> T |
getProperty(java.lang.String key,
java.lang.Class<T> type)
Deprecated.
Returns a named address property converted to a given type.
|
<T> T |
getProperty(java.lang.String key,
T defaultValue)
Deprecated.
Returns a named address property or a default value if the property can not be retrieved.
|
java.lang.String |
getState()
Deprecated.
Returns the address state.
|
java.lang.String |
getStreetLine1()
Deprecated.
Returns the 1st line of the address street.
|
java.lang.String |
getStreetLine2()
Deprecated.
Returns the 2nd line of the address street.
|
java.lang.String |
getTitle()
Deprecated.
Returns the address title.
|
java.lang.String |
getZipCode()
Deprecated.
Returns the address zip code.
|
void |
setCity(java.lang.String city)
Deprecated.
Sets the address city.
|
void |
setCountry(java.lang.String country)
Deprecated.
Sets the address country.
|
void |
setFirstName(java.lang.String firstName)
Deprecated.
Sets the address first name.
|
void |
setLabel(java.lang.String label)
Deprecated.
Sets the address label.
|
void |
setLastName(java.lang.String lastName)
Deprecated.
Sets the address last name.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Deprecated.
Sets the address properties.
|
void |
setProperty(java.lang.String key,
java.lang.Object value)
Deprecated.
Sets an address property.
|
void |
setState(java.lang.String state)
Deprecated.
Sets the address state.
|
void |
setStreetLine1(java.lang.String streetLine1)
Deprecated.
Sets the 1st line of the address street.
|
void |
setStreetLine2(java.lang.String streetLine2)
Deprecated.
Sets the 2nd line of the address street.
|
void |
setTitle(java.lang.String title)
Deprecated.
Sets the address title.
|
void |
setZipCode(java.lang.String zipCode)
Deprecated.
Sets the address zip code.
|
setAdapterManager, unsetAdapterManager
public static final java.lang.String LABEL
public static final java.lang.String TITLE
public static final java.lang.String FIRST_NAME
public static final java.lang.String LAST_NAME
public static final java.lang.String STREET_LINE1
public static final java.lang.String STREET_LINE2
public static final java.lang.String CITY
public static final java.lang.String ZIP_CODE
public static final java.lang.String STATE
public static final java.lang.String COUNTRY
public static final java.lang.String PARAM_ADDRESS_PATH
public Address(Resource res)
res
- The resource that represents the address.public java.lang.String getPath()
public ValueMap getProperties()
ValueMap
.public <T> T getProperty(java.lang.String key, java.lang.Class<T> type)
T
- The class of the typekey
- The name of the propertytype
- The type to which the property should be converted.public <T> T getProperty(java.lang.String key, T defaultValue)
T
- The class of the typekey
- The name of the propertydefaultValue
- The default value to use if the named property does
not exist or cannot be converted to the requested type. The
default value is also used to define the type to convert the
value to. If this is null
any existing property is
not converted.public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties) throws AddressException
properties
- The new address properties.AddressException
- if persisting the properties fails.public void setProperty(java.lang.String key, java.lang.Object value) throws AddressException
key
- The name of the propertyvalue
- The value of the propertyAddressException
- if persisting the property fails.public java.lang.String getLabel()
public void setLabel(java.lang.String label) throws AddressException
label
- The address labelAddressException
- if persisting fails.public java.lang.String getTitle()
public void setTitle(java.lang.String title) throws AddressException
title
- The address titleAddressException
- if persisting fails.public java.lang.String getFirstName()
public void setFirstName(java.lang.String firstName) throws AddressException
firstName
- The address first nameAddressException
- if persisting fails.public java.lang.String getLastName()
public void setLastName(java.lang.String lastName) throws AddressException
lastName
- The address last nameAddressException
- if persisting fails.public java.lang.String getStreetLine1()
public void setStreetLine1(java.lang.String streetLine1) throws AddressException
streetLine1
- The address 1st lineAddressException
- if persisting fails.public java.lang.String getStreetLine2()
public void setStreetLine2(java.lang.String streetLine2) throws AddressException
streetLine2
- The address 2nd lineAddressException
- if persisting fails.public java.lang.String getCity()
public void setCity(java.lang.String city) throws AddressException
city
- The address cityAddressException
- if persisting fails.public java.lang.String getZipCode()
public void setZipCode(java.lang.String zipCode) throws AddressException
zipCode
- The address zip codeAddressException
- if persisting fails.public java.lang.String getState()
public void setState(java.lang.String state) throws AddressException
state
- The address stateAddressException
- if persisting fails.public java.lang.String getCountry()
public void setCountry(java.lang.String country) throws AddressException
country
- The address countryAddressException
- if persisting fails.public int compareTo(Address address)
compareTo
in interface java.lang.Comparable<Address>
address
- The address which has to be compared with the current oneComparable.compareTo(Object)
public <AdapterType> AdapterType adaptTo(java.lang.Class<AdapterType> type)
AdapterManager
to adapt this object to
the desired type
.
This method implements a cache of adapters to improve performance. That is repeated calls to this method with the same class will result in the same object to be returned.
adaptTo
in interface Adaptable
adaptTo
in class SlingAdaptable
AdapterType
- The generic type to which this resource is adapted
totype
- The Class object of the target type, such as
javax.jcr.Node.class
or
java.io.File.class
null
if the resource cannot
adapt to the requested typeCopyright © 2010 - 2020 Adobe. All Rights Reserved