⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ldapvcardprovider.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_15) on Thu Aug 28 21:12:45 PDT 2008 --><TITLE>LdapVCardProvider (Openfire 3.6.0a Javadoc)</TITLE><META NAME="keywords" CONTENT="org.jivesoftware.openfire.ldap.LdapVCardProvider class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="LdapVCardProvider (Openfire 3.6.0a Javadoc)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Openfire 3.6.0a Javadoc</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/jivesoftware/openfire/ldap/LdapUserProvider.html" title="class in org.jivesoftware.openfire.ldap"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?org/jivesoftware/openfire/ldap/LdapVCardProvider.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="LdapVCardProvider.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.jivesoftware.openfire.ldap</FONT><BR>Class LdapVCardProvider</H2><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.jivesoftware.openfire.ldap.LdapVCardProvider</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/jivesoftware/openfire/vcard/VCardProvider.html" title="interface in org.jivesoftware.openfire.vcard">VCardProvider</A>, <A HREF="../../../../org/jivesoftware/util/PropertyEventListener.html" title="interface in org.jivesoftware.util">PropertyEventListener</A></DD></DL><HR><DL><DT><PRE>public class <B>LdapVCardProvider</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../org/jivesoftware/openfire/vcard/VCardProvider.html" title="interface in org.jivesoftware.openfire.vcard">VCardProvider</A>, <A HREF="../../../../org/jivesoftware/util/PropertyEventListener.html" title="interface in org.jivesoftware.util">PropertyEventListener</A></DL></PRE><P>Read-only LDAP provider for vCards.Configuration consists of adding a provider:<p/> <tt>provider.vcard.className = org.jivesoftware.openfire.ldap.LdapVCardProvider</tt> and an xml vcard-mapping in the system properties.<p/> The vcard attributes can be configured by adding an <code>attrs="attr1,attr2"</code> attribute to the vcard elements.<p/> Arbitrary text can be used for the element values as well as <code>MessageFormat</code> style placeholders for the ldap attributes. For example, if you wanted to map the LDAP attribute <code>displayName</code> to the vcard element <code>FN</code>, the xml nippet would be:<br><pre>&lt;FN attrs=&quot;displayName&quot;&gt;{0}&lt;/FN&gt;</pre><p/> The vCard XML must be escaped in CDATA and must also be well formed. It is the exact XML this provider will send to a client after after stripping <code>attr</code> attributes and populating the placeholders with the data retrieved from LDAP. This system should be flexible enough to handle any client's vCard format. An example mapping follows.<br> <tt>ldap.vcard-mapping =        &lt;![CDATA[                &lt;vCard xmlns='vcard-temp'&gt;                        &lt;FN attrs=&quot;displayName&quot;&gt;{0}&lt;/FN&gt;                        &lt;NICKNAME attrs=&quot;uid&quot;&gt;{0}&lt;/NICKNAME&gt;                        &lt;BDAY attrs=&quot;dob&quot;&gt;{0}&lt;/BDAY&gt;                        &lt;ADR&gt;                                &lt;HOME/&gt;                                &lt;EXTADR&gt;Ste 500&lt;/EXTADR&gt;                                &lt;STREET&gt;317 SW Alder St&lt;/STREET&gt;                                &lt;LOCALITY&gt;Portland&lt;/LOCALITY&gt;                                &lt;REGION&gt;Oregon&lt;/REGION&gt;                                &lt;PCODE&gt;97204&lt;/PCODE&gt;                                &lt;CTRY&gt;USA&lt;/CTRY&gt;                        &lt;/ADR&gt;                        &lt;TEL&gt;                                &lt;HOME/&gt;                                &lt;VOICE/&gt;                                &lt;NUMBER attrs=&quot;telephoneNumber&quot;&gt;{0}&lt;/NUMBER&gt;                        &lt;/TEL&gt;                        &lt;EMAIL&gt;                                &lt;INTERNET/&gt;                                &lt;USERID attrs=&quot;mail&quot;&gt;{0}&lt;/USERID&gt;                        &lt;/EMAIL&gt;                        &lt;TITLE attrs=&quot;title&quot;&gt;{0}&lt;/TITLE&gt;                        &lt;ROLE attrs=&quot;&quot;&gt;{0}&lt;/ROLE&gt;                        &lt;ORG&gt;                                &lt;ORGNAME attrs=&quot;o&quot;&gt;{0}&lt;/ORGNAME&gt;                                &lt;ORGUNIT attrs=&quot;&quot;&gt;{0}&lt;/ORGUNIT&gt;                        &lt;/ORG&gt;                        &lt;URL attrs=&quot;labeledURI&quot;&gt;{0}&lt;/URL&gt;                        &lt;DESC attrs=&quot;uidNumber,homeDirectory,loginShell&quot;&gt;                                uid: {0} home: {1} shell: {2}                        &lt;/DESC&gt;                &lt;/vCard&gt;        ]]&gt; </tt> <p/> An easy way to get the vcard format your client needs, assuming you've been using the database store, is to do a <code>SELECT value FROM ofVCard WHERE username='some_user'</code> in your favorite sql querier and paste the result into the <code>vcard-mapping</code> (don't forget the CDATA).<P><P><DL><DT><B>Author:</B></DT>  <DD>rkelly</DD></DL><HR><P><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/ldap/LdapVCardProvider.html#LdapVCardProvider()">LdapVCardProvider</A></B>()</CODE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -