Package oracle.security.idm

Examples of oracle.security.idm.User


            IdentityStoreService service =
                  jpsCtx.getServiceInstance(IdentityStoreService.class);
           
            idStore = service.getIdmStore();

            User user = idStore.searchUser(secCntx.getUserName());
            if (user != null) {
                userProfile = user.getUserProfile();
                PropertySet propSet = userProfile.getAllUserProperties();

                Iterator it = propSet.getAll();
                while (it.hasNext()) {
                    Property prop = (Property)it.next();
View Full Code Here


          Property prop = new Property("samaccountname",this.createUser);
  //        Property prop2 = new Property("userAccountControl",66048);
          propSet.put(prop);
  //        propSet.put(prop2);
          
          User newUser = idStore.getUserManager()
                .createUser(this.createUser,
                            this.createUserPassword.toCharArray(),
                            propSet);
          if ( createUserRole != null  ) {
              SimpleSearchFilter filter =
                        idStore.getSimpleSearchFilter(RoleProfile.NAME,
                                                      SimpleSearchFilter.TYPE_EQUAL,
                                                      this.createUserRole);
              SearchParameters sp = new SearchParameters(filter,
                                                         SearchParameters.SEARCH_ROLES_ONLY);
              SearchResponse response = idStore.search(sp);
              if (response.hasNext()) {
                Role role = (Role)response.next();
                idStore.getRoleManager().grantRole(role, newUser.getPrincipal());
              }
          }
          ModProperty userAccountControl =
              new ModProperty("userAccountControl",
                              "66048",
                              ModProperty.REPLACE );
         
          newUser.getUserProfile().setProperty(userAccountControl);
         
          FacesMessage fm = new FacesMessage("Success");
          fm.setSeverity(FacesMessage.SEVERITY_INFO);
          FacesContext context = FacesContext.getCurrentInstance();
          context.addMessage(null, fm);
View Full Code Here

          SearchParameters sp = new SearchParameters(filter,
                                                     SearchParameters.SEARCH_USERS_ONLY);
          try {
            SearchResponse response = idStore.search(sp);
            if (response.hasNext()) {
              User user = (User)response.next();
              if (user != null) {
                UserProfile userProfile = user.getUserProfile();
                this.searchUserResult = userProfile.toString();
              }
            } 
          } catch (IMException e) {
                e.printStackTrace();
View Full Code Here

TOP

Related Classes of oracle.security.idm.User

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.