psdi.iface.omp

Class OmpService

    • Field Detail

      • INTEGRATIONLOGGER

        public static final MXLogger INTEGRATIONLOGGER
        Integration logger for logging messages related to MAXIMO startup.
    • Constructor Detail

      • OmpService

        public OmpService()
                   throws java.rmi.RemoteException
        Creates a new OmpService.
        Throws:
        java.rmi.RemoteException - Creating the OmpService failed.
      • OmpService

        public OmpService(MXServer mxServer)
                   throws java.rmi.RemoteException
        Creates a new OmpService for an MXServer.
        Parameters:
        mxServer - the MXServer to use.
        Throws:
        java.rmi.RemoteException - Creating the OmpService failed.
    • Method Detail

      • getOMPListForLMO

        public OmpSetRemote getOMPListForLMO(java.lang.String ompProductname,
                                             java.lang.String lmoName,
                                             java.lang.String lmoNamespace)
                                      throws java.rmi.RemoteException,
                                             MXException
        Gets a list of all the Operational Management Products with the specified product name that are associated with the specified Logical Management Operation.
        Specified by:
        getOMPListForLMO in interface OmpServiceRemote
        Parameters:
        ompProductname - Product name of the Operational Management Product to find.
        lmoName - Name of the Logical Management Operation.
        lmoNamespace - Namespace of the Logical Managment Operation.
        Returns:
        The set of OMPs with the specified product name on which the specified Logical Management Operation is implemented.
        Throws:
        java.rmi.RemoteException
        MXException - One of the arguments passed on the call is null.
      • getOMPListForIM

        public OmpSetRemote getOMPListForIM(java.lang.String imName,
                                            java.lang.String imVersion)
                                     throws java.rmi.RemoteException,
                                            MXException
        Gets a list of the Operational Management Products associated with the given Integration Module.
        Specified by:
        getOMPListForIM in interface OmpServiceRemote
        Parameters:
        imName - Integration Module name
        imVersion - Integration Module version
        Returns:
        The set of OMPs associated with the specified Integration Module.
        Throws:
        java.rmi.RemoteException
        MXException - One of the arguments passed on the call is null.
      • getLMOListForIM

        public LMOSetRemote getLMOListForIM(java.lang.String imName,
                                            java.lang.String imVersion)
                                     throws java.rmi.RemoteException,
                                            MXException
        Gets the Logical Management Operations implemented by the specified Integration Module.
        Specified by:
        getLMOListForIM in interface OmpServiceRemote
        Parameters:
        imName - Integration Module name.
        imVersion - Integration Module version.
        Returns:
        The set of LMOs implemented by the specified Integration Module.
        Throws:
        java.rmi.RemoteException
        MXException - One of the arguments passed on the call is null.
      • getPreferredIM

        public OmpImLmoRelInfo getPreferredIM(java.lang.String ompGUID,
                                              java.lang.String lmoName,
                                              java.lang.String lmoNamespace)
                                       throws java.rmi.RemoteException,
                                              MXException
        Gets the preferred Integration Module that implements the specified Logical Management Operation on the specified Operational Management Product. Returns an arbitrary Intagration Module if there is more than one Integration Module and none is marked preferred.
        Specified by:
        getPreferredIM in interface OmpServiceRemote
        Parameters:
        ompGUID - The OMPGUID of the Operational Management Product.
        lmoName - The LMO name.
        lmoNamespace - The LMO namespace.
        Returns:
        The OmpImLmoRelInfo object that represents the preferred Integration Module for the specified Operational Management Product and Logical Management Operation, or an arbitrary Integration Module if none is marked preferred.
        Throws:
        java.rmi.RemoteException
        MXException - One of the arguments passed on the call is null.
      • getIMListForOMPAndLMO

        public java.util.Collection getIMListForOMPAndLMO(java.lang.String ompGUID,
                                                          java.lang.String lmoName,
                                                          java.lang.String lmoNamespace)
                                                   throws java.rmi.RemoteException,
                                                          MXException
        Gets the list of Integration Modules that implement the specified Logical Management Operation on the specified Operational Management Product.
        Specified by:
        getIMListForOMPAndLMO in interface OmpServiceRemote
        Parameters:
        ompGUID - The OMPGUID of the Operational Management Product.
        lmoName - The LMO name.
        lmoNamespace - The LMO namespace.
        Returns:
        A collection of OmpImLmoRelInfo objects representing Integration Modules that implement the specified Logical Management Operation on the specified Operational Management Product. The OmpImLmoRelInfo indicates which, if any, of the Integration Modules is the primary/preferred IM.
        Throws:
        java.rmi.RemoteException
        MXException - One of the arguments passed on the call is null.
      • getPreferredIM

        public OmpImLmoRelInfo getPreferredIM(java.lang.String ompHostname,
                                              java.lang.String ompProductname,
                                              java.lang.String ompManufacturer,
                                              java.lang.String lmoName,
                                              java.lang.String lmoNamespace)
                                       throws java.rmi.RemoteException,
                                              MXException
        Gets the preferred Integration Module that implements the specified Logical Management Operation on the specified Operational Management Product. Returns an arbitrary Integration Module if none is marked preferred. The hostname and productname are required, but the manufacturer can be null. If the manufacturer is not specified, it will only match an OMP that does not have a manufacturer attribute. If there are more than one of these, it will return an arbitrary one. For this reason it is preferable to use the method getPreferredIM(String ompGUID, String lmoName, String lmoNamespace) instead.
        Specified by:
        getPreferredIM in interface OmpServiceRemote
        Parameters:
        ompHostname - Hostname of the Operational management Product.
        ompProductname - Product name of the Operational Management Product.
        ompManufacturer - Manufacturer of the Operational Management Product.
        lmoName - LMO name.
        lmoNamespace - LMO namespace.
        Returns:
        The OmpImLmoRelInfo object representing the preferred Integration Module for the given Logical Management Operation and Operational Management Product. If none of the IMs are marked preferred, it returns an arbitrary one. Likewise if the manufacturer is null and more than one OMP matches the criteria, an arbitrary OMP is used.
        Throws:
        java.rmi.RemoteException
        MXException - The ompHostname or ompProductname is null or a matching OMP is not found.
      • getIMListForOMPAndLMO

        public java.util.Collection getIMListForOMPAndLMO(java.lang.String ompHostname,
                                                          java.lang.String ompProductname,
                                                          java.lang.String ompManufacturer,
                                                          java.lang.String lmoName,
                                                          java.lang.String lmoNamespace)
                                                   throws java.rmi.RemoteException,
                                                          MXException
        Gets the list of Integration Modules that implement the specified Logical Management Operation on the specified Operational Management Product. The ompHostname and ompProductname are required, but the manufacturer can be null. If the manufacturer is not specified, it will only match an OMP that does not have a manufacturer attribute. If there are more than one of these, it will return an arbitrary one. For this reason it is preferable to use the method public Collection getIMListForOMPAndLMO(String ompGUID, String lmoName, String lmoNamespace).
        Specified by:
        getIMListForOMPAndLMO in interface OmpServiceRemote
        Parameters:
        ompHostname - Hostname of the Operational management Product.
        ompProductname - Product name of the Operational Management Product.
        ompManufacturer - Manufacturer of the Operational Management Product.
        lmoName - LMO name.
        lmoNamespace - LMO namespace.
        Returns:
        A collection of OmpImLmoRelInfo objects representing the list of Integration Modules that implement the specified Logical Management Operation on the specified Operational Management Product. If the manufacturer is null and more than one OMP matches the criteria, an arbitrary OMP is used.
        Throws:
        java.rmi.RemoteException
        MXException - The ompHostname or ompProductname is null or a matching OMP is not found.
      • getIMListForOMP

        public MaxIMSetRemote getIMListForOMP(java.lang.String ompGuid)
                                       throws java.rmi.RemoteException,
                                              MXException
        Gets the list of Integration Modules that implement at least one Logical Management Operation on the given Operational Management Product.
        Specified by:
        getIMListForOMP in interface OmpServiceRemote
        Parameters:
        ompGuid - The OMPGUID of the Operational Management Product.
        Returns:
        The set of Integration Modules that implement at least one Logical Management Operation on the specified Operational Management Product.
        Throws:
        java.rmi.RemoteException
        MXException - The ompGuid is null.
      • getIMListForLMO

        public MaxIMSetRemote getIMListForLMO(java.lang.String lmoName,
                                              java.lang.String lmoNamespace)
                                       throws java.rmi.RemoteException,
                                              MXException
        Gets the list of Integration Modules that implement the specified Logical Management Operation.
        Specified by:
        getIMListForLMO in interface OmpServiceRemote
        Parameters:
        lmoName - LMO name.
        lmoNamespace - LMO namespace.
        Returns:
        Set of IMs that implement the specified Logical Management Operation.
        Throws:
        java.rmi.RemoteException
        MXException - One of the arguments passed on the call is null.
      • getIMListForLMOWithOMP

        public MaxIMSetRemote getIMListForLMOWithOMP(java.lang.String lmoName,
                                                     java.lang.String lmoNamespace)
                                              throws java.rmi.RemoteException,
                                                     MXException
        Gets the list of Integration Modules that implement the specified Logical Management Operation on at least one Operational Management Product.
        Specified by:
        getIMListForLMOWithOMP in interface OmpServiceRemote
        Parameters:
        lmoName - LMO name.
        lmoNamespace - LMO namespace.
        Returns:
        Set of IMs that implement the specified Logical Management Operation on at least one Operational Management Product.
        Throws:
        java.rmi.RemoteException
        MXException - One of the arguments passed on the call is null.
      • getServiceInvokerListForCIAndLMO

        public java.util.Collection getServiceInvokerListForCIAndLMO(java.lang.String ciGUID,
                                                                     java.lang.String lmoName,
                                                                     java.lang.String lmoNamespace,
                                                                     UserInfo userInfo)
                                                              throws java.rmi.RemoteException,
                                                                     MXException
        Gets a list of the ServiceInvokers for the preferred Integration Modules that implement the specified Logical Management Operation on the Operational Management Products that have a relationship with the specified Actual Configuration Item. This method returns a collection of Maps.
        Specified by:
        getServiceInvokerListForCIAndLMO in interface OmpServiceRemote
        Parameters:
        ciGUID - GUID of the Actual Configuration Item managed by the Operational Management Product.
        lmoName - Logical Management Operation name.
        lmoNamespace - Logical Management Operation namespace.
        userInfo - The UserInfo of the currently logged-in user. You can get it from mainMbo.getUserInfo().
        Returns:
        Collection of map objects for the preferred IMs that implement the specified LMO on the OMPs that manage the specified Actual CI.
        Throws:
        java.rmi.RemoteException
        MXException - One of the arguments passed on the call is null or the Actual Configuration Item is not management by any Operational Management Product.
      • getServiceInvoker

        public java.util.Map getServiceInvoker(java.lang.String ompGUID,
                                               java.lang.String lmoName,
                                               java.lang.String lmoNamespace,
                                               UserInfo userInfo)
                                        throws java.rmi.RemoteException,
                                               MXException
        Gets the ServiceInvoker for the preferred Integration Module for the specified Operational Management Product and Logical Management Operation. If no matching Integration Modules are marked preferred, an arbitrary one is returned. Returns null if no matching Integration Module exists.
        Specified by:
        getServiceInvoker in interface OmpServiceRemote
        Parameters:
        ompGUID - GUID of the Operational Management Product.
        lmoName - Logical Management Operation name.
        lmoNamespace - Logical Management Operation namespace.
        userInfo - The UserInfo of the currently logged-in user. You can get it from mainMbo.getUserInfo().
        Returns:
        Returns a Map containing properties needed to call the Integration Module. See psdi.iface.omp.IMConstants.
        Throws:
        java.rmi.RemoteException
        MXException - One of the arguments passed on the call is null.
      • getServiceInvoker

        public java.util.Map getServiceInvoker(OmpImLmoRelRemote ompImLmoRelRemote,
                                               UserInfo userInfo)
                                        throws java.rmi.RemoteException,
                                               MXException
        Gets the ServiceInvoker for the specified Integration Module.
        Specified by:
        getServiceInvoker in interface OmpServiceRemote
        Parameters:
        ompImLmoRelRemote - An OmpImLmoRelRemote representing a specific IM that implements a specific LMO on a specific OMP.
        userInfo - The UserInfo of the currently logged-in user. You can get it from mainMbo.getUserInfo().
        Returns:
        A Map containing properties needed to call the IM. See psdi.iface.omp.IMConstants.
        Throws:
        java.rmi.RemoteException
        MXException - The userInfo is null.
      • getServiceInvoker

        public java.util.Map getServiceInvoker(java.lang.String ompGUID,
                                               java.lang.String imName,
                                               java.lang.String imVersion,
                                               java.lang.String lmoName,
                                               java.lang.String lmoNamespace,
                                               UserInfo userInfo)
                                        throws java.rmi.RemoteException,
                                               MXException
        Gets the ServiceInvoker for the specified Integration Module. Returns null if no matching Integration Module exists.
        Specified by:
        getServiceInvoker in interface OmpServiceRemote
        Parameters:
        ompGUID - GUID of the Operational Management Product.
        imName - Integration Module name.
        imVersion - Integration Module version.
        lmoName - Logical Management Operation name.
        lmoNamespace - Logical Management Operation namespace.
        userInfo - The UserInfo of the currently logged-in user. You can get it from mainMbo.getUserInfo().
        Returns:
        A Map containing properties needed to call the IM. See psdi.iface.omp.IMConstants.
        Throws:
        java.rmi.RemoteException
        MXException - One of the arguments passed on the call is null.
      • getServiceInvoker

        public java.util.Map getServiceInvoker(OmpImLmoRelInfo ompImLmoRelInfo,
                                               UserInfo userInfo)
                                        throws java.rmi.RemoteException,
                                               MXException
        Returns the ServiceInvoker for the specified Integration Module.
        Specified by:
        getServiceInvoker in interface OmpServiceRemote
        Parameters:
        ompImLmoRelInfo - An OmpImLmoRelRemote representing a specific IM that implements a specific LMO on a specific OMP.
        userInfo - The UserInfo of the currently logged-in user. You can get it from mainMbo.getUserInfo().
        Returns:
        Returns a Map containing properties needed to call the IM. See psdi.iface.omp.IMConstants.
        Throws:
        java.rmi.RemoteException
        MXException - The userInfo is null.
      • getCredentialMapper

        public BaseCredentialMapper getCredentialMapper(UserInfo userInfo,
                                                        java.lang.String endPointName)
                                                 throws MXException,
                                                        java.rmi.RemoteException
        Returns the credential mapper for this Endpoint and user. If there is no credential mapper configured, this returns null. In that case, just use the credentials in the configured Endpoint properties.
        Specified by:
        getCredentialMapper in interface OmpServiceRemote
        Parameters:
        userInfo - The currently logged-in user (be sure not to use the system user).
        endPointName - The name of the end point to use.
        Returns:
        The credential mapper for this end point and user, or null if there is not one defined.
        Throws:
        MXApplicationException - The credential mapper classname is not found in the classpath, or the constructor for the class is not found, or the class cannot be instantiated or used.
        java.rmi.RemoteException
        MXException
      • setupEndPoint

        public java.util.Map setupEndPoint(java.util.Map invokerPropMap,
                                           java.lang.String endPointName,
                                           UserInfo userInfo)
                                    throws MXException,
                                           java.rmi.RemoteException
        Use this method to set or override the Endpoint of a Service Invoker. The getServiceInvoker methods call this for you, if you're using the default/configured Endpoint. Pass in the service invoker map from getServiceInvoker, and you'll get the same map back with the necessary updates made to it. This method checks for a credential mapper, and uses it to update the Endpoint properties for you if needed.
        Specified by:
        setupEndPoint in interface OmpServiceRemote
        Parameters:
        invokerPropMap - The Service Invoker Map containing the JavaIM or InvokeChannel object, IM Name, IM Version, LMO Name, LMO Namespace, OMP guid, Endpoint name, and Endpoint properties.
        endPointName - The name of the new endpoint.
        userInfo - The UserInfo of the currently logged-in user. You can get it from mainMbo.getUserInfo().
        Returns:
        The same map, with an updated Endpoint name and Endpoint properties.
        Throws:
        MXException
        java.rmi.RemoteException
      • getLMOsNotAssociatedWithIM

        public LMOSetRemote getLMOsNotAssociatedWithIM(MboRemote imMbo)
                                                throws java.rmi.RemoteException,
                                                       MXException
        Get the Logical Management Operations that are not associated with an Integration Module.
        Specified by:
        getLMOsNotAssociatedWithIM in interface OmpServiceRemote
        Parameters:
        imMbo - - Integration Module.
        Returns:
        Set of LMOs that are not associated with any Integration Modules.
        Throws:
        java.rmi.RemoteException
        MXException - The imMbo is null.
      • getLMOListForOMP

        public LMOSetRemote getLMOListForOMP(java.lang.String ompGuid)
                                      throws java.rmi.RemoteException,
                                             MXException
        Gets the Logical Management Operations that are implemented by at least one Integration Module on the given Operational Management Product.
        Specified by:
        getLMOListForOMP in interface OmpServiceRemote
        Parameters:
        ompGuid - Operational Management Product GUID.
        Returns:
        LMOSetRemote. The set of LMOs that are implemented by at least one IM on the given OMP.
        Throws:
        java.rmi.RemoteException
        MXException - The ompGuid is null.
      • getSourceToken

        public java.lang.String getSourceToken(java.lang.String ciGUID,
                                               java.lang.String ompGUID)
                                        throws java.rmi.RemoteException,
                                               MXException
        Given an Actual Configuration Item GUID and an Operational Management Product GUID, return the source token that the OMP uses for the ActCI. This may be null if the ActCI does not have a source token for that OMP. Calls getSourceToken(String, OmpRemote).
        Specified by:
        getSourceToken in interface OmpServiceRemote
        Parameters:
        ciGUID - The Actual Configuration Item GUID to use.
        ompGUID - The Operational Management Product GUID to use.
        Returns:
        The source token that this OMP uses for this ActCI, null if this OMP does not manage this ActCI, or null if there is no source token for this OMP and ActCI.
        Throws:
        MXApplicationException - The OMP with this GUID is not found.
        MXApplicationException - The ActCI with this GUID is not found.
        java.rmi.RemoteException
        MXException
      • getSourceToken

        public java.lang.String getSourceToken(java.lang.String ciGUID,
                                               OmpRemote omp)
                                        throws java.rmi.RemoteException,
                                               MXException
        Given an Actual Configuration Item GUID and an OMP, return the source token that the OMP uses for the Actual Configuration Item. This may be null if the ActCI does not have a source token for that OMP. Calls getSourceToken(ActCIRemote, OmpRemote).
        Specified by:
        getSourceToken in interface OmpServiceRemote
        Parameters:
        ciGUID - The Actual Configuration Item GUID to use.
        omp - The OMP to use.
        Returns:
        The source token that this OMP uses for this ActCI, null if this OMP does not manage this ActCI, or null if there is no source token for this OMP and ActCI.
        Throws:
        MXApplicationException - The ActCI with this GUID is not found.
        java.rmi.RemoteException
        MXException
      • getSourceToken

        public java.lang.String getSourceToken(ActCIRemote ci,
                                               OmpRemote omp)
                                        throws java.rmi.RemoteException,
                                               MXException
        Given an ActCI and an OMP, return the source token that the OMP uses for the ActCI. This may be null if the ActCI does not have a source token for that OMP.
        Specified by:
        getSourceToken in interface OmpServiceRemote
        Parameters:
        ci - The ActCI to use.
        omp - The OMP to use.
        Returns:
        The source token that this OMP uses for this ActCI, null if this OMP does not manage this ActCI, or null if there is no source token for this OMP and ActCI.
        Throws:
        java.rmi.RemoteException
        MXException
      • getCIGUIDFromMBO

        public java.lang.String getCIGUIDFromMBO(MboRemote mainMbo)
                                          throws java.rmi.RemoteException,
                                                 MXException
        Tries to get the CI GUID from the given MBO in two ways. First, if this is the ACTCI MBO, it tries to get the GUID attribute. Second, if this is any other MBO, it tries to get the CIGUID attribute. This will return null if this is not an ACTCI MBO and this is not a MBO with a CIGUID attribute.
        Specified by:
        getCIGUIDFromMBO in interface OmpServiceRemote
        Parameters:
        mainMbo - The MBO to try to get the CI GUID from. Must not be null.
        Returns:
        the CI GUID, if it can be found in this MBO.
        Throws:
        MXApplicationException - The GUID or CIGUID attribute is present in the MBO, but calling getString on it fails.
        java.rmi.RemoteException
        MXException
      • checkContext

        public int checkContext(MaxLaunchEntryInfo entry,
                                MboRemote mainMbo)
                         throws java.rmi.RemoteException,
                                MXException
        Checks to see if the given launch entry should be available from an application with the given main MBO.
        Specified by:
        checkContext in interface OmpServiceRemote
        Parameters:
        entry - The launch entry to check (must not be null).
        mainMbo - The main MBO for the application.
        Returns:
        NO_CONTEXT_NEEDED if there are no contexts to match, CORRECT_CONTEXT if the mainMbo has the correct resource type and/or resource classification for this launch entry, or INCORRECT_CONTEXT if the mainMbo has the wrong resource type and/or classification.
        Throws:
        MXApplicationException - The main MBO has a classstructureid attribute, but there was an error in reading it.
        MXApplicationException - The launch entry is null.
        java.rmi.RemoteException
        MXException
      • getLaunchEntry

        public MaxLaunchEntryInfo getLaunchEntry(java.lang.String launchEntryName)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Given a launch entry name, get the MaxLaunchEntry.
        Specified by:
        getLaunchEntry in interface OmpServiceRemote
        Parameters:
        launchEntryName - The name of the launch entry to look up.
        Returns:
        The cached information for the launch entry.
        Throws:
        MXException
        java.rmi.RemoteException
      • getURL

        public java.lang.String getURL(java.lang.String launchEntryName,
                                       OmpRemote omp,
                                       MboRemote mainMbo)
                                throws MXException,
                                       java.rmi.RemoteException
        Given a Launch Entry Name, an OMP to launch to, and a main Mbo for the application, create the launch URL. The OMP may be null if this is not an OMP-type URL. This fills in substitution variables in the URL, then URL-encodes it. Values in the launch entry console URL will be substituted in from the main MBO's attributes and relationships.
        Specified by:
        getURL in interface OmpServiceRemote
        Parameters:
        launchEntryName - The name of the launch entry.
        omp - The OMP to launch to (null if this is not an OMP-type launch entry).
        mainMbo - The main MBO for the application.
        Returns:
        The launch entry's URL with all substitution variables replaced.
        Throws:
        MXApplicationException - The launch entry with the given name is not found.
        MXApplicationException - one of the substituted values cannot be URL-encoded.
        MXException - There is a substitution variables in the launch entry's console URL that cannot be substituted from the main MBO.
        java.rmi.RemoteException
      • getOMPList

        public OmpSetRemote getOMPList(java.lang.String launchEntryName,
                                       MboRemote mainMbo)
                                throws java.rmi.RemoteException,
                                       MXException
        Given a Launch Entry name and a MBO, return a list of OMPs that this Launch Entry can launch to.
        Specified by:
        getOMPList in interface OmpServiceRemote
        Parameters:
        launchEntryName - The name of the launch entry to use.
        mainMbo - The main MBO of the current application.
        Returns:
        A list of OMPs that this launch entry can launch to for this MBO.
        Throws:
        MXApplicationException - The launch entry with the given name is not found.
        MXApplicationException - iThis is not a MBO with a CI GUID, but the Launch Entry requires OMPs (it has an OMP product name).
        MXApplicationException - There is an error when getting the CI GUID attribute.
        java.rmi.RemoteException
        MXException
      • testCredentialMapper

        public static void testCredentialMapper()
                                         throws MXException,
                                                java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • test

        public void test()
                  throws MXException,
                         java.rmi.RemoteException
        A simple test method, for development purposes only. This creates some test data and does some lookups on it.
        Specified by:
        test in interface OmpServiceRemote
        Throws:
        MXException
        java.rmi.RemoteException