You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by tv...@apache.org on 2013/07/08 12:05:35 UTC
svn commit: r1500638 -
/turbine/fulcrum/trunk/security/nt/src/java/org/apache/fulcrum/security/nt/NTUserManagerImpl.java
Author: tv
Date: Mon Jul 8 10:05:35 2013
New Revision: 1500638
URL: http://svn.apache.org/r1500638
Log:
Adjust to API changes
Modified:
turbine/fulcrum/trunk/security/nt/src/java/org/apache/fulcrum/security/nt/NTUserManagerImpl.java
Modified: turbine/fulcrum/trunk/security/nt/src/java/org/apache/fulcrum/security/nt/NTUserManagerImpl.java
URL: http://svn.apache.org/viewvc/turbine/fulcrum/trunk/security/nt/src/java/org/apache/fulcrum/security/nt/NTUserManagerImpl.java?rev=1500638&r1=1500637&r2=1500638&view=diff
==============================================================================
--- turbine/fulcrum/trunk/security/nt/src/java/org/apache/fulcrum/security/nt/NTUserManagerImpl.java (original)
+++ turbine/fulcrum/trunk/security/nt/src/java/org/apache/fulcrum/security/nt/NTUserManagerImpl.java Mon Jul 8 10:05:35 2013
@@ -35,14 +35,14 @@ import com.tagish.auth.win32.NTSystem;
/**
* This implementation attempts to manager users against NT.
- *
+ *
* @author <a href="mailto:epugh@upstate.com">Eric Pugh</a>
* @version $Id$
*/
public class NTUserManagerImpl extends AbstractUserManager
{
@Override
- protected User persistNewUser(User user) throws DataBackendException
+ protected <T extends User> T persistNewUser(T user) throws DataBackendException
{
throw new RuntimeException("This method is not supported.");
}
@@ -51,7 +51,7 @@ public class NTUserManagerImpl extends A
* Retrieve a user from persistent storage using username as the key, and
* authenticate the user. The implementation may chose to authenticate to
* the server as the user whose data is being retrieved.
- *
+ *
* @param userName
* the name of the user.
* @param password
@@ -65,18 +65,18 @@ public class NTUserManagerImpl extends A
* if there is a problem accessing the storage.
*/
@Override
- public User getUser(String userName, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException
+ public <T extends User> T getUser(String userName, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException
{
- User user = getUserInstance(userName);
+ T user = getUserInstance(userName);
authenticate(user, password);
return user;
}
/**
* Check whether a specified user's account exists.
- *
+ *
* The login name is used for looking up the account.
- *
+ *
* @param user
* The user to be checked.
* @return true if the specified account exists
@@ -105,9 +105,9 @@ public class NTUserManagerImpl extends A
/**
* Check whether a specified user's account exists.
- *
+ *
* The login name is used for looking up the account.
- *
+ *
* @param userName
* The name of the user to be checked.
* @return true if the specified account exists
@@ -122,7 +122,7 @@ public class NTUserManagerImpl extends A
/**
* Retrieve a user from persistent storage using username as the key. Not
* supported currently.
- *
+ *
* @param userName
* the name of the user.
* @return an User object.
@@ -132,7 +132,7 @@ public class NTUserManagerImpl extends A
* if there is a problem accessing the storage.
*/
@Override
- public User getUser(String userName) throws UnknownEntityException, DataBackendException
+ public <T extends User> T getUser(String userName) throws UnknownEntityException, DataBackendException
{
throw new RuntimeException("Not supported by NT User Manager");
}
@@ -143,7 +143,7 @@ public class NTUserManagerImpl extends A
* exception was thrown. Additionally, if the User object is of type
* BasicUser or DynamicUser, then it will populate all the group information
* as well!
- *
+ *
* @param user
* an User object to authenticate.
* @param password
@@ -199,7 +199,7 @@ public class NTUserManagerImpl extends A
/**
* Removes an user account from the system. Not supported currently.
- *
+ *
* @param user
* the object describing the account to be removed.
* @throws DataBackendException
@@ -215,19 +215,19 @@ public class NTUserManagerImpl extends A
/**
* Creates new user account with specified attributes. Not supported
* currently.
- *
+ *
* @param user
* the object describing account to be created.
* @param password
* The password to use for the account.
- *
+ *
* @throws DataBackendException
* if there was an error accessing the data backend.
* @throws EntityExistsException
* if the user account already exists.
*/
@Override
- public User addUser(User user, String password) throws DataBackendException, EntityExistsException
+ public <T extends User> T addUser(T user, String password) throws DataBackendException, EntityExistsException
{
throw new RuntimeException("Not supported by NT User Manager");
}
@@ -235,7 +235,7 @@ public class NTUserManagerImpl extends A
/**
* Stores User attributes. The User is required to exist in the system. Not
* supported currently.
- *
+ *
* @param role
* The User to be stored.
* @throws DataBackendException
@@ -250,7 +250,7 @@ public class NTUserManagerImpl extends A
/**
* Retrieves all users defined in the system.
- *
+ *
* @return the names of all users defined in the system.
* @throws DataBackendException
* if there was an error accessing the data backend.