Commit 37554a58 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Added new method that returns if password retrieval is supported.

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@2771 b35dd754-fafc-0310-a699-88a17e54d16e
parent 1f69f360
...@@ -438,4 +438,8 @@ public class LdapUserProvider implements UserProvider { ...@@ -438,4 +438,8 @@ public class LdapUserProvider implements UserProvider {
public boolean isReadOnly() { public boolean isReadOnly() {
return true; return true;
} }
public boolean supportsPasswordRetrieval() {
return false;
}
} }
\ No newline at end of file
/** /**
* $RCSfile$ * $RCSfile: DefaultUserProvider.java,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
...@@ -518,4 +518,8 @@ public class DefaultUserProvider implements UserProvider { ...@@ -518,4 +518,8 @@ public class DefaultUserProvider implements UserProvider {
public boolean isReadOnly() { public boolean isReadOnly() {
return false; return false;
} }
public boolean supportsPasswordRetrieval() {
return true;
}
} }
\ No newline at end of file
...@@ -227,4 +227,14 @@ public interface UserProvider { ...@@ -227,4 +227,14 @@ public interface UserProvider {
* @return true if the user provider is read-only. * @return true if the user provider is read-only.
*/ */
public boolean isReadOnly(); public boolean isReadOnly();
/**
* Returns true if this UserProvider is able to retrieve user passwords from
* the backend user store. If this operation is not supported then {@link #getPassword(String)}
* will throw an {@link UnsupportedOperationException} if invoked.
*
* @return true if this UserProvider is able to retrieve user passwords from the
* backend user store.
*/
public boolean supportsPasswordRetrieval();
} }
\ No newline at end of file
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