/*
* This file is part of the WfMOpen project.
* Copyright (C) 2001-2005 Danet GmbH (www.danet.de), GS-AN.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: RmsFactory.java 1607 2006-09-29 12:32:13Z drmlipp $
*
* $Log$
* Revision 1.1 2005/11/16 16:35:09 drmlipp
* Started Liferay based RMS.
*
*/
package de.danet.an.workflow.liferayrms;
import de.danet.an.workflow.spis.rms.FactoryConfigurationError;
import de.danet.an.workflow.spis.rms.ResourceManagementService;
import de.danet.an.workflow.spis.rms.ResourceManagementServiceFactory;
/**
* This class provides a Resource Management Service factory based on
* the Liferay user management components.
*
* @author <a href="mailto:lipp@danet.de">Michael Lipp</a>
* @version $Revision: 1607 $
*/
public class RmsFactory extends ResourceManagementServiceFactory {
/**
* Implements the factory API that allows access to the Liferay
* based resource management service.<P>
*
* @throws FactoryConfigurationError if configuration information is
* missing or invalid.
*/
public RmsFactory () throws FactoryConfigurationError {
}
/* Comment copied from interface. */
public ResourceManagementService newResourceManagementService ()
throws FactoryConfigurationError {
if (getResourceAssignmentService() == null) {
throw new FactoryConfigurationError
("Resource assignment service not configured.");
}
RmsService serviceImpl
= new RmsService (getResourceAssignmentService());
return serviceImpl;
}
}