public class Ivy extends Object
Access to this class (e.g. Ivy.cms()
or Ivy.cms
) is
only available within a request, otherwise an EnvironmentNotAvailableException
is thrown.
Some methods are only available depending on the request kind. If they are
not available, they will return null
.
E.g. Ivy.rd()
only works in a rich dialog process otherwise null
will
be returned. On the other hand the fields (e.g Ivy.rd
or Ivy.wf
) are never null.
In such a case a method call on one of these fields will throw an
IllegalStateException
.
Newer features, like ivy.casemap, are not directly available by corresponding methods. Instead
the methods Ivy.get(String)
and Ivy.get(Class)
can be used. E.g. Ivy.get(ICaseMapService.class)
.
Modifier and Type | Field and Description |
---|---|
IDefaultBusinessCalendar |
cal
|
IContentManagementSystem |
cms
Provides access to the
content management system
of the currently active project (process model version). |
IDataCacheContext |
datacache
Provides access to
data cache context to manage application (global) and session (user-specific) data caches. |
IExtensions |
extensions
Provides access to any
extensions that are installed on the ivy server. |
IHtmlDialogContext |
html
Provides access to the current
HTML dialog context . |
ILogger |
log
Provides access to the ivy logging subsystem.
|
IPersistenceContext |
persistence
Access to the
IPersistenceContext of the current process model version. |
IRichDialogContext |
rd
Provides access to the current
rich dialog context . |
BusinessDataRepository |
repo
Provides access to the
BusinessDataRepository . |
IProcessModelVersionRequest |
request
The currently executed process
request . |
IResponse |
response
The
response for the currently executed request. |
IRestClientContext |
rest
Access to
rest clients . |
IWorkflowSession |
session
Provides information about the currently active
session . |
IGlobalVariableContext |
var
Access to
global variable context to manage global variables. |
IWorkflowContext |
wf
Provides access to runtime information of the
workflow subsystem
(with respect to the current session). |
ICase |
wfCase
The currently executed
case . |
ITask |
wfTask
The currently executed
task . |
Modifier and Type | Method and Description |
---|---|
static IDefaultBusinessCalendar |
cal()
Returns the default business calendar.
|
static IContentManagementSystem |
cms()
Returns the
content management system
of the currently active project (process model version). |
static IDataCacheContext |
datacache()
Provides access to
data cache context to manage
application (global) and session (user-specific) data caches. |
static IExtensions |
extensions()
Gets access to any
extensions that are installed on the ivy server. |
static <T> T |
get(Class<T> type)
Provides access to the ivy variable member that is an instance of the given type
|
static <T> T |
get(String memberName)
Provides access to the ivy variable member with the given name.
|
static Ivy |
getInstance()
Returns the singleton of
Ivy . |
static IHtmlDialogContext |
html()
Returns the currently running
HTML dialog context . |
static Logger |
log()
Gets the runtime log from the environment.
|
static IPersistenceContext |
persistence()
Returns the
persistence context of the current process model version. |
static IRichDialogContext |
rd()
Returns the currently running
rich dialog context . |
static BusinessDataRepository |
repo()
Provides access to the
BusinessDataRepository . |
static IProcessModelVersionRequest |
request()
Returns the currently executed process
request . |
static IResponse |
response()
Returns the
response for the currently executed request. |
static IRestClientContext |
rest()
Access to
rest clients . |
static IWorkflowSession |
session()
Returns the currently active
session . |
static IGlobalVariableContext |
var()
Access to
global variable context to manage global variables (constants). |
static IWorkflowContext |
wf()
Returns the
workflow context (with respect to the current session)
to access runtime information of the workflow subsystem. |
static ICase |
wfCase()
Returns the currently executed
case . |
static ITask |
wfTask()
Returns the currently executed
task . |
public final IDefaultBusinessCalendar cal
public final IProcessModelVersionRequest request
request
.public final IResponse response
response
for the currently executed request.public final IWorkflowContext wf
workflow subsystem
(with respect to the current session).public final IWorkflowSession session
session
.public final ICase wfCase
case
. case
is not available (e.g. on a static HTML page),
an IllegalStateException
will be thrown on method invocation.public final ITask wfTask
task
. task
is not available (e.g. on a static HTML page),
an IllegalStateException
will be thrown on method invocation.public final IContentManagementSystem cms
content management system
of the currently active project (process model version).public final IRichDialogContext rd
rich dialog context
.
If the rich dialog context
is not available (e.g. outside a rich dialog),
an IllegalStateException
will be thrown on method invocation.public final IHtmlDialogContext html
HTML dialog context
.public final ILogger log
RuntimeLogCategory.USER
.public final IExtensions extensions
extensions
that are installed on the ivy server.public final IDataCacheContext datacache
data cache context
to manage application (global) and session (user-specific) data caches.public final IPersistenceContext persistence
IPersistenceContext
of the current process model version.public final IGlobalVariableContext var
global variable context
to manage global variables.
The exact values depend on the currently active environment.public final IRestClientContext rest
Access to rest clients
.
Example:
Ivy ivy = Ivy.getInstance();
String response = ivy.rest.client("myRestClient").request().get().readEntity(String.class);
public final BusinessDataRepository repo
Provides access to the BusinessDataRepository
.
public static Ivy getInstance()
Ivy
. Useful for access to the ivy
fields in the same way as in IvyScript. So it possible to copy/paste
code snippets forth and back from IvyScript to Java and vice versa.
Example:Ivy ivy = Ivy.getInstance(); ivy.cms.co("/Project/Banner");
Ivy
.public static IDefaultBusinessCalendar cal()
public static IProcessModelVersionRequest request()
request
.
Returns null
if not available.request
or null
, if not availableEnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static IResponse response()
IResponse
instance or null
if not available.EnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static IRichDialogContext rd()
rich dialog context
.
Returns null
if not available (e.g. if not running in a rich dialog process request).rich dialog context
or null
, if not availableEnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static IPersistenceContext persistence()
persistence context
of the current process model version.
Returns null
if not available.IPersistenceContext
of the current process model version or null
if not available.EnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static IGlobalVariableContext var()
global variable context
to manage global variables (constants).
The exact values depend on the currently active environment.global variable context
with defined global variables.EnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static IRestClientContext rest()
Access to rest clients
.
Example:
String response = Ivy.rest().client("myRestClient").request().get().readEntity(String.class);
EnvironmentNotAvailableException
public static BusinessDataRepository repo()
Provides access to the BusinessDataRepository
.
EnvironmentNotAvailableException
public static IHtmlDialogContext html()
HTML dialog context
.
Returns null
if not availableIHtmlDialogContext
instance or null
EnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static IContentManagementSystem cms()
content management system
of the currently active project (process model version).content management system
of the currently active project (i.e. process model version).EnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static IWorkflowSession session()
session
.session
.EnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static IWorkflowContext wf()
workflow context
(with respect to the current session)
to access runtime information of the workflow subsystem.IWorkflowContext
instanceEnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static ICase wfCase()
case
.case
or null
, if not available (e.g. on a static HTML page)EnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static ITask wfTask()
task
.task
. or null
, if not available (e.g. on a static HTML page)EnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static Logger log()
RuntimeLogCategory.USER
.RuntimeLogCategory.USER
EnvironmentNotAvailableException
- if accessing this method outside a request threadpublic static IExtensions extensions()
extensions
that are installed on the ivy server.EnvironmentNotAvailableException
- if environment is not availablepublic static IDataCacheContext datacache()
data cache context
to manage
application (global) and session (user-specific) data caches.data cache context
to access data cachesEnvironmentNotAvailableException
- if environment is not availablepublic static <T> T get(String memberName)
Provides access to the ivy variable member with the given name.
Example:
import ch.ivyteam.ivy.globalvars.IGlobalVariableContext;
IGlobalVariableContext var = Ivy.get("var");
memberName
- name of the member of the ivy variablepublic static <T> T get(Class<T> type)
Provides access to the ivy variable member that is an instance of the given type
Example:
import ch.ivyteam.ivy.globalvars.IGlobalVariableContext;
IGlobalVariableContext var = Ivy.get(IGlobalVariableContext.class);
type
- the type of the member of the ivy variableCopyright © 2024
AXON IVY AG
All Rights Reserved Documentation was generated
on April 28, 2024