Table of Contents

Search

  1. Preface
  2. Part 1: Introduction
  3. Part 2: Configuring Hub Console Tools
  4. Part 3: Building the Data Model
  5. Part 4: Configuring the Data Flow
  6. Part 5: Executing Informatica MDM Hub Processes
  7. Part 6: Configuring Application Access
  8. Appendix A: MDM Hub Properties
  9. Appendix B: Viewing Configuration Details
  10. Appendix C: Row-level Locking
  11. Appendix D: MDM Hub Logging
  12. Appendix E: Table Partitioning
  13. Appendix F: Collecting MDM Environment Information with the Product Usage Toolkit
  14. Appendix G: Glossary

Example Server-Based Function

Example Server-Based Function

The name of the server function class for the following code is com.siperian.mrm.customfunctions.test.TestFunctionClient.
package com.siperian.mrm.customfunctions.test; import java.awt.Frame; import java.util.Properties; import javax.swing.Icon; import com.siperian.mrm.customfunctions.api.CustomFunction; /** * This is a sample custom function that is executed on the Server. * To deploy this function, put it in a jar file and upload the jar file * to the DB using DeployCustomFunction. */ public class TestFunction implements CustomFunction {     public String getActionText() {         return "Test Server";     }     public Icon getGuiIcon() {         return null;     }     public void executeClient(Properties properties, Frame frame, String username, String password, String orsId, String baseObjectRowid, String baseObjectUid, String packageRowid, String packageUid, String[] recordIds) {         System.err.println("This method will never be called because getExecutionType() returns SERVER_FUNCTION");     }     public void executeServer(Properties properties, String username, String password, String orsId, String baseObjectRowid, String baseObjectUid, String packageRowid, String packageUid, String[] recordIds) {         System.err.println("Called custom test function on the server with the following parameters:");         System.err.println("Username/Password: '" + username + "'/'" + password + "'");         System.err.println(" ORS Database ID: '" + orsId + "'");         System.err.println("Base Object Rowid: '" + baseObjectRowid + "'");         System.err.println(" Base Object UID: '" + baseObjectUid + "'");         System.err.println(" Package Rowid: '" + packageRowid + "'");         System.err.println(" Package UID: '" + packageUid + "'");         System.err.println(" Record Ids: ");         for(int i = 0; i < recordIds.length; i++) {             System.err.println(" '"+recordIds[i]+"'");         }         System.err.println(" Properties: " + properties.toString());     }     public int getExecutionType() {         return SERVER_FUNCTION;     } }

0 COMMENTS

We’d like to hear from you!