001: /*
002: * This file is part of the WfMOpen project.
003: * Copyright (C) 2001-2005 Danet GmbH (www.danet.de), BU BTS.
004: * All rights reserved.
005: *
006: * This program is free software; you can redistribute it and/or modify
007: * it under the terms of the GNU General Public License as published by
008: * the Free Software Foundation; either version 2 of the License, or
009: * (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: *
020: * $Id: PropsRmsConnection.java,v 1.4 2007/05/17 21:53:00 mlipp Exp $
021: *
022: * $Log: PropsRmsConnection.java,v $
023: * Revision 1.4 2007/05/17 21:53:00 mlipp
024: * Refactored resource adaptors.
025: *
026: * Revision 1.3 2006/10/03 17:04:48 mlipp
027: * Clarified method names.
028: *
029: * Revision 1.2 2006/09/29 12:32:07 drmlipp
030: * Consistently using WfMOpen as projct name now.
031: *
032: * Revision 1.1 2006/09/24 20:57:16 mlipp
033: * Moved RMS implementations in own sub-package.
034: *
035: * Revision 1.3 2006/07/11 11:13:13 drmlipp
036: * Props RMS running.
037: *
038: * Revision 1.2 2006/07/10 13:47:08 drmlipp
039: * Implemented EisRmsService.
040: *
041: * Revision 1.1 2006/07/05 10:58:52 drmlipp
042: * Renamed package.
043: *
044: * Revision 1.1 2006/07/05 10:53:26 drmlipp
045: * Separated generic RMS adapter client from properties based adapter.
046: *
047: * Revision 1.1 2006/07/04 16:28:30 drmlipp
048: * Started.
049: *
050: */
051: package de.danet.an.workflow.rmsimpls.propsrmsra;
052:
053: import java.util.Collection;
054:
055: import javax.naming.NameNotFoundException;
056: import javax.resource.ResourceException;
057:
058: import de.danet.an.util.ra.ConnectionSupport;
059: import de.danet.an.workflow.rmsimpls.eisrms.aci.RmsConnection;
060: import de.danet.an.workflow.rmsimpls.eisrms.aci.RmsEntry;
061:
062: /**
063: * This class provides the connection implementation of the resource
064: * adapter for the properties files based RMS.
065: * @author Michael Lipp
066: */
067: public class PropsRmsConnection extends ConnectionSupport implements
068: RmsConnection {
069:
070: /* Comment copied from interface. */
071: public Collection authorizers(String key) throws ResourceException {
072: return ((PropsRmsManagedConnection) getManagedConnection())
073: .authorizers(key);
074: }
075:
076: /* Comment copied from interface. */
077: public Collection listResources() throws ResourceException {
078: return ((PropsRmsManagedConnection) getManagedConnection())
079: .listResources();
080: }
081:
082: /* Comment copied from interface. */
083: public RmsEntry lookupUserByAccountName(String name)
084: throws NameNotFoundException {
085: return ((PropsRmsManagedConnection) getManagedConnection())
086: .lookupUserByName(name);
087: }
088:
089: /* Comment copied from interface. */
090: public RmsEntry lookupResource(String key)
091: throws ResourceException, NameNotFoundException {
092: return ((PropsRmsManagedConnection) getManagedConnection())
093: .lookupResource(key);
094: }
095:
096: /* Comment copied from interface. */
097: public Collection selectResources(Object resSel)
098: throws ResourceException {
099: return ((PropsRmsManagedConnection) getManagedConnection())
100: .selectResources(resSel);
101: }
102:
103: }
|