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 sign up was validated.
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     * siteTitle the site title
092     * siteUrl the site url
093     * @param language the language
094     * @return the email subject when user sign up.
095     */
096    public String getSubjectForSignUpValidatedEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
097    
098    /**
099     * The email text body when user sign up was validated.
100     * @param defaultI18nParams The default i18n parameters with :
101     * siteName the site name
102     * login the login
103     * email the mail
104     * fullName the full name
105     * siteTitle the site title
106     * siteUrl the site url
107     * @param language the language
108     * @return the email text body when user sign up.
109     */
110    public String getTextBodyForSignUpValidatedEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
111    
112    /**
113     * The email html body when user sign up was validated.
114     * @param defaultI18nParams The default i18n parameters with :
115     * siteName the site name
116     * login the login
117     * email the mail
118     * fullName the full name
119     * siteTitle the site title
120     * siteUrl the site url
121     * @param language the language
122     * @return the email html body when user sign up.
123     */
124    public String getHtmlBodyForSignUpValidatedEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
125    
126    /**
127     * The email subject when user reset password.
128     * @param defaultI18nParams The default i18n parameters with :
129     * siteName the site name
130     * login the login
131     * email the mail
132     * fullName the full name
133     * token the token
134     * confirmUri the confirmation uri
135     * siteTitle the site title
136     * siteUrl the site url 
137     * @param language the language
138     * @return the email subject when user reset password.
139     */
140    public String getSubjectForResetPwdEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
141    
142    /**
143     * The email text body when user reset password.
144     * @param defaultI18nParams The default i18n parameters with :
145     * siteName the site name
146     * login the login
147     * email the mail
148     * fullName the full name
149     * token the token
150     * confirmUri the confirmation uri
151     * siteTitle the site title
152     * siteUrl the site url 
153     * @param language the language
154     * @return the email text body when user reset password.
155     */
156    public String getTextBodyForResetPwdEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
157    
158    /**
159     * The email html body when user reset password.
160     * @param defaultI18nParams The default i18n parameters with :
161     * siteName the site name
162     * login the login
163     * email the mail
164     * fullName the full name
165     * token the token
166     * confirmUri the confirmation uri
167     * siteTitle the site title
168     * siteUrl the site url 
169     * @param language the language
170     * @return the email html body when user reset password.
171     */
172    public String getHtmlBodyForResetPwdEmail (Map<String, I18nizableTextParameter> defaultI18nParams , String language);
173}