Class SessionHelper.TempPrincipalContext
java.lang.Object
com.ptc.arbortext.windchill.siscore.translation.SessionHelper.TempPrincipalContext
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
SessionHelper
public static final class SessionHelper.TempPrincipalContext
extends Object
implements AutoCloseable
AutoCloseable implementation for establishing a SessionContext for a clearly delimited scope, restoring
the previous SessionContext upon leaving this scope. Usage:
try (AutoCloseable tempSessionContext = new TempPrincipalContext(demoUserName)) {
... use temporary SessionContext ...
... previous SessionContext is always restored when leaving this scope ...
}
Supported API: true
Extendable: false
-
Method Summary