Interface IlrSessionController
-
- All Superinterfaces:
- IlrSessionCallback
- All Known Implementing Classes:
- IlrDefaultSessionController
public interface IlrSessionController extends IlrSessionCallback
IlrSessionControlleris the base interface for all classes that define security settings and interactive behavior for Decision Center.Overview
To keep the default behavior for customized session controller, subclass
IlrDefaultSessionController, then enhance only the features you want to change, each method in your customized session controller class must call its super method first.Code examples
This section contains two code examples. The first example shows how to customize Decision Center security; the second shows how to trace user activity to a log file.
Note: The custom classes implement
IlrDefaultSessionController, and notIlrSessionControllerdirectly. This makes sure that the default behavior of Decision Center in all other domains is retained.You register these classes with Decision Center by adding the following line to the
preferences.propertiesfile:teamserver.controller.class=ilog.rules.rts.samples.permissiontuning.WorkflowSessionControllerCustomizing Decision Center Security
The following code example shows a custom session controller implementation that will be used by Decision Center to check if the current user has the rights to update an element:
public class WorkflowSessionController extends IlrDefaultSessionController { // Constants for role definition public static final String ADMINISTRATOR_ROLE = "rtsAdministrator"; // This method is called in the GUI to find out whether or not a property should be grayed and, // before committing a change, to check the permissions. public void checkUpdate(IlrElementHandle element, IlrElementDetails details, org.eclipse.emf.ecore.EStructuralFeature feature) throws IlrPermissionException, IlrObjectNotFoundException { IlrSession session = element.getSession(); IlrElementDetails elementDetails = session.getElementDetails(element); // If we are checking a Business Rule... if (elementDetails!=null && elementDetails.isInstanceOf("BusinessRule")) { // Get the status of the rule String status = (String)elementDetails.getPropertyValue("status"); // If the status is 'deployable', forbid any change if (status.equals("deployable") &&! session.isUserInRole(ADMINISTRATOR_ROLE)) throw new IlrPermissionException("Unable to change a deployable rule"); } } }Logging Decision Center User Activity
The following code example shows a custom session controller implementation that will be used by Decision Center to log actions by the current user:
public class LogController extends IlrDefaultSessionController { private BufferedWriter outfile = null; public LogController() throws IOException{ Date myDate = new Date(); String outputFile = "RTSLog" + myDate.getTime(); outfile = new BufferedWriter(new FileWriter(outputFile, true)); } public void elementDeleted(IlrElementHandle handle) throws IlrObjectNotFoundException { // Always call the super method super.elementDeleted(handle); try{ log((IlrModelElement) handle, "DELETE"); } catch(IOException e){;} } public void elementCommitted(IlrCommitableObject cobject, IlrElementHandle newHandle) throws IlrObjectNotFoundException { // Always call the super method super.elementCommitted(cobject, newHandle); Object detail = session.getElementDetails(newHandle); if (!(detail instanceof IlrModelElement)) return; try { log( (IlrModelElement) detail, "COMMITTED"); }catch(IOException e){;} } public void log(IlrModelElement element, String action) throws IOException { String logComment = action + " " + element.getName(); logComment += " uuid " + element.getUuid(); logComment += " changed on " + element.getLastChangedOn(); logComment += " by " + element.getLastChangedBy(); logComment += " committed by " + session.getUserName(); outfile.write( logComment); outfile.flush(); } }
-
-
Field Summary
-
Fields inherited from interface ilog.rules.teamserver.model.IlrSessionCallback
CHANGE_ACTIVITY_CONTROLLER_CALLBACK, CONTROLLER_CALLBACK, ISUSERINROLE_CALLBACK, RELEASE_CONTROLLER_CALLBACK, VALIDATION_ACTIVITY_CONTROLLER_CALLBACK
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method and Description voidcheckCreate(IlrBaseline baseline, org.eclipse.emf.ecore.EClass eclass)Checks whether the current user has the right to create elements of the given class.voidcheckDelete(IlrBranch branch, org.eclipse.emf.ecore.EClass eclass, java.lang.String group)Checks whether the current user has the right to delete an element of the given class in the given branch.voidcheckDelete(IlrBranch branch, IlrElementHandle element)Checks whether the current user has the right to delete the given element in the given branch.voidcheckDelete(IlrElementHandle element)Checks whether the current user has the right to delete the given element.voidcheckUpdate(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.voidcheckUpdate(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.voidcheckUpdate(IlrElementHandle element, IlrElementDetails details, org.eclipse.emf.ecore.EStructuralFeature feature)Deprecated.replaced by checkUpdate(IlrBaseline baseline, IlrElementHandle element, IlrElementDetails details, EStructuralFeature feature).voidelementAddedToBaseline(IlrElementHandle element, IlrBaseline baseline)Implements a custom session controller that changes the way in which Decision Center reacts to an action.voidelementCommitted(IlrBranch branch, IlrCommitableObject cobject, IlrElementHandle newHandle)This method is called just after an element has been committed.voidelementCommitted(IlrCommitableObject cobject, IlrElementHandle newHandle)Deprecated.use elementCommitted(IlrBranch, IlrCommitableObject, IlrElementHandle).voidelementDeleted(IlrBaseline baseline)Deprecated.use elementDeleted(IlrBranch, IlrBaseline)voidelementDeleted(IlrBranch branch, IlrBaseline baseline)This method is called just after a baseline has been deleted.voidelementDeleted(IlrBranch branch, IlrElementHandle element)This method is called just after an element has been deleted.voidelementDeleted(IlrBranch branch, IlrProjectInfo prjInfo)This method is called just after a project info has been deleted.voidelementDeleted(IlrElementHandle element)Deprecated.use elementDeleted(IlrBranch, IlrElementHandle)voidelementDeleted(IlrProjectInfo prjInfo)Deprecated.use elementDeleted(IlrBranch, IlrBaseline)voidelementRemovedFromBaseline(IlrElementHandle element, IlrBaseline baseline)Implements a custom session controller that changes the way in which Decision Center reacts to an action.java.lang.ObjectgetInitialValue(IlrElementDetails element, org.eclipse.emf.ecore.EStructuralFeature feature)Gets the initial value for the given feature.IlrBusinessVersiongetNextVersion(boolean isNew, boolean isNewInBranch, IlrBusinessVersion previousVersion)Deprecated.should use method that specifies the branch where the update is done. Called By RTS when creating or updating an element to get the new version details.IlrBusinessVersiongetNextVersion(IlrBaseline branch, boolean isNew, boolean isNewInBranch, IlrBusinessVersion previousVersion)Called By RTS when creating or updating an element to get the new version details.java.util.ListgetPossibleValues(IlrElementHandle element, org.eclipse.emf.ecore.EStructuralFeature feature)Gets the possible values for the given feature.booleanisEditable(IlrElementHandle element, java.lang.String feature)Tests whether the given feature for a specific element is editable.booleanisHidden(IlrElementHandle element, java.lang.String feature)Tests whether the given feature for a specific element must be hidden.booleanisServerVisible(IlrServer server, IlrRuleApp ruleApp)Called when the list of servers to deploy on is displayed.booleanisServerVisible(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.StringisValid(IlrElementHandle element, java.lang.String feature, java.lang.Object value)Tests whether the given value for a specific feature and element is valid.voidonAddElementToBaseline(IlrElementHandle element, IlrBaseline baseline)Implements a custom session controller that changes the way in which Decision Center reacts to an action.voidonCheckRulesetArchive(ilog.rules.archive.IlrRulesetArchive rulesetArchive, IlrBaseline baseline, IlrSearchCriteria ruleArtifactquery, ilog.rules.commonbrm.extractor.IlrExtractorValidator extractorValidator, java.util.List generationErrors)Called when a generated ruleset archive is being checked.voidonCommitElement(IlrBranch branch, IlrCommitableObject cobject)This method is called when entering theIlrSession.commitmethod, just before effectively committing an element.voidonCommitElement(IlrCommitableObject cobject)Deprecated.This method is called when entering theIlrSession.commitmethod, just before effectively committing an element.Implements a custom session controller to change the way in which Decision Center reacts to this action. This method assume the commit operation is applied on the working branch. The new method onCommitElement(IlrBranch, IlrCommitableObject) should be used instead of this one in order to specify the branch in which the commit operation is executed.
voidonDeleteElement(IlrBranch branch, IlrElementHandle element)This method is called when entering theIlrSession.deletemethod, just before deleting an element.voidonDeleteElement(IlrElementHandle element)Deprecated.use onDeleteElement(IlrBranch, IlrElementHandle) ;voidonGenerateRulesetArchive(ilog.rules.engine.IlrRulesetArchiveBuilder rulesetArchiveBuilder, IlrBaseline baseline, IlrSearchCriteria ruleArtifactquery, ilog.rules.commonbrm.extractor.IlrExtractorValidator extractorValidator)Called at the end of the generation of a ruleset archive.voidonRemoveElementFromBaseline(IlrElementHandle element, IlrBaseline baseline)Implements a custom session controller that changes the way in which Decision Center reacts to an action.IlrSearchCriteriaredefineSearch(IlrSearchCriteria searchCriteria)Called each time a search is performed using search criteria.voidsecurityProfileCommitted(java.lang.String role, IlrSecurityProfileData profile)Called when new permissions for a givenrolehave been committed.voidsecurityProfileDeleted(java.lang.String role)Called when permissions for a givenrolehave been deleted.-
Methods inherited from interface ilog.rules.teamserver.model.IlrSessionCallback
setSession
-
-
-
-
Method Detail
-
checkDelete
void checkDelete(IlrElementHandle element) throws IlrPermissionException, IlrObjectNotFoundException
Checks whether the current user has the right to delete the given element.This method is called by the
IlrSession.deleteElement(IlrElementHandle)method, just beforeelementis finally deleted. For Decision Center GUI front ends, this method might also be called to check if the "Delete" button is grayed out forelement.- Throws:
IlrPermissionException- if the current user does not have the right to deleteelement.IlrObjectNotFoundException- ifelementis not found in the Decision Center database.- Parameters:
element- The handle of the element to be deleted.- See Also:
- Overview
-
checkDelete
void checkDelete(IlrBranch branch, IlrElementHandle element) throws IlrPermissionException, IlrObjectNotFoundException
Checks whether the current user has the right to delete the given element in the given branch.This method is called by the
IlrSession.deleteElement(IlrElementHandle)method, just beforeelementis finally deleted. For Decision Center GUI front ends, this method might also be called to check if the "Delete" button is grayed out forelement.- Throws:
IlrPermissionException- if the current user does not have the right to deleteelement.IlrObjectNotFoundException- ifelementis not found in the Decision Center database.- Parameters:
branch- The branch in which the permission should be checked.element- The handle of the element to be deleted.- See Also:
- Overview
-
checkDelete
void checkDelete(IlrBranch branch, org.eclipse.emf.ecore.EClass eclass, java.lang.String group) throws IlrPermissionException, IlrObjectNotFoundException
Checks whether the current user has the right to delete an element of the given class in the given branch.This method is called by the
IlrSession.deleteElement(IlrElementHandle)method, just beforeelementis finally deleted. For Decision Center GUI front ends, this method might also be called to check if the "Delete" button is grayed out forelement.- Throws:
IlrPermissionException- if the current user does not have the right to delete an element of classeclass.IlrObjectNotFoundException- Parameters:
branch- The branch in which the permission should be checked.eclass- The class of element to be deleted.group- The group of element to be deleted.- See Also:
- Overview
-
checkCreate
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.For Decision Center GUI front ends, this method is called to check if a "New" button can be grayed out, or to compute the list of available types.
- Throws:
IlrPermissionException- if the current user does not have the right to createeclass.IlrObjectNotFoundException- Ifelementcannot be found in the Decision Center database.- Parameters:
baseline- The branch on which the check should be done. If this argument is null, the working baseline is checked.eclass- The element class.- See Also:
- Overview
-
checkUpdate
void checkUpdate(IlrElementHandle element, IlrElementDetails details, org.eclipse.emf.ecore.EStructuralFeature feature) throws IlrPermissionException, IlrObjectNotFoundException
Deprecated. replaced by checkUpdate(IlrBaseline baseline, IlrElementHandle element, IlrElementDetails details, EStructuralFeature feature).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
commitmethod to check if the details of an edited object can be committed.- Throws:
IlrPermissionException- if the current user does not have the rights to changeelement.IlrObjectNotFoundException- iffeatureis 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
void checkUpdate(IlrBaseline baseline, IlrElementHandle element, IlrElementDetails details, org.eclipse.emf.ecore.EStructuralFeature feature) throws IlrPermissionException, IlrObjectNotFoundException
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
commitmethod to check if the details of an edited object can be committed.- Throws:
IlrPermissionException- if the current user does not have the rights to changeelement.IlrObjectNotFoundException- iffeatureis 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
void checkUpdate(IlrBaseline baseline, org.eclipse.emf.ecore.EClass eclass, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String group) throws IlrPermissionException, IlrObjectNotFoundException
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
- Throws:
IlrPermissionException- if the current user does not have the rights to change elements of classeclass.IlrObjectNotFoundException- iffeatureis not found in the Decision Center database.- Parameters:
eclass- The class to modify. This parameter may be set tonull.feature- The feature to modify. If set tonull,- See Also:
- Overview
-
getPossibleValues
java.util.List getPossibleValues(IlrElementHandle element, org.eclipse.emf.ecore.EStructuralFeature feature) throws IlrObjectNotFoundException
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.
- Throws:
IlrObjectNotFoundException- iffeatureis 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_LISTif there are no possible values to return. - See Also:
- Overview
-
getInitialValue
java.lang.Object getInitialValue(IlrElementDetails element, org.eclipse.emf.ecore.EStructuralFeature feature) throws IlrObjectNotFoundException
Gets the initial value for the given feature.- Throws:
IlrObjectNotFoundException- iffeatureis 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
void elementCommitted(IlrCommitableObject cobject, IlrElementHandle newHandle) throws IlrApplicationException
Deprecated. use elementCommitted(IlrBranch, IlrCommitableObject, IlrElementHandle).Called just after an element has been committed.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrObjectNotFoundException- ifobjectis not found in the database.IlrApplicationException- Parameters:
cobject- The committed object.newHandle- The new handle.- See Also:
IlrSession.commit(IlrCommitableObject), Overview
-
elementCommitted
void elementCommitted(IlrBranch branch, IlrCommitableObject cobject, IlrElementHandle newHandle) throws IlrApplicationException
This method is called just after an element has been committed.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrObjectNotFoundException- ifobjectis not found in the database.IlrApplicationException- Parameters:
cobject- The committed object.newHandle-- See Also:
IlrSession.commit(IlrCommitableObject), Overview
-
elementDeleted
void elementDeleted(IlrElementHandle element) throws IlrObjectNotFoundException
Deprecated. use elementDeleted(IlrBranch, IlrElementHandle)Called just after an element has been deleted.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrObjectNotFoundException- ifelementis not found in the database.- Parameters:
element- The deleted object.- See Also:
IlrSession.deleteElement(IlrElementHandle), Overview
-
elementDeleted
void elementDeleted(IlrBranch branch, IlrElementHandle element) throws IlrObjectNotFoundException
This method is called just after an element has been deleted.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrObjectNotFoundException- ifelementis not found in the database.- Parameters:
branch- The branch in which the object is to be deleted.element- The deleted object.- See Also:
IlrSession.deleteElement(IlrElementHandle), Overview
-
elementDeleted
void elementDeleted(IlrBaseline baseline) throws IlrObjectNotFoundException
Deprecated. use elementDeleted(IlrBranch, IlrBaseline)This method is called just after a baseline has been deleted.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrObjectNotFoundException- ifbaselineis not found in the database.- Parameters:
baseline- The deleted baseline.- See Also:
IlrSession.deleteElement(IlrElementHandle), Overview
-
elementDeleted
void elementDeleted(IlrBranch branch, IlrBaseline baseline) throws IlrObjectNotFoundException
This method is called just after a baseline has been deleted.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrObjectNotFoundException- ifbaselineis not found in the database.- Parameters:
branch- The branch in which the baseline is to be deleted.baseline- The deleted baseline.- See Also:
IlrSession.deleteElement(IlrElementHandle), Overview
-
elementDeleted
void elementDeleted(IlrProjectInfo prjInfo) throws IlrObjectNotFoundException
Deprecated. use elementDeleted(IlrBranch, IlrBaseline)This method is called just after a project info has been deleted.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrObjectNotFoundException- ifprjInfois not found in the database.- Parameters:
prjInfo- The deleted project info.- See Also:
IlrSession.deleteElement(IlrElementHandle), Overview
-
elementDeleted
void elementDeleted(IlrBranch branch, IlrProjectInfo prjInfo) throws IlrObjectNotFoundException
This method is called just after a project info has been deleted.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrObjectNotFoundException- ifprjInfois not found in the database.- Parameters:
branch- The branch in which the object is to be deleted.prjInfo- The deleted project info.- See Also:
IlrSession.deleteElement(IlrElementHandle), Overview
-
elementAddedToBaseline
void elementAddedToBaseline(IlrElementHandle element, IlrBaseline baseline) throws IlrApplicationException
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.- Throws:
IlrApplicationException- ifelementcannot be added tobaseline.- Parameters:
element- The element to add.baseline- The baseline to update.- See Also:
IlrBaselineManagementFacility.addToBaseline(IlrElementHandle, IlrBaseline), Overview
-
elementRemovedFromBaseline
void elementRemovedFromBaseline(IlrElementHandle element, IlrBaseline baseline) throws IlrApplicationException
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.- Throws:
IlrApplicationException- ifelementcannot be removed frombaseline.- Parameters:
element- The element that has been removed.baseline- The baseline to update.- See Also:
IlrBaselineManagementFacility.addToBaseline(IlrElementHandle, IlrBaseline), Overview
-
onCommitElement
void onCommitElement(IlrCommitableObject cobject) throws IlrApplicationException
Deprecated. This method is called when entering theIlrSession.commitmethod, just before effectively committing an element.Implements a custom session controller to change the way in which Decision Center reacts to this action. This method assume the commit operation is applied on the working branch. The new method onCommitElement(IlrBranch, IlrCommitableObject) should be used instead of this one in order to specify the branch in which the commit operation is executed.
- Throws:
IlrObjectNotFoundException- ifcobjectis not found in the database.IlrPermissionException- if the current user does not have the rights to commitcobject.IlrInvalidElementException- ifcobjectis invalid. For example, if the name of a project element isnull.IlrActivityObjectLockedExceptionIlrApplicationException- if an operation throws one.- Parameters:
cobject- The object to be committed.- See Also:
IlrSession.commit(IlrCommitableObject), Overview
-
onCommitElement
void onCommitElement(IlrBranch branch, IlrCommitableObject cobject) throws IlrApplicationException
This method is called when entering theIlrSession.commitmethod, just before effectively committing an element.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrObjectNotFoundException- ifcobjectis not found in the database.IlrPermissionException- if the current user does not have the rights to commitcobject.IlrInvalidElementException- ifcobjectis invalid. For example, if the name of a project element isnull.IlrActivityObjectLockedExceptionIlrApplicationException- if an operation throws one.- Parameters:
branch- The branch in which the element should get committed.cobject- The object to be committed.- See Also:
IlrSession.commit(IlrCommitableObject), Overview
-
onDeleteElement
void onDeleteElement(IlrElementHandle element) throws IlrApplicationException
Deprecated. use onDeleteElement(IlrBranch, IlrElementHandle) ;Called when entering theIlrSession.deletemethod, just before deleting an element.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrApplicationException- Parameters:
element- The object to be deleted.- See Also:
IlrSession.deleteElement(IlrElementHandle), Overview
-
onDeleteElement
void onDeleteElement(IlrBranch branch, IlrElementHandle element) throws IlrApplicationException
This method is called when entering theIlrSession.deletemethod, just before deleting an element.Implements a custom session controller to change the way in which Decision Center reacts to this action.
- Throws:
IlrApplicationException- Parameters:
branch- The branch in which the object should be deleted.element- The object to be deleted.- See Also:
IlrSession.deleteElement(IlrElementHandle), Overview
-
onAddElementToBaseline
void onAddElementToBaseline(IlrElementHandle element, IlrBaseline baseline) throws IlrApplicationException
Implements a custom session controller that changes the way in which Decision Center reacts to an action. This method is called on entering theIlrSession.addToBaselinemethod, just before the element is added to a baseline.- Throws:
IlrApplicationException- ifelementcannot be added tobaseline.- Parameters:
element- The element to be added.baseline- The baseline to be updated.- See Also:
IlrBaselineManagementFacility.addToBaseline(IlrElementHandle, IlrBaseline), Overview
-
onRemoveElementFromBaseline
void onRemoveElementFromBaseline(IlrElementHandle element, IlrBaseline baseline) throws IlrApplicationException
Implements a custom session controller that changes the way in which Decision Center reacts to an action. This method is called on entering theIlrSession.removeFromBaselinemethod, just before the element is removed from a baseline.- Throws:
IlrApplicationException- ifelementcannot be removed frombaseline.- Parameters:
element- The element to be removed.baseline- The baseline to be updated.- See Also:
IlrBaselineManagementFacility.addToBaseline(IlrElementHandle, IlrBaseline), Overview
-
isHidden
boolean isHidden(IlrElementHandle element, java.lang.String feature) throws IlrObjectNotFoundException
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.- Throws:
IlrObjectNotFoundException- Ifelementis not found in the database.- Parameters:
element- The element handle.feature- The feature to test.- Returns:
Trueiffeatureis hidden.- See Also:
- Overview
-
isEditable
boolean isEditable(IlrElementHandle element, java.lang.String feature) throws IlrObjectNotFoundException
Tests whether the given feature for a specific element is editable.This method is used in the UI to check if
featuremay be edited by the current user.- Throws:
IlrObjectNotFoundException- If an object is not found in the database.- Parameters:
element- The element handle.feature- The feature to test.- Returns:
Trueiffeatureis editable.- See Also:
- Overview
-
isValid
java.lang.String isValid(IlrElementHandle element, java.lang.String feature, java.lang.Object value) throws IlrObjectNotFoundException
Tests whether the given value for a specific feature and element is valid.This method is used in the UI to check if
valuecan be entered by the current user.- 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,
nullotherwise. - See Also:
- Overview
-
onGenerateRulesetArchive
void onGenerateRulesetArchive(ilog.rules.engine.IlrRulesetArchiveBuilder rulesetArchiveBuilder, IlrBaseline baseline, IlrSearchCriteria ruleArtifactquery, ilog.rules.commonbrm.extractor.IlrExtractorValidator extractorValidator)Called at the end of the generation of a ruleset archive.Implement this method in your custom session controller to manipulate the content of an archive using the
IlrRulesetArchiveBuilderclass. This method is called just before the archive is generated. SeeIlrRulesetArchiveBuilderBase.generate()for more information.- 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), Overview
-
onCheckRulesetArchive
void onCheckRulesetArchive(ilog.rules.archive.IlrRulesetArchive rulesetArchive, IlrBaseline baseline, IlrSearchCriteria ruleArtifactquery, ilog.rules.commonbrm.extractor.IlrExtractorValidator extractorValidator, java.util.List generationErrors)Called when a generated ruleset archive is being checked.Implements a custom session controller to change the way in which Decision Center reacts to this action. For example, perform a custom check on
rulesetArchiveand add errors togenerationErrors.- 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 ofIlrElementErrorobjects.- See Also:
IlrElementError,IlrDeploymentFacility.generateRulesetArchive(IlrSearchCriteria, String, String), Overview
-
redefineSearch
IlrSearchCriteria redefineSearch(IlrSearchCriteria searchCriteria)
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
searchCriteriaunchanged - return a new
IlrSearchCriteriainstance with extra criteria
- Parameters:
searchCriteria- The search criteria passed when one of theIlrSession.findElementsmethods is called.- Returns:
- Either a new
IlrSearchCriteriainstance with overridden criteria, orsearchCriteria.
- return
-
isServerVisible
boolean isServerVisible(IlrServer server, IlrRuleApp ruleApp)
Called when the list of servers to deploy on is displayed.Implements a custom session controller to filter the displayed servers.
- Parameters:
server- The server to manage.ruleApp- The RuleApp to deploy.- Returns:
- True if the server must be displayed, false otherwise.
-
isServerVisible
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.Implements a custom session controller to filter the displayed servers.
- Parameters:
server- The server to manage.suite- The test suite.- Returns:
- True if the server must be displayed, false otherwise.
-
securityProfileCommitted
void securityProfileCommitted(java.lang.String role, IlrSecurityProfileData profile)Called when new permissions for a givenrolehave been committed.- Parameters:
role- The role on which the permissions have changed.profile- The permissions that have been committed.
-
securityProfileDeleted
void securityProfileDeleted(java.lang.String role)
Called when permissions for a givenrolehave been deleted.- Parameters:
role- The role on which the permissions have been deleted.
-
getNextVersion
IlrBusinessVersion getNextVersion(boolean isNew, boolean isNewInBranch, IlrBusinessVersion previousVersion)
Deprecated. should use method that specifies the branch where the update is done. Called By RTS when creating or updating an element to get the new version details.- 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.
-
getNextVersion
IlrBusinessVersion getNextVersion(IlrBaseline branch, boolean isNew, boolean isNewInBranch, IlrBusinessVersion previousVersion)
Called By RTS when creating or updating an element to get the new version details.- Parameters:
branch- the branch where the update is doneisNew- 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.
-
-