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: LdapRmsConnection.java,v 1.5 2007/09/02 22:19:53 mlipp Exp $
021: *
022: * $Log: LdapRmsConnection.java,v $
023: * Revision 1.5 2007/09/02 22:19:53 mlipp
024: * Made LDAP EIS RA realy work.
025: *
026: * Revision 1.4 2007/05/17 21:52:59 mlipp
027: * Refactored resource adaptors.
028: *
029: * Revision 1.3 2006/10/03 17:05:13 mlipp
030: * Clarified method names.
031: *
032: * Revision 1.2 2006/09/29 12:32:07 drmlipp
033: * Consistently using WfMOpen as projct name now.
034: *
035: * Revision 1.1 2006/09/24 20:57:16 mlipp
036: * Moved RMS implementations in own sub-package.
037: *
038: * Revision 1.2 2006/07/11 11:13:13 drmlipp
039: * Props RMS running.
040: *
041: * Revision 1.1 2006/07/11 09:00:21 drmlipp
042: * Started LDAP RMS RA.
043: *
044: */
045: package de.danet.an.workflow.rmsimpls.ldaprmsra;
046:
047: import java.util.Collection;
048:
049: import javax.naming.NameNotFoundException;
050: import javax.resource.ResourceException;
051:
052: import de.danet.an.util.ra.ConnectionSupport;
053: import de.danet.an.workflow.rmsimpls.eisrms.aci.RmsConnection;
054: import de.danet.an.workflow.rmsimpls.eisrms.aci.RmsEntry;
055:
056: /**
057: * This class provides the connection implementation of the resource
058: * adapter for the properties files based RMS.
059: * @author Michael Lipp
060: */
061: public class LdapRmsConnection extends ConnectionSupport implements
062: RmsConnection {
063:
064: /* (non-Javadoc)
065: * @see de.danet.an.workflow.rmsimpls.eisrms.aci.RmsConnection#lookupResource
066: */
067: public RmsEntry lookupResource(String key)
068: throws ResourceException, NameNotFoundException {
069: return ((LdapRmsManagedConnection) getManagedConnection())
070: .lookupResource(key);
071: }
072:
073: /* (non-Javadoc)
074: * @see de.danet.an.workflow.rmsimpls.eisrms.aci.RmsConnection#findResource
075: */
076: public RmsEntry lookupUserByAccountName(String name)
077: throws ResourceException, NameNotFoundException {
078: return ((LdapRmsManagedConnection) getManagedConnection())
079: .lookupUserByAccountName(name);
080: }
081:
082: /* (non-Javadoc)
083: * @see de.danet.an.workflow.rmsimpls.eisrms.aci.RmsConnection#authorizers
084: */
085: public Collection authorizers(String key) throws ResourceException {
086: return ((LdapRmsManagedConnection) getManagedConnection())
087: .authorizers(key);
088: }
089:
090: /* (non-Javadoc)
091: * @see de.danet.an.workflow.rmsimpls.eisrms.aci.RmsConnection#listResources()
092: */
093: public Collection listResources() throws ResourceException {
094: return ((LdapRmsManagedConnection) getManagedConnection())
095: .listResources();
096: }
097:
098: /* (non-Javadoc)
099: * @see de.danet.an.workflow.rmsimpls.eisrms.aci.RmsConnection#selectResources
100: */
101: public Collection selectResources(Object resSel)
102: throws ResourceException {
103: return ((LdapRmsManagedConnection) getManagedConnection())
104: .selectResources(resSel);
105: }
106: }
|