@Security public class CustomOperationServiceSecurity extends CRUDServiceSecurity<CustomOperationDTO,CustomOperation,CustomOperationData,java.lang.Void> implements CustomOperationService
CustomOperationentityClass| Constructor and Description |
|---|
CustomOperationServiceSecurity() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCreateNew(java.lang.Void param)
Checks whether creating new entities with the given context parameters is allowed, throwing
PermissionDeniedException if not |
protected void |
checkRun(CustomOperationVO customOperationVO,
User user,
BasicAd ad) |
protected boolean |
doHasManageAccess(CustomOperation entity)
Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given
operation
|
boolean |
doHasViewAccess(CustomOperation entity)
Should be implemented in order to return whether the caller is allowed to view the given entity.
|
protected CRUDServiceLocal<CustomOperation,CustomOperationDTO,CustomOperationData,java.lang.Void> |
getImplementation()
Should be implemented in order to return the actual implementation of the service
|
RunCustomOperationData |
getRunData(CustomOperationVO customOperationVO,
UserLocatorVO userVO,
BasicAdVO adVO)
Returns data to run a custom operation over an specific user or specific ad.
|
boolean |
isAccessible(SessionData sessionData,
CustomOperation entity)
Must be implemented in order to determine whether the given entity is accessible for the given session data.
|
java.util.List<CustomOperationVO> |
list()
Lists all available custom operations
|
java.util.List<CustomOperationVO> |
listSystemToRun()
Lists the custom operations with scope =
CustomOperationScope.SYSTEM the logged user can run |
java.util.List<CustomOperationVO> |
listUserToRun(UserLocatorVO locator)
Lists the user custom operations scope =
CustomOperationScope.USER the logged user can run over the given
user (or self if null) |
RunCustomOperationResult |
run(RunCustomOperationDTO params)
Runs a custom operation, returning the result with all type information
|
java.lang.String |
runExternalRedirectCallback(RunExternalRedirectCallbackParams params)
Runs the callback for a custom operation of type external redirect
|
CustomOperationContentResult |
runForContent(RunCustomOperationDTO params,
FileInfo inputFile)
Runs a content page custom operation
|
FileInfo |
runForCSV(RunCustomOperationDTO params,
FileInfo inputFile)
Runs a result page custom operation, returning the all in a CSV file
|
FileInfo |
runForFile(RunCustomOperationDTO params,
FileInfo inputFile)
Runs a custom operation.
|
CustomOperationPageResult |
runForPage(RunCustomOperationDTO params,
FileInfo inputFile)
Runs a result page custom operation
|
FileInfo |
runForPDF(RunCustomOperationDTO params,
FileInfo inputFile)
Runs a result page custom operation, returning the page results in a PDF file
|
java.lang.String |
runForString(RunCustomOperationDTO params,
FileInfo inputFile)
Runs a custom operation.
|
canPerformOperation, canViewHistoryLog, checkManageAccess, checkOperation, checkViewAccess, customizeData, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, onBeforeSave, 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 doHasViewAccess(CustomOperation entity)
CRUDServiceSecuritydoHasViewAccess in class CRUDServiceSecurity<CustomOperationDTO,CustomOperation,CustomOperationData,java.lang.Void>public RunCustomOperationData getRunData(CustomOperationVO customOperationVO, UserLocatorVO userVO, BasicAdVO adVO) throws FrameworkException
CustomOperationServiceCustomOperationScope.SYSTEM, user and ad must be null.
if CustomOperationScope.USER, user must be passed in
if CustomOperationScope.ADVERTISEMENT, ad must be passed ingetRunData in interface CustomOperationServiceFrameworkExceptionpublic boolean isAccessible(SessionData sessionData, CustomOperation entity)
CRUDServiceSecurityCRUDServiceSecurity.hasViewAccess(BaseEntity). If the only condition for an entity is
CRUDServiceSecurity.hasViewAccess(BaseEntity), this method
should return false.isAccessible in class CRUDServiceSecurity<CustomOperationDTO,CustomOperation,CustomOperationData,java.lang.Void>public java.util.List<CustomOperationVO> list() throws FrameworkException
CustomOperationServicelist in interface CustomOperationServiceFrameworkExceptionpublic java.util.List<CustomOperationVO> listSystemToRun() throws FrameworkException
CustomOperationServiceCustomOperationScope.SYSTEM the logged user can runlistSystemToRun in interface CustomOperationServiceFrameworkExceptionpublic java.util.List<CustomOperationVO> listUserToRun(UserLocatorVO locator) throws FrameworkException
CustomOperationServiceCustomOperationScope.USER the logged user can run over the given
user (or self if null)listUserToRun in interface CustomOperationServiceFrameworkExceptionpublic RunCustomOperationResult run(RunCustomOperationDTO params) throws FrameworkException
CustomOperationServicerun in interface CustomOperationServiceFrameworkExceptionpublic java.lang.String runExternalRedirectCallback(RunExternalRedirectCallbackParams params) throws FrameworkException
CustomOperationServicerunExternalRedirectCallback in interface CustomOperationServiceFrameworkExceptionpublic CustomOperationContentResult runForContent(RunCustomOperationDTO params, FileInfo inputFile) throws FrameworkException
CustomOperationServicerunForContent in interface CustomOperationServiceValidationException - If the operation has system scope but an user id was informed, or if the operation
didn't expect a file but one was
uploadedIllegalActionException - When the custom operation result type is not
CustomOperationResultType.RESULT_PAGEFrameworkExceptionpublic FileInfo runForCSV(RunCustomOperationDTO params, FileInfo inputFile) throws FrameworkException
CustomOperationServicerunForCSV in interface CustomOperationServiceValidationException - If the operation has system scope but an user id was informed, or if the operation
didn't expect a file but one was
uploadedIllegalActionException - When the custom operation result type is not
CustomOperationResultType.RESULT_PAGEFrameworkExceptionpublic FileInfo runForFile(RunCustomOperationDTO params, FileInfo inputFile) throws FrameworkException
CustomOperationServicerunForFile in interface CustomOperationServiceValidationException - If the operation has system scope but an user id was informed, or if the operation
didn't expect a file but one was
uploadedIllegalActionException - When the custom operation result type is not
CustomOperationResultType.FILE_DOWNLOADFrameworkExceptionpublic CustomOperationPageResult runForPage(RunCustomOperationDTO params, FileInfo inputFile) throws FrameworkException
CustomOperationServicerunForPage in interface CustomOperationServiceValidationException - If the operation has system scope but an user id was informed, or if the operation
didn't expect a file but one was
uploadedIllegalActionException - When the custom operation result type is not
CustomOperationResultType.RESULT_PAGEFrameworkExceptionpublic FileInfo runForPDF(RunCustomOperationDTO params, FileInfo inputFile) throws FrameworkException
CustomOperationServicerunForPDF in interface CustomOperationServiceValidationException - If the operation has system scope but an user id was informed, or if the operation
didn't expect a file but one was
uploadedIllegalActionException - When the custom operation result type is not
CustomOperationResultType.RESULT_PAGEFrameworkExceptionpublic java.lang.String runForString(RunCustomOperationDTO params, FileInfo inputFile) throws FrameworkException
CustomOperationServicerunForString in interface CustomOperationServiceValidationException - If the operation has system scope but an user id was informed, or if the operation
didn't expect a file but one was
uploadedIllegalActionException - When the custom operation result type is not a stringFrameworkExceptionprotected void checkCreateNew(java.lang.Void param)
CRUDServiceSecurityPermissionDeniedException if notcheckCreateNew in class CRUDServiceSecurity<CustomOperationDTO,CustomOperation,CustomOperationData,java.lang.Void>protected void checkRun(CustomOperationVO customOperationVO, User user, BasicAd ad)
protected boolean doHasManageAccess(CustomOperation entity)
CRUDServiceSecuritydoHasManageAccess in class CRUDServiceSecurity<CustomOperationDTO,CustomOperation,CustomOperationData,java.lang.Void>protected CRUDServiceLocal<CustomOperation,CustomOperationDTO,CustomOperationData,java.lang.Void> getImplementation()
CRUDServiceSecuritygetImplementation in class CRUDServiceSecurity<CustomOperationDTO,CustomOperation,CustomOperationData,java.lang.Void>