@Security public class RecordServiceSecurity extends CRUDServiceSecurity<RecordDTO,Record,RecordData,RecordDataParams> implements RecordService
RecordServiceentityClass| Constructor and Description |
|---|
RecordServiceSecurity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPerformOperation(Record record,
CRUDOperation operation)
Returns whether the logged user can perform the given operation over the given entity
|
<T extends RecordType> |
canPerformOperation(T recordType,
User user,
CRUDOperation operation) |
protected void |
checkCreateNew(RecordDataParams params)
Checks whether creating new entities with the given context parameters is allowed, throwing
PermissionDeniedException if not |
protected void |
checkSharedFieldsSearchPermissions() |
protected void |
customizeData(RecordData data)
Can be overridden in order to process the returned data object for the given entity
|
boolean |
doHasManageAccess(Record record)
Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given
operation
|
boolean |
doHasViewAccess(Record record)
Should be implemented in order to return whether the caller is allowed to view the given entity.
|
protected RecordServiceLocal |
getImplementation()
Should be implemented in order to return the actual implementation of the service
|
java.util.List<RecordTypeCountVO> |
getRecordTypeCount(AccountOwnerLocator locator)
Returns, for each visible record type, the count and permissions over records of the given owner (either system
or user)
|
RecordSearchData |
getSearchData(RecordTypeVO recordTypeVO,
UserLocatorVO locator)
Returns data for searching records
|
SharedRecordFieldsSearchData |
getSharedFieldsSearchData()
Returns data for searching records with shared record fields
|
TiledRecordsData |
getTiledRecordsData(RecordTypeVO recordTypeVO,
UserLocatorVO locator)
Returns data for listing tiled records of a given user or system
|
boolean |
isAccessible(SessionData sessionData,
Record entity)
Must be implemented in order to determine whether the given entity is accessible for the given session data.
|
RecordVO |
loadVO(java.lang.Long id)
Loads a VO, by id
|
protected void |
onBeforeSave(RecordDTO dto,
Record entity) |
Page<RecordVO> |
search(RecordQuery query)
Searches for records
|
canViewHistoryLog, checkManageAccess, checkOperation, checkViewAccess, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, remove, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveEntityCheck, save, saveWithConfirmationPasswordcheckGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initializecanManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getAccountHandler, getAuthHandler, getBaseEntityManagerHandler, getChannelConfiguration, getConfiguration, getConversionHandler, getCustomFieldValueHandler, getEntityManagerHandler, getGroupsHandler, getLoggedBasicUser, getLoggedUser, getProducts, getProductsHandler, getReportHandler, getTranslatedName, getTranslatedValue, getUserLocatorHandler, getValidationResult, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, toDate, toDateTime, validatedelete, detach, find, flush, from, getApplicationContext, getConfigurationHandler, getDataTranslationHandler, getFormatter, getFormatter, getFormatter, getLogger, getNotificationHandler, getProfileFieldHandler, getRemoteAddress, getSessionData, getTransactionHandler, getTranslationHandler, message, message, persist, processBatch, refresh, remove, subQuery, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetData, getDataForNew, load, remove, removeAll, savepublic boolean canPerformOperation(Record record, CRUDOperation operation)
CRUDServiceSecuritycanPerformOperation in class CRUDServiceSecurity<RecordDTO,Record,RecordData,RecordDataParams>public <T extends RecordType> boolean canPerformOperation(T recordType, User user, CRUDOperation operation)
public boolean doHasManageAccess(Record record)
CRUDServiceSecuritydoHasManageAccess in class CRUDServiceSecurity<RecordDTO,Record,RecordData,RecordDataParams>public boolean doHasViewAccess(Record record)
CRUDServiceSecuritydoHasViewAccess in class CRUDServiceSecurity<RecordDTO,Record,RecordData,RecordDataParams>public java.util.List<RecordTypeCountVO> getRecordTypeCount(AccountOwnerLocator locator) throws FrameworkException
RecordServicegetRecordTypeCount in interface RecordServiceFrameworkExceptionpublic RecordSearchData getSearchData(RecordTypeVO recordTypeVO, UserLocatorVO locator)
RecordServicegetSearchData in interface RecordServicepublic SharedRecordFieldsSearchData getSharedFieldsSearchData()
RecordServicegetSharedFieldsSearchData in interface RecordServicepublic TiledRecordsData getTiledRecordsData(RecordTypeVO recordTypeVO, UserLocatorVO locator)
RecordServicegetTiledRecordsData in interface RecordServicepublic boolean isAccessible(SessionData sessionData, Record entity)
CRUDServiceSecurityCRUDServiceSecurity.hasViewAccess(BaseEntity). If the only condition for an entity is
CRUDServiceSecurity.hasViewAccess(BaseEntity), this method
should return false.isAccessible in class CRUDServiceSecurity<RecordDTO,Record,RecordData,RecordDataParams>public RecordVO loadVO(java.lang.Long id) throws FrameworkException
RecordServiceloadVO in interface RecordServiceFrameworkExceptionpublic Page<RecordVO> search(RecordQuery query) throws QueryParseException
RecordServicesearch in interface RecordServiceQueryParseExceptionprotected void checkCreateNew(RecordDataParams params)
CRUDServiceSecurityPermissionDeniedException if notcheckCreateNew in class CRUDServiceSecurity<RecordDTO,Record,RecordData,RecordDataParams>protected void checkSharedFieldsSearchPermissions()
protected void customizeData(RecordData data)
CRUDServiceSecuritycustomizeData in class CRUDServiceSecurity<RecordDTO,Record,RecordData,RecordDataParams>protected RecordServiceLocal getImplementation()
CRUDServiceSecuritygetImplementation in class CRUDServiceSecurity<RecordDTO,Record,RecordData,RecordDataParams>protected void onBeforeSave(RecordDTO dto, Record entity)
onBeforeSave in class CRUDServiceSecurity<RecordDTO,Record,RecordData,RecordDataParams>