at.spardat.xma.plugins.dummy
Class DummyContext

java.lang.Object
  extended byat.spardat.xma.plugins.dummy.DummyContext
All Implemented Interfaces:
java.security.Principal, java.io.Serializable, at.spardat.xma.security.XMAContext

public class DummyContext
extends java.lang.Object
implements at.spardat.xma.security.XMAContext

Dummy implementation of a XMAContext.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface at.spardat.xma.security.XMAContext
devel, local, prod, qsys, qual
 
Constructor Summary
DummyContext()
          Constructor for XMAContext.
 
Method Summary
 java.lang.String getEnvironment()
          Returns the environment.
 java.util.Locale getLocale()
          Returns the locale.
 java.lang.String getMandant()
          Returns the mandant as set by DummyLoginModule.
 java.lang.String getName()
          Returns the userName as set by DummyLoginModule.
 boolean isLocal()
          Determines if the environment is developers pc.
 void setEnvironment(java.lang.String environment)
          Sets the environment.
 void setLocale(java.util.Locale locale)
          Sets the locale.
 void setMandant(java.lang.String mandant)
          Sets the mandant.
 void setName(java.lang.String userName)
          Sets the userName.
 java.lang.String toString()
          Prints username, mandant, environment and locale seperated by blanks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode
 

Constructor Detail

DummyContext

public DummyContext()
Constructor for XMAContext.

Method Detail

getLocale

public java.util.Locale getLocale()
Returns the locale. Default is de_AT.

Specified by:
getLocale in interface at.spardat.xma.security.XMAContext
Returns:
the locale.

getMandant

public java.lang.String getMandant()
Returns the mandant as set by DummyLoginModule.

Specified by:
getMandant in interface at.spardat.xma.security.XMAContext
Returns:
the mandant of the logged in user.

getEnvironment

public java.lang.String getEnvironment()
Returns the environment. Default is the local developers PC.

Specified by:
getEnvironment in interface at.spardat.xma.security.XMAContext
Returns:
the environment.

isLocal

public boolean isLocal()
Determines if the environment is developers pc.

Specified by:
isLocal in interface at.spardat.xma.security.XMAContext
Returns:
true if the environment is developers pc.

getName

public java.lang.String getName()
Returns the userName as set by DummyLoginModule.

Specified by:
getName in interface at.spardat.xma.security.XMAContext
Returns:
the name of the logged in user.

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale.

Parameters:
locale - The locale to set

setMandant

public void setMandant(java.lang.String mandant)
Sets the mandant.

Parameters:
mandant - The mandant to set

setEnvironment

public void setEnvironment(java.lang.String environment)
Sets the environment.

Parameters:
environment - The environment to set

setName

public void setName(java.lang.String userName)
Sets the userName.

Parameters:
userName - The userName to set

toString

public java.lang.String toString()
Prints username, mandant, environment and locale seperated by blanks.

Specified by:
toString in interface java.security.Principal
Returns:
the string representation of this DummyContext.