Package com.google.code.lightssh.project.security.entity

Examples of com.google.code.lightssh.project.security.entity.LoginAccountChange


    }else if(AuditStatus.EFFECTIVE.equals(status) ){
      type = EntityChange.Type.UPDATE;
      remark = "变更登录帐户";
    }
   
    LoginAccountChange lac =loginAccountChangeManager.save(
        operator,type,originalAcc,newAcc,remark);
   
    //启动工作流
    startWorkflow(lac,newAcc,operator);
  }
View Full Code Here


      throw new ApplicationException("参数为空!");
   
    if( change == null || StringUtils.isEmpty(change.getId()) )
      throw new ApplicationException("登录帐户变更信息为空!");
   
    LoginAccountChange dbChange = this.loginAccountChangeManager.get(change);
    if( dbChange == null )
      throw new ApplicationException("登录帐户变更信息["+change.getId()+"]不存在!");
   
    LoginAccount dbAcc = loginAccountManager.get(change.getLoginAccount());
    LoginAccount newAcc = null;
    byte[] newObject = dbChange.getNewObject();
    if( newObject != null )
      newAcc = (LoginAccount)IoSerialUtil.deserialize(newObject);
    if( newObject == null || newAcc == null )
      throw new ApplicationException("数据异常,变更登录帐户信息为空!");
   
    boolean passed = AuditResult.LAST_AUDIT_PASSED.equals(audit.getResult());
    if( passed && EntityChange.Type.DELETE.equals(dbChange.getType()) ){//删除
      dbAcc.setStatus( AuditStatus.DELETE );
    }else if( passed && AuditStatus.EFFECTIVE.equals(newAcc.getStatus())){
      dbAcc.setPartyId( newAcc.getPartyId() );
      dbAcc.setPeriod(newAcc.getPeriod());
      dbAcc.setEmail( newAcc.getEmail());
View Full Code Here

 
  @Override
  public void process(ExecutionType type, String procDefKey,
      String procInstId, String bizKey) {
   
    LoginAccountChange lac = this.loginAccountChangeManager.get(bizKey);
   
    LoginAccountAudit accAudit = new LoginAccountAudit();
    accAudit.setLoginAccountChange( lac );//关联变更
   
    accAudit.setUser( null );
View Full Code Here

    if( StringUtils.isEmpty(bizKey) ){
      this.addActionError("业务参数为空!");
      return SUCCESS;
    }
   
    LoginAccountChange rc = loginAccountChangeManager.get(bizKey);
    if( rc == null ){
      this.addActionError("登录帐号数据["+bizKey+"]不存在!");
      return SUCCESS;
    }
   
View Full Code Here

  public LoginAccountChange save(LoginAccount user,EntityChange.Type type
      ,LoginAccount originalAcc,LoginAccount newAcc,String remark){
    if( originalAcc == null && newAcc == null )
      throw new ApplicationException("原始登录帐户或新登录帐户为空!");
   
    LoginAccountChange ec = new LoginAccountChange();
    ec.setStatus(EntityChange.Status.NEW);
    ec.setOperator(user);
    ec.setType(type);
    ec.setDescription(remark);
   
    if( newAcc != null ){
      ec.setLoginAccount(newAcc);
      ec.setNewObject( IoSerialUtil.serialize(newAcc) );
    }else{
      ec.setLoginAccount(originalAcc);
    }
   
    if( originalAcc != null )
      ec.setOriginalObject(IoSerialUtil.serialize(originalAcc) );
   
    dao.create(ec);
   
    return ec;
  }
View Full Code Here

TOP

Related Classes of com.google.code.lightssh.project.security.entity.LoginAccountChange

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.