Package com.webobjects.monitor.rest

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

package com.webobjects.monitor.rest;

import com.webobjects.appserver.WOActionResults;
import com.webobjects.appserver.WORequest;
import com.webobjects.monitor._private.MSiteConfig;
import com.webobjects.monitor.application.Session;
import com.webobjects.monitor.application.WOTaskdHandler;

import er.rest.routes.ERXDefaultRouteController;

public class JavaMonitorController extends ERXDefaultRouteController {

    private WOTaskdHandler _handler;

  public JavaMonitorController(WORequest request) {
    super(request);
    _handler = new WOTaskdHandler(mySession());
  }
   
  protected MSiteConfig siteConfig() {
    return WOTaskdHandler.siteConfig();
  }

  public WOTaskdHandler handler() {
    return _handler;
  }
   
    public Session mySession() {
        return (Session) super.session();
    }

  @Override
  public WOActionResults createAction() throws Throwable {
    // TODO Auto-generated method stub
    return null;
  }

  @Override
  public WOActionResults destroyAction() throws Throwable {
    // TODO Auto-generated method stub
    return null;
  }

  @Override
  public WOActionResults indexAction() throws Throwable {
    // TODO Auto-generated method stub
    return null;
  }

  @Override
  public WOActionResults newAction() throws Throwable {
    // TODO Auto-generated method stub
    return null;
  }

  @Override
  public WOActionResults showAction() throws Throwable {
    // TODO Auto-generated method stub
    return null;
  }

  @Override
  public WOActionResults updateAction() throws Throwable {
    // TODO Auto-generated method stub
    return null;
  }
   
  protected void checkPassword() throws SecurityException {
        String pw = context().request().stringFormValueForKey("pw");
        if(!siteConfig().compareStringWithPassword(pw)) {
      throw new SecurityException("Invalid password");
        }
  }
   
}
TOP

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

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.