Add wisemapping support for import.

This commit is contained in:
Paulo Gustavo Veiga
2012-06-06 00:48:46 -03:00
parent 88b0efa859
commit 79b009e29e
23 changed files with 214 additions and 339 deletions

View File

@@ -41,6 +41,7 @@ final public class Utils {
return result;
}
@NotNull
public static User getUser() {
User result = null;
final Authentication auth = SecurityContextHolder.getContext().getAuthentication();
@@ -51,6 +52,10 @@ final public class Utils {
result = ((UserDetails)principal).getUser();
}
}
if(result==null){
throw new IllegalStateException("User could not be retrieved");
}
return result;
}
}