ilog.rules.teamserver.model

Interface IlrSessionController

    • Method Detail

      • 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 create eclass.
        IlrObjectNotFoundException - If element cannot 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
        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
        It is also called at the beginning of the commit method to check if the details of an edited object can be committed.
        Throws:
        IlrPermissionException - if the current user does not have the rights to change element.
        IlrObjectNotFoundException - if feature is not found in the Decision Center database.
        Parameters:
        element - The element handle. This parameter may be set to null.
        details - The object that will be committed if this method does not throw any exceptions. This parameter may be set to null.
        feature - The feature to modify. If set to null, you should consider whether the entire object can be modified in your custom session controller.
        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 - if feature is not found in the Decision Center database.
        Parameters:
        element - The element handle. This parameter may be set to null.
        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 return List.EMPTY_LIST if 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 - if feature is not found in the Decision Center database.
        Parameters:
        element - The element handle. This parameter may be set to null.
        feature - The feature whose initial value is to be returned.
        Returns:
        The initial value for the object. May return null.
        See Also:
        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 - If element is not found in the database.
        Parameters:
        element - The element handle.
        feature - The feature to test.
        Returns:
        True if feature is 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 feature may 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:
        True if feature is 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 value can 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, null otherwise.
        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 IlrRulesetArchiveBuilder class. This method is called just before the archive is generated. See IlrRulesetArchiveBuilderBase.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 to null.
        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 rulesetArchive and add errors to generationErrors.

        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 to null.
        extractorValidator - The extractor validator used to filter out the artifacts to be extracted.
        generationErrors - A list of IlrElementError objects.
        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 searchCriteria unchanged
        • return a new IlrSearchCriteria instance with extra criteria
        Parameters:
        searchCriteria - The search criteria passed when one of the IlrSession.findElements methods is called.
        Returns:
        Either a new IlrSearchCriteria instance with overridden criteria, or searchCriteria.
      • 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 given role have 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 given role have been deleted.
        Parameters:
        role - The role on which the permissions have been deleted.
      • getNextVersion

        IlrBusinessVersion getNextVersion(boolean isNew,
                                        boolean isNewInBranch,
                                        IlrBusinessVersion previousVersion)
        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 create
        isNewInBranch - true if the element is updated for the first time in working branch
        previousVersion - latest element version in working branch hierarchy, null if this is a new element
        Returns:
        the version to set for the element update.

© Copyright IBM Corp. 1987, 2015