001/* 002 * Copyright 2016 Anyware Services 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.ametys.web.usermanagement; 017 018import java.util.Map; 019 020import org.ametys.runtime.i18n.I18nizableText; 021 022/** 023 * Interface for user sign up configuration 024 */ 025public interface UserSignUpConfiguration 026{ 027 /** Constant for Avalon ROLE */ 028 public static final String ROLE = UserSignUpConfiguration.class.getName(); 029 030 /** 031 * The token validity period, in days. 032 * @return the token validity period, in days. 033 */ 034 public int getTokenValidity (); 035 036 /** 037 * The email subject when user sign up. 038 * @param defaultI18nParams The default i18n parameters with : 039 * siteName the site name 040 * login the login 041 * email the mail 042 * fullName the full name 043 * token the token 044 * confirmUri the confirmation uri 045 * siteTitle the site title 046 * siteUrl the site url 047 * @param language the language 048 * @return the email subject when user sign up. 049 */ 050 public String getSubjectForSignUpEmail (Map<String, I18nizableText> defaultI18nParams , String language); 051 052 /** 053 * The email text body when user sign up. 054 * @param defaultI18nParams The default i18n parameters with : 055 * siteName the site name 056 * login the login 057 * email the mail 058 * fullName the full name 059 * token the token 060 * confirmUri the confirmation uri 061 * siteTitle the site title 062 * siteUrl the site url 063 * @param language the language 064 * @return the email text body when user sign up. 065 */ 066 public String getTextBodyForSignUpEmail (Map<String, I18nizableText> defaultI18nParams , String language); 067 068 /** 069 * The email html body when user sign up. 070 * @param defaultI18nParams The default i18n parameters with : 071 * siteName the site name 072 * login the login 073 * email the mail 074 * fullName the full name 075 * token the token 076 * confirmUri the confirmation uri 077 * siteTitle the site title 078 * siteUrl the site url 079 * @param language the language 080 * @return the email html body when user sign up. 081 */ 082 public String getHtmlBodyForSignUpEmail (Map<String, I18nizableText> defaultI18nParams , String language); 083 084 /** 085 * The email subject when user reset password. 086 * @param defaultI18nParams The default i18n parameters with : 087 * siteName the site name 088 * login the login 089 * email the mail 090 * fullName the full name 091 * token the token 092 * confirmUri the confirmation uri 093 * siteTitle the site title 094 * siteUrl the site url 095 * @param language the language 096 * @return the email subject when user reset password. 097 */ 098 public String getSubjectForResetPwdEmail (Map<String, I18nizableText> defaultI18nParams , String language); 099 100 /** 101 * The email text body when user reset password. 102 * @param defaultI18nParams The default i18n parameters with : 103 * siteName the site name 104 * login the login 105 * email the mail 106 * fullName the full name 107 * token the token 108 * confirmUri the confirmation uri 109 * siteTitle the site title 110 * siteUrl the site url 111 * @param language the language 112 * @return the email text body when user reset password. 113 */ 114 public String getTextBodyForResetPwdEmail (Map<String, I18nizableText> defaultI18nParams , String language); 115 116 /** 117 * The email html body when user reset password. 118 * @param defaultI18nParams The default i18n parameters with : 119 * siteName the site name 120 * login the login 121 * email the mail 122 * fullName the full name 123 * token the token 124 * confirmUri the confirmation uri 125 * siteTitle the site title 126 * siteUrl the site url 127 * @param language the language 128 * @return the email html body when user reset password. 129 */ 130 public String getHtmlBodyForResetPwdEmail (Map<String, I18nizableText> defaultI18nParams , String language); 131}