@Security public class VoucherServiceSecurity extends BaseServiceSecurity implements VoucherService
VoucherService| Constructor and Description |
|---|
VoucherServiceSecurity() |
| Modifier and Type | Method and Description |
|---|---|
SerializableInputStream |
barcode(VoucherBarcodeParams params)
Returns a barcode image of the token of the given voucher
|
VoucherPackWithIdsVO |
buy(BuyVouchersDTO params)
Buys one or more vouchers
|
int |
cancel(CancelVouchersDTO params)
Cancels one or more vouchers
|
void |
changeExpirationDate(ChangeVoucherExpirationDateDTO params)
Changes the voucher expiration date according to the given information.
|
SerializableInputStream |
exportToCSV(VoucherQuery query,
boolean markAsPrinted)
Returns a CSV version of all returned vouchers, optionally marking them as printed
|
VoucherPackWithIdsVO |
generate(GenerateVouchersDTO params)
Generates vouchers
|
BuyVoucherData |
getBuyData(BuyVoucherDataParams params)
Returns data used to buy a voucher
|
VoucherData |
getData(java.lang.Long id)
Returns data about a specific voucher
|
GenerateVouchersData |
getGenerateData(VoucherTypeVO voucherTypeVO)
Returns data which is needed for generating vouchers
|
RedeemVoucherData |
getRedeemData(RedeemVoucherDataParams params)
Returns data used to redeem a voucher
|
InitialRedeemVoucherData |
getRedeemInitialData(UserLocatorVO userVO)
Returns data for starting a voucher redeeming
|
VouchersSearchData |
getSearchData(VoucherSearchContext context,
UserLocatorVO locator)
Returns data for searching vouchers, either over an user or for a general search
|
java.util.List<VoucherTypeDetailedVO> |
listTypesForBuy(UserLocatorVO forUserVO)
Returns the voucher types the logged user can buy vouchers to the given user (defaults to the logged user
himself)
|
java.util.List<VoucherTypeDetailedVO> |
listTypesForGenerate()
Returns the voucher types the logged administrator can generate vouchers on
|
VoucherVO |
loadByToken(java.lang.String token)
Returns a voucher by token
|
SerializableInputStream |
print(java.lang.Long id)
Returns a PDF-printable version of the voucher, and marks it as printed
|
SerializableInputStream |
printAll(VoucherQuery query,
boolean markAsPrinted)
Returns a PDF-printable version of all returned vouchers, optionally marking them as printed
|
RedeemVoucherResult |
redeem(RedeemVoucherDTO params)
Redeems a voucher, returning the generated voucher id
|
protected org.cyclos.impl.access.EntityCheck<?> |
resolveEntityCheck()
Must be implemented in order to return the
EntityCheck managed by this security component, or null if
none |
Page<VoucherVO> |
search(VoucherQuery params)
Searches for vouchers according to the given filters
|
VouchersResultsWithSummaryVO |
searchWithSummary(VoucherQuery params)
Searches for vouchers according to the given filters, also returning summaries per status
|
checkGuest, 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, updatepublic SerializableInputStream barcode(VoucherBarcodeParams params) throws FrameworkException
VoucherServicebarcode in interface VoucherServiceFrameworkExceptionpublic VoucherPackWithIdsVO buy(BuyVouchersDTO params) throws FrameworkException
VoucherServicebuy in interface VoucherServiceFrameworkExceptionpublic int cancel(CancelVouchersDTO params) throws FrameworkException
VoucherServicecancel in interface VoucherServiceFrameworkExceptionpublic void changeExpirationDate(ChangeVoucherExpirationDateDTO params) throws FrameworkException
VoucherServicechangeExpirationDate in interface VoucherServiceFrameworkExceptionpublic SerializableInputStream exportToCSV(VoucherQuery query, boolean markAsPrinted) throws FrameworkException
VoucherServiceexportToCSV in interface VoucherServiceFrameworkExceptionpublic VoucherPackWithIdsVO generate(GenerateVouchersDTO params) throws FrameworkException
VoucherServicegenerate in interface VoucherServiceFrameworkExceptionpublic BuyVoucherData getBuyData(BuyVoucherDataParams params) throws FrameworkException
VoucherServicegetBuyData in interface VoucherServiceFrameworkExceptionpublic VoucherData getData(java.lang.Long id) throws FrameworkException
VoucherServicegetData in interface VoucherServiceFrameworkExceptionpublic GenerateVouchersData getGenerateData(VoucherTypeVO voucherTypeVO) throws FrameworkException
VoucherServicegetGenerateData in interface VoucherServiceFrameworkExceptionpublic RedeemVoucherData getRedeemData(RedeemVoucherDataParams params) throws FrameworkException
VoucherServicegetRedeemData in interface VoucherServiceFrameworkExceptionVoucherService.redeem(RedeemVoucherDTO)public InitialRedeemVoucherData getRedeemInitialData(UserLocatorVO userVO) throws FrameworkException
VoucherServicegetRedeemInitialData in interface VoucherServiceFrameworkExceptionpublic VouchersSearchData getSearchData(VoucherSearchContext context, UserLocatorVO locator) throws FrameworkException
VoucherServicegetSearchData in interface VoucherServiceFrameworkExceptionpublic java.util.List<VoucherTypeDetailedVO> listTypesForBuy(UserLocatorVO forUserVO) throws FrameworkException
VoucherServicelistTypesForBuy in interface VoucherServiceFrameworkExceptionpublic java.util.List<VoucherTypeDetailedVO> listTypesForGenerate() throws FrameworkException
VoucherServicelistTypesForGenerate in interface VoucherServiceFrameworkExceptionpublic VoucherVO loadByToken(java.lang.String token) throws FrameworkException
VoucherServiceloadByToken in interface VoucherServiceFrameworkExceptionpublic SerializableInputStream print(java.lang.Long id) throws FrameworkException
VoucherServiceprint in interface VoucherServiceFrameworkExceptionpublic SerializableInputStream printAll(VoucherQuery query, boolean markAsPrinted) throws FrameworkException
VoucherServiceprintAll in interface VoucherServiceFrameworkExceptionpublic RedeemVoucherResult redeem(RedeemVoucherDTO params) throws FrameworkException
VoucherServiceredeem in interface VoucherServiceFrameworkExceptionpublic Page<VoucherVO> search(VoucherQuery params) throws FrameworkException
VoucherServicesearch in interface VoucherServiceFrameworkExceptionpublic VouchersResultsWithSummaryVO searchWithSummary(VoucherQuery params) throws FrameworkException
VoucherServicesearchWithSummary in interface VoucherServiceFrameworkExceptionprotected org.cyclos.impl.access.EntityCheck<?> resolveEntityCheck()
BaseServiceSecurityEntityCheck managed by this security component, or null if
noneresolveEntityCheck in class BaseServiceSecurity