Package com.webobjects.monitor.rest

Source Code of com.webobjects.monitor.rest.MHostController

package com.webobjects.monitor.rest;

import com.webobjects.appserver.WOActionResults;
import com.webobjects.appserver.WORequest;
import com.webobjects.monitor._private.MHost;

import er.extensions.eof.ERXKeyFilter;

public class MHostController extends JavaMonitorController {

  public MHostController(WORequest request) {
    super(request);
  }
 
  @Override
  public WOActionResults createAction() throws Throwable {
    checkPassword();
    MHost host = create(ERXKeyFilter.filterWithAttributes());
        siteConfig().addHost_M(host);
        if (siteConfig().hostArray().count() != 0) {
            handler().sendAddHostToWotaskds(host, siteConfig().hostArray());
        }
    return response(host, ERXKeyFilter.filterWithAttributes());
  }

  @Override
  public WOActionResults indexAction() throws Throwable {
    checkPassword();
    return response(siteConfig().hostArray(), ERXKeyFilter.filterWithAttributes());
  }

  @Override
  public WOActionResults showAction() throws Throwable {
    checkPassword();
    MHost host = siteConfig().hostWithName((String) routeObjectForKey("mHost"));   
    return response(host, ERXKeyFilter.filterWithAttributes());
  }
 
}
TOP

Related Classes of com.webobjects.monitor.rest.MHostController

TOP
Copyright © 2018 www.massapi.com. 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.