org.openxma.context.ServiceContext Maven / Gradle / Ivy
package org.openxma.context;
import java.security.Principal;
import java.util.Locale;
public interface ServiceContext {
/**
* Returns the user of this context
*
* @return the principal of this context
*/
public Principal getUser();
/**
* Returns the locale of this context
*
* @return the locale of this context
*/
public Locale getLocale();
/**
* Returns the tenant of this context
*
* @return the tenant of this context
*/
public Principal getTenant();
/**
* Returns the environment of this context
*
* @return the environment of this context
*/
public Environment getEnvironment();
/**
* Checks the permission for the code
*
* @param code the code for which the permission is checked
* @return
*/
public boolean hasPermission(String code);
}