Java Doc for UserAdminServiceLDAPImpl.java in  » Portal » stringbeans-3.5 » com » nabhinc » portal » spi » impl » ldap » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » stringbeans 3.5 » com.nabhinc.portal.spi.impl.ldap 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.nabhinc.portal.spi.BaseUserServiceImpl
   com.nabhinc.portal.spi.impl.ldap.UserAdminServiceLDAPImpl

UserAdminServiceLDAPImpl
public class UserAdminServiceLDAPImpl extends BaseUserServiceImpl implements UserAdminService(Code)

User Admin service that works with a directory server accessed via the Java Naming and Directory Interface (JNDI) APIs. The following constraints are imposed on the data structure in the underlying directory server:



Field Summary
final public static  StringDEREF_ALIASES
     Constant that holds the name of the environment property for specifying the manner in which aliases should be dereferenced.
protected  StringUserInfoAttributes
     The attribute names.
protected  StringUserInfoAttributesLDAP
    
protected  StringalternateURL
     An alternate URL, to which, we should connect if connectionURL fails.
protected  Stringauthentication
    
protected  intconnectionAttempt
     The number of connection attempts.
protected  StringconnectionName
     The connection username for the server we will contact.
protected  StringconnectionPassword
     The connection password for the server we will contact.
protected  StringconnectionURL
     The connection URL for the server we will contact.
protected  DirContextcontext
     The directory context linking us to our directory server.
protected  StringcontextFactory
     The JNDI context factory used to acquire our InitialContext.
protected  intcurUserPattern
     The current user pattern to be used for lookup and binding of a user.
protected  StringderefAliases
     How aliases should be dereferenced during search operations.
final protected static  Stringname
     Descriptive information about this Realm implementation.
protected  Stringprotocol
     The protocol that will be used in the communication with the directory server.
protected  Stringreferrals
     How should we handle referrals? Microsoft Active Directory can't handle the default case, so an application authenticating against AD must set referrals to "follow".
protected  StringuserBase
     The base element for user searches.
protected  StringuserPattern
     The message format used to form the distinguished name of a user, with "{0}" marking the spot where the specified username goes.
protected  String[]userPatternArray
     A string of LDAP user patterns or paths, ":"-separated These will be used to form the distinguished name of a user, with "{0}" marking the spot where the specified username goes.
protected  MessageFormat[]userPatternFormatArray
     An array of MessageFormat objects associated with the current userPatternArray.
protected  StringuserSearch
     The message format used to search for a user, with "{0}" marking the spot where the username goes.
protected  MessageFormatuserSearchFormat
     The MessageFormat object associated with the current userSearch.
protected  booleanuserSubtree
    


Method Summary
protected  voidclose(DirContext context)
     Close any open connection to the directory server for this Realm.
public  voidcreateUser(User usr, String password, int[] roleIDs)
    
public  voiddeleteUsers(int[] userID)
    
public  voiddeleteUsers(String[] usernames)
    
protected  StringdoRFC2254Encoding(String inString)
     Given an LDAP search string, returns the string with certain characters escaped according to RFC 2254 guidelines.
public  StringgetAlternateURL()
     Getter for property alternateURL.
public  StringgetAuthentication()
     Return the type of authentication to use.
public  StringgetConnectionName()
     Return the connection username for this Realm.
public  StringgetConnectionPassword()
     Return the connection password for this Realm.
public  StringgetConnectionURL()
     Return the connection URL for this Realm.
public  StringgetContextFactory()
     Return the JNDI context factory for this Realm.
public  java.lang.StringgetDerefAliases()
     Return the derefAliases setting to be used.
protected  HashtablegetDirectoryContextEnvironment()
     Create our directory context configuration.
public  byte[]getIcon(String userName)
    
public  StringgetProtocol()
     Return the protocol to be used.
public  StringgetReferrals()
     Returns the current settings for handling JNDI referrals.
public  UsergetUser(int userID)
    
public  UsergetUser(String userName)
    
protected synchronized  AttributesgetUserAttributes(DirContext context, String userName)
     Return the attributes associated with the given user name.
public  StringgetUserBase()
     Return the base element for user searches.
public  intgetUserCount()
    
public  MapgetUserInfo(String userName)
    
public  StringgetUserInfoAttributes()
    
public  StringgetUserInfoAttributesLDAP()
    
public  StringgetUserNameFromEmail(String email)
    
public  StringgetUserPattern()
     Return the message format pattern for selecting users in this Realm.
public  StringgetUserSearch()
     Return the message format pattern for selecting users in this Realm.
public  booleangetUserSubtree()
     Return the "search subtree for users" flag.
public  ListgetUsers(int offset, int maxUsers, String orderby, boolean isDescending)
    
public  voidinit(ServerObjectConfig config)
     Caches server context and sets object properties.
protected  DirContextopen()
     Open (if necessary) and return a connection to the configured directory server for this Realm.
protected  String[]parseUserPatternString(String userPatternString)
     Given a string containing LDAP patterns for user locations (separated by parentheses in a pseudo-LDAP search string format - "(location1)(location2)", returns an array of those paths.
protected  voidrelease(DirContext context)
     Release our use of this connection so that it can be recycled.
public  voidsetAlternateURL(String alternateURL)
     Setter for property alternateURL.
public  voidsetAuthentication(String authentication)
     Set the type of authentication to use.
public  voidsetConnectionName(String connectionName)
     Set the connection username for this Realm.
public  voidsetConnectionPassword(String connectionPassword)
     Set the connection password for this Realm.
public  voidsetConnectionURL(String connectionURL)
     Set the connection URL for this Realm.
public  voidsetContextFactory(String contextFactory)
     Set the JNDI context factory for this Realm.
public  voidsetDerefAliases(java.lang.String derefAliases)
     Set the value for derefAliases to be used when searching the directory.
public  voidsetIcon(String userName, byte[] icon)
    
public  voidsetPassword(String userName, String password)
    
public  voidsetProtocol(String protocol)
     Set the protocol for this Realm.
public  voidsetReferrals(String referrals)
     How do we handle JNDI referrals? ignore, follow, or throw (see javax.naming.Context.REFERRAL for more information).
public  voidsetUserBase(String userBase)
     Set the base element for user searches.
public  voidsetUserInfoAttributeTypes(String attribTypes)
    
public  voidsetUserInfoAttributes(String uInfoAttribs)
    
public  voidsetUserInfoAttributesLDAP(String uInfoAttribsLDAP)
    
public  voidsetUserPattern(String userPattern)
     Set the message format pattern for selecting users in this Realm. This may be one simple pattern, or multiple patterns to be tried, separated by parentheses.
public  voidsetUserSearch(String userSearch)
     Set the message format pattern for selecting users in this Realm.
public  voidsetUserSubtree(boolean userSubtree)
     Set the "search subtree for users" flag.
public  voidupdateLastLogin(String userName)
    
public  voidupdateUser(User usr, int[] roleIDs)
    
public  voidupdateUserProfile(User usr)
    

Field Detail
DEREF_ALIASES
final public static String DEREF_ALIASES(Code)
Constant that holds the name of the environment property for specifying the manner in which aliases should be dereferenced.



UserInfoAttributes
protected String UserInfoAttributes(Code)
The attribute names.



UserInfoAttributesLDAP
protected String UserInfoAttributesLDAP(Code)



alternateURL
protected String alternateURL(Code)
An alternate URL, to which, we should connect if connectionURL fails.



authentication
protected String authentication(Code)
The type of authentication to use



connectionAttempt
protected int connectionAttempt(Code)
The number of connection attempts. If greater than zero we use the alternate url.



connectionName
protected String connectionName(Code)
The connection username for the server we will contact.



connectionPassword
protected String connectionPassword(Code)
The connection password for the server we will contact.



connectionURL
protected String connectionURL(Code)
The connection URL for the server we will contact.



context
protected DirContext context(Code)
The directory context linking us to our directory server.



contextFactory
protected String contextFactory(Code)
The JNDI context factory used to acquire our InitialContext. By default, assumes use of an LDAP server using the standard JNDI LDAP provider.



curUserPattern
protected int curUserPattern(Code)
The current user pattern to be used for lookup and binding of a user.



derefAliases
protected String derefAliases(Code)
How aliases should be dereferenced during search operations.



name
final protected static String name(Code)
Descriptive information about this Realm implementation.



protocol
protected String protocol(Code)
The protocol that will be used in the communication with the directory server.



referrals
protected String referrals(Code)
How should we handle referrals? Microsoft Active Directory can't handle the default case, so an application authenticating against AD must set referrals to "follow".



userBase
protected String userBase(Code)
The base element for user searches.



userPattern
protected String userPattern(Code)
The message format used to form the distinguished name of a user, with "{0}" marking the spot where the specified username goes.



userPatternArray
protected String[] userPatternArray(Code)
A string of LDAP user patterns or paths, ":"-separated These will be used to form the distinguished name of a user, with "{0}" marking the spot where the specified username goes. This is similar to userPattern, but allows for multiple searches for a user.



userPatternFormatArray
protected MessageFormat[] userPatternFormatArray(Code)
An array of MessageFormat objects associated with the current userPatternArray.



userSearch
protected String userSearch(Code)
The message format used to search for a user, with "{0}" marking the spot where the username goes.



userSearchFormat
protected MessageFormat userSearchFormat(Code)
The MessageFormat object associated with the current userSearch.



userSubtree
protected boolean userSubtree(Code)
Should we search the entire subtree for matching users?





Method Detail
close
protected void close(DirContext context)(Code)
Close any open connection to the directory server for this Realm.
Parameters:
  context - The directory context to be closed



createUser
public void createUser(User usr, String password, int[] roleIDs) throws EntityExistsException, MissingRequiredAttributeException, RemoteException(Code)



deleteUsers
public void deleteUsers(int[] userID) throws RemoteException(Code)



deleteUsers
public void deleteUsers(String[] usernames) throws RemoteException(Code)



doRFC2254Encoding
protected String doRFC2254Encoding(String inString)(Code)
Given an LDAP search string, returns the string with certain characters escaped according to RFC 2254 guidelines. The character mapping is as follows: char -> Replacement --------------------------- -> \2a ( -> \28 ) -> \29 \ -> \5c \0 -> \00
Parameters:
  inString - string to escape according to RFC 2254 guidelines String the escaped/encoded result



getAlternateURL
public String getAlternateURL()(Code)
Getter for property alternateURL. Value of property alternateURL.



getAuthentication
public String getAuthentication()(Code)
Return the type of authentication to use.



getConnectionName
public String getConnectionName()(Code)
Return the connection username for this Realm.



getConnectionPassword
public String getConnectionPassword()(Code)
Return the connection password for this Realm.



getConnectionURL
public String getConnectionURL()(Code)
Return the connection URL for this Realm.



getContextFactory
public String getContextFactory()(Code)
Return the JNDI context factory for this Realm.



getDerefAliases
public java.lang.String getDerefAliases()(Code)
Return the derefAliases setting to be used.



getDirectoryContextEnvironment
protected Hashtable getDirectoryContextEnvironment()(Code)
Create our directory context configuration. java.util.Hashtable the configuration for the directory context.



getIcon
public byte[] getIcon(String userName) throws RemoteException(Code)



getProtocol
public String getProtocol()(Code)
Return the protocol to be used.



getReferrals
public String getReferrals()(Code)
Returns the current settings for handling JNDI referrals.



getUser
public User getUser(int userID) throws NoSuchEntityException, RemoteException(Code)



getUser
public User getUser(String userName) throws NoSuchEntityException, RemoteException(Code)



getUserAttributes
protected synchronized Attributes getUserAttributes(DirContext context, String userName) throws NamingException(Code)
Return the attributes associated with the given user name.



getUserBase
public String getUserBase()(Code)
Return the base element for user searches.



getUserCount
public int getUserCount() throws RemoteException(Code)



getUserInfo
public Map getUserInfo(String userName) throws RemoteException, NoSuchEntityException(Code)



getUserInfoAttributes
public String getUserInfoAttributes()(Code)



getUserInfoAttributesLDAP
public String getUserInfoAttributesLDAP()(Code)



getUserNameFromEmail
public String getUserNameFromEmail(String email) throws NoSuchEntityException, RemoteException(Code)



getUserPattern
public String getUserPattern()(Code)
Return the message format pattern for selecting users in this Realm.



getUserSearch
public String getUserSearch()(Code)
Return the message format pattern for selecting users in this Realm.



getUserSubtree
public boolean getUserSubtree()(Code)
Return the "search subtree for users" flag.



getUsers
public List getUsers(int offset, int maxUsers, String orderby, boolean isDescending) throws RemoteException(Code)



init
public void init(ServerObjectConfig config) throws WebServiceException(Code)
Caches server context and sets object properties.



open
protected DirContext open() throws NamingException(Code)
Open (if necessary) and return a connection to the configured directory server for this Realm.
exception:
  NamingException - if a directory server error occurs



parseUserPatternString
protected String[] parseUserPatternString(String userPatternString)(Code)
Given a string containing LDAP patterns for user locations (separated by parentheses in a pseudo-LDAP search string format - "(location1)(location2)", returns an array of those paths. Real LDAP search strings are supported as well (though only the "|" "OR" type).
Parameters:
  userPatternString - - a string LDAP search paths surrounded byparentheses



release
protected void release(DirContext context)(Code)
Release our use of this connection so that it can be recycled.
Parameters:
  context - The directory context to release



setAlternateURL
public void setAlternateURL(String alternateURL)(Code)
Setter for property alternateURL.
Parameters:
  alternateURL - New value of property alternateURL.



setAuthentication
public void setAuthentication(String authentication)(Code)
Set the type of authentication to use.
Parameters:
  authentication - The authentication



setConnectionName
public void setConnectionName(String connectionName)(Code)
Set the connection username for this Realm.
Parameters:
  connectionName - The new connection username



setConnectionPassword
public void setConnectionPassword(String connectionPassword)(Code)
Set the connection password for this Realm.
Parameters:
  connectionPassword - The new connection password



setConnectionURL
public void setConnectionURL(String connectionURL)(Code)
Set the connection URL for this Realm.
Parameters:
  connectionURL - The new connection URL



setContextFactory
public void setContextFactory(String contextFactory)(Code)
Set the JNDI context factory for this Realm.
Parameters:
  contextFactory - The new context factory



setDerefAliases
public void setDerefAliases(java.lang.String derefAliases)(Code)
Set the value for derefAliases to be used when searching the directory.
Parameters:
  derefAliases - New value of property derefAliases.



setIcon
public void setIcon(String userName, byte[] icon) throws RemoteException(Code)



setPassword
public void setPassword(String userName, String password) throws RemoteException(Code)



setProtocol
public void setProtocol(String protocol)(Code)
Set the protocol for this Realm.
Parameters:
  protocol - The new protocol.



setReferrals
public void setReferrals(String referrals)(Code)
How do we handle JNDI referrals? ignore, follow, or throw (see javax.naming.Context.REFERRAL for more information).



setUserBase
public void setUserBase(String userBase)(Code)
Set the base element for user searches.
Parameters:
  userBase - The new base element



setUserInfoAttributeTypes
public void setUserInfoAttributeTypes(String attribTypes)(Code)



setUserInfoAttributes
public void setUserInfoAttributes(String uInfoAttribs)(Code)



setUserInfoAttributesLDAP
public void setUserInfoAttributesLDAP(String uInfoAttribsLDAP)(Code)



setUserPattern
public void setUserPattern(String userPattern)(Code)
Set the message format pattern for selecting users in this Realm. This may be one simple pattern, or multiple patterns to be tried, separated by parentheses. (for example, either "cn={0}", or "(cn={0})(cn={0},o=myorg)" Full LDAP search strings are also supported, but only the "OR", "|" syntax, so "(|(cn={0})(cn={0},o=myorg))" is also valid. Complex search strings with &, etc are NOT supported.
Parameters:
  userPattern - The new user pattern



setUserSearch
public void setUserSearch(String userSearch)(Code)
Set the message format pattern for selecting users in this Realm.
Parameters:
  userSearch - The new user search pattern



setUserSubtree
public void setUserSubtree(boolean userSubtree)(Code)
Set the "search subtree for users" flag.
Parameters:
  userSubtree - The new search flag



updateLastLogin
public void updateLastLogin(String userName) throws RemoteException(Code)



updateUser
public void updateUser(User usr, int[] roleIDs) throws EntityExistsException, MissingRequiredAttributeException, RemoteException(Code)



updateUserProfile
public void updateUserProfile(User usr) throws EntityExistsException, RemoteException(Code)



Fields inherited from com.nabhinc.portal.spi.BaseUserServiceImpl
protected String digest(Code)(Java Doc)
protected String digestEncoding(Code)(Java Doc)
protected MessageDigest md(Code)(Java Doc)

Methods inherited from com.nabhinc.portal.spi.BaseUserServiceImpl
protected boolean compareCredentials(String password, String credentials)(Code)(Java Doc)
protected String digest(String credentials)(Code)(Java Doc)
public String getDigest()(Code)(Java Doc)
public String getDigestEncoding()(Code)(Java Doc)
protected boolean hasMessageDigest()(Code)(Java Doc)
public void setDigest(String digest) throws NoSuchAlgorithmException(Code)(Java Doc)
public void setDigestEncoding(String charset)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.