Copyright© 2008-2025 Sitevision AB, all rights reserved.
@Requireable(value="GeolocationValueBuilder") public interface GeolocationValueBuilder extends Builder<GeolocationValue>
GeolocationValue instances that can be used to set geolocation metadata.
GeolocationValueBuilder has three mandatory attributes:
[-90.0 ... 90.0].
[-180.0 ... 180.0].
Using the GeolocationValueBuilder is pretty straightforward, if you remember that it is stateful. Conceptually you would typically use it like this:
When you have built a GeolocationValue instance, you can re-use the GeolocationValueBuilder to build more instances.
Something like:
Tip! The Builder interface documentation contains
more information about Builders and how to work with them!
An instance of the Sitevision class implementing this interface can be obtained via
MetadataUtil.getGeolocationValueBuilder().
See MetadataUtil for how to obtain an instance of the MetadataUtil interface.
| Modifier and Type | Method and Description |
|---|---|
GeolocationValue |
build()
Creates a GeolocationValue instance using current state of this builder.
|
GeolocationValueBuilder |
setLatitude(double aLatitude)
Sets the latitude.
|
GeolocationValueBuilder |
setLongitude(double aLongitude)
Sets the longitude.
|
GeolocationValueBuilder |
setName(String aLocationName)
Sets the location name.
|
GeolocationValueBuilder setName(String aLocationName)
aLocationName - the location name, must not be null or blankGeolocationValueBuilder setLatitude(double aLatitude)
aLatitude - the latitude, must be within range [-90.0 ... 90.0]GeolocationValueBuilder setLongitude(double aLongitude)
aLongitude - the longitude, must be within range [-180.0 ... 180.0]GeolocationValue build() throws IllegalStateException
build in interface Builder<GeolocationValue>IllegalStateException - if the name, longitude or latitude value are invalidSitevision - Content Management Made Easy
Sitevision is an advanced Java enterprise portal product that implements Java Content Repository (JSR 283).
Copyright© 2008-2025 Sitevision AB, all rights reserved.