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_IDENTITY_PROVIDER, 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_REPLY_TO, ATTR_REQUEST_ID, ATTR_STORAGE, ATTR_TICKET, ATTR_TYPE, ATTR_UNSUBSCRIBE_EMAIL_KEY, ATTR_UNSUBSCRIBE_EMAIL_TYPE, ATTR_URL_FILE_PART, ATTR_USER, ATTR_VALIDATION_KEY, ATTR_VOUCHER
-
-
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.StringemailUnsubscribe(EmailUnsubscribeType unsubscribeType, BasicUser user)Generates a link for unsubscribing an e-mailStringhome(BasicUser user)Generates a link for the home of the given user.StringidentityProviderCallback(IdentityProvider provider)Generates a link for the identity provider callback URLStringidentityProviderRedirect(IdentityProvider provider, String requestId)Generates a link for the popup which will redirect the user to the identity provider authorization pageStringlocation(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(BasicUser user)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.StringreplyMessage(IncomingMessage replyTo)Generates a link for replying a given messageStringroot(BasicUser user)Generates a link for the root URL for the given user, or default if the user is nullStringticket(Ticket ticket)Generates a link for paying the given ticket.StringvoucherInfo()Generates a link for the root of the voucher information pageStringvoucherInfo(Voucher voucher)Generates a link for the voucher information page for a specific voucher-
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
-
-
-
-
Method Detail
-
customOperationExternalRedirect
public String customOperationExternalRedirect(ExternalRedirectExecution ere)
Description copied from interface:LinkGeneratorHandlerGenerates a link for a custom operation external redirect execution.- 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.- 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.- 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
-
emailUnsubscribe
public String emailUnsubscribe(EmailUnsubscribeType unsubscribeType, BasicUser user)
Description copied from interface:LinkGeneratorHandlerGenerates a link for unsubscribing an e-mail- Specified by:
emailUnsubscribein interfaceLinkGeneratorHandler
-
home
public String home(BasicUser user)
Description copied from interface:LinkGeneratorHandlerGenerates a link for the home of the given user.- Specified by:
homein interfaceLinkGeneratorHandler
-
identityProviderCallback
public String identityProviderCallback(IdentityProvider provider)
Description copied from interface:LinkGeneratorHandlerGenerates a link for the identity provider callback URL- Specified by:
identityProviderCallbackin interfaceLinkGeneratorHandler
-
identityProviderRedirect
public String identityProviderRedirect(IdentityProvider provider, String requestId)
Description copied from interface:LinkGeneratorHandlerGenerates a link for the popup which will redirect the user to the identity provider authorization page- Specified by:
identityProviderRedirectin 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(BasicUser user)
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.- 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.- Specified by:
registrationValidationin interfaceLinkGeneratorHandler
-
replyMessage
public String replyMessage(IncomingMessage replyTo)
Description copied from interface:LinkGeneratorHandlerGenerates a link for replying a given message- Specified by:
replyMessagein interfaceLinkGeneratorHandler
-
root
public String root(BasicUser user)
Description copied from interface:LinkGeneratorHandlerGenerates a link for the root URL for the given user, or default if the user is null- Specified by:
rootin interfaceLinkGeneratorHandler
-
ticket
public String ticket(Ticket ticket)
Description copied from interface:LinkGeneratorHandlerGenerates a link for paying the given ticket.- Specified by:
ticketin interfaceLinkGeneratorHandler
-
voucherInfo
public String voucherInfo()
Description copied from interface:LinkGeneratorHandlerGenerates a link for the root of the voucher information page- Specified by:
voucherInfoin interfaceLinkGeneratorHandler
-
voucherInfo
public String voucherInfo(Voucher voucher)
Description copied from interface:LinkGeneratorHandlerGenerates a link for the voucher information page for a specific voucher- Specified by:
voucherInfoin interfaceLinkGeneratorHandler
-
-