|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.pmease.quickbuild.Context
public class Context
This class provides a convenient way to access current configuration and build either from background build thread or UI thread.
Field Summary | |
---|---|
static java.lang.String |
BUILD_KEY
|
static java.lang.String |
CONFIGURATION_KEY
|
static java.lang.String |
NODE_KEY
|
static java.lang.String |
USER_TIMEZONE_ATTRNAME
|
Constructor Summary | |
---|---|
Context()
|
Method Summary | |
---|---|
static java.util.Map<java.lang.String,java.lang.Object> |
buildEvalContext(java.lang.Object currentObj,
java.util.Map customContext)
Construct expression evaluation context. |
static void |
clear()
Used internally by QuickBuild. |
static void |
clearUserTimeZone()
|
static void |
detectUserTimeZone(javax.servlet.http.HttpServletRequest request)
|
static Build |
get()
Internally used by QuickBuild. |
static Build |
getBuild()
Get current selected build if access from UI thread or current running build if access from a back end build thread. |
static org.apache.wicket.Component |
getComponent()
|
static Configuration |
getConfiguration()
Get current selected configuration if access from UI thread or current running configuration if access from a back end build thread. |
static org.slf4j.Logger |
getLogger()
Get current logger. |
static org.slf4j.Logger |
getLogger(int stackBacktrackCount)
Get current logger with specified stack backtrack count. |
static BuildRequest |
getRequest()
Get the build request. |
static Step |
getStep()
|
static java.util.TimeZone |
getTimeZone()
Get current time zone. |
static User |
getUser()
Get current logged in user if access from UI thread, or the user triggering the build if access from background build thread. |
static java.util.TimeZone |
getUserTimeZone()
|
static boolean |
isBackend()
Whether or not current thread is a back end build thread. |
static void |
pop()
Used internally by QuickBuild. |
static void |
popComponent()
|
static void |
popStep()
|
static void |
push(Build build)
Used internally by QuickBuild. |
static void |
push(Configuration configuration)
Used internally by QuickBuild. |
static void |
pushComponent(org.apache.wicket.Component component)
|
static void |
pushStep(Step step)
|
static void |
setUser(User user)
Set current user in the context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String USER_TIMEZONE_ATTRNAME
public static final java.lang.String NODE_KEY
public static final java.lang.String CONFIGURATION_KEY
public static final java.lang.String BUILD_KEY
Constructor Detail |
---|
public Context()
Method Detail |
---|
public static Configuration getConfiguration()
public static Build getBuild()
public static BuildRequest getRequest()
public static Build get()
public static boolean isBackend()
public static void push(Build build)
context
- public static void push(Configuration configuration)
configuration
- public static void pop()
public static void clear()
public static User getUser()
public static void setUser(User user)
user
- public static void pushStep(Step step)
public static void popStep()
public static Step getStep()
public static org.slf4j.Logger getLogger(int stackBacktrackCount)
stackBacktrackCount
-
public static org.slf4j.Logger getLogger()
public static java.util.Map<java.lang.String,java.lang.Object> buildEvalContext(java.lang.Object currentObj, java.util.Map customContext)
currentObj
- null if no current objectcustomContext
- null or empty if no custom context
public static java.util.TimeZone getTimeZone()
public static void clearUserTimeZone()
public static java.util.TimeZone getUserTimeZone()
public static void detectUserTimeZone(javax.servlet.http.HttpServletRequest request)
public static void pushComponent(org.apache.wicket.Component component)
public static void popComponent()
public static org.apache.wicket.Component getComponent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |