Android Open Source - Icinga-Mobile Icinga Udt






From Project

Back to project page Icinga-Mobile.

License

The source code is released under:

GNU General Public License

If you think the Android project Icinga-Mobile listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package mhst.dreamteam.IcingaClient.Icinga;
//  www .ja v  a 2s. co m
/**
 * Contains Icinga user-define template. IcingaUdt stands for 'Icinga User-Define Template'.<br />
 * First, declare a constant identify the template<br />
 * Then, implement the template in method getTemplate() by using IcingaParam class or directly String variable
 *
 * @author MinhNN
 * @see mhst.dreamteam.IcingaClient.Icinga.IcingaParam
 * @see mhst.dreamteam.IcingaClient.Icinga.IcingaConst
 */
public class IcingaUdt {
    // Declare template identify constant here
    public static final int ICINGA_TEMPLATE_MAINACTIVITY_HOST = 1; // Template to use in main activity to get list host
    public static final int ICINGA_TEMPLATE_MAINACTIVITY_OKHOST = 2; // Template to use in main activity to get list ok host
    public static final int ICINGA_TEMPLATE_MAINACTIVITY_DOWNHOST = 3;// Template to use in main activity to get list down host
    public static final int ICINGA_TEMPLATE_MAINACTIVITY_UNREACHABLEHOST = 4; // Template to use in main activity to get list unreachable host
    public static final int ICINGA_TEMPLATE_MAINACTIVITY_PENDINGHOST = 5; //Template to use in main activity to get list host which is pending
    public static final int ICINGA_TEMPLATE_MAINACTIVITY_SERVICE = 6; // Template to use in main activity to get list service
    public static final int ICINGA_TEMPLATE_MAINACTIVITY_WARNINGSERVICE = 7; // Template to use in main activity to get list service  which is warning
    public static final int ICINGA_TEMPLATE_MAINACTIVITY_CRITICALSERVICE = 8; // Template to use in main activity to get list critical service
    public static final int ICINGA_TEMPLATE_MAINACTIVITY_OKSERVICE = 9; // Template to use in main activity to get list ok service
    public static final int ICINGA_TEMPLATE_MAINACTIVITY_UNKNOWSERVICE = 10; // Template to use in main activity to get list unknow service

    /**
     * Returns Icinga parameter String via template defined.
     *
     * @param nTemplate an integer that define the template
     * @return a icinga parameter string
     */
    public static String getTemplate(int nTemplate, int start, int end, String hostObjectId) {
        /**
         * By using this method, you need to declare a constant above, then add a 'case' condition below
         * and change the value of the variable named 'result' in switch-case block.
         */

        // This is the variable mentioned above. The method will return the value of this variable.
        String result = "";
        IcingaParam param;
        // This is where we process the result. Change the value of result here.
        switch (nTemplate) {
            // First approach, using IcingaParam
            case ICINGA_TEMPLATE_MAINACTIVITY_HOST:
                param = new IcingaParam(); // create icinga parameter

                if (start >= 0) {
                    if (end == -1) {
                        param.setLimit(start);
                    } else if (end >= start) {
                        param.setLimit(start, end);
                    }
                }

                if (!isNullOrEmpty(hostObjectId)) {
                    param.setFilters("[AND(" + IcingaConst.HOST_OBJECT_ID + "|=|" + hostObjectId + ")]");
                }

                param.setTarget(IcingaConst.TARGET_HOST) // set target
                    .setCountField(IcingaConst.HOST_OBJECT_ID)
                    .setOrder(IcingaConst.HOST_OBJECT_ID, "ASC")
                    .setColumns(IcingaConst.HOST_OBJECT_ID, IcingaConst.HOST_NAME,
                            IcingaConst.HOST_ALIAS, IcingaConst.HOST_DISPLAY_NAME,
                            IcingaConst.HOST_ADDRESS, IcingaConst.HOST_ADDRESS6,
                            IcingaConst.HOST_PERFDATA, IcingaConst.HOST_CURRENT_STATE,
                            IcingaConst.HOST_LATENCY, IcingaConst.HOST_LAST_CHECK,
                            IcingaConst.HOST_NEXT_CHECK, IcingaConst.HOST_CURRENT_CHECK_ATTEMPT,
                            IcingaConst.HOST_MAX_CHECK_ATTEMPTS, IcingaConst.HOST_CHECK_TYPE,
                            IcingaConst.HOST_LAST_STATE_CHANGE, IcingaConst.HOST_ACTION_URL,
                            IcingaConst.HOST_NOTES, IcingaConst.HOST_IS_PENDING,
                            IcingaConst.HOST_NOTIFICATIONS_ENABLED, IcingaConst.HOST_PROBLEM_HAS_BEEN_ACKNOWLEDGED,
                            IcingaConst.HOST_HAS_BEEN_CHECKED) // set the columns to show
                    .setOutput("json"); // set type of data response

                // Attention! Every case condition must assign value to result like this!
                result = param.toString(); // convert parameter to string
                break;

            case ICINGA_TEMPLATE_MAINACTIVITY_DOWNHOST:
                param = new IcingaParam(); // create icinga parameter

                if (start >= 0) {
                    if (end == -1) {
                        param.setLimit(start);
                    } else if (end >= start) {
                        param.setLimit(start, end);
                    }
                }

                if (!isNullOrEmpty(hostObjectId)) {
                    param.setFilters("[AND(" + IcingaConst.HOST_OBJECT_ID + "|=|" + hostObjectId + ";"
                            + IcingaConst.HOST_CURRENT_STATE + "|=|" + IcingaApiConst.HOST_STATE_DOWN + ")]");// if filter not null
                } else {
                    param.setFilters("[AND(" + IcingaConst.HOST_CURRENT_STATE + "|=|" + IcingaApiConst.HOST_STATE_DOWN + ")]");
                }

                param.setTarget(IcingaConst.TARGET_HOST) // set target
                    .setCountField(IcingaConst.HOST_OBJECT_ID)
                    .setColumns(IcingaConst.HOST_OBJECT_ID, IcingaConst.HOST_NAME,
                            IcingaConst.HOST_ALIAS, IcingaConst.HOST_DISPLAY_NAME,
                            IcingaConst.HOST_ADDRESS, IcingaConst.HOST_ADDRESS6,
                            IcingaConst.HOST_PERFDATA, IcingaConst.HOST_CURRENT_STATE,
                            IcingaConst.HOST_LATENCY, IcingaConst.HOST_LAST_CHECK,
                            IcingaConst.HOST_NEXT_CHECK, IcingaConst.HOST_CURRENT_CHECK_ATTEMPT,
                            IcingaConst.HOST_MAX_CHECK_ATTEMPTS, IcingaConst.HOST_CHECK_TYPE,
                            IcingaConst.HOST_LAST_STATE_CHANGE, IcingaConst.HOST_ACTION_URL,
                            IcingaConst.HOST_NOTES, IcingaConst.HOST_IS_PENDING,
                            IcingaConst.HOST_NOTIFICATIONS_ENABLED, IcingaConst.HOST_PROBLEM_HAS_BEEN_ACKNOWLEDGED,
                            IcingaConst.HOST_HAS_BEEN_CHECKED) // set the columns to show
                    .setOutput("json"); // set type of data response

                // Attention! Every case condition must assign value to result like this!
                result = param.toString(); // convert parameter to string
                break;

            case ICINGA_TEMPLATE_MAINACTIVITY_UNREACHABLEHOST:
                param = new IcingaParam(); // create icinga parameter

                if (start >= 0) {
                    if (end == -1) {
                        param.setLimit(start);
                    } else if (end >= start) {
                        param.setLimit(start, end);
                    }
                }

                if (!isNullOrEmpty(hostObjectId)) {
                    param.setFilters("[AND(" + IcingaConst.HOST_OBJECT_ID + "|=|" + hostObjectId + ";"
                            + IcingaConst.HOST_CURRENT_STATE + "|=|" + IcingaApiConst.HOST_STATE_UNREACHABLE + ")]");// if filter not null
                } else {
                    param.setFilters("[AND(" + IcingaConst.HOST_CURRENT_STATE + "|=|" + IcingaApiConst.HOST_STATE_UNREACHABLE + ")]");
                }

                param.setTarget(IcingaConst.TARGET_HOST) // set target
                    .setCountField(IcingaConst.HOST_OBJECT_ID)
                    .setColumns(IcingaConst.HOST_OBJECT_ID, IcingaConst.HOST_NAME,
                            IcingaConst.HOST_ALIAS, IcingaConst.HOST_DISPLAY_NAME,
                            IcingaConst.HOST_ADDRESS, IcingaConst.HOST_ADDRESS6,
                            IcingaConst.HOST_PERFDATA, IcingaConst.HOST_CURRENT_STATE,
                            IcingaConst.HOST_LATENCY, IcingaConst.HOST_LAST_CHECK,
                            IcingaConst.HOST_NEXT_CHECK, IcingaConst.HOST_CURRENT_CHECK_ATTEMPT,
                            IcingaConst.HOST_MAX_CHECK_ATTEMPTS, IcingaConst.HOST_CHECK_TYPE,
                            IcingaConst.HOST_LAST_STATE_CHANGE, IcingaConst.HOST_ACTION_URL,
                            IcingaConst.HOST_NOTES, IcingaConst.HOST_IS_PENDING,
                            IcingaConst.HOST_NOTIFICATIONS_ENABLED, IcingaConst.HOST_PROBLEM_HAS_BEEN_ACKNOWLEDGED,
                            IcingaConst.HOST_HAS_BEEN_CHECKED) // set the columns to show
                    .setOutput("json"); // set type of data response

                // Attention! Every case condition must assign value to result like this!
                result = param.toString(); // convert parameter to string
                break;

            case ICINGA_TEMPLATE_MAINACTIVITY_PENDINGHOST:
                param = new IcingaParam(); // create icinga parameter

                if (start >= 0) {
                    if (end == -1) {
                        param.setLimit(start);
                    } else if (end >= start) {
                        param.setLimit(start, end);
                    }
                }

                if (!isNullOrEmpty(hostObjectId)) {
                    param.setFilters("[AND(" + IcingaConst.HOST_OBJECT_ID + "|=|" + hostObjectId + ";"
                            + IcingaConst.HOST_IS_PENDING + "|=|" + 1 + ")]");// if filter not null
                } else {
                    param.setFilters("[AND(" + IcingaConst.HOST_IS_PENDING + "|=|" + 1 + ")]");
                }

                param.setTarget(IcingaConst.TARGET_HOST) // set target
                    .setCountField(IcingaConst.HOST_OBJECT_ID)
                    .setColumns(IcingaConst.HOST_OBJECT_ID, IcingaConst.HOST_NAME,
                            IcingaConst.HOST_ALIAS, IcingaConst.HOST_DISPLAY_NAME,
                            IcingaConst.HOST_ADDRESS, IcingaConst.HOST_ADDRESS6,
                            IcingaConst.HOST_PERFDATA, IcingaConst.HOST_CURRENT_STATE,
                            IcingaConst.HOST_LATENCY, IcingaConst.HOST_LAST_CHECK,
                            IcingaConst.HOST_NEXT_CHECK, IcingaConst.HOST_CURRENT_CHECK_ATTEMPT,
                            IcingaConst.HOST_MAX_CHECK_ATTEMPTS, IcingaConst.HOST_CHECK_TYPE,
                            IcingaConst.HOST_LAST_STATE_CHANGE, IcingaConst.HOST_ACTION_URL,
                            IcingaConst.HOST_NOTES, IcingaConst.HOST_IS_PENDING,
                            IcingaConst.HOST_NOTIFICATIONS_ENABLED, IcingaConst.HOST_PROBLEM_HAS_BEEN_ACKNOWLEDGED,
                            IcingaConst.HOST_HAS_BEEN_CHECKED) // set the columns to show
                    .setOutput("json"); // set type of data response

                // Attention! Every case condition must assign value to result like this!
                result = param.toString(); // convert parameter to string
                break;

            case ICINGA_TEMPLATE_MAINACTIVITY_OKHOST:
                param = new IcingaParam(); // create icinga parameter

                if (start >= 0) {
                    if (end == -1) {
                        param.setLimit(start);
                    } else if (end >= start) {
                        param.setLimit(start, end);
                    }
                }

                if (!isNullOrEmpty(hostObjectId)) {
                    param.setFilters("[AND(" + IcingaConst.HOST_OBJECT_ID + "|=|" + hostObjectId + ";"
                            + IcingaConst.HOST_CURRENT_STATE + "|=|" + IcingaApiConst.HOST_STATE_OK + ")]");// if filter not null
                } else {
                    param.setFilters("[AND(" + IcingaConst.HOST_CURRENT_STATE + "|=|" + IcingaApiConst.HOST_STATE_OK + ")]");
                }

                param.setTarget(IcingaConst.TARGET_HOST) // set target
                    .setCountField(IcingaConst.HOST_OBJECT_ID)
                    .setColumns(IcingaConst.HOST_OBJECT_ID, IcingaConst.HOST_NAME,
                            IcingaConst.HOST_ALIAS, IcingaConst.HOST_DISPLAY_NAME,
                            IcingaConst.HOST_ADDRESS, IcingaConst.HOST_ADDRESS6,
                            IcingaConst.HOST_PERFDATA, IcingaConst.HOST_CURRENT_STATE,
                            IcingaConst.HOST_LATENCY, IcingaConst.HOST_LAST_CHECK,
                            IcingaConst.HOST_NEXT_CHECK, IcingaConst.HOST_CURRENT_CHECK_ATTEMPT,
                            IcingaConst.HOST_MAX_CHECK_ATTEMPTS, IcingaConst.HOST_CHECK_TYPE,
                            IcingaConst.HOST_LAST_STATE_CHANGE, IcingaConst.HOST_ACTION_URL,
                            IcingaConst.HOST_NOTES, IcingaConst.HOST_IS_PENDING,
                            IcingaConst.HOST_NOTIFICATIONS_ENABLED, IcingaConst.HOST_PROBLEM_HAS_BEEN_ACKNOWLEDGED,
                            IcingaConst.HOST_HAS_BEEN_CHECKED) // set the columns to show
                    .setOutput("json"); // set type of data response

                // Attention! Every case condition must assign value to result like this!
                result = param.toString(); // convert parameter to string
                break;

            case ICINGA_TEMPLATE_MAINACTIVITY_SERVICE:
                param = new IcingaParam();

                if (start >= 0) {
                    if (end == -1) {
                        param.setLimit(start);
                    } else if (end >= start) {
                        param.setLimit(start, end);
                    }
                }

                if (!isNullOrEmpty(hostObjectId)) {
                    param.setFilters("[AND(" + IcingaConst.SERVICE_OBJECT_ID + "|=|" + hostObjectId + ")]");
                }

                param.setTarget(IcingaConst.TARGET_SERVICE)
                    .setCountField(IcingaConst.SERVICE_OBJECT_ID)
                    .setOrder(IcingaConst.SERVICE_OBJECT_ID, "ASC")
                    .setColumns(IcingaConst.SERVICE_OBJECT_ID, IcingaConst.SERVICE_OUTPUT,
                            IcingaConst.SERVICE_PERFDATA, IcingaConst.HOST_OBJECT_ID,
                            IcingaConst.SERVICE_NAME, IcingaConst.SERVICE_DISPLAY_NAME,
                            IcingaConst.SERVICE_PROCESS_PERFORMANCE_DATA, IcingaConst.SERVICE_CURRENT_STATE,
                            IcingaConst.SERVICE_LAST_STATE_CHANGE,
                            IcingaConst.SERVICE_LAST_CHECK, IcingaConst.SERVICE_NEXT_CHECK,
                            IcingaConst.SERVICE_ACTION_URL, IcingaConst.SERVICE_NOTES,
                            IcingaConst.SERVICE_CURRENT_CHECK_ATTEMPT, IcingaConst.SERVICE_MAX_CHECK_ATTEMPTS)
                    .setOutput("json");

                // Attention! Every case condition must assign value to result like this!
                result = param.toString();
                break;

            case ICINGA_TEMPLATE_MAINACTIVITY_WARNINGSERVICE:
                param = new IcingaParam();

                if (start >= 0) {
                    if (end == -1) {
                        param.setLimit(start);
                    } else if (end >= start) {
                        param.setLimit(start, end);
                    }
                }

                if (!isNullOrEmpty(hostObjectId)) {
                    param.setFilters("[AND(" + IcingaConst.HOST_OBJECT_ID + "|=|" + hostObjectId
                            + IcingaConst.SERVICE_CURRENT_STATE + "|=|"
                            + IcingaApiConst.SERVICE_STATE_WARNING + ")]");
                } else {
                    param.setFilters("[AND(" + IcingaConst.SERVICE_CURRENT_STATE + "|=|"
                            + IcingaApiConst.SERVICE_STATE_WARNING + ")]");
                }

                param.setTarget(IcingaConst.TARGET_SERVICE)
                    .setCountField(IcingaConst.SERVICE_OBJECT_ID)
                    .setColumns(IcingaConst.SERVICE_OBJECT_ID, IcingaConst.SERVICE_OUTPUT,
                            IcingaConst.SERVICE_PERFDATA, IcingaConst.HOST_OBJECT_ID,
                            IcingaConst.HOST_NAME, IcingaConst.HOST_ALIAS, IcingaConst.HOST_DISPLAY_NAME,
                            IcingaConst.SERVICE_NAME, IcingaConst.SERVICE_DISPLAY_NAME,
                            IcingaConst.SERVICE_PROCESS_PERFORMANCE_DATA, IcingaConst.SERVICE_CURRENT_STATE,
                            IcingaConst.HOST_CURRENT_STATE, IcingaConst.SERVICE_LAST_STATE_CHANGE,
                            IcingaConst.SERVICE_LAST_CHECK, IcingaConst.SERVICE_NEXT_CHECK,
                            IcingaConst.SERVICE_ACTION_URL, IcingaConst.SERVICE_NOTES,
                            IcingaConst.SERVICE_CURRENT_CHECK_ATTEMPT, IcingaConst.SERVICE_MAX_CHECK_ATTEMPTS)
                    .setOutput("json");

                // Attention! Every case condition must assign value to result like this!
                result = param.toString();
                break;

            case ICINGA_TEMPLATE_MAINACTIVITY_CRITICALSERVICE:
                param = new IcingaParam();

                if (start >= 0) {
                    if (end == -1) {
                        param.setLimit(start);
                    } else if (end >= start) {
                        param.setLimit(start, end);
                    }
                }

                if (!isNullOrEmpty(hostObjectId)) {
                    param.setFilters("[AND(" + IcingaConst.HOST_OBJECT_ID + "|=|" + hostObjectId +
                            IcingaConst.SERVICE_CURRENT_STATE + "|=|"
                            + IcingaApiConst.SERVICE_STATE_CRITICAL + ")]");
                } else {
                    param.setFilters("[AND(" + IcingaConst.SERVICE_CURRENT_STATE + "|=|"
                            + IcingaApiConst.SERVICE_STATE_CRITICAL + ")]");
                }

                param.setTarget(IcingaConst.TARGET_SERVICE)
                    .setCountField(IcingaConst.SERVICE_OBJECT_ID)
                    .setColumns(IcingaConst.SERVICE_OBJECT_ID, IcingaConst.SERVICE_OUTPUT,
                            IcingaConst.SERVICE_PERFDATA, IcingaConst.HOST_OBJECT_ID,
                            IcingaConst.HOST_NAME, IcingaConst.HOST_ALIAS, IcingaConst.HOST_DISPLAY_NAME,
                            IcingaConst.SERVICE_NAME, IcingaConst.SERVICE_DISPLAY_NAME,
                            IcingaConst.SERVICE_PROCESS_PERFORMANCE_DATA, IcingaConst.SERVICE_CURRENT_STATE,
                            IcingaConst.HOST_CURRENT_STATE, IcingaConst.SERVICE_LAST_STATE_CHANGE,
                            IcingaConst.SERVICE_LAST_CHECK, IcingaConst.SERVICE_NEXT_CHECK,
                            IcingaConst.SERVICE_ACTION_URL, IcingaConst.SERVICE_NOTES,
                            IcingaConst.SERVICE_CURRENT_CHECK_ATTEMPT, IcingaConst.SERVICE_MAX_CHECK_ATTEMPTS)
                    .setOutput("json");

                // Attention! Every case condition must assign value to result like this!
                result = param.toString();
                break;
            case ICINGA_TEMPLATE_MAINACTIVITY_OKSERVICE:
                param = new IcingaParam();

                if (start >= 0) {
                    if (end == -1) {
                        param.setLimit(start);
                    } else if (end >= start) {
                        param.setLimit(start, end);
                    }
                }

                if (!isNullOrEmpty(hostObjectId)) {
                    param.setFilters("[AND(" + IcingaConst.HOST_OBJECT_ID + "|=|" + hostObjectId +
                            IcingaConst.SERVICE_CURRENT_STATE + "|=|"
                            + IcingaApiConst.SERVICE_STATE_OK + ")]");
                } else {
                    param.setFilters("[AND(" + IcingaConst.SERVICE_CURRENT_STATE + "|=|"
                            + IcingaApiConst.SERVICE_STATE_OK + ")]");
                }

                param.setTarget(IcingaConst.TARGET_SERVICE)
                    .setCountField(IcingaConst.SERVICE_OBJECT_ID)
                    .setColumns(IcingaConst.SERVICE_OBJECT_ID, IcingaConst.SERVICE_OUTPUT,
                            IcingaConst.SERVICE_PERFDATA, IcingaConst.HOST_OBJECT_ID,
                            IcingaConst.HOST_NAME, IcingaConst.HOST_ALIAS, IcingaConst.HOST_DISPLAY_NAME,
                            IcingaConst.SERVICE_NAME, IcingaConst.SERVICE_DISPLAY_NAME,
                            IcingaConst.SERVICE_PROCESS_PERFORMANCE_DATA, IcingaConst.SERVICE_CURRENT_STATE,
                            IcingaConst.HOST_CURRENT_STATE, IcingaConst.SERVICE_LAST_STATE_CHANGE,
                            IcingaConst.SERVICE_LAST_CHECK, IcingaConst.SERVICE_NEXT_CHECK,
                            IcingaConst.SERVICE_ACTION_URL, IcingaConst.SERVICE_NOTES,
                            IcingaConst.SERVICE_CURRENT_CHECK_ATTEMPT, IcingaConst.SERVICE_MAX_CHECK_ATTEMPTS)
                    .setOutput("json");

                // Attention! Every case condition must assign value to result like this!
                result = param.toString();
                break;

            case ICINGA_TEMPLATE_MAINACTIVITY_UNKNOWSERVICE:
                param = new IcingaParam();

                if (start >= 0) {
                    if (end == -1) {
                        param.setLimit(start);
                    } else if (end >= start) {
                        param.setLimit(start, end);
                    }
                }

                if (!isNullOrEmpty(hostObjectId)) {
                    param.setFilters("[AND(" + IcingaConst.HOST_OBJECT_ID + "|=|" + hostObjectId +
                            IcingaConst.SERVICE_CURRENT_STATE + "|=|"
                            + IcingaApiConst.SERVICE_STATE_UNKNOWN + ")]");
                } else {
                    param.setFilters("[AND(" + IcingaConst.SERVICE_CURRENT_STATE + "|=|"
                            + IcingaApiConst.SERVICE_STATE_UNKNOWN + ")]");
                }

                param.setTarget(IcingaConst.TARGET_SERVICE)
                    .setCountField(IcingaConst.SERVICE_OBJECT_ID)
                    .setColumns(IcingaConst.SERVICE_OBJECT_ID, IcingaConst.SERVICE_OUTPUT,
                            IcingaConst.SERVICE_PERFDATA, IcingaConst.HOST_OBJECT_ID,
                            IcingaConst.HOST_NAME, IcingaConst.HOST_ALIAS, IcingaConst.HOST_DISPLAY_NAME,
                            IcingaConst.SERVICE_NAME, IcingaConst.SERVICE_DISPLAY_NAME,
                            IcingaConst.SERVICE_PROCESS_PERFORMANCE_DATA, IcingaConst.SERVICE_CURRENT_STATE,
                            IcingaConst.HOST_CURRENT_STATE, IcingaConst.SERVICE_LAST_STATE_CHANGE,
                            IcingaConst.SERVICE_LAST_CHECK, IcingaConst.SERVICE_NEXT_CHECK,
                            IcingaConst.SERVICE_ACTION_URL, IcingaConst.SERVICE_NOTES,
                            IcingaConst.SERVICE_CURRENT_CHECK_ATTEMPT, IcingaConst.SERVICE_MAX_CHECK_ATTEMPTS)
                    .setOutput("json");

                // Attention! Every case condition must assign value to result like this!
                result = param.toString();
                break;

            // Second approach, using directly string, not recommended
            // case ICINGA_TEMPLATE_MAINACTIVITY_HOST:
            //    result = "/host/columns[...list of column...]/xml";
        }

        return result;
    }

    private static boolean isNullOrEmpty(String s) {
        return (s == null || s.isEmpty());
    }
}




Java Source Code List

mhst.dreamteam.ApplicationContext.java
mhst.dreamteam.ApplicationTest.java
mhst.dreamteam.ApplicationTest.java
mhst.dreamteam.MainActivity.java
mhst.dreamteam.IcingaClient.GlobalConfig.java
mhst.dreamteam.IcingaClient.GlobalConst.java
mhst.dreamteam.IcingaClient.Controller.NetControllerTest.java
mhst.dreamteam.IcingaClient.Controller.NetController.java
mhst.dreamteam.IcingaClient.Icinga.IcingaApiConst.java
mhst.dreamteam.IcingaClient.Icinga.IcingaApi.java
mhst.dreamteam.IcingaClient.Icinga.IcingaConst.java
mhst.dreamteam.IcingaClient.Icinga.IcingaExecutor.java
mhst.dreamteam.IcingaClient.Icinga.IcingaParam.java
mhst.dreamteam.IcingaClient.Icinga.IcingaUdt.java
mhst.dreamteam.IcingaClient.Icinga.package-info.java
mhst.dreamteam.IcingaClient.Interface.OnCompleteListener.java
mhst.dreamteam.IcingaClient.Interface.OnPieChartClickListener.java
mhst.dreamteam.IcingaClient.Json.JsonHelperTest.java
mhst.dreamteam.IcingaClient.Json.JsonHelper.java
mhst.dreamteam.IcingaClient.Misc.CookieMng.java
mhst.dreamteam.IcingaClient.Misc.CookieTest.java
mhst.dreamteam.IcingaClient.SessionMng.LogInTest.java
mhst.dreamteam.IcingaClient.SessionMng.Login.java
mhst.dreamteam.IcingaClient.SessionMng.Logout.java
mhst.dreamteam.IcingaClient.SessionMng.Session.java
mhst.dreamteam.IcingaService.ApplicationContext.java
mhst.dreamteam.IcingaService.DataUpdater.java
mhst.dreamteam.IcingaService.MessageReveicer.java
mhst.dreamteam.IcingaService.NotiBuilder.java
mhst.dreamteam.IcingaService.SQLHelper.java
mhst.dreamteam.IcingaService.SessionProvider.java
mhst.dreamteam.UI.Color.java
mhst.dreamteam.UI.GradientLine.java
mhst.dreamteam.UI.HostDetailsFragment.java
mhst.dreamteam.UI.HostlistAdapter.java
mhst.dreamteam.UI.HostlistFragment.java
mhst.dreamteam.UI.LoginActivity.java
mhst.dreamteam.UI.OverviewFragment.java
mhst.dreamteam.UI.PieGraph.java
mhst.dreamteam.UI.ProgressDialog.java
mhst.dreamteam.UI.ServiceDetailsFragment.java
mhst.dreamteam.UI.ServicelistAdapter.java
mhst.dreamteam.UI.ServicelistFragment.java
org.json.CDL.java
org.json.CookieList.java
org.json.Cookie.java
org.json.HTTPTokener.java
org.json.HTTP.java
org.json.JSONArray.java
org.json.JSONException.java
org.json.JSONML.java
org.json.JSONObject.java
org.json.JSONString.java
org.json.JSONStringer.java
org.json.JSONTokener.java
org.json.JSONWriter.java
org.json.Kim.java
org.json.Property.java
org.json.XMLTokener.java
org.json.XML.java
org.json.zip.BitInputStream.java
org.json.zip.BitOutputStream.java
org.json.zip.BitReader.java
org.json.zip.BitWriter.java
org.json.zip.Huff.java
org.json.zip.JSONzip.java
org.json.zip.Keep.java
org.json.zip.None.java
org.json.zip.PostMortem.java
org.json.zip.Unzipper.java
org.json.zip.Zipper.java