Kaydet (Commit) d8c95ac1 authored tarafından Oliver Bolte's avatar Oliver Bolte

INTEGRATION: CWS cfgfix01 (1.3.78); FILE MERGED

2005/03/08 15:28:06 jb 1.3.78.2: #i42842# Add component name to pseudo-URL
2005/03/04 15:48:35 jb 1.3.78.1: #i42842# Add support for URL property to layer; also add missing license header
üst b47664bc
/*************************************************************************
*
* $RCSfile: ldapuserprofilelayer.hxx,v $
*
* $Revision: 1.4 $
*
* last change: $Author: obo $ $Date: 2005-03-18 10:39:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards OOurce License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free OOftware; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free OOftware Foundation.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free OOftware
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards OOurce License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* OOurce License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* OOftware provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE OOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the OOftware.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2004 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#ifndef EXTENSIONS_CONFIG_LDAP_LADPUSERPROFILELAYER_HXX_ #ifndef EXTENSIONS_CONFIG_LDAP_LADPUSERPROFILELAYER_HXX_
#define EXTENSIONS_CONFIG_LDAP_LADPUSERPROFILELAYER_HXX_ #define EXTENSIONS_CONFIG_LDAP_LADPUSERPROFILELAYER_HXX_
...@@ -8,6 +69,8 @@ ...@@ -8,6 +69,8 @@
#include "ldapaccess.hxx" #include "ldapaccess.hxx"
#endif // EXTENSIONS_CONFIG_LDAP_LDAPACCESS_HXX_ #endif // EXTENSIONS_CONFIG_LDAP_LDAPACCESS_HXX_
#include "propertysethelper.hxx"
#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYER_HPP_ #ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYER_HPP_
#include <com/sun/star/configuration/backend/XLayer.hpp> #include <com/sun/star/configuration/backend/XLayer.hpp>
#endif // _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYER_HPP_ #endif // _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYER_HPP_
...@@ -50,17 +113,21 @@ struct LdapUserProfileSource : public salhelper::SimpleReferenceObject ...@@ -50,17 +113,21 @@ struct LdapUserProfileSource : public salhelper::SimpleReferenceObject
LdapConnection mConnection; LdapConnection mConnection;
LdapUserProfileMap mProfileMap; LdapUserProfileMap mProfileMap;
rtl::OUString getComponentName() const;
rtl::OUString getConfigurationBasePath() const; rtl::OUString getConfigurationBasePath() const;
void getUserProfile(rtl::OUString const & aUser, LdapUserProfile & aProfile); void getUserProfile(rtl::OUString const & aUser, LdapUserProfile & aProfile);
}; };
typedef rtl::Reference< LdapUserProfileSource > LdapUserProfileSourceRef; typedef rtl::Reference< LdapUserProfileSource > LdapUserProfileSourceRef;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/** /**
Implementation of the XLayer interfaces for LdapUserProfileBe. Implementation of the XLayer interfaces for LdapUserProfileBe.
Class reads UserProfile setting form LDAP. Class reads UserProfile setting form LDAP.
The timestamp indicates the last modification time The timestamp indicates the last modification time
*/ */
class LdapUserProfileLayer : public cppu::WeakImplHelper2<backend::XLayer, class LdapUserProfileLayer : public cppu::ImplInheritanceHelper2<
apihelper::ReadOnlyPropertySetHelper,
backend::XLayer,
util::XTimeStamped> util::XTimeStamped>
{ {
public : public :
...@@ -88,6 +155,11 @@ typedef rtl::Reference< LdapUserProfileSource > LdapUserProfileSourceRef; ...@@ -88,6 +155,11 @@ typedef rtl::Reference< LdapUserProfileSource > LdapUserProfileSourceRef;
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ return mTimestamp; } { return mTimestamp; }
protected:
// PropertySetHelper
virtual cppu::IPropertyArrayHelper * SAL_CALL newInfoHelper();
virtual void SAL_CALL getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) const;
private : private :
struct ProfileData; struct ProfileData;
bool readProfile(); bool readProfile();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment