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

at.spardat.xma.security.XMAContext Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
/*******************************************************************************
 * Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     s IT Solutions AT Spardat GmbH - initial API and implementation
 *******************************************************************************/

/*
 * Created on 24.06.2003
 *
 * 
 * 
 */
package at.spardat.xma.security;

import java.io.Serializable;
import java.security.Principal;
import java.util.Locale;

/**
 * This interface defines which information of the user context is available in
 * every XMA-application. The interface must be implemented by the login plugins.
 * 
 * @author s2877
 */
public interface XMAContext extends Principal, Serializable {
    /** Envrionment name defining the developers local PC: "L" */
    public static final String local = "L";
    
    /** Environment name defining the development server: "E" */
    public static final String devel = "E";
    
    /** Environment name defining the quality assurance server: "A" */
    public static final String qual = "A";
    
    /** Environment name defining the spardat QSYS: "Q" */
    public static final String qsys = "Q";
    
    /** Environment name defining the production server "P" */
    public static final String prod = "P";


    /**
     * Returns the java.util.Locale to use for the logged in user.
     * @return the Locale to use.
     */
    public abstract Locale getLocale();

    /**
     * Returns the mandant the logged in user belongs to.
     * @return the mandant to use.
     */
    public abstract String getMandant();

    /**
     * Returns the environment the user used to log in.
     * @return the environment to use.
     */
    public abstract String getEnvironment();
    
    /**
     * Determines if the environment is developers pc.
     * @return true if the environment is developers pc.
     */
    public abstract boolean isLocal();

    /**
     * Returns the name of the user logged in.
     * @return the username to use.
     */
    public abstract String getName();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy