@Deprecated public final class Location extends SlingAdaptable
LocationManager
to access location objects.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HOURS
Deprecated.
|
static java.lang.String |
LATITUDE
Deprecated.
|
static java.lang.String |
LONGITUDE
Deprecated.
|
static java.lang.String |
PHONE
Deprecated.
|
Constructor and Description |
---|
Location(Resource resource)
Deprecated.
Creates a location 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 . |
boolean |
equals(java.lang.Object obj)
Deprecated.
|
Coordinates |
getCoordinates()
Deprecated.
Returns coordinates for this location if latitude and longitude are both available.
|
java.lang.String |
getDescription()
Deprecated.
Return the description of this location as entered by the user.
|
java.lang.String |
getFullAddress()
Deprecated.
The full string representation of a location using the default set of fields
|
java.lang.String |
getFullAddress(java.lang.String[] fields)
Deprecated.
The full string representation of a location using the provided array of property names.
|
java.lang.String[] |
getHours()
Deprecated.
Returns the location hours, or null, if no hours property exists.
|
java.lang.String |
getPath()
Deprecated.
Returns the location path in the repository.
|
java.lang.String |
getPhone()
Deprecated.
Returns the location phone number.
|
java.lang.String |
getTitle()
Deprecated.
Returns the title of this location as entered by the user.
|
int |
hashCode()
Deprecated.
|
void |
setCoordinates(Coordinates coord)
Deprecated.
Sets the location coordinate properties.
|
void |
setHours(java.lang.String[] hours)
Deprecated.
Sets the location hours.
|
void |
setPhone(java.lang.String phone)
Deprecated.
Sets the location phone number.
|
setAdapterManager, unsetAdapterManager
public static final java.lang.String LATITUDE
public static final java.lang.String LONGITUDE
public static final java.lang.String PHONE
public static final java.lang.String HOURS
public Location(Resource resource)
resource
- The resource representing a location.java.lang.IllegalArgumentException
- when Resource is null
public java.lang.String getPath()
public java.lang.String getTitle()
null
if not defined.public java.lang.String getDescription()
null
if not defined.public void setCoordinates(Coordinates coord) throws AddressException
coord
- The new location properties.AddressException
- if persisting the coordinates fails.public Coordinates getCoordinates()
null
if not definedpublic java.lang.String getPhone()
public void setPhone(java.lang.String phone) throws AddressException
phone
- The location phone numberAddressException
- if persisting fails.public java.lang.String[] getHours()
public void setHours(java.lang.String[] hours) throws AddressException
hours
- The location hoursAddressException
- if persisting fails.public java.lang.String getFullAddress()
public java.lang.String getFullAddress(java.lang.String[] fields)
fields
- Property names to usepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public <AdapterType> AdapterType adaptTo(java.lang.Class<AdapterType> type)
SlingAdaptable
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 type"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"