Class CBEGeneratorFC

  • All Implemented Interfaces:
    FunctionInterface, VersionInfoInterface

    public class CBEGeneratorFC
    extends Function
    This class generates objects of type org.eclipse.hyades.logging.events.cbe.CommonBaseEvent from attributes mapped by user to Entry object.
    • Constructor Detail

      • CBEGeneratorFC

        public CBEGeneratorFC()
    • Method Detail

      • perform

        public java.lang.Object perform​(java.lang.Object obj)
                                 throws java.lang.Exception
        The attributes of the Entry object passed as parameter to this method is mapped to/from a CommonBaseEvent.
        Parameters:
        obj - object of type Entry
        Returns:
        the Entry
        Throws:
        java.lang.Exception - if the user has passed a null or non Entry type object as parameter
      • getVersion

        public java.lang.String getVersion()
        Version information.
        Returns:
        version information
      • initialize

        public void initialize​(java.lang.Object obj)
                        throws java.lang.Exception
        This method initializes the eventFactory object used to create the CommonBaseEvent
        Specified by:
        initialize in interface FunctionInterface
        Overrides:
        initialize in class Function
        Parameters:
        obj -
        Throws:
        java.lang.Exception - An exception is thrown if the initialization fails.
      • convertCBEEventToXML

        public static java.lang.String convertCBEEventToXML​(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event)
                                                     throws java.lang.Exception
        returns the CBE event as a XMLDocString using org.eclipse.hyades.logging.events.cbe.util.EventFormatter
        Parameters:
        event - CommonBaseEvent
        Returns:
        String
        Throws:
        java.lang.Exception
      • getCBELogXml

        public static java.lang.String getCBELogXml​(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event,
                                                    boolean isXMLComplete)
                                             throws java.lang.Exception
        Method uses org.eclipse.hyades.logging.java.CommonBaseEventLogRecord to generate log records
        Parameters:
        event - CommomnBaseEvent
        isXMLComplete - returns a complete xml string if true
        Returns:
        xmlDocString
        Throws:
        java.lang.Exception
      • mapCbeToEntry

        public static void mapCbeToEntry​(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent aCbe,
                                         Entry aEntry)
        Maps the fields of a Common Base Event object into the attributes of a IBM Tivoli Directory Integrator Entry. This process is the reverse of what the CBE Generator FC's 'perform' method does. All attributes in the resulting Entry are of type java.lang.String.
        Parameters:
        aCbe - the Common Base Event to be mapped into the Entry
        aEntry - the Entry, where will be mapped the fields of the Common Base Event
        Since:
        6.1.1