All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.plexus.redback.policy.DefaultUserValidationSettings Maven / Gradle / Ivy

The newest version!
package org.codehaus.plexus.redback.policy;

/*
 * Copyright 2001-2006 The Codehaus.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import org.codehaus.plexus.redback.configuration.UserConfiguration;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * DefaultUserValidationSettings
 *
 * @author Joakim Erdfelt
 * @version $Id: DefaultUserValidationSettings.java 1049 2011-05-06 20:23:11Z olamy $
 */
@Service("userValidationSettings")
public class DefaultUserValidationSettings
    implements UserValidationSettings
{
    @Resource (name="userConfiguration")
    private UserConfiguration config;

    private boolean emailValidationRequired;

    private int emailValidationTimeout;

    private String emailSubject;

    public boolean isEmailValidationRequired()
    {
        return emailValidationRequired;
    }

    public int getEmailValidationTimeout()
    {
        return emailValidationTimeout;
    }

    public String getEmailSubject()
    {
        return emailSubject;
    }

    @PostConstruct
    public void initialize()
    {
        this.emailValidationRequired = config.getBoolean( "email.validation.required" );
        this.emailValidationTimeout = config.getInt( "email.validation.timeout" );
        this.emailSubject = config.getString( "email.validation.subject" );
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy