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

org.valkyriercp.application.session.ApplicationSessionInitializer Maven / Gradle / Ivy

There is a newer version: 1.3
Show newest version
package org.valkyriercp.application.session;

import org.valkyriercp.command.support.AbstractCommand;

import java.util.List;
import java.util.Map;

public class ApplicationSessionInitializer
{

    /**
     * Extra user attributes to be added to the ApplicationSession after login
     */
    private Map userAttributes;

    /**
     * Extra session attributes to be added to the ApplicationSession after login
     */
    private Map sessionAttributes;

    /**
     * List of command ids to be executed before startup of the application window
     */
    private List preStartupCommands;

     /**
     * List of command ids to be executed after startup of the application window
     */
    private List postStartupCommands;

    /**
     * Sets extra user attributes to be added to the ApplicationSession after login
     */
    public void setUserAttributes(Map attributes)
    {
        this.userAttributes = attributes;
    }

    /**
     * @return extra user attributes to be added to the ApplicationSession after login
     */
    public Map getUserAttributes()
    {
        return userAttributes;
    }

    /**
     * Sets extra session attributes to be added to the ApplicationSession after login
     */
    public void setSessionAttributes(Map attributes)
    {
        this.sessionAttributes = attributes;
    }

    /**
     * @return extra session attributes to be added to the ApplicationSession after login
     */
    public Map getSessionAttributes()
    {
        return sessionAttributes;
    }

     /**
     * Sets the list of command ids to be executed before startup of the application window
     */
    public void setPreStartupCommands(List commandIds)
    {
        this.preStartupCommands = commandIds;
    }

    /**
     * @return the list of command ids to be executed before startup of the application window
     */
    public List getPreStartupCommands()
    {
        return preStartupCommands;
    }

    /**
     * Sets the list of command ids to be executed after startup of the application window
     */
    public void setPostStartupCommands(List commandIds)
    {
        this.postStartupCommands = commandIds;
    }

     /**
     * @return the list of command ids to be executed after startup of the application window
     */
    public List getPostStartupCommands()
    {
        return postStartupCommands;
    }

    /**
     * Hook that is called before the session attributes are retrieved. Here you can
     * set session attributes in code.
     */
    public void initializeSession()
    {
    }

    /**
     * Hook that is called before the user attributes are retrieved. Here you can
     * set user attributes in code.
     */
    public void initializeUser()
    {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy