org.onebusaway.users.impl
Class UserPropertiesServiceV1Impl

java.lang.Object
  extended by org.onebusaway.users.impl.UserPropertiesServiceV1Impl
All Implemented Interfaces:
UserPropertiesService

public class UserPropertiesServiceV1Impl
extends Object
implements UserPropertiesService


Constructor Summary
UserPropertiesServiceV1Impl()
           
 
Method Summary
 int addStopBookmark(User user, String name, List<String> stopIds, RouteFilter filter)
           
 void authorizeApi(User user, long minRequestInteval)
          Authorize this user to use the api
 void clearDefaultLocation(User user)
           
 void deleteStopBookmarks(User user, int index)
           
 UserBean getAnonymousUserAsBean(UserBean bean)
           
 UserBean getUserAsBean(User user, UserBean bean)
           
 Class<? extends UserProperties> getUserPropertiesType()
           
 void markServiceAlertAsRead(User user, String situationId, long time, boolean isRead)
           
 void mergeProperties(User sourceUser, User targetUser)
           
 void resetUser(User user)
           
 void setDefaultLocation(User user, String locationName, double lat, double lon)
           
 void setLastSelectedStopIds(User user, List<String> stopIds)
           
 void setRememberUserPreferencesEnabled(User user, boolean rememberPreferencesEnabled)
           
 void setUserDao(UserDao dao)
           
 void setUserPropertiesMigration(UserPropertiesMigration userPropertiesMigration)
           
 void updateStopBookmark(User user, int id, String name, List<String> stopIds, RouteFilter routeFilter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserPropertiesServiceV1Impl

public UserPropertiesServiceV1Impl()
Method Detail

setUserDao

public void setUserDao(UserDao dao)

setUserPropertiesMigration

public void setUserPropertiesMigration(UserPropertiesMigration userPropertiesMigration)

getUserPropertiesType

public Class<? extends UserProperties> getUserPropertiesType()
Specified by:
getUserPropertiesType in interface UserPropertiesService

getUserAsBean

public UserBean getUserAsBean(User user,
                              UserBean bean)
Specified by:
getUserAsBean in interface UserPropertiesService

getAnonymousUserAsBean

public UserBean getAnonymousUserAsBean(UserBean bean)
Specified by:
getAnonymousUserAsBean in interface UserPropertiesService

setRememberUserPreferencesEnabled

public void setRememberUserPreferencesEnabled(User user,
                                              boolean rememberPreferencesEnabled)
Specified by:
setRememberUserPreferencesEnabled in interface UserPropertiesService

setDefaultLocation

public void setDefaultLocation(User user,
                               String locationName,
                               double lat,
                               double lon)
Specified by:
setDefaultLocation in interface UserPropertiesService

clearDefaultLocation

public void clearDefaultLocation(User user)
Specified by:
clearDefaultLocation in interface UserPropertiesService

addStopBookmark

public int addStopBookmark(User user,
                           String name,
                           List<String> stopIds,
                           RouteFilter filter)
Specified by:
addStopBookmark in interface UserPropertiesService
Returns:
the id for the newly created bookmark

updateStopBookmark

public void updateStopBookmark(User user,
                               int id,
                               String name,
                               List<String> stopIds,
                               RouteFilter routeFilter)
Specified by:
updateStopBookmark in interface UserPropertiesService

deleteStopBookmarks

public void deleteStopBookmarks(User user,
                                int index)
Specified by:
deleteStopBookmarks in interface UserPropertiesService

setLastSelectedStopIds

public void setLastSelectedStopIds(User user,
                                   List<String> stopIds)
Specified by:
setLastSelectedStopIds in interface UserPropertiesService

resetUser

public void resetUser(User user)
Specified by:
resetUser in interface UserPropertiesService

mergeProperties

public void mergeProperties(User sourceUser,
                            User targetUser)
Specified by:
mergeProperties in interface UserPropertiesService

authorizeApi

public void authorizeApi(User user,
                         long minRequestInteval)
Description copied from interface: UserPropertiesService
Authorize this user to use the api

Specified by:
authorizeApi in interface UserPropertiesService
minRequestInteval - the minimum time between requests in milliseconds

markServiceAlertAsRead

public void markServiceAlertAsRead(User user,
                                   String situationId,
                                   long time,
                                   boolean isRead)
Specified by:
markServiceAlertAsRead in interface UserPropertiesService


Copyright © 2011 OneBusAway. All Rights Reserved.