Interface ILocation


  • public interface ILocation
    A location of a user or task. A location has a geo-position with coordinates (latitude, longitude, altitude). But also information about the location's address. To separate different locations a location type is provided.
    API:
    This is a public API.
    • Method Detail

      • create

        static LocationBuilder create​(GeoPosition position)

        Use to creates a new location

        Example:

         import ch.ivyteam.ivy.location.GeoPosition;
         import ch.ivyteam.ivy.location.LocationBuilder;
         GeoPosition ivyTeamOffice = GeoPosition.inDegrees(47.171573, 8.516835);
         LocationBuilder builder = ILocation.create(ivyTeamOffice).withNote("My work place")
         ivy.session.getSessionUser().locations().add(builder);
         

        Parameters:
        position -
        Returns:
        location builder
        See Also:
        ILocationService.add(LocationBuilder)
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getPosition

        GeoPosition getPosition()

        The geo-position with coordinates latitude, longitude, altitude.

        Returns:
        geo-position
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getName

        String getName()

        The name of the location. E.g. the name of the contact person or a brief description of the location (e.g. ivyTeam HQ, Church, Chrysler Building).

        Returns:
        name
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getAddress

        String getAddress()

        The postal address that belongs to the location.

        Returns:
        postal address
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getNote

        String getNote()

        Additional information related to the location that may be of any help.

        Returns:
        note
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getType

        String getType()

        The type of the location.

        There are some predefined constants for the type of a location (see ILocation.Type.USER_POSITION). Feel free to invent your own.

        Returns:
        type
        See Also:
        ILocation.Type
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.
      • getTimestamp

        Date getTimestamp()

        The creation timestamp of the location.

        Returns:
        timestamp
        API:
        This public API is available in IvyScript and Java. It has the visibility EXPERT.