Class IlrDefaultSessionController
- java.lang.Object
-
- ilog.rules.teamserver.model.IlrDefaultSessionController
-
- All Implemented Interfaces:
- IlrSessionCallback, IlrSessionController
public class IlrDefaultSessionController extends java.lang.Object implements IlrSessionController
IlrDefaultSessionController
is the default session controller implementation used by Decision Center.Overview
A session controller defines the interactive behavior of Decision Center. To keep the default behavior for customized session controller, create a subclass of
IlrDefaultSessionController
, then enhance only the features you want to change. Each method in your customized session controller class must call its super method whenever possible. For more information, see the session controller example.About Decision Center API
IBM Decision Center is a rule management server and repository integrated into a J2EE application server. It is used for authoring, managing, validating, and deploying business rules. Using this API you
connect
to Decision Center and create anIlrSession
instance for a specific user. You use the API to do the following:- Customize the Security and behavior of Decision Center to user interaction.
- Create and control rule projects and rules.
- Control the versions and baselines for files and projects.
- See Also:
IlrSession
,SessionListener
,IlrDefaultSearchCriteria
-
-
Field Summary
Fields Modifier and Type Field and Description protected java.util.List
listeners
The list of session listeners registered on this controller.protected IlrSession
session
The session associated with this controller.-
Fields inherited from interface ilog.rules.teamserver.model.IlrSessionCallback
CHANGE_ACTIVITY_CONTROLLER_CALLBACK, CONTROLLER_CALLBACK, ISUSERINROLE_CALLBACK, RELEASE_CONTROLLER_CALLBACK, VALIDATION_ACTIVITY_CONTROLLER_CALLBACK
-
-
Constructor Summary
Constructors Constructor and Description IlrDefaultSessionController()
-
Method Summary
Methods Modifier and Type Method and Description void
addSessionListener(SessionListener l)
Adds a session listener to the session listeners list.void
checkCreate(IlrBaseline baseline, org.eclipse.emf.ecore.EClass eclass)
Checks whether the current user has the right to create elements of the given class.void
checkDelete(IlrBranch branch, org.eclipse.emf.ecore.EClass eclass, java.lang.String group)
Checks to see if the current user has the right to delete a specific element in the given branch.void
checkDelete(IlrBranch branch, IlrElementHandle element)
Checks to see if the current user has the right to delete a specific element in the given branch.void
checkDelete(IlrElementHandle element)
Checks to see if the current user has the right to delete a specific element.void
checkUpdate(IlrBaseline baseline, org.eclipse.emf.ecore.EClass eclass, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String group)
Checks whether the current user has the right to update the an element of the given class in given branch.void
checkUpdate(IlrBaseline baseline, IlrElementHandle element, IlrElementDetails details, org.eclipse.emf.ecore.EStructuralFeature feature)
Checks whether the current user has the right to update the given element in given branch.void
checkUpdate(IlrElementHandle element, IlrElementDetails details, org.eclipse.emf.ecore.EStructuralFeature feature)
Checks whether the current user has the right to update the given element.void
elementAddedToBaseline(IlrElementHandle element, IlrBaseline baseline)
Implements a custom session controller that changes the way in which Decision Center reacts to an action.void
elementCommitted(IlrBranch branch, IlrCommitableObject cobject, IlrElementHandle newHandle)
Calls the list of session listeners registered on this controller.void
elementCommitted(IlrCommitableObject cobject, IlrElementHandle newHandle)
Calls the list of session listeners registered on this controller.void
elementDeleted(IlrBaseline baseline)
Calls the list of session listeners registered on this controller.void
elementDeleted(IlrBranch branch, IlrElementHandle element)
Calls the list of session listeners registered on this controller.void
elementDeleted(IlrElementHandle element)
Calls the list of session listeners registered on this controller.void
elementDeleted(IlrProjectInfo prjInfo)
Calls the list of session listeners registered on this controller.void
elementRemovedFromBaseline(IlrElementHandle element, IlrBaseline baseline)
Implements a custom session controller that changes the way in which Decision Center reacts to an action.java.lang.Object
getInitialValue(IlrElementDetails element, org.eclipse.emf.ecore.EStructuralFeature feature)
Gets the initial value for the given feature.protected ilog.rules.commonbrm.model.IlrInitialValue
getInitialValueCallback(org.eclipse.emf.ecore.EStructuralFeature feature)
Gets the initial value class defined in the Decision Center preferences for the given feature, if any.IlrBusinessVersion
getNextVersion(boolean isNew, boolean isNewInBranch, IlrBusinessVersion previousVersion)
Called By RTS when creating or updating an element to get the new version details.java.util.List
getPossibleValues(IlrElementHandle element, org.eclipse.emf.ecore.EStructuralFeature feature)
Gets the possible values for the given feature.protected ilog.rules.commonbrm.model.IlrPropertyExtension
getPropertyExtension()
Gets the property extension class defined in the Decision Center preferences, if any.boolean
isEditable(IlrElementHandle element, java.lang.String property)
Tests whether the given feature for a specific element is editable.boolean
isHidden(IlrElementHandle element, java.lang.String property)
Tests whether the given feature for a specific element must be hidden.boolean
isServerVisible(IlrServer server, IlrRuleApp ruleApp)
Called when the list of servers to deploy on is displayed.boolean
isServerVisible(IlrServer server, IlrScenarioSuite suite)
This method is called when the list of servers that can be set on the test suite is displayed.java.lang.String
isValid(IlrElementHandle element, java.lang.String feature, java.lang.Object value)
Tests whether the given value for a specific feature and element is valid.void
onAddElementToBaseline(IlrElementHandle element, IlrBaseline baseline)
Implements a custom session controller that changes the way in which Decision Center reacts to an action.void
onCheckRulesetArchive(ilog.rules.archive.IlrRulesetArchive rulesetArchive, IlrBaseline baseline, IlrSearchCriteria ruleArtifactquery, ilog.rules.commonbrm.extractor.IlrExtractorValidator extractorValidator, java.util.List generationErrors)
This method does nothing in this default implementation.void
onCommitElement(IlrBranch branch, IlrCommitableObject cobject)
Passes the element to theonCommitElement
method of theSessionListener
attached to this session controller.void
onCommitElement(IlrCommitableObject cobject)
Passes the element to theonCommitElement
method of theSessionListener
attached to this session controller.void
onDeleteElement(IlrBranch branch, IlrElementHandle element)
Passes the element to theonDeleteElement
method of theSessionListener
attached to this session controller.void
onDeleteElement(IlrElementHandle element)
Passes the element to theonDeleteElement
method of theSessionListener
attached to this session controller.void
onGenerateRulesetArchive(ilog.rules.engine.IlrRulesetArchiveBuilder rulesetArchiveBuilder, IlrBaseline baseline, IlrSearchCriteria ruleArtifactquery, ilog.rules.commonbrm.extractor.IlrExtractorValidator extractorValidator)
This method does nothing in this default implementation.void
onRemoveElementFromBaseline(IlrElementHandle element, IlrBaseline baseline)
Implements a custom session controller that changes the way in which Decision Center reacts to an action.IlrSearchCriteria
redefineSearch(IlrSearchCriteria searchCriteria)
Called each time a search is performed using search criteria.void
removeSessionListener(SessionListener l)
Removes a session listener from the session listeners list.void
securityProfileCommitted(java.lang.String role, IlrSecurityProfileData profile)
Called when new permissions for a givenrole
have been committed.void
securityProfileDeleted(java.lang.String role)
Called when permissions for a givenrole
have been deleted.void
setSession(IlrSession dataProvider)
Sets the session for this callback.
-
-
-
Field Detail
-
session
protected IlrSession session
The session associated with this controller.
-
listeners
protected java.util.List listeners
The list of session listeners registered on this controller.
-
-
Method Detail
-
setSession
public void setSession(IlrSession dataProvider)
Description copied from interface:IlrSessionCallback
Sets the session for this callback.This method is called just after a user connects to a session.
- Specified by:
setSession
in interfaceIlrSessionCallback
- Parameters:
dataProvider
- The session.- See Also:
IlrSessionFactory.connect(String, String, String, String)
, Overview
-
checkUpdate
public void checkUpdate(IlrElementHandle element, IlrElementDetails details, org.eclipse.emf.ecore.EStructuralFeature feature) throws IlrPermissionException, IlrObjectNotFoundException
Description copied from interface:IlrSessionController
Checks whether the current user has the right to update the given element.Decision Center calls this method in several places. It is called by the Decision Center GUI front end to check if:
- an "Edit" button should be grayed out
- a form field corresponding to a feature should be grayed out
commit
method to check if the details of an edited object can be committed.- Specified by:
checkUpdate
in interfaceIlrSessionController
- Throws:
IlrPermissionException
- if the current user does not have the rights to changeelement
.IlrObjectNotFoundException
- iffeature
is not found in the Decision Center database.- Parameters:
element
- The element handle. This parameter may be set tonull
.details
- The object that will be committed if this method does not throw any exceptions. This parameter may be set tonull
.feature
- The feature to modify. If set tonull
, you should consider whether the entire object can be modified in your custom session controller.- See Also:
- Overview
-
checkUpdate
public void checkUpdate(IlrBaseline baseline, IlrElementHandle element, IlrElementDetails details, org.eclipse.emf.ecore.EStructuralFeature feature) throws IlrPermissionException, IlrObjectNotFoundException
Description copied from interface:IlrSessionController
Checks whether the current user has the right to update the given element in given branch.Decision Center calls this method in several places. It is called by the Decision Center GUI front end to check if:
- an "Edit" button should be grayed out
- a form field corresponding to a feature should be grayed out
commit
method to check if the details of an edited object can be committed.- Specified by:
checkUpdate
in interfaceIlrSessionController
- Throws:
IlrPermissionException
- if the current user does not have the rights to changeelement
.IlrObjectNotFoundException
- iffeature
is not found in the Decision Center database.element
- The element handle. This parameter may be set tonull
.details
- The object that will be committed if this method does not throw any exceptions. This parameter may be set tonull
.feature
- The feature to modify. If set tonull
, you should consider whether the entire object can be modified in your custom session controller.- See Also:
- Overview
-
checkUpdate
public void checkUpdate(IlrBaseline baseline, org.eclipse.emf.ecore.EClass eclass, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String group) throws IlrPermissionException, IlrObjectNotFoundException
Description copied from interface:IlrSessionController
Checks whether the current user has the right to update the an element of the given class in given branch.Decision Center calls this method in several places. It is called by the Decision Center GUI front end to check if:
- an "Edit" button should be grayed out
- Specified by:
checkUpdate
in interfaceIlrSessionController
- Throws:
IlrPermissionException
- if the current user does not have the rights to change elements of classeclass
.IlrObjectNotFoundException
- iffeature
is not found in the Decision Center database.eclass
- The class to modify. This parameter may be set tonull
.feature
- The feature to modify. If set tonull
,- See Also:
- Overview
-
checkDelete
public void checkDelete(IlrElementHandle element) throws IlrPermissionException, IlrObjectNotFoundException
Checks to see if the current user has the right to delete a specific element.- Specified by:
checkDelete
in interfaceIlrSessionController
- Throws:
IlrPermissionException
- if the current user does not have the right to deleteelement
.IlrObjectNotFoundException
- ifelement
cannot be found in the Decision Center database.- Parameters:
element
- The element handle.- See Also:
- Session Controllers
-
checkDelete
public void checkDelete(IlrBranch branch, IlrElementHandle element) throws IlrPermissionException, IlrObjectNotFoundException
Checks to see if the current user has the right to delete a specific element in the given branch.- Specified by:
checkDelete
in interfaceIlrSessionController
- Throws:
IlrPermissionException
- if the current user does not have the right to deleteelement
.IlrObjectNotFoundException
- ifelement
cannot be found in the Decision Center database.- Parameters:
branch
- The branch in which the permission should be checked.element
- The element handle.- See Also:
- Session Controllers
-
checkDelete
public void checkDelete(IlrBranch branch, org.eclipse.emf.ecore.EClass eclass, java.lang.String group) throws IlrPermissionException, IlrObjectNotFoundException
Checks to see if the current user has the right to delete a specific element in the given branch.- Specified by:
checkDelete
in interfaceIlrSessionController
- Throws:
IlrPermissionException
- if the current user does not have the right to deleteelement
.IlrObjectNotFoundException
- ifelement
cannot be found in the Decision Center database.- Parameters:
branch
- The branch in which the permission should be checked.element
- The element handle.- See Also:
- Session Controllers
-
checkCreate
public void checkCreate(IlrBaseline baseline, org.eclipse.emf.ecore.EClass eclass) throws IlrPermissionException, IlrObjectNotFoundException
Checks whether the current user has the right to create elements of the given class.Implements a custom session controller to change the way Decision Center reacts to this action.
- Specified by:
checkCreate
in interfaceIlrSessionController
- Throws:
IlrPermissionException
- If the current user does not have the right to createeclass
IlrObjectNotFoundException
- Ifelement
cannot be found in the Decision Center database.- Parameters:
eclass
- The element class.baseline
- The branch on which the check should be done. If this argument is null, the working baseline is checked.- See Also:
- Session Controllers
-
isHidden
public boolean isHidden(IlrElementHandle element, java.lang.String property) throws IlrObjectNotFoundException
Description copied from interface:IlrSessionController
Tests whether the given feature for a specific element must be hidden.This method is used in the UI to test if the current user has the rights to see the
feature
.- Specified by:
isHidden
in interfaceIlrSessionController
- Throws:
IlrObjectNotFoundException
- Ifelement
is not found in the database.- Parameters:
element
- The element handle.property
- The feature to test.- Returns:
True
iffeature
is hidden.- See Also:
- Overview
-
isEditable
public boolean isEditable(IlrElementHandle element, java.lang.String property) throws IlrObjectNotFoundException
Description copied from interface:IlrSessionController
Tests whether the given feature for a specific element is editable.This method is used in the UI to check if
feature
may be edited by the current user.- Specified by:
isEditable
in interfaceIlrSessionController
- Throws:
IlrObjectNotFoundException
- If an object is not found in the database.- Parameters:
element
- The element handle.property
- The feature to test.- Returns:
True
iffeature
is editable.- See Also:
- Overview
-
onCheckRulesetArchive
public void onCheckRulesetArchive(ilog.rules.archive.IlrRulesetArchive rulesetArchive, IlrBaseline baseline, IlrSearchCriteria ruleArtifactquery, ilog.rules.commonbrm.extractor.IlrExtractorValidator extractorValidator, java.util.List generationErrors)
This method does nothing in this default implementation.Implements a custom session controller to change the way Decision Center reacts to this action.
- Specified by:
onCheckRulesetArchive
in interfaceIlrSessionController
- Parameters:
rulesetArchive
- The ruleset archive that has been generated.baseline
- The baseline from which the execution artifacts were extracted.ruleArtifactquery
- The query used to get the rule artifacts to be extracted. This parameter can be set tonull
.extractorValidator
- The extractor validator used to filter out the artifacts to be extracted.generationErrors
- A list ofIlrElementError
.- See Also:
IlrElementError
,IlrDeploymentFacility.generateRulesetArchive(IlrSearchCriteria, String, String)
, Session Controllers
-
redefineSearch
public IlrSearchCriteria redefineSearch(IlrSearchCriteria searchCriteria)
Description copied from interface:IlrSessionController
Called each time a search is performed using search criteria.A typical use is to modify the search according to the role of the user. For example, you could redefine a search such that the current user can only view the rules with the status 'new'. In this case, you will return a new search criterion that will add (status, 'new') to the list of features and values of the input search criteria.
Note: Do not modify and return
searchCriteria
. You must do one of the following:- return
searchCriteria
unchanged - return a new
IlrSearchCriteria
instance with extra criteria
- Specified by:
redefineSearch
in interfaceIlrSessionController
- Parameters:
searchCriteria
- The search criteria passed when one of theIlrSession.findElements
methods is called.- Returns:
- Either a new
IlrSearchCriteria
instance with overridden criteria, orsearchCriteria
.
- return
-
onDeleteElement
public void onDeleteElement(IlrElementHandle element) throws IlrApplicationException
Passes the element to theonDeleteElement
method of theSessionListener
attached to this session controller.- Specified by:
onDeleteElement
in interfaceIlrSessionController
- Throws:
IlrApplicationException
- Parameters:
element
- The object to be deleted.- See Also:
addSessionListener(SessionListener)
,IlrSession.deleteElement(IlrElementHandle)
, Session Controllers
-
onDeleteElement
public void onDeleteElement(IlrBranch branch, IlrElementHandle element) throws IlrApplicationException
Passes the element to theonDeleteElement
method of theSessionListener
attached to this session controller.- Specified by:
onDeleteElement
in interfaceIlrSessionController
- Throws:
IlrApplicationException
- Parameters:
element
- The object to be deleted.- See Also:
addSessionListener(SessionListener)
,IlrSession.deleteElement(IlrElementHandle)
, Session Controllers
-
onCommitElement
public void onCommitElement(IlrCommitableObject cobject) throws IlrApplicationException
Passes the element to theonCommitElement
method of theSessionListener
attached to this session controller.- Specified by:
onCommitElement
in interfaceIlrSessionController
- Throws:
IlrApplicationException
IlrObjectNotFoundException
- ifcobject
is not found in the database.IlrPermissionException
- if the current user does not have the rights to commitcobject
.IlrInvalidElementException
- ifcobject
is invalid. For example, if the name of a project element isnull
.IlrActivityObjectLockedException
- Parameters:
cobject
- The object to be committed.- See Also:
addSessionListener(SessionListener)
,IlrSession.commit(IlrCommitableObject)
, Session Controllers
-
onCommitElement
public void onCommitElement(IlrBranch branch, IlrCommitableObject cobject) throws IlrApplicationException
Passes the element to theonCommitElement
method of theSessionListener
attached to this session controller.- Specified by:
onCommitElement
in interfaceIlrSessionController
- Throws:
IlrApplicationException
IlrObjectNotFoundException
- ifcobject
is not found in the database.IlrPermissionException
- if the current user does not have the rights to commitcobject
.IlrInvalidElementException
- ifcobject
is invalid. For example, if the name of a project element isnull
.IlrActivityObjectLockedException
- Parameters:
cobject
- The object to be committed.branch
- The branch in which the element should get committed.- See Also:
addSessionListener(SessionListener)
,IlrSession.commit(IlrCommitableObject)
, Session Controllers
-
onGenerateRulesetArchive
public void onGenerateRulesetArchive(ilog.rules.engine.IlrRulesetArchiveBuilder rulesetArchiveBuilder, IlrBaseline baseline, IlrSearchCriteria ruleArtifactquery, ilog.rules.commonbrm.extractor.IlrExtractorValidator extractorValidator)
This method does nothing in this default implementation.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Specified by:
onGenerateRulesetArchive
in interfaceIlrSessionController
- Parameters:
rulesetArchiveBuilder
- The ruleset archive builder, ready to generate a ruleset archive. It contains the execution artifacts resulting from the extraction of the ruleset being generated.baseline
- The baseline from which the execution artifacts were extracted.ruleArtifactquery
- The query used to get the rule artifacts to be extracted. This parameter can be set tonull
.extractorValidator
- The extractor validator used to filter out the artifacts to be extracted.- See Also:
IlrDeploymentFacility.generateRulesetArchive(IlrSearchCriteria, String, String)
, Session Controllers
-
isValid
public java.lang.String isValid(IlrElementHandle element, java.lang.String feature, java.lang.Object value) throws IlrObjectNotFoundException
Description copied from interface:IlrSessionController
Tests whether the given value for a specific feature and element is valid.This method is used in the UI to check if
value
can be entered by the current user.- Specified by:
isValid
in interfaceIlrSessionController
- Throws:
IlrObjectNotFoundException
- If an object is not found in the database.- Parameters:
element
- The element handle.feature
- The feature to test.- Returns:
- An error message when the value is not valid,
null
otherwise. - See Also:
- Overview
-
getPossibleValues
public java.util.List getPossibleValues(IlrElementHandle element, org.eclipse.emf.ecore.EStructuralFeature feature) throws IlrObjectNotFoundException
Description copied from interface:IlrSessionController
Gets the possible values for the given feature.Optionally, the element for which the framework wants the possible values can be given. This allows implementors to dynamically compute the possible values according to the current state of the element.
- Specified by:
getPossibleValues
in interfaceIlrSessionController
- Throws:
IlrObjectNotFoundException
- iffeature
is not found in the Decision Center database.- Parameters:
element
- The element handle. This parameter may be set tonull
.feature
- The feature whose possible values you want to retrieve. This must be an attribute whose type is enumerated (EEnum
).- Returns:
- A list of the possible values. This method cannot return
null
. Set your custom implementation to returnList.EMPTY_LIST
if there are no possible values to return. - See Also:
- Overview
-
getInitialValue
public java.lang.Object getInitialValue(IlrElementDetails element, org.eclipse.emf.ecore.EStructuralFeature feature) throws IlrObjectNotFoundException
Description copied from interface:IlrSessionController
Gets the initial value for the given feature.- Specified by:
getInitialValue
in interfaceIlrSessionController
- Throws:
IlrObjectNotFoundException
- iffeature
is not found in the Decision Center database.- Parameters:
element
- The element handle. This parameter may be set tonull
.feature
- The feature whose initial value is to be returned.- Returns:
- The initial value for the object. May return
null
. - See Also:
- Overview
-
elementCommitted
public void elementCommitted(IlrCommitableObject cobject, IlrElementHandle newHandle) throws IlrApplicationException
Calls the list of session listeners registered on this controller.- Specified by:
elementCommitted
in interfaceIlrSessionController
- Throws:
IlrApplicationException
IlrObjectNotFoundException
- ifobject
is not found in the database.- Parameters:
cobject
- The committed object.newHandle
- The new handle.- See Also:
IlrSession.commit(IlrCommitableObject)
, Overview
-
elementCommitted
public void elementCommitted(IlrBranch branch, IlrCommitableObject cobject, IlrElementHandle newHandle) throws IlrApplicationException
Calls the list of session listeners registered on this controller.- Specified by:
elementCommitted
in interfaceIlrSessionController
- Throws:
IlrApplicationException
IlrObjectNotFoundException
- ifobject
is not found in the database.cobject
- The committed object.- See Also:
IlrSession.commit(IlrCommitableObject)
, Overview
-
elementDeleted
public void elementDeleted(IlrElementHandle element) throws IlrObjectNotFoundException
Calls the list of session listeners registered on this controller.- Specified by:
elementDeleted
in interfaceIlrSessionController
- Throws:
IlrObjectNotFoundException
- ifelement
is not found in the database.- Parameters:
element
- The deleted object.- See Also:
IlrSession.deleteElement(IlrElementHandle)
, Overview
-
elementDeleted
public void elementDeleted(IlrBranch branch, IlrElementHandle element) throws IlrObjectNotFoundException
Calls the list of session listeners registered on this controller.- Specified by:
elementDeleted
in interfaceIlrSessionController
- Throws:
IlrObjectNotFoundException
- ifelement
is not found in the database.element
- The deleted object.- See Also:
IlrSession.deleteElement(IlrElementHandle)
, Overview
-
elementDeleted
public void elementDeleted(IlrBaseline baseline) throws IlrObjectNotFoundException
Calls the list of session listeners registered on this controller.- Specified by:
elementDeleted
in interfaceIlrSessionController
- Throws:
IlrObjectNotFoundException
- ifbaseline
is not found in the database.- Parameters:
baseline
- The deleted baseline.- See Also:
IlrSession.deleteElement(IlrElementHandle)
, Overview
-
elementDeleted
public void elementDeleted(IlrProjectInfo prjInfo) throws IlrObjectNotFoundException
Calls the list of session listeners registered on this controller.- Specified by:
elementDeleted
in interfaceIlrSessionController
- Throws:
IlrObjectNotFoundException
- ifprjInfo
is not found in the database.- Parameters:
prjInfo
- The deleted project info.- See Also:
IlrSession.deleteElement(IlrElementHandle)
, Overview
-
addSessionListener
public void addSessionListener(SessionListener l)
Adds a session listener to the session listeners list.- Parameters:
l
- The session listener.
-
removeSessionListener
public void removeSessionListener(SessionListener l)
Removes a session listener from the session listeners list.- Parameters:
l
- The session listener.
-
elementAddedToBaseline
public void elementAddedToBaseline(IlrElementHandle element, IlrBaseline baseline) throws IlrApplicationException
Description copied from interface:IlrSessionController
Implements a custom session controller that changes the way in which Decision Center reacts to an action. This method is called just after an element has been added to a baseline.- Specified by:
elementAddedToBaseline
in interfaceIlrSessionController
- Throws:
IlrApplicationException
- ifelement
cannot be added tobaseline
.- Parameters:
element
- The element to add.baseline
- The baseline to update.- See Also:
IlrBaselineManagementFacility.addToBaseline(IlrElementHandle, IlrBaseline)
, Overview
-
elementRemovedFromBaseline
public void elementRemovedFromBaseline(IlrElementHandle element, IlrBaseline baseline) throws IlrApplicationException
Description copied from interface:IlrSessionController
Implements a custom session controller that changes the way in which Decision Center reacts to an action. This method is called just after an element has been removed from a baseline.- Specified by:
elementRemovedFromBaseline
in interfaceIlrSessionController
- Throws:
IlrApplicationException
- ifelement
cannot be removed frombaseline
.- Parameters:
element
- The element that has been removed.baseline
- The baseline to update.- See Also:
IlrBaselineManagementFacility.addToBaseline(IlrElementHandle, IlrBaseline)
, Overview
-
onAddElementToBaseline
public void onAddElementToBaseline(IlrElementHandle element, IlrBaseline baseline) throws IlrApplicationException
Description copied from interface:IlrSessionController
Implements a custom session controller that changes the way in which Decision Center reacts to an action. This method is called on entering theIlrSession.addToBaseline
method, just before the element is added to a baseline.- Specified by:
onAddElementToBaseline
in interfaceIlrSessionController
- Throws:
IlrApplicationException
- ifelement
cannot be added tobaseline
.- Parameters:
element
- The element to be added.baseline
- The baseline to be updated.- See Also:
IlrBaselineManagementFacility.addToBaseline(IlrElementHandle, IlrBaseline)
, Overview
-
onRemoveElementFromBaseline
public void onRemoveElementFromBaseline(IlrElementHandle element, IlrBaseline baseline) throws IlrApplicationException
Description copied from interface:IlrSessionController
Implements a custom session controller that changes the way in which Decision Center reacts to an action. This method is called on entering theIlrSession.removeFromBaseline
method, just before the element is removed from a baseline.- Specified by:
onRemoveElementFromBaseline
in interfaceIlrSessionController
- Throws:
IlrApplicationException
- ifelement
cannot be removed frombaseline
.- Parameters:
element
- The element to be removed.baseline
- The baseline to be updated.- See Also:
IlrBaselineManagementFacility.addToBaseline(IlrElementHandle, IlrBaseline)
, Overview
-
getPropertyExtension
protected ilog.rules.commonbrm.model.IlrPropertyExtension getPropertyExtension()
Gets the property extension class defined in the Decision Center preferences, if any.- Returns:
- The instance of
IlrPropertyExtension
, ornull
if no property extension has been defined.
-
getInitialValueCallback
protected ilog.rules.commonbrm.model.IlrInitialValue getInitialValueCallback(org.eclipse.emf.ecore.EStructuralFeature feature)
Gets the initial value class defined in the Decision Center preferences for the given feature, if any.- Returns:
- The instance of
IlrInitialValue
, ornull
if no initial value class has been defined.
-
isServerVisible
public boolean isServerVisible(IlrServer server, IlrRuleApp ruleApp)
Description copied from interface:IlrSessionController
Called when the list of servers to deploy on is displayed.Implements a custom session controller to filter the displayed servers.
- Specified by:
isServerVisible
in interfaceIlrSessionController
- Parameters:
server
- The server to manage.ruleApp
- The RuleApp to deploy.- Returns:
- True if the server must be displayed, false otherwise.
-
isServerVisible
public boolean isServerVisible(IlrServer server, IlrScenarioSuite suite)
Description copied from interface:IlrSessionController
This method is called when the list of servers that can be set on the test suite is displayed.Implements a custom session controller to filter the displayed servers.
- Specified by:
isServerVisible
in interfaceIlrSessionController
- Parameters:
server
- The server to manage.suite
- The test suite.- Returns:
- True if the server must be displayed, false otherwise.
-
securityProfileCommitted
public void securityProfileCommitted(java.lang.String role, IlrSecurityProfileData profile)
Description copied from interface:IlrSessionController
Called when new permissions for a givenrole
have been committed.- Specified by:
securityProfileCommitted
in interfaceIlrSessionController
- Parameters:
role
- The role on which the permissions have changed.profile
- The permissions that have been committed.
-
securityProfileDeleted
public void securityProfileDeleted(java.lang.String role)
Description copied from interface:IlrSessionController
Called when permissions for a givenrole
have been deleted.- Specified by:
securityProfileDeleted
in interfaceIlrSessionController
- Parameters:
role
- The role on which the permissions have been deleted.
-
getNextVersion
public IlrBusinessVersion getNextVersion(boolean isNew, boolean isNewInBranch, IlrBusinessVersion previousVersion)
Description copied from interface:IlrSessionController
Called By RTS when creating or updating an element to get the new version details.- Specified by:
getNextVersion
in interfaceIlrSessionController
- Parameters:
isNew
- true if this is a new element to createisNewInBranch
- true if the element is updated for the first time in working branchpreviousVersion
- latest element version in working branch hierarchy, null if this is a new element- Returns:
- the version to set for the element update.
-
-