|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wavemaker.runtime.RuntimeAccess
public class RuntimeAccess
Runtime bean. Provides an interface to the session, request and response
objects, and other WaveMaker interfaces. This is the primary interface
point for any WaveMaker system access.
This class supersedes the old AGRuntime class.
This should only be used as a bean property or through the static
getInstance()
method; other instantiation methods are unsupported.
Using it as a bean property is recommended (see getInstance()
for
more information). The RuntimeAccess bean is named runtimeAccess, an
example:
<bean id="myServiceBeanId" class="myServiceBeanClass" scope="singleton" lazy-init="true"> <property name="runtimeAccess"> <ref bean="runtimeAccess" /> </property> </bean>
Constructor Summary | |
---|---|
RuntimeAccess()
Do not use this constructor; instead, use either getInstance()
or access this class through bean properties. |
Method Summary | |
---|---|
static RuntimeAccess |
getInstance()
Statically return the current instance of RuntimeAccess. |
javax.servlet.http.HttpServletRequest |
getRequest()
Get the current HttpServletRequest. |
java.lang.Object |
getService(java.lang.Class<?> serviceType)
Get the service (of the corresponding serviceType). |
java.lang.Object |
getService(java.lang.String serviceId)
Get the service with the specified service id. |
java.lang.Object |
getServiceBean(java.lang.String serviceId)
|
com.wavemaker.runtime.service.ServiceWire |
getServiceWire(java.lang.String serviceId)
|
javax.servlet.http.HttpSession |
getSession()
Retrieve the current HttpSession. |
int |
getTenantId()
|
void |
setRequest(javax.servlet.http.HttpServletRequest request)
|
static void |
setRuntimeBean(RuntimeAccess bean)
|
void |
setServiceManager(com.wavemaker.runtime.service.ServiceManager serviceManager)
|
void |
setTenantId(int val)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RuntimeAccess()
getInstance()
or access this class through bean properties.
Method Detail |
---|
public static RuntimeAccess getInstance()
getInstance()
in
your service call, or use a Spring property on your service class to
reference the runtime bean. Using a Spring property is recommended.
public javax.servlet.http.HttpSession getSession()
public javax.servlet.http.HttpServletRequest getRequest()
public java.lang.Object getService(java.lang.String serviceId)
serviceId
- The service ID to look for.
com.wavemaker.common.WMRuntimeException
- If a bean with the specified id is not found, or if
Spring has not yet initialized this bean.public java.lang.Object getService(java.lang.Class<?> serviceType)
getService(String)
, since the serviceId is
guaranteed unique (whereas the service class is not).
serviceType
- The class of the service to search for.
com.wavemaker.common.WMRuntimeException
- If a bean with the specified class is not found, more
than one bean with the specified class is found, or if
Spring has not yet initialized this bean.public com.wavemaker.runtime.service.ServiceWire getServiceWire(java.lang.String serviceId)
public java.lang.Object getServiceBean(java.lang.String serviceId)
public static void setRuntimeBean(RuntimeAccess bean)
public void setRequest(javax.servlet.http.HttpServletRequest request)
public void setServiceManager(com.wavemaker.runtime.service.ServiceManager serviceManager)
public void setTenantId(int val)
public int getTenantId()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |