Package com.exedosoft.plat.login

Source Code of com.exedosoft.plat.login.LoginDelegateAction

package com.exedosoft.plat.login;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.exedosoft.plat.ExedoException;
import com.exedosoft.plat.SessionContext;
import com.exedosoft.plat.action.DOAbstractAction;
import com.exedosoft.plat.bo.BOInstance;
import com.exedosoft.plat.bo.DOBO;
import com.exedosoft.plat.bo.org.SessionParterFactory;

public class LoginDelegateAction extends DOAbstractAction {

  private static Log log = LogFactory.getLog(LoginDelegateAction.class);

  @Override
  public String excute() throws ExedoException {
    // TODO Auto-generated method stub

    DOBO boUser = DOBO.getDOBOByName("do_org_user");
    String delegateuid = this.actionForm.getValue("delegateuid");
    BOInstance delegateUser = boUser.getInstance(delegateuid);
    SessionContext.getInstance().setDeleGate(delegateUser);
    BOInstance user = SessionContext.getInstance().getUser();

    List allAuthParter = SessionParterFactory.getSessionParter()
        .getParterAuths(delegateuid);
    user.putValue(LoginMain.ALLAUTH, allAuthParter);

    List allAuthMenus = SessionParterFactory.getSessionParter()
        .getMenuAuthConfigByAccount(delegateuid);
    if (allAuthMenus != null && !allAuthMenus.isEmpty()) {
      user.putValue(LoginMain.ALLAUTHMENUS, allAuthMenus);
    }

    return this.DEFAULT_FORWARD;
  }

}
TOP

Related Classes of com.exedosoft.plat.login.LoginDelegateAction

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.