01: /*
02: * This file is part of the WfMOpen project.
03: * Copyright (C) 2001-2005 Danet GmbH (www.danet.de), GS-AN.
04: * All rights reserved.
05: *
06: * This program is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: *
20: * $Id: RmsFactory.java,v 1.2 2006/09/29 12:32:13 drmlipp Exp $
21: *
22: * $Log: RmsFactory.java,v $
23: * Revision 1.2 2006/09/29 12:32:13 drmlipp
24: * Consistently using WfMOpen as projct name now.
25: *
26: * Revision 1.1 2005/11/16 16:35:09 drmlipp
27: * Started Liferay based RMS.
28: *
29: */
30: package de.danet.an.workflow.liferayrms;
31:
32: import de.danet.an.workflow.spis.rms.FactoryConfigurationError;
33: import de.danet.an.workflow.spis.rms.ResourceManagementService;
34: import de.danet.an.workflow.spis.rms.ResourceManagementServiceFactory;
35:
36: /**
37: * This class provides a Resource Management Service factory based on
38: * the Liferay user management components.
39: *
40: * @author <a href="mailto:lipp@danet.de">Michael Lipp</a>
41: * @version $Revision: 1.2 $
42: */
43:
44: public class RmsFactory extends ResourceManagementServiceFactory {
45:
46: /**
47: * Implements the factory API that allows access to the Liferay
48: * based resource management service.<P>
49: *
50: * @throws FactoryConfigurationError if configuration information is
51: * missing or invalid.
52: */
53: public RmsFactory() throws FactoryConfigurationError {
54: }
55:
56: /* Comment copied from interface. */
57: public ResourceManagementService newResourceManagementService()
58: throws FactoryConfigurationError {
59: if (getResourceAssignmentService() == null) {
60: throw new FactoryConfigurationError(
61: "Resource assignment service not configured.");
62: }
63: RmsService serviceImpl = new RmsService(
64: getResourceAssignmentService());
65: return serviceImpl;
66: }
67:
68: }
|