Package org.cyclos.security.users
Class UserAddressServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.CRUDServiceSecurity<UserAddressDTO,UserAddress,UserAddressData,UserAddressDataParams>
-
- org.cyclos.security.users.UserAddressServiceSecurity
-
- All Implemented Interfaces:
CRUDService<UserAddressDTO,UserAddressData,UserAddressDataParams>,CRUDWithConfirmationPasswordService<UserAddressDTO,UserAddressData,UserAddressDataParams>,Service,UserAddressService
@Security public class UserAddressServiceSecurity extends CRUDServiceSecurity<UserAddressDTO,UserAddress,UserAddressData,UserAddressDataParams> implements UserAddressService
Security forUserAddressService
-
-
Field Summary
-
Fields inherited from class org.cyclos.security.CRUDServiceSecurity
entityClass
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description UserAddressServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanPerformOperation(UserAddress entity, CRUDOperation operation)Returns whether the logged user can perform the given operation over the given entityprotected voidcheckCreateNew(UserAddressDataParams params)Checks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif notbooleandoHasManageAccess(UserAddress address)Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given operationbooleandoHasViewAccess(UserAddress address)Should be implemented in order to return whether the caller is allowed to view the given entity.UserAddressListDatagetAddressListData(UserLocatorVO locator)Returns all the user addresses.protected UserAddressServiceLocalgetImplementation()Should be implemented in order to return the actual implementation of the servicebooleanisAccessible(SessionData sessionData, UserAddress entity)Must be implemented in order to determine whether the given entity is accessible for the given session data.voidmarkAsDefault(Long addressId)Marks the given address as default for it's ownerprotected voidonBeforeSave(UserAddressDTO dto, UserAddress address)-
Methods inherited from class org.cyclos.security.CRUDServiceSecurity
canViewData, checkManageAccess, checkOperation, checkSave, checkViewAccess, customizeData, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, remove, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveEntityCheck, save, saveWithConfirmationPassword
-
Methods inherited from class org.cyclos.security.BaseServiceSecurity
checkGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkScope, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initialize
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.services.CRUDWithConfirmationPasswordService
getConfirmationPasswordInputForRemove, removeAllWithConfirmationPassword, removeWithConfirmationPassword, saveWithConfirmationPassword
-
-
-
-
Method Detail
-
canPerformOperation
public boolean canPerformOperation(UserAddress entity, CRUDOperation operation)
Description copied from class:CRUDServiceSecurityReturns whether the logged user can perform the given operation over the given entity- Overrides:
canPerformOperationin classCRUDServiceSecurity<UserAddressDTO,UserAddress,UserAddressData,UserAddressDataParams>
-
doHasManageAccess
public boolean doHasManageAccess(UserAddress address)
Description copied from class:CRUDServiceSecurityShould be implemented in order to return whether the caller is allowed to manage the given entity, for the given operation- Specified by:
doHasManageAccessin classCRUDServiceSecurity<UserAddressDTO,UserAddress,UserAddressData,UserAddressDataParams>
-
doHasViewAccess
public boolean doHasViewAccess(UserAddress address)
Description copied from class:CRUDServiceSecurityShould be implemented in order to return whether the caller is allowed to view the given entity.- Specified by:
doHasViewAccessin classCRUDServiceSecurity<UserAddressDTO,UserAddress,UserAddressData,UserAddressDataParams>
-
getAddressListData
public UserAddressListData getAddressListData(UserLocatorVO locator)
Description copied from interface:UserAddressServiceReturns all the user addresses. If the logged user manages the given user, the hidden addresses will be also returned.- Specified by:
getAddressListDatain interfaceUserAddressService
-
isAccessible
public boolean isAccessible(SessionData sessionData, UserAddress entity)
Description copied from class:CRUDServiceSecurityMust be implemented in order to determine whether the given entity is accessible for the given session data. This method shouldn't check the same condition asCRUDServiceSecurity.hasViewAccess(BaseEntity). If the only condition for an entity isCRUDServiceSecurity.hasViewAccess(BaseEntity), this method should return false.- Specified by:
isAccessiblein classCRUDServiceSecurity<UserAddressDTO,UserAddress,UserAddressData,UserAddressDataParams>
-
markAsDefault
public void markAsDefault(Long addressId)
Description copied from interface:UserAddressServiceMarks the given address as default for it's owner- Specified by:
markAsDefaultin interfaceUserAddressService
-
checkCreateNew
protected void checkCreateNew(UserAddressDataParams params)
Description copied from class:CRUDServiceSecurityChecks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif not- Specified by:
checkCreateNewin classCRUDServiceSecurity<UserAddressDTO,UserAddress,UserAddressData,UserAddressDataParams>
-
getImplementation
protected UserAddressServiceLocal getImplementation()
Description copied from class:CRUDServiceSecurityShould be implemented in order to return the actual implementation of the service- Specified by:
getImplementationin classCRUDServiceSecurity<UserAddressDTO,UserAddress,UserAddressData,UserAddressDataParams>
-
onBeforeSave
protected void onBeforeSave(UserAddressDTO dto, UserAddress address)
- Overrides:
onBeforeSavein classCRUDServiceSecurity<UserAddressDTO,UserAddress,UserAddressData,UserAddressDataParams>
-
-