Package org.cyclos.impl.utils
Class LinkGeneratorHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseNetworkedHandlerImpl
-
- org.cyclos.impl.utils.LinkGeneratorHandlerImpl
-
- All Implemented Interfaces:
LinkGeneratorHandler
@Component public class LinkGeneratorHandlerImpl extends BaseNetworkedHandlerImpl implements LinkGeneratorHandler
-
-
Field Summary
-
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, profileFieldHandler, transactionHandler, translationHandler
-
Fields inherited from interface org.cyclos.impl.utils.LinkGeneratorHandler
ATTR_ENTITY_ID, ATTR_ENTITY_ID_PARAM, ATTR_EXECUTION, ATTR_EXTERNAL_REDIRECT_EXECUTION, ATTR_LOCATION, ATTR_MOBILE_URL_FILE_PART, ATTR_PAYMENT_AMOUNT, ATTR_PAYMENT_CURRENCY, ATTR_PAYMENT_CUSTOM_VALUES, ATTR_PAYMENT_DESCRIPTION, ATTR_PAYMENT_TO, ATTR_PAYMENT_TYPE, ATTR_STORAGE, ATTR_TICKET, ATTR_TYPE, ATTR_URL_FILE_PART, ATTR_USER, ATTR_VALIDATION_KEY
-
-
Constructor Summary
Constructors Constructor Description LinkGeneratorHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcustomOperationExternalRedirect(ExternalRedirectExecution ere)Generates a link for a custom operation external redirect execution.StringcustomWizardExternalRedirect(CustomWizardExecution execution, CustomWizardExecutionStorage storage)Generates a link for a custom wizard external redirect execution.StringeasyInvoice(LocateUserResult payee, BigDecimal amount, String description, Currency currency, PaymentTransferType paymentType, Map<TransactionCustomField,String> customValues)Generates a link for an easy invoice.StringemailChange(String key, BasicUser user)Generates a link for the validating an e-mail change for the given user.StringforgotPassword(String key, BasicUser user)Generates a link for the forgot password request for the given user.Stringlocation(Location location, Long entityId, BasicUser user)Generates a link for a given Location and entity adding ID parameter in the URL with the entityId value, also the link will be created taking the user's network.Stringlocation(Location location, String idParamName, Long entityId, BasicUser user)Generates a link for a given Location and entity adding the given parameter in the URL with the entityId value, also the link will be created taking the user's network.Stringlocation(Location location, BasicUser user)Generates a dynamic ("tagged") link for a given Location without using any id parameter, also the link will be created taking the user's network.Stringlogin(ConfigurationAccessor configuration)Generates a link to the application login pageStringmobile(String urlPart)Generates a link to be opened directly by the Mobile Application for the given Url file part.
E.g cyclos://forgotPassword?key=ZBCXYZStringmobileRedirect(String urlPart, BasicUser user)Generates a link which will redirect the user to the mobile application under the given URL part.StringregistrationValidation(String key, BasicUser user)Generates a link for the registration validation of the given user.Stringticket(Ticket ticket)Generates a link for paying the given ticket.-
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, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
customOperationExternalRedirect
public String customOperationExternalRedirect(ExternalRedirectExecution ere)
Description copied from interface:LinkGeneratorHandlerGenerates a link for a custom operation external redirect execution. The default URL is{root}/external-redirect-callback/{maskId(ere.getId()}/{ere.getVerificationToken()}- Specified by:
customOperationExternalRedirectin interfaceLinkGeneratorHandler
-
customWizardExternalRedirect
public String customWizardExternalRedirect(CustomWizardExecution execution, CustomWizardExecutionStorage storage)
Description copied from interface:LinkGeneratorHandlerGenerates a link for a custom wizard external redirect execution. The default URL is{root}/wizard-external-callback/{execution.getKey()}- Specified by:
customWizardExternalRedirectin interfaceLinkGeneratorHandler
-
easyInvoice
public String easyInvoice(LocateUserResult payee, BigDecimal amount, String description, Currency currency, PaymentTransferType paymentType, Map<TransactionCustomField,String> customValues)
Description copied from interface:LinkGeneratorHandlerGenerates a link for an easy invoice. The default URL is{root}/pay?to={payee.principal}&amount={amount}&description={description}¤cy={maskId(currency.id)}&type={maskId(type.id)}[&{customValues.key.internalName}={customValues.value}]- Specified by:
easyInvoicein interfaceLinkGeneratorHandler
-
emailChange
public String emailChange(String key, BasicUser user)
Description copied from interface:LinkGeneratorHandlerGenerates a link for the validating an e-mail change for the given user. The default URL is{root}/content/users/validateEmailChange?key={key}- Specified by:
emailChangein interfaceLinkGeneratorHandler
-
forgotPassword
public String forgotPassword(String key, BasicUser user)
Description copied from interface:LinkGeneratorHandlerGenerates a link for the forgot password request for the given user. The default URL is{root}#access.passwords.forgot!key={key}- Specified by:
forgotPasswordin interfaceLinkGeneratorHandler
-
location
public String location(Location location, BasicUser user)
Description copied from interface:LinkGeneratorHandlerGenerates a dynamic ("tagged") link for a given Location without using any id parameter, also the link will be created taking the user's network. This kind of url will be resolved to a static (without any tags) before send the data to the user.- Specified by:
locationin interfaceLinkGeneratorHandler
-
location
public String location(Location location, Long entityId, BasicUser user)
Description copied from interface:LinkGeneratorHandlerGenerates a link for a given Location and entity adding ID parameter in the URL with the entityId value, also the link will be created taking the user's network.- Specified by:
locationin interfaceLinkGeneratorHandler
-
location
public String location(Location location, String idParamName, Long entityId, BasicUser user)
Description copied from interface:LinkGeneratorHandlerGenerates a link for a given Location and entity adding the given parameter in the URL with the entityId value, also the link will be created taking the user's network.- Specified by:
locationin interfaceLinkGeneratorHandler
-
login
public String login(ConfigurationAccessor configuration)
Description copied from interface:LinkGeneratorHandlerGenerates a link to the application login page- Specified by:
loginin interfaceLinkGeneratorHandler
-
mobile
public String mobile(String urlPart)
Description copied from interface:LinkGeneratorHandlerGenerates a link to be opened directly by the Mobile Application for the given Url file part.
E.g cyclos://forgotPassword?key=ZBCXYZ- Specified by:
mobilein interfaceLinkGeneratorHandler
-
mobileRedirect
public String mobileRedirect(String urlPart, BasicUser user)
Description copied from interface:LinkGeneratorHandlerGenerates a link which will redirect the user to the mobile application under the given URL part. The default URL is{root}/mobile-redirect/{urlPart}- Specified by:
mobileRedirectin interfaceLinkGeneratorHandler
-
registrationValidation
public String registrationValidation(String key, BasicUser user)
Description copied from interface:LinkGeneratorHandlerGenerates a link for the registration validation of the given user. The default URL is{root}/content/users/validateRegistration?key={key}- Specified by:
registrationValidationin interfaceLinkGeneratorHandler
-
ticket
public String ticket(Ticket ticket)
Description copied from interface:LinkGeneratorHandlerGenerates a link for paying the given ticket. The default URL is{root}/pay/{ticket.ticketNumber}- Specified by:
ticketin interfaceLinkGeneratorHandler
-
-