Package org.cyclos.impl.users
Interface UserAddressServiceLocal
-
- All Superinterfaces:
CRUDService<UserAddressDTO,UserAddressData,UserAddressDataParams>,CRUDServiceLocal<UserAddress,UserAddressDTO,UserAddressData,UserAddressDataParams>,CRUDWithConfirmationPasswordService<UserAddressDTO,UserAddressData,UserAddressDataParams>,Service,UserAddressService
public interface UserAddressServiceLocal extends UserAddressService, CRUDServiceLocal<UserAddress,UserAddressDTO,UserAddressData,UserAddressDataParams>
Local interface forUserAddressService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappendValidations(Validator validator, AddressDTO address, ConfigurationAccessor configuration, boolean nameRequired)Append validation of address fields to the given validatorvoidcleanDisabledAddressFields(IAddress address, ConfigurationAccessor configuration)Sets null to the disabled address fields according to the given configurationintcount(User user)Count the addresses of the given user (hidden or not).List<UserAddressVO>getAddresses(User user, boolean visibleOnly, boolean locatedOnly)Returns all the user addresses or only the visible or located onesUserAddressgetDefaultUserAddress(User user)Returns the user default address or null if none existsSearchByDistanceDatagetSearchByDistanceData()Returns data for the logged user to search by distanceValidatorgetValidator(AddressDTO address, Group group, boolean nameRequired)Get a validator to validate in other servicesList<UserAddress>listByUser(User user)Returns the addresses of the given user.booleanmaxAddressesReached(User user)Returns whether the given has reached the limit of allowed addressesvoidremoveAll(User user)Removes all addresses of the given user-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, newEntity, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
Methods inherited from interface org.cyclos.services.CRUDWithConfirmationPasswordService
getConfirmationPasswordInputForRemove, removeAllWithConfirmationPassword, removeWithConfirmationPassword, saveWithConfirmationPassword
-
Methods inherited from interface org.cyclos.services.users.UserAddressService
getAddressListData, markAsDefault
-
-
-
-
Method Detail
-
appendValidations
void appendValidations(Validator validator, AddressDTO address, ConfigurationAccessor configuration, boolean nameRequired)
Append validation of address fields to the given validator
-
cleanDisabledAddressFields
void cleanDisabledAddressFields(IAddress address, ConfigurationAccessor configuration)
Sets null to the disabled address fields according to the given configuration
-
count
int count(User user)
Count the addresses of the given user (hidden or not).
-
getAddresses
List<UserAddressVO> getAddresses(User user, boolean visibleOnly, boolean locatedOnly)
Returns all the user addresses or only the visible or located ones
-
getDefaultUserAddress
UserAddress getDefaultUserAddress(User user)
Returns the user default address or null if none exists
-
getSearchByDistanceData
SearchByDistanceData getSearchByDistanceData()
Returns data for the logged user to search by distance
-
getValidator
Validator getValidator(AddressDTO address, Group group, boolean nameRequired)
Get a validator to validate in other services
-
listByUser
List<UserAddress> listByUser(User user)
Returns the addresses of the given user. If the logged user can not view hidden profile fields then only visible addresses are returned.
-
maxAddressesReached
boolean maxAddressesReached(User user)
Returns whether the given has reached the limit of allowed addresses
-
removeAll
void removeAll(User user)
Removes all addresses of the given user- Parameters:
user-
-
-