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.I18nizableTextParameter;
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, I18nizableTextParameter> 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, I18nizableTextParameter> 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, I18nizableTextParameter> defaultI18nParams , String language);
083    
084    /**
085     * The email subject when user is invit to signup
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 sign up.
097     */
098    public String getSubjectForInvitationToSignUpEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
099    
100    /**
101     * The email text body when user is invit to signup
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 sign up.
113     */
114    public String getTextBodyForInvitationToSignUpEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
115    
116    /**
117     * The email html body when user is invit to signup
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 sign up.
129     */
130    public String getHtmlBodyForInvitationToSignUpEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
131    
132    /**
133     * The email subject when user sign up was validated.
134     * @param defaultI18nParams The default i18n parameters with :
135     * siteName the site name
136     * login the login
137     * email the mail
138     * fullName the full name
139     * siteTitle the site title
140     * siteUrl the site url
141     * @param language the language
142     * @return the email subject when user sign up.
143     */
144    public String getSubjectForSignUpValidatedEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
145    
146    /**
147     * The email text body when user sign up was validated.
148     * @param defaultI18nParams The default i18n parameters with :
149     * siteName the site name
150     * login the login
151     * email the mail
152     * fullName the full name
153     * siteTitle the site title
154     * siteUrl the site url
155     * @param language the language
156     * @return the email text body when user sign up.
157     */
158    public String getTextBodyForSignUpValidatedEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
159    
160    /**
161     * The email html body when user sign up was validated.
162     * @param defaultI18nParams The default i18n parameters with :
163     * siteName the site name
164     * login the login
165     * email the mail
166     * fullName the full name
167     * siteTitle the site title
168     * siteUrl the site url
169     * @param language the language
170     * @return the email html body when user sign up.
171     */
172    public String getHtmlBodyForSignUpValidatedEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
173    
174    /**
175     * The email subject when user reset password.
176     * @param defaultI18nParams The default i18n parameters with :
177     * siteName the site name
178     * login the login
179     * email the mail
180     * fullName the full name
181     * token the token
182     * confirmUri the confirmation uri
183     * siteTitle the site title
184     * siteUrl the site url 
185     * @param language the language
186     * @return the email subject when user reset password.
187     */
188    public String getSubjectForResetPwdEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
189    
190    /**
191     * The email text body when user reset password.
192     * @param defaultI18nParams The default i18n parameters with :
193     * siteName the site name
194     * login the login
195     * email the mail
196     * fullName the full name
197     * token the token
198     * confirmUri the confirmation uri
199     * siteTitle the site title
200     * siteUrl the site url 
201     * @param language the language
202     * @return the email text body when user reset password.
203     */
204    public String getTextBodyForResetPwdEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
205    
206    /**
207     * The email html body when user reset password.
208     * @param defaultI18nParams The default i18n parameters with :
209     * siteName the site name
210     * login the login
211     * email the mail
212     * fullName the full name
213     * token the token
214     * confirmUri the confirmation uri
215     * siteTitle the site title
216     * siteUrl the site url 
217     * @param language the language
218     * @return the email html body when user reset password.
219     */
220    public String getHtmlBodyForResetPwdEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
221}