|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.teamserver.web.beans.ManagerBean
public class ManagerBean
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); }
Field Summary | |
---|---|
protected static String |
COMPLETE
|
Fields inherited from interface ilog.rules.teamserver.web.IlrConstants |
---|
ACTIVE, ADDED_STYLE_CLASS, AGGREGATE_TITLE_CLASS, ALLOW_COOKIE_PERSISTENCE, ANY_CLASS, AUTO_POPULATE, AUTO_POPULATE_AGGREGATES, AUTO_POPULATE_EXTENDED, AUTO_POPULATE_PREVIEW, BASELINE, CAUSE, CHANGED_STYLE_CLASS, COLS, COLUMN_CLASSES, COLUMN_IDS, COLUMN_WIDTHS, COMMITABLEOBJECT, DATA, DATA1, DATA2, DATASOURCE_COOKIE, DESCRIPTION, DESCRIPTION_STYLE_CLASS, DIRECTION, ECLASS, EDITOR_IDENTIFIER, ELEMENT, ELEMENT_DETAILS_CLASS, ELEMENT_TYPE, ELEMENT_VERSION, ELEMENTS, EMPTY_DEFINITION, EMPTY_LIST_MESSAGE, EMPTY_STYLE_CLASS, ENABLED, EVEN_ROW_CLASS, FAILURE_STYLE_CLASS, FIELD_CLASS, GLOBAL_STYLE_CLASS, GROUP_CLASS, HEADER_CLASS, HIDE_TOOLBAR, HREF, HTML_DATA, HYPER_LINK_CLASS, ICON, ICON_RENDERED, ICON_STYLE_CLASS, KPI_CLASSNAME, KPI_RESULT_CLASSNAME, LANGUAGEPATH, LEFT_COLUMN_CLASS, LOCK_PANEL_CLASS, LOCK_WHEN_EDITING, MAX_TEXT_LENGTH, MESSAGE, MODE, MODE_VIEWER, MODEL, NONE_CLASS, ODD_ROW_CLASS, ONCLICK, PASSWORD_COOKIE, PERSISTENT, PROP_NAME_VISIBLE, PROPERTY_COLUMN_CLASS, RECURSIVE, REMEMBERME_COOKIE, REMOVED_STYLE_CLASS, RENDERED, RIGHT_COLUMN_CLASS, ROWS, SELECTABLE_TYPE, SELECTED_CLASS, SELECTED_ELEMENT, SELECTED_STYLE_CLASS, SELECTOR_CLASS, SESSION_FACTORY, SHOW_STACK, STACK, STEPS_CLASS, STYLE_CLASS, SUCCESS, SUCCESS_STYLE_CLASS, TABLE_CLASS, TARGET, TEXT_VIEW, TITLE, TITLE_RENDERED, TOOLTIP, TYPE_CLASS, UNCHANGED_STYLE_CLASS, UNSELECTED_CLASS, USERNAME_COOKIE, VALUE, VALUE_COLUMN_CLASS, WIDTH |
Method Summary | |
---|---|
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. |
String |
confirmSelection()
|
String |
getAccessToken()
|
List<Locale> |
getAvailableLocales()
Gets the list of available locales in the Decision Center console. |
IlrTreeController |
getCurrentTreeController()
|
static String |
getDetailsURL(IlrElementHandle handle)
Deprecated. replaced by getPermanentLinkHelper() |
List<IlrElementSummary> |
getDisplayElements()
Gets the currently displayed elements in the table. |
String |
getIconPath()
|
static ManagerBean |
getInstance()
Retrieves the instance of the manager for this HTTP session. |
Locale |
getLocale()
Gets the locale of the Decision Center console. |
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. |
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. |
String |
getUsername()
Gets the current user name, that is, the name given by the user at sign in. |
String |
getWorkOnProjectValue()
|
boolean |
isActivityActive()
|
boolean |
isAdministrator()
Indicates whether the current user has the rtsAdministrator role. |
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 |
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 |
isProjectModeInit()
|
boolean |
isProjectOpened()
Indicates whether a project is currently open in the web console. |
boolean |
isReleaseActive()
|
boolean |
isUserInRole(String role)
Indicates whether the user has the given role. |
boolean |
isWorkOnProject()
|
String |
noItemSelectedSingle()
Error message helper. |
void |
saveAsLastBaseline(IlrBaseline baseline)
|
protected IlrBaseline |
setInitialProject()
|
void |
setIsAccessible(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 |
setWorkingRelease(IlrBaseline baseline)
Sets the working release for the current session and notifies the console of the change. |
void |
setWorkOnProjectValue(String newValue)
|
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent event)
|
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String COMPLETE
Method Detail |
---|
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 isDecisionServiceOpened()
public List<Locale> getAvailableLocales()
This list can be seen in the Options / Display Options page of the console.
java.util.Locale
objects.public String getLocaleDir()
public 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(Boolean isAccessible)
public String getAccessToken()
public 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.
IlrApplicationException
getSession()
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.
IlrApplicationException
getSession()
public boolean isDotNetProject()
public boolean isBusinessSpaceContext()
protected IlrBaseline setInitialProject() throws IlrApplicationException
IlrApplicationException
public IlrElementHandle commit(IlrCommitableObject cobject) throws IlrApplicationException
IlrApplicationException
cobject
- The element to commit.
public static ManagerBean getInstance()
public void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
valueBound
in interface javax.servlet.http.HttpSessionBindingListener
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
valueUnbound
in interface javax.servlet.http.HttpSessionBindingListener
public boolean isAdministrator()
public boolean isConfigManager()
public boolean isUserInRole(String role)
role
- The role to test.
true
if the user has the given role.public String getIconPath()
public boolean isInstalled()
public boolean isInstalledAndInitialized()
public boolean isInstaller()
public static 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 List getSelectedElementsInTable()
ilog.rules.teamserver.model.IlrElementDetails
objects.public List<IlrElementSummary> getDisplayElements()
IlrElementSummary
public 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 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 void setWorkOnProjectValue(String newValue)
public String getWorkOnProjectValue()
public String confirmSelection()
public void saveAsLastBaseline(IlrBaseline baseline)
public boolean isReleaseActive()
public boolean isActivityActive()
|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |