Class IXServerEventsBase

java.lang.Object
de.elo.ix.client.plugin.IXServerEventsBase
All Implemented Interfaces:
byps.Remote, IXServerEvents, de.elo.utils.net.Remote, Remote

public class IXServerEventsBase extends Object implements IXServerEvents
Helper class to simplify implementation of IXServerEvents. This class simplifies to implement the interface IXServerEvents. It provides an empty default implementation for all methods. Furthermore, it collects the methods of the derived class to implement hasMethod(IXServerEventsContext, String). Hence, the derived class does not need to provide an own hasMethod(IXServerEventsContext, String) function. Example:
 
 public class IXServerEventsImpl extends IXServerEventsBase {
   public IXServerEventsImpl(PluginActivator activator) {
     super(activator);
   }
   public void onBeforeCheckinSord(IXServerEventsContext ec, Sord sord, Sord sordDB, Sord parentSord, SordZ sordZ, LockZ unlockZ)
     throws RemoteException {
     // ...
   }
 }
 
 
  • Field Details

    • implementedMethods

      protected final Set<String> implementedMethods
    • activator

      protected final PluginActivator activator
  • Constructor Details

    • IXServerEventsBase

      public IXServerEventsBase(PluginActivator activator)
  • Method Details

    • getAppInfo

      public String getAppInfo(IXServerEventsContext ec) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This mandatory method returns information about the application that implements the interface. It should return the application name and version and the implementors name. The returned String is printed into the log file and is added to error messages. This method is mandatory.
      Specified by:
      getAppInfo in interface IXServerEvents
      Parameters:
      ec - Execution context.
      Returns:
      String
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • hasMethod

      public boolean hasMethod(IXServerEventsContext ec, String methodName) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This mandatory method tests, wether an interace method is implemented. The Indexserver calls this function for each method, before the method is called the first time.
      Specified by:
      hasMethod in interface IXServerEvents
      Parameters:
      ec - Execution context.
      methodName - Method name.
      Returns:
      true, if the method is implemented.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onBeforeCheckinSord

      public void onBeforeCheckinSord(IXServerEventsContext ec, Sord sord, Sord sordDB, Sord parentSord, SordZ sordZ, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This synchronous event is raised before a Sord object is written. It is raised in checkinSord, checkinDocEnd, checkinDocsEnd, startImport.
      Specified by:
      onBeforeCheckinSord in interface IXServerEvents
      Parameters:
      ec - Execution context
      sord - Parameter supplied in checkinSord
      sordDB - Current DB record, is null for new Sords
      parentSord - Parent Sord, might be null.
      sordZ - Members to be written
      unlockZ - Parameter supplied in checkinSord
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC. Execption thrown by the script itself or scripting engine.
    • onAfterCheckinSord

      public void onAfterCheckinSord(IXServerEventsContext ec, Sord sord, Sord sordDB, Sord parentSord, SordZ sordZ, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This asynchronous event is raised after a Sord object has been written. It is raised in checkinSord, checkinDocEnd, checkinDocsEnd, checkinSordPath, startImport.
      Specified by:
      onAfterCheckinSord in interface IXServerEvents
      Parameters:
      ec - Execution context
      sord - Parameter supplied in checkinSord
      sordDB - Current DB record, is null for new Sords
      parentSord - Parent Sord, might be null.
      sordZ - Members written
      unlockZ - Parameter supplied in checkinSord
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC. Execption thrown by the script itself or scripting engine.
    • onBeforeCheckinDocEnd

      public void onBeforeCheckinDocEnd(IXServerEventsContext ec, Sord sord, Sord sordDB, Sord parentSord, Document doc, SordZ sordZ, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This synchronous event is raised before a document or a document version is checked in. It is raised in checkinDocEnd, checkinDocsEnd, startImport.
      Specified by:
      onBeforeCheckinDocEnd in interface IXServerEvents
      Parameters:
      ec - Execution context
      sord - Parameter supplied in checkinDocEnd, can be null.
      sordDB - Current DB record, is null for new Sords
      parentSord - Parent Sord, might be null.
      doc - Parameter supplied in checkinDocEnd
      sordZ - Members to be written, can be null.
      unlockZ - Parameter supplied in checkinDocEnd
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC. Execption thrown by the script itself or scripting engine.
    • onAfterCheckinDocEnd

      public void onAfterCheckinDocEnd(IXServerEventsContext ec, Sord sord, Sord sordDB, Sord parentSord, Document doc, SordZ sordZ, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This asynchronous event is raised after a document or a document version has been checked in. It is raised in checkinDocEnd, checkinDocsEnd, startImport.
      Specified by:
      onAfterCheckinDocEnd in interface IXServerEvents
      Parameters:
      ec - Execution context
      sord - Parameter supplied in checkinDocEnd, can be null.
      sordDB - Current DB record, is null for new Sords
      parentSord - Parent Sord, might be null.
      doc - Parameter supplied in checkinDocEnd
      sordZ - Members to be written, can be null.
      unlockZ - Parameter supplied in checkinDocEnd
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC. Execption thrown by the script itself or scripting engine.
    • onBeforeDeleteSord

      public void onBeforeDeleteSord(IXServerEventsContext ec, Sord parentSord, Sord sord, LockZ unlockZ, DeleteOptions delOpts) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This synchronous event is raised before a Sord is deleted. It is raised in deleteSord, cleanupStart.
      Specified by:
      onBeforeDeleteSord in interface IXServerEvents
      Parameters:
      ec - Execution context
      parentSord - Parent Sord Valid members are defined by parentSord.changedMembers. In JavaScript, use new SordZ(parentSord.changedMembers).isTrue(SordC.mb...) to test whether a member is valid.
      sord - Sord to be deleted (might be a logical reference in parentSord) Valid members are defined by sord.changedMembers.
      unlockZ - Lock mode
      delOpts - Delete options
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterDeleteSord

      public void onAfterDeleteSord(IXServerEventsContext ec, Sord parentSord, Sord sord, LockZ unlockZ, DeleteOptions delOpts, boolean ret) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This asynchronous event is raised after a Sord is deleted. It is raised in deleteSord, cleanupStart.
      Specified by:
      onAfterDeleteSord in interface IXServerEvents
      Parameters:
      ec - Execution context
      parentSord - Parent Sord Valid members are defined by parentSord.changedMembers. In JavaScript, use new SordZ(parentSord.changedMembers).isTrue(SordC.mb...) to test whether a member is valid.
      sord - Sord to be deleted (might be a logical reference in parentSord) Valid members are defined by sord.changedMembers.
      unlockZ - Lock mode
      delOpts - Delete options
      ret - Return value of deleteSord
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onBeforeRefSord

      public void onBeforeRefSord(IXServerEventsContext ec, Sord parentSordOld, Sord parentSordNew, Sord sord, int manSortIndex) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This synchronous event is raised before a Sord is moved or a reference is created. It is raised in refSord, copySord.
      Specified by:
      onBeforeRefSord in interface IXServerEvents
      Parameters:
      ec - Execution context
      parentSordOld - Previsious parent
      parentSordNew - New parent
      sord - Object or reference to be moved.
      manSortIndex - Manually sort order in the new parent.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterRefSord

      public void onAfterRefSord(IXServerEventsContext ec, Sord parentSordOld, Sord parentSordNew, Sord sord, int manSortIndex) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This asynchronous event is raised after a Sord is moved or a reference is created. It is raised in refSord, copySord.
      Specified by:
      onAfterRefSord in interface IXServerEvents
      Parameters:
      ec - Execution context
      parentSordOld - Previsious parent
      parentSordNew - New parent
      sord - Object or reference to be moved.
      manSortIndex - Manually sort order in the new parent.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterEndEditWorkFlowNode

      public void onAfterEndEditWorkFlowNode(IXServerEventsContext ec, WFDiagram workflow, int nodeId, Sord sord, SordZ sordZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This asynchronous event is raised after a workflow node is forwarded by endEditWorkFlowNode.
      Specified by:
      onAfterEndEditWorkFlowNode in interface IXServerEvents
      Parameters:
      ec - Execution context
      workflow - Workflow object
      nodeId - Forwarded node ID
      sord - Sord object, valid members as in sordZ
      sordZ - Valid members of Sord object, SordC.mbLeanMembers|SordC.mbDocVersion
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterCheckinReminder

      public void onAfterCheckinReminder(IXServerEventsContext ec, Reminder[] remiArray, Sord sord, SordZ sordZ, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This asynchronous event is raised after checkinReminder was called.
      Specified by:
      onAfterCheckinReminder in interface IXServerEvents
      Parameters:
      ec - Execution context
      remiArray - Created or written reminder objects.
      sord - Sord object, valid members as in sordZ
      sordZ - Valid members of Sord object, SordC.mbLeanMembers|SordC.mbDocVersion
      unlockZ - Unlock mode.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • executeRegisteredFunction

      public Any executeRegisteredFunction(IXServerEventsContext ec, String functionName, Any any) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is raised when the IXServicePortIF function executeRegisteredFunction is called.
      Specified by:
      executeRegisteredFunction in interface IXServerEvents
      Parameters:
      ec - Execution context
      functionName - Name of the function to be executed. Function IXServerEvents.hasMethod(IXServerEventsContext, String) must return true for the given functionName.
      any - Parameter
      Returns:
      An Any object
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • executeRegisteredFunctionString

      public String executeRegisteredFunctionString(IXServerEventsContext ec, String functionName, String args) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is raised when the IXServicePortIF function executeRegisteredFunctionString is called.
      Specified by:
      executeRegisteredFunctionString in interface IXServerEvents
      Parameters:
      ec - Execution context
      functionName - Name of the function to be executed. Function IXServerEvents.hasMethod(IXServerEventsContext, String) must return true for the given functionName.
      args - Parameter
      Returns:
      Result as String
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onBeforeStartWorkFlow

      public void onBeforeStartWorkFlow(IXServerEventsContext ec, WFDiagram workflow, Sord sord, SordZ sordZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This synchronous event is raised before a workflow is started.
      Specified by:
      onBeforeStartWorkFlow in interface IXServerEvents
      Parameters:
      ec - Execution context
      workflow - Workflow object
      sord - Sord object, valid members as in sordZ
      sordZ - Valid members of Sord object, SordC.mbLeanMembers|SordC.mbDocVersion
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterStartWorkFlow

      public void onAfterStartWorkFlow(IXServerEventsContext ec, WFDiagram workflow, Sord sord, SordZ sordZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This asynchronous event is raised after a workflow is started.
      Specified by:
      onAfterStartWorkFlow in interface IXServerEvents
      Parameters:
      ec - Execution context
      workflow - Workflow object
      sord - Sord object, valid members as in sordZ
      sordZ - Valid members of Sord object, SordC.mbLeanMembers|SordC.mbDocVersion
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onBeforeCheckinActivity

      public void onBeforeCheckinActivity(IXServerEventsContext ec, Activity act, boolean isNew, Sord sord, SordZ sordZ, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is raised before an activity is written. The event is invoked too, if the activity is to be deleted. An activity is called deleted, if member activity.backAt is not empty.
      Specified by:
      onBeforeCheckinActivity in interface IXServerEvents
      Parameters:
      ec - Execution context
      act - Activity object
      isNew - true, if a new activity is to be created. false, if an existing activity is updated.
      sord - Associated sord object.
      sordZ - Valid members of Sord object
      unlockZ - Unlock mode.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterCheckinActivity

      public void onAfterCheckinActivity(IXServerEventsContext ec, Activity act, boolean isNew, Sord sord, SordZ sordZ, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is raised asynchronously after an activity is written. The event is invoked too, if the activity was deleted. An activity is called deleted, if member activity.backAt is not empty.
      Specified by:
      onAfterCheckinActivity in interface IXServerEvents
      Parameters:
      ec - Execution context
      act - Activity object
      isNew - true, if a new activity is to be created. false, if an existing activity is updated.
      sord - Associated sord object.
      sordZ - Valid members of Sord object
      unlockZ - Unlock mode.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onBeforeCheckinNotes

      public void onBeforeCheckinNotes(IXServerEventsContext ec, Note[] notes, Sord[] sords, long noteC, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This synchronous event is raised before a Note object is written. It is raised in checkinNotes
      Specified by:
      onBeforeCheckinNotes in interface IXServerEvents
      Parameters:
      ec - Execution context
      notes - Notes to checkin.
      sords - Sord objects that belong to the notes.
      noteC - Element selector that defines the valid Note members.
      unlockZ - Unlock mode.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterCheckinNotes

      public void onAfterCheckinNotes(IXServerEventsContext ec, Note[] notes, Sord[] sords, long noteC, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This asynchronous event is raised after a Note object has been written. It is raised in
      Specified by:
      onAfterCheckinNotes in interface IXServerEvents
      Parameters:
      ec - Execution context
      notes - Notes to checkin.
      sords - Sord objects that belong to the notes.
      noteC - Element selector that defines the valid Note members.
      unlockZ - Unlock mode.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onFileUploadBuildResponse

      public void onFileUploadBuildResponse(IXServerEventsContext ec, DocVersion dv, String fileName, HttpRequestInfo requestInfo, HttpResponseInfo responseInfo) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is raised after files has been uploaded by the JSON API to build the response message. The response message depends on the file upload solution used by the client side JavaScript. This event can only be implemented as a JavaScript function. It is not possible to process it in a WEB-service like other events in this interface.
      Specified by:
      onFileUploadBuildResponse in interface IXServerEvents
      Parameters:
      ec - Execution context
      dv - DocVersion object with the following valid members: ext, size, guid, uploadResult, physPath. DocVersion.uploadResult has to be returned to the client application. It must be set into its DocVersion.uploadResult before checkinDocEnd can be called. DocVersion.physPath is set to the location of the uploaded file in the servers temporary directory.
      fileName - Name of the uploaded file.
      requestInfo - Information of the underlying HttpServletRequest object.
      responseInfo - Information for the underlying HttpServletResponse object.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • getUserNames

      public UserName[] getUserNames(IXServerEventsContext ec, String[] ids, CheckoutUsersZ checkoutUsersZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Get lean user and group information. This method is called to internally process the API function IXServicePortIF.getUserNames(ClientInfo, String[], CheckoutUsersZ). This method should call IXServicePortIF.getUserNames(ClientInfo, String[], CheckoutUsersZ) internally and should only modify UserName.flags2 or UserName.flags2 in the returned array. E.g. UserName.flags2 can be changed in order to hide particular users by removing the bit AccessC.FLAG2_VISIBLE_USER.
      Specified by:
      getUserNames in interface IXServerEvents
      Parameters:
      ec - Execution context
      ids - User or group IDs or names.
      checkoutUsersZ - See IXServicePortIF.checkoutUsers(ClientInfo, String[], CheckoutUsersZ, LockZ).
      Returns:
      Array of Names and IDs
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onReadSord

      public void onReadSord(IXServerEventsContext ec, Sord sord, SordZ sordZ, Document doc, LockZ lockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Modify the Sord information returned in checkoutSord, checkoutDoc, findFirstSords, etc. This function is called, before a Sord object is returned to the client application. It can be used to modify or delete some of the transmitted data. But it must not change the members sord.id and sord.guid. Furthermore it cannot prevent the Sord object from being transmitted. This method cannot be implemented by services because of the output parameters. This method is frequently called and should perform as fast as possible.
      Specified by:
      onReadSord in interface IXServerEvents
      Parameters:
      ec - Execution context
      sord - Sord object, "in/out" parameter, can be null.
      sordZ - Valid members in the Sord object, "in" parameter, can be null.
      doc - Document object, "in/out" parameter, can be null.
      lockZ - reserved.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC..
      See Also:
    • onCheckSordAccess

      public boolean onCheckSordAccess(IXServerEventsContext ec, Sord sord, SordZ sordZ, int lur, CheckAccessOptions opts) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Check access to Sord object. Use this method to replace the internal access checking of the ACL for Sord objects. In order to deny access to the given sord, return false, otherwise return true.

      This method should not be implemented by services for performance reasons. It is frequently called and should perform as fast as possible.

      The Indexserver's access check function can be called via class de.elo.ix.jscript.Access.

      Example code:

      
       function onCheckSordAccess(ec, sord, sordZ, lur, opts) {
         var acc = new Packages.de.elo.ix.jscript.Access();
         var succ = acc.checkAccess(sord, lur);
         return succ;
       } 
       
      Specified by:
      onCheckSordAccess in interface IXServerEvents
      Parameters:
      ec - Execution context
      sord - Sord object, "in" parameter.
      sordZ - Valid members in the Sord object, "in" parameter.
      lur - Combination of AccessC.LUR_* access modes.
      opts - Options for access checking
      Returns:
      true, if at least one access mode given in lur is allowed. false, if access is denied.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.. Do not throw an exception in order to deny access, return false instead. Any exception will be reported as error in the log file and the access check function of Indexserver is called.
      See Also:
    • onBeforeLogin

      public void onBeforeLogin(IXServerEventsContext ec, String userName, LoginScriptOptions opts) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Before a user is authenticated the IX calls this method. Use it to allow or deny the the login to the user. If the user is not allowed to login according to the LoginScriptOptions opts, an exception has to be thrown.

      Example code:

      
       function onBeforeLogin(ec, user, opts) {
         if (username == "OnlyWithWebClient" && options.getClientName() != LoginScriptOptionsC.CLIENT_NAME_WEBCLIENT) {
           throw "User may login only with the WebClient";
         }
       }
       
      Specified by:
      onBeforeLogin in interface IXServerEvents
      Parameters:
      ec - Execution context
      userName - of the user that is trying to login. If a run-as login is being processed, this parameter contains the run-as user name. The technical user used for authentication can be found it LoginScriptOptions.techUser.
      opts - additional information.
      Throws:
      byps.RemoteException
    • onAfterLogin

      public void onAfterLogin(IXServerEventsContext ec, String userName, LoginScriptOptions opts) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This method is called asynchronously after a user has been successfully authenticated.
      Specified by:
      onAfterLogin in interface IXServerEvents
      Parameters:
      ec - Execution context
      userName - of the user that has been logged in successfully. If a run-as login has been processed, this parameter contains the run-as user name. The technical user used for authentication can be found it LoginScriptOptions.techUser.
      opts - additional information.
      Throws:
      byps.RemoteException
    • onCreateSord

      public EditInfo onCreateSord(IXServerEventsContext ec, String parentId, String maskId, EditInfoZ editZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is triggered in createSord, checkinSordPath and optionally in createDoc. Use this event in order to customize the initialization of an EditInfo resp. Sord object. The script can call the IXServicePortIF.createSord(ClientInfo, String, String, EditInfoZ) function in order to get a new EditInfo object. The script can return null, if the standard initialization should be used. Before the EditInfo object created by this function is returned to the client application, the following mebers are overwritten: EditInfo.sord.id=-1, EditInfo.sord.guid=random GUID. All members in EditInfo that are not assigned by this function but requested from the element selector editZ, are assigned (as far as possible) before the EditInfo object is returned to the client. Hint: Although this function is named createSord, it has to return an EditInfo object. This event is not triggered, if there is an onCreateDoc event customized.
      Specified by:
      onCreateSord in interface IXServerEvents
      Parameters:
      ec - Execution context
      parentId - Same value as the client supplies in its call to createSord. Exception: an empty String is received for a null value.
      maskId - Same value as the client supplies in its call to createSord. Exception: an empty String is received for a null value.
      editZ - Element selector supplied by the client application in createSord or createDoc.
      Returns:
      Initialized EditInfo object.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onCreateDoc

      public EditInfo onCreateDoc(IXServerEventsContext ec, String parentId, String maskId, String docTemplate, EditInfoZ editInfoZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is triggered in createDoc. If an onCreateDoc event is configured, the event onCreateSord is not triggered in onCreateSord.
      Specified by:
      onCreateDoc in interface IXServerEvents
      Parameters:
      ec - Execution context
      parentId - Same value as the client supplies in its call to createDoc. Exception: an empty String is received for a null value.
      maskId - Same value as the client supplies in its call to createDoc. Exception: an empty String is received for a null value.
      docTemplate - Same value as the client supplies in its call to createDoc. Exception: an empty String is received for a null value.
      editInfoZ - Element selector supplied by the client application in createDoc.
      Returns:
      Initialized EditInfo object.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
      See Also:
    • onBeforeCheckinUsers

      public UserInfo[] onBeforeCheckinUsers(IXServerEventsContext ec, UserInfo[] userInfos, CheckinUsersZ checkinUsersZ, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is invoked before IXServicePortIF.checkinUsers(ClientInfo, UserInfo[], CheckinUsersZ, LockZ) processes the supplied UserInfo objects.
      Specified by:
      onBeforeCheckinUsers in interface IXServerEvents
      Parameters:
      ec - Execution context
      userInfos - Array of UserInfo objects. Can be null or empty if only the lock should be released.
      checkinUsersZ - CheckinUsersC constant.
      unlockZ - Lock mode.
      Returns:
      Potentially modified UserInfo objects. This objects will be written to the database.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterCheckinUsers

      public void onAfterCheckinUsers(IXServerEventsContext ec, UserInfo[] userInfos, CheckinUsersZ checkinUsersZ, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is called after IXServicePortIF.checkinUsers(ClientInfo, UserInfo[], CheckinUsersZ, LockZ) has processed the supplied UserInfo objects. Indexserver invokes this event asynchronously after the users have been written.
      Specified by:
      onAfterCheckinUsers in interface IXServerEvents
      Parameters:
      ec - Execution context
      userInfos - Array of UserInfo objects. Can be null or empty if only the lock should be released.
      checkinUsersZ - CheckinUsersC constant.
      unlockZ - reserved.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onBeforeCheckinMap

      public KeyValue[] onBeforeCheckinMap(IXServerEventsContext ec, String domainName, String id, int objId, KeyValue[] data, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Specified by:
      onBeforeCheckinMap in interface IXServerEvents
      Parameters:
      ec - Execution context
      id - map ID
      objId - Sord ID, if the map should be attached to a Sord object; otherwise 0
      data - map items
      unlockZ - Remove lock
      Returns:
      New array of KeyValue objects to be inserted. Or null, if the array passed in parameter data should be stored.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterCheckinMap

      public void onAfterCheckinMap(IXServerEventsContext ec, String domainName, String id, int objId, KeyValue[] data, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Specified by:
      onAfterCheckinMap in interface IXServerEvents
      Parameters:
      ec - Execution context
      id - map ID
      objId - Sord ID, if the map should be attached to a Sord object; otherwise 0
      data - map items
      unlockZ - Remove lock
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onBeforeDeleteMap

      public String[] onBeforeDeleteMap(IXServerEventsContext ec, String domainName, String id, String[] keyNames, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Specified by:
      onBeforeDeleteMap in interface IXServerEvents
      Parameters:
      ec - Execution context
      domainName - map domain name; an arbitrary (existing name) or a predefined name from MapDomainC
      id - map ID. In order to delete the map values associated to a Sord object pass the numeric Sord ID (Sord#id).
      keyNames - keys to be deleted; null to delete the entire map with all keys and history; wildcards allowed
      unlockZ - Remove lock
      Returns:
      New array of keys to be deleted. Or null, if the key names passed in parameter keyNames should be deleted.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterDeleteMap

      public void onAfterDeleteMap(IXServerEventsContext ec, String domainName, String id, String[] keyNames, LockZ unlockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Specified by:
      onAfterDeleteMap in interface IXServerEvents
      Parameters:
      ec - Execution context
      domainName - map domain name; an arbitrary (existing name) or a predefined name from MapDomainC
      id - map ID. In order to delete the map values associated to a Sord object pass the numeric Sord ID (Sord#id).
      keyNames - keys to be deleted; null to delete the entire map with all keys and history; wildcards allowed
      unlockZ - Remove lock
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onBeforeTakeWorkFlowNode

      public void onBeforeTakeWorkFlowNode(IXServerEventsContext ec, WFDiagram workflow, WFNode node, UserInfo user, int flags, LockZ lockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Specified by:
      onBeforeTakeWorkFlowNode in interface IXServerEvents
      Parameters:
      ec - Execution context
      workflow - Workflow object
      node - WFNode object to be taken. This object is a reference to one of the elements in workflow.nodes[].
      user - UserInfo object of the user that receives the task.
      flags - Combination of WFTakeNodeC values.
      lockZ - Specifies the lock mode used to access the workflow. Only administrators can use FORCE. The current lock is not changed.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onBeforeFindSords

      public void onBeforeFindSords(IXServerEventsContext ec, FindInfo findInfo, SordZ sordZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is fired before the FindInfo object passed in findFirstSords is evaluated. The passed findInfo object can be modified.
      Specified by:
      onBeforeFindSords in interface IXServerEvents
      Parameters:
      ec - Execution context
      findInfo - FindInfo from IXServicePortIF.findFirstSords(ClientInfo, FindInfo, int, SordZ)
      sordZ - SordZ from IXServicePortIF.findFirstSords(ClientInfo, FindInfo, int, SordZ)
      Throws:
      byps.RemoteException
    • onBeforeFindSordsInternalSQL

      public void onBeforeFindSordsInternalSQL(IXServerEventsContext ec, FindInfo findInfo, SordZ sordZ, FindInfoAsInternalSQL findSql) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is fired before findFirstSords executes the search statement. Be aware of the fact that there is no guaranty about the generated FindSql data. Subsequent IX versions can create different FindSql objects for the same FindInfo object. Hence, modifications of the FindSql data might not work in future releases. Prefer to use IXServerEvents.onBeforeFindSords(IXServerEventsContext, FindInfo, SordZ) wherever possible.
      Specified by:
      onBeforeFindSordsInternalSQL in interface IXServerEvents
      Parameters:
      ec - Execution context
      findInfo - FindInfo from IXServicePortIF.findFirstSords(ClientInfo, FindInfo, int, SordZ), read-only.
      sordZ - SordZ from IXServicePortIF.findFirstSords(ClientInfo, FindInfo, int, SordZ)
      findSql - Describes the SQL select statement.
      Throws:
      byps.RemoteException
    • onFindSordsResult

      public void onFindSordsResult(IXServerEventsContext ec, FindInfo findInfo, SordZ sordZ, FindResult findResult) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is called for find results found by findFirstSords and findNextSords.
      Specified by:
      onFindSordsResult in interface IXServerEvents
      Parameters:
      ec - ExecContext
      findInfo - FindInfo passed to IXServicePortIF.findFirstSords(ClientInfo, FindInfo, int, SordZ), read-only.
      sordZ - Element selector, read-only.
      findResult - Find results, read-only.
      Throws:
      byps.RemoteException
    • onFindClose

      public void onFindClose(IXServerEventsContext ec, Object findInfo) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is called when a search via findFirstSords/findNextSords is closed.
      Specified by:
      onFindClose in interface IXServerEvents
      Parameters:
      ec - Execution context
      findInfo - FindInfo passed to IXServicePortIF.findFirstSords(ClientInfo, FindInfo, int, SordZ)
      Throws:
      byps.RemoteException
    • onInheritKeywording

      public InheritKeywordingResult onInheritKeywording(IXServerEventsContext ec, Sord sord, Sord parentSord, String[] okeyNames, Object reserved) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is called when index values are inherited.

      Example:

       
       function onInheritKeywording(ec, sord, parent, okeyNames, reserved) {
         for (var i = 0; i < okeyNames.length; i++) {
           var key = okeyNames[i];
           var value = getObjKey(parent, key);
           log.info("inherit " + key + ", value=" + value);
           setObjKey(sord, key, value);
         }
         return InheritKeywordingResult.INHERITED;
       }
       
       
      Specified by:
      onInheritKeywording in interface IXServerEvents
      Parameters:
      ec - Execution context
      sord - Sord object to be updated. The object contains at least the members of SordC.mbLeanMembers.
      parentSord - Parent of sord. The object contains at least the members of SordC.mbLeanMembers.
      okeyNames - Inheritable group names of index values as defined in keywording form definition.
      reserved - Reserved.
      Returns:
      Control value that defines how to continue processing, see InheritKeywordingResult.
      Throws:
      byps.RemoteException
    • onSendSordToISearch

      public void onSendSordToISearch(IXServerEventsContext ec, Sord sord, DocMask mask, String fulltext) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Every time a Sord is send to the iSearch to add it to the iSearch index, this event is called.
      Specified by:
      onSendSordToISearch in interface IXServerEvents
      Parameters:
      ec - Execution context
      Throws:
      byps.RemoteException
    • onSendFeedToISearch

      public void onSendFeedToISearch(IXServerEventsContext ec, List<FeedPost> feedPosts) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      Every time feed documents are send to the iSearch to add it to the iSearch index, this event is called.
      Specified by:
      onSendFeedToISearch in interface IXServerEvents
      Parameters:
      ec - Execution context
      Throws:
      byps.RemoteException
    • onBeforeDelegateWorkflowNode

      public void onBeforeDelegateWorkflowNode(IXServerEventsContext ec, WFDelegateNodeInfo delegateNodeInfo, LockZ lockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is invoked before a workflow node is delegated. The implementor can use this function to perform additional checks on delegation before Indexserver performs its plausibility and access checks. Furthermore, it can be used to modify the members of the passed delegateNodeInfo obect. To deny delegation, throw an exception like:
       
       throw [ IXExceptionC.ACCESS_DENIED, "Delegate workflow denied." ];
       
       
      This event function is executed synchronously to the API call delegateWorkflowNode.
      Specified by:
      onBeforeDelegateWorkflowNode in interface IXServerEvents
      Parameters:
      ec - Execution context
      delegateNodeInfo - WFDelegateNodeInfo object
      lockZ - Lock mode
      Throws:
      byps.RemoteException
      See Also:
    • onAfterDelegateWorkflowNode

      public void onAfterDelegateWorkflowNode(IXServerEventsContext ec, WFDelegateNodeInfo delegateNodeInfo, LockZ lockZ) throws byps.RemoteException
      Description copied from interface: IXServerEvents
      This event is invoked after a workflow node has been delegated. The implementor can use this function to notify other systems about the delegation. It is executed asynchronously after the API call delegateWorkflowNode has been successfully executed. Modifications to parameters or thrown exceptions are ignored.
      Specified by:
      onAfterDelegateWorkflowNode in interface IXServerEvents
      Parameters:
      ec - Execution context
      delegateNodeInfo - WFDelegateNodeInfo object
      lockZ - Lock mode
      Throws:
      byps.RemoteException
      See Also:
    • onBeforeTerminateDeleteWorkFlow

      public void onBeforeTerminateDeleteWorkFlow(IXServerEventsContext ec, WFDiagram workflow, Sord sord, SordZ sordZ, int status) throws byps.RemoteException
      EIX-1664
      Specified by:
      onBeforeTerminateDeleteWorkFlow in interface IXServerEvents
      Parameters:
      ec - Execution context
      workflow - Workflow object
      sord - Sord object, valid members as in sordZ
      sordZ - Valid members of Sord object, SordC.mbLeanMembers|SordC.mbDocVersion
      status - 0, if workflow is terminated. 1, if workflow is deleted.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterTerminateDeleteWorkFlow

      public void onAfterTerminateDeleteWorkFlow(IXServerEventsContext ec, WFDiagram workflow, Sord sord, SordZ sordZ, int status) throws byps.RemoteException
      EIX-1664
      Specified by:
      onAfterTerminateDeleteWorkFlow in interface IXServerEvents
      Parameters:
      ec - Execution context
      workflow - Workflow object
      sord - Sord object, valid members as in sordZ
      sordZ - Valid members of Sord object, SordC.mbLeanMembers|SordC.mbDocVersion
      status - 0, if workflow is terminated. 1, if workflow is deleted.
      Throws:
      byps.RemoteException - Exception with message text of format "[ELOIX:number] text". The number is one of the constants defined in IXExceptionC.
    • onAfterPackageImport

      public void onAfterPackageImport(IXServerEventsContext ec, PackageImportEventInfo eventInfo) throws byps.RemoteException
      EIX-3085
      Specified by:
      onAfterPackageImport in interface IXServerEvents
      Parameters:
      ec - Execution context
      eventInfo - PackageImportEventInfo object
      Throws:
      byps.RemoteException