Package net.gridshield.nexsm.entityclasses

Examples of net.gridshield.nexsm.entityclasses.ServiceExtInfo


    }
   
    public ServiceExtInfo getServiceExtInfo(String hostname, String dsc) {
        Vertex v = getVertex(hostname);
        Object sx = v.getUserDatum("servicesextinfo");
        ServiceExtInfo sei = null;
        if (sx instanceof Map) {
            Map <String, ServiceExtInfo> ssei = (Map <String, ServiceExtInfo>)sx;
            sei = ssei.get(dsc);
        }
        return sei;
View Full Code Here


   
    public void setMapper(Mapper map) {
        _map = map;
        refreshComments();
       
        ServiceExtInfo se = _map.getServiceExtInfo(_h.getName(), _ss.getServiceDescription());
        if (se != null) {
            if (se.getActionUrl() == null || se.getActionUrl().length() <= 1)
                jBtnOpenURLAction.setEnabled(false);
            else
                jBtnOpenURLAction.setEnabled(true);
            if (se.getNotesUrl() == null || se.getNotesUrl().length() <= 1)
                jBtnOpenURLNotes.setEnabled(false);
            else
                jBtnOpenURLNotes.setEnabled(true);
        } else {
            jBtnOpenURLAction.setEnabled(false);
View Full Code Here

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jBtnOpenURLActionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnOpenURLActionActionPerformed
        ServiceExtInfo se = _map.getServiceExtInfo(_h.getName(), _ss.getServiceDescription());
        String action = se.getActionUrl();
        try {
            action = action.replace("$SERVICEDESC$",  StatusMisc.encode(_ss.getServiceDescription()));
            action = action.replace("$HOSTNAME$", StatusMisc.encode(_h.getName()));
            action = action.replace("$HOSTADDRESS$", StatusMisc.encode(_h.getAddress()));
            _map.openURL("action_url", action);
View Full Code Here

            ex.printStackTrace();
        }
    }//GEN-LAST:event_jBtnOpenURLActionActionPerformed

    private void jBtnOpenURLNotesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnOpenURLNotesActionPerformed
        ServiceExtInfo se = _map.getServiceExtInfo(_h.getName(), _ss.getServiceDescription());
        String notes = se.getNotesUrl();
        try {       
            notes = notes.replace("$SERVICEDESC$",  StatusMisc.encode(_ss.getServiceDescription()));
            notes = notes.replace("$HOSTNAME$", StatusMisc.encode(_h.getName()));
            notes = notes.replace("$HOSTADDRESS$", StatusMisc.encode(_h.getAddress()));
            _map.openURL("notes_url", notes);
View Full Code Here

            hostextinfo = true; hetmp = new HostExtInfo();
        }
       
        // Added for Nagios 3 compat
        if (tag.compareTo("service") == 0) {
            svcextinfo = true; setmp = new ServiceExtInfo();
        }
       
        if (tag.compareTo("host_name") == 0) { host_name = true; }
        if (tag.compareTo("address") == 0) { ip = true; }
        if (tag.compareTo("alias") == 0) { alias = true; }
        if (tag.compareTo("parents") == 0){ parents = true; }

        if (tag.equals("host_name")) { host_name = true; }
        if (tag.equals("hostextinfo")) { hostextinfo = true; hetmp = new HostExtInfo(); }
        if (tag.equals("icon_image")) { icon_image = true; }
        if (tag.equals("statusmap_image")) { statusmap_image = true; }
        if (tag.equals("notes_url")) { notes_url = true; }
        if (tag.equals("action_url")) { action_url = true; }
        if (tag.equals("serviceextinfo")) { svcextinfo = true; setmp = new ServiceExtInfo(); }
        if (tag.equals("service_description")) { service_description = true; }

        /* error section */
        if (tag.compareTo("error") == 0) { errorDefinition = true; etmp = new ErrorMapper();}
        if (errorDefinition) {
View Full Code Here

TOP

Related Classes of net.gridshield.nexsm.entityclasses.ServiceExtInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.