public class ManagerBean
extends java.lang.Object
implements ilog.rules.teamserver.web.IlrConstants, java.io.Serializable, javax.servlet.http.HttpSessionBindingListener
ManagerBean is the main entry point for a Decision Center web application.
ManagerBean manages the connection to Decision Center. Two Decision Center sessions are associated to this bean, one for general use, the other one for RuleApp generation.
You retrieve the instance of this bean in the current HTTP session either in Java by calling getInstance() or as a JSF EL expression.
The following JSP code example shows how to display a command link for the Decision Center administrator only:
<h:commandLink value="Click me" action="MyBackingBean#myAction" rendered="#{ManagerBean.administrator}"/>
The following Java code example shows how reset the owner field of a rule using a ManagerBean instance:
public static void resetOwner(IlrElementDetails ruleDetails) throws IlrObjectNotFoundException, IlrInvalidElementException, IlrKnownUUIDException, IlrObjectLockedException, IlrFolderLockedException, IlrPermissionException {
ManagerBean bean = ManagerBean.getInstance();
IlrSession session = bean.getSession();
// Set the processInstance. Notice that the status is an extended property.
ruleDetails.setRawValueNoCheck((EAttribute) session.getModelInfo().getElementFromFQN("brm.BusinessRule.owner"), null);
IlrCommitableObject cObj = new IlrCommitableObject(ruleDetails);
cObj.setRootDetails(ruleDetails);
session.commit(cObj);
}
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
COMPLETE |
| Modifier and Type | Method and Description |
|---|---|
IlrElementHandle |
commit(IlrCommitableObject cobject)
Commits an element and notifies the console so that the tree and table in the explore view can reflect the change.
|
java.lang.String |
confirmSelection() |
java.lang.String |
getAccessToken() |
java.util.List<java.util.Locale> |
getAvailableLocales()
Gets the list of available locales in the Decision Center console.
|
IlrTreeController |
getCurrentTreeController() |
static java.lang.String |
getDetailsURL(IlrElementHandle handle)
Deprecated.
replaced by
getPermanentLinkHelper() |
java.util.List<IlrElementSummary> |
getDisplayElements()
Gets the currently displayed elements in the table.
|
java.lang.String |
getIconPath() |
static ManagerBean |
getInstance()
Retrieves the instance of the manager for this HTTP session.
|
java.util.Locale |
getLocale()
Gets the locale of the Decision Center console.
|
java.lang.String |
getLocaleDir() |
static IlxWPort |
getOrCreateAndOpenCurrentPort()
Gets or creates the current web component port and opens it if not already done.
|
IlrPermanentLinkHelper |
getPermanentLinkHelper()
Gets the permanent link helper for this bean.
|
IlrElementDetails |
getSelectedElement()
Gets the element currently selected in the console.
|
java.util.List |
getSelectedElementsInTable()
Returns the list of elements currently selected in the current displayed element table (Explore or Query tab).
|
IlrSession |
getSession()
Gets the Decision Center session.
|
java.lang.String |
getUsername()
Gets the current user name, that is, the name given by the user at sign in.
|
java.lang.String |
getWorkOnProjectValue() |
boolean |
isActivityActive() |
boolean |
isAdministrator()
Indicates whether the current user has the rtsAdministrator role.
|
boolean |
isAnyProjectOpened() |
boolean |
isAuthenticated() |
boolean |
isBusinessSpaceContext() |
boolean |
isConfigManager()
Indicates whether the current user has the rtsConfigManager role.
|
boolean |
isConnected()
Checks if the manager sessions are connected to Decision Center.
|
boolean |
isDecisionServiceOpened()
Indicates whether a project is currently open in the web console.
|
boolean |
isDotNetProject() |
boolean |
isDsOpened()
Indicates whether a decision service is currently open in the web console.
|
boolean |
isInstalled()
Indicates whether Decision Center has been installed, that is, whether the database tables have been created.
|
boolean |
isInstalledAndInitialized()
Indicates whether Decision Center has been installed and initialized, that is, whether the database tables have been created and the metamodel uploaded.
|
boolean |
isInstaller()
Indicates whether the current user has the rtsInstaller role.
|
boolean |
isODMonCloud() |
boolean |
isProjectModeInit() |
boolean |
isProjectOpened()
Indicates whether a project is currently open in the web console.
|
boolean |
isReleaseActive() |
boolean |
isUserInRole(java.lang.String role)
Indicates whether the user has the given role.
|
boolean |
isWorkOnDGF() |
boolean |
isWorkOnDS() |
boolean |
isWorkOnProject() |
java.lang.String |
noItemSelectedSingle()
Error message helper.
|
void |
saveAsLastBaseline(IlrBaseline baseline) |
protected IlrBaseline |
setInitialProject() |
void |
setIsAccessible(java.lang.Boolean isAccessible) |
void |
setProjectModeInit(boolean init) |
void |
setWorkingBaseline(IlrBaseline baseline)
Sets the working baseline for the current session and notifies the console of the change.
|
void |
setWorkingDSBranch(IlrBaseline baseline)
Sets the working DS branch for the current session and notifies the console of the change.
|
void |
setWorkingRelease(IlrBaseline baseline)
Sets the working release for the current session and notifies the console of the change.
|
void |
setWorkOnProjectValue(java.lang.String newValue) |
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent event) |
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent event) |
protected static final java.lang.String COMPLETE
public boolean isConnected()
The manager bean attempts to connect to the manager sessions the first
time a Decision Center JSP page is displayed. If the connection fails
for any reason, this method returns false.
true is
returned.IlrSessionFactory.connect(String, String, String, String)public IlrSession getSession()
IlrSession, or null if no connection has been attempted so far.public boolean isProjectOpened()
public boolean isDsOpened()
public boolean isDecisionServiceOpened()
public boolean isAnyProjectOpened()
public boolean isODMonCloud()
public java.util.List<java.util.Locale> getAvailableLocales()
This list can be seen in the Options / Display Options page of the console.
java.util.Locale objects.public java.lang.String getLocaleDir()
public java.util.Locale getLocale()
This locale is found in the Decision Center preferences of the connected user. If it is not found, then the locale is taken from the URL request passed to Decision Center (for example, http://localhost:9080/teamserver?locale=en). If it is not specified in the URL, then the
locale used is the locale of the browser, provided that this locale is part of the available locales.
Locale object.getAvailableLocales()public void setIsAccessible(java.lang.Boolean isAccessible)
public java.lang.String getAccessToken()
public java.lang.String getUsername()
public boolean isAuthenticated()
public void setWorkingBaseline(IlrBaseline baseline) throws IlrApplicationException
If you want to change the working baseline by API, you should use this method instead of IlrSession.setWorkingBaseline(ilog.rules.teamserver.brm.IlrBaseline), because this will notify the console and allow it to update accordingly the next time it is displayed.
IlrApplicationExceptiongetSession()public void setWorkingRelease(IlrBaseline baseline) throws IlrApplicationException
If you want to change the working release by API, you should use this method instead of IlrSession.setWorkingBaseline(ilog.rules.teamserver.brm.IlrBaseline), because this will notify the console and allow it to update accordingly the next time it is displayed.
IlrApplicationExceptiongetSession()public void setWorkingDSBranch(IlrBaseline baseline) throws IlrApplicationException
IlrApplicationExceptiongetSession()public boolean isDotNetProject()
public boolean isBusinessSpaceContext()
protected IlrBaseline setInitialProject() throws IlrApplicationException
IlrApplicationExceptionpublic IlrElementHandle commit(IlrCommitableObject cobject) throws IlrApplicationException
IlrApplicationExceptioncobject - The element to commit.public static ManagerBean getInstance()
public void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
valueBound in interface javax.servlet.http.HttpSessionBindingListenerpublic void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
valueUnbound in interface javax.servlet.http.HttpSessionBindingListenerpublic boolean isAdministrator()
public boolean isConfigManager()
public boolean isUserInRole(java.lang.String role)
role - The role to test.true if the user has the given role.public java.lang.String getIconPath()
public boolean isInstalled()
public boolean isInstalledAndInitialized()
public boolean isInstaller()
public static java.lang.String getDetailsURL(IlrElementHandle handle)
getPermanentLinkHelper()The context and the datasource name are loaded from the session.
handle - Handle on the element from which you want to display the details.public java.util.List getSelectedElementsInTable()
ilog.rules.teamserver.model.IlrElementDetails objects.public java.util.List<IlrElementSummary> getDisplayElements()
IlrElementSummarypublic IlrElementDetails getSelectedElement()
The element will be either the one currently selected in the left pane of the Explore tab or the element currently being viewed or edited. In any case, the returned element is the one that was selected last.
public java.lang.String noItemSelectedSingle()
Should be returned when an action is triggered but no element was selected.
public static IlxWPort getOrCreateAndOpenCurrentPort()
Always use this method instead of IlxWPort.getCurrentPort() and IlxWPort.open() when you want to print some web components in a JSP page containing some other tags that already print some components.
The Decision Center JSF components that internally use the web components also call this method. This will ensure that 2 ports are not used twice in the same JSP page, which is not suported by the web component framework.
public IlrPermanentLinkHelper getPermanentLinkHelper()
The helper will be set up so that when a permalink is generated from it, it will embed in any page of the Decision Center console.
public IlrTreeController getCurrentTreeController()
public boolean isProjectModeInit()
public void setProjectModeInit(boolean init)
public boolean isWorkOnProject()
public boolean isWorkOnDS()
public boolean isWorkOnDGF()
public void setWorkOnProjectValue(java.lang.String newValue)
public java.lang.String getWorkOnProjectValue()
public java.lang.String confirmSelection()
public void saveAsLastBaseline(IlrBaseline baseline)
public boolean isReleaseActive()
public boolean isActivityActive()
© Copyright IBM Corp. 1987, 2017