- public final static String getUsername() {
- Subject subject = Subject.getSubject(AccessController.getContext());
- Principal principal = subject.getPrincipals(X500Principal.class)
- .iterator().next();
- return principal.getName();
-
- }
-
- public final static String getUsername(User user) {
- String cn = getProperty(user, UserAdminConstants.KEY_CN);
- if (isEmpty(cn))
- cn = getProperty(user, UserAdminConstants.KEY_UID);
- return cn;
- }
-
- public final static String getProperty(Role role, String key) {
- Object obj = role.getProperties().get(key);
- if (obj != null)
- return (String) obj;
- else
- return "";
- }
-
- public final static String getDefaultCn(String firstName, String lastName) {
- return (firstName.trim() + " " + lastName.trim() + " ").trim();
- }
-
- public final static void beginTransactionIfNeeded(
+ /*
+ * INTERNAL METHODS: Below methods are meant to stay here and are not part
+ * of a potential generic backend to manage the useradmin
+ */
+ /** Easily notify the ActiveWindow that the transaction had a state change */
+ public final static void notifyTransactionStateChange(