Package org.huihoo.willow.client

Source Code of org.huihoo.willow.client.SerialUserDatabaseImpl

//----------------------------BEGIN LICENSE----------------------------
/*
* Willow : the Open Source WorkFlow Project
* Distributable under GNU LGPL license by gun.org
*
* Copyright (C) 2004-2010 huihoo.org
* Copyright (C) 2004-2010  ZosaTapo <dertyang@hotmail.com>
*
* ====================================================================
* Project Homepage : http://www.huihoo.org/willow
* Source Forge     : http://sourceforge.net/projects/huihoo
* Mailing list     : willow@lists.sourceforge.net
*/
//----------------------------END  LICENSE-----------------------------
package org.huihoo.willow.client;

import java.rmi.RemoteException;

import org.huihoo.workflow.client.serial.model.SerialParticipant;
import org.huihoo.workflow.client.serial.model.SerialUserDatabase;
import org.huihoo.workflow.runtime.WorkflowService;
import org.huihoo.workflow.store.UserDatabase;
import org.huihoo.workflow.usermodel.WorkflowParticipant;

/**
* @author reic
*
* To change the template for this generated type comment go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
public class SerialUserDatabaseImpl extends SerialRemoteObject implements SerialUserDatabase
{
  private transient WorkflowService workflowService;
 
  public SerialUserDatabaseImpl(WorkflowService workflowService)throws RemoteException
  {
    super();
    this.workflowService=workflowService; 
  }

  public SerialParticipant findParticipant(String username) throws RemoteException
  {
    WorkflowParticipant participant=workflowService.getUserDatabase().findParticipant(username);
   
    if(participant==null)
    {
      return null;
    }
   
    return new SerialParticipant(participant);
  }
 
  public UserDatabase getWrappedObject()
  {
    return workflowService.getUserDatabase();
  }
}
TOP

Related Classes of org.huihoo.willow.client.SerialUserDatabaseImpl

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.