Package org.picketlink.idm.api

Examples of org.picketlink.idm.api.Attribute


                user.setFirstName(attrs.get(USER_FIRST_NAME).getValue().toString());
            }
            if (attrs.containsKey(USER_LAST_LOGIN_TIME)) {
                try {
                    Long lastLoginMillis = null;
                    Attribute lastLoginAttr = attrs.get(USER_LAST_LOGIN_TIME);
                    if (lastLoginAttr != null) {
                        Object lastLoginValue = lastLoginAttr.getValue();
                        if (lastLoginValue != null) {
                            lastLoginMillis = Long.parseLong(lastLoginValue.toString());
                        }
                    }
                    if (lastLoginMillis != null) {
View Full Code Here


    // Field displayName is not mandatory. We need to handle situation when user deleted displayName, which had been set
    // previously.
    // We need to ask if current User has displayName set previously and if yes, it needs to be removed.
    private void removeDisplayNameIfNeeded(AttributesManager am, User user) {
        try {
            Attribute attr = am.getAttribute(user.getUserName(), USER_DISPLAY_NAME);
            if (attr != null) {
                am.removeAttributes(user.getUserName(), new String[] { USER_DISPLAY_NAME });
            }
        } catch (IdentityException e) {
            handleException("Cannot remove displayName attribute of user: " + user.getUserName() + "; ", e);
View Full Code Here

                user.setFirstName(attrs.get(USER_FIRST_NAME).getValue().toString());
            }
            if (attrs.containsKey(USER_LAST_LOGIN_TIME)) {
                try {
                    Long lastLoginMillis = null;
                    Attribute lastLoginAttr = attrs.get(USER_LAST_LOGIN_TIME);
                    if (lastLoginAttr != null) {
                        Object lastLoginValue = lastLoginAttr.getValue();
                        if (lastLoginValue != null) {
                            lastLoginMillis = Long.parseLong(lastLoginValue.toString());
                        }
                    }
                    if (lastLoginMillis != null) {
View Full Code Here

    // Field displayName is not mandatory. We need to handle situation when user deleted displayName, which had been set
    // previously.
    // We need to ask if current User has displayName set previously and if yes, it needs to be removed.
    private void removeDisplayNameIfNeeded(AttributesManager am, User user) {
        try {
            Attribute attr = am.getAttribute(user.getUserName(), USER_DISPLAY_NAME);
            if (attr != null) {
                am.removeAttributes(user.getUserName(), new String[] { USER_DISPLAY_NAME });
            }
        } catch (Exception e) {
            handleException("Cannot remove displayName attribute of user: " + user.getUserName() + "; ", e);
View Full Code Here

                user.setFirstName(attrs.get(USER_FIRST_NAME).getValue().toString());
            }
            if (attrs.containsKey(USER_LAST_LOGIN_TIME)) {
                try {
                    Long lastLoginMillis = null;
                    Attribute lastLoginAttr = attrs.get(USER_LAST_LOGIN_TIME);
                    if (lastLoginAttr != null) {
                        Object lastLoginValue = lastLoginAttr.getValue();
                        if (lastLoginValue != null) {
                            lastLoginMillis = Long.parseLong(lastLoginValue.toString());
                        }
                    }
                    if (lastLoginMillis != null) {
View Full Code Here

    // Field displayName is not mandatory. We need to handle situation when user deleted displayName, which had been set
    // previously.
    // We need to ask if current User has displayName set previously and if yes, it needs to be removed.
    private void removeDisplayNameIfNeeded(AttributesManager am, User user) {
        try {
            Attribute attr = am.getAttribute(user.getUserName(), USER_DISPLAY_NAME);
            if (attr != null) {
                am.removeAttributes(user.getUserName(), new String[] { USER_DISPLAY_NAME });
            }
        } catch (Exception e) {
            handleException("Cannot remove displayName attribute of user: " + user.getUserName() + "; ", e);
View Full Code Here

                user.setFirstName(attrs.get(USER_FIRST_NAME).getValue().toString());
            }
            if (attrs.containsKey(USER_LAST_LOGIN_TIME)) {
                try {
                    Long lastLoginMillis = null;
                    Attribute lastLoginAttr = attrs.get(USER_LAST_LOGIN_TIME);
                    if (lastLoginAttr != null) {
                        Object lastLoginValue = lastLoginAttr.getValue();
                        if (lastLoginValue != null) {
                            lastLoginMillis = Long.parseLong(lastLoginValue.toString());
                        }
                    }
                    if (lastLoginMillis != null) {
View Full Code Here

    // Field displayName is not mandatory. We need to handle situation when user deleted displayName, which had been set
    // previously.
    // We need to ask if current User has displayName set previously and if yes, it needs to be removed.
    private void removeDisplayNameIfNeeded(AttributesManager am, User user) {
        try {
            Attribute attr = am.getAttribute(user.getUserName(), USER_DISPLAY_NAME);
            if (attr != null) {
                am.removeAttributes(user.getUserName(), new String[] { USER_DISPLAY_NAME });
            }
        } catch (Exception e) {
            handleException("Cannot remove displayName attribute of user: " + user.getUserName() + "; ", e);
View Full Code Here

      for (RoleType roleType : roleTypes)
      {
         roles.addAll(identitySession.getRoleManager().findRoles(username, roleType.getName()));
      }         
     
      Attribute enabledAttr = identitySession.getAttributesManager().getAttribute(username,
            ATTRIBUTE_NAME_USER_ENABLED);
     
      if (enabledAttr != null)
      {
         Object value = enabledAttr.getValue();
         if (value != null)
         {
            if (Boolean.class.isAssignableFrom(value.getClass()))
            {
               enabled = (Boolean) value;
View Full Code Here

        for (RoleType roleType : roleTypes) {
            roles.addAll(identitySession.getRoleManager().findRoles(username, roleType.getName()));
        }

        Attribute enabledAttr = identitySession.getAttributesManager().getAttribute(username,
                ATTRIBUTE_NAME_USER_ENABLED);

        if (enabledAttr != null) {
            Object value = enabledAttr.getValue();
            if (value != null) {
                if (Boolean.class.isAssignableFrom(value.getClass())) {
                    enabled = (Boolean) value;
                } else {
                    enabled = Boolean.valueOf((String) value);
View Full Code Here

TOP

Related Classes of org.picketlink.idm.api.Attribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.