public void activate(String principal) throws IDMException { if(principal == null || principal.trim().length()==0) { throw new IllegalStateException("Principal should not be null!!"); } Identity identity = this.identityController.read(principal); if(identity == null) { throw new IDMException(IDMException.IDENITITY_NOT_FOUND); } identity.activate(); this.identityController.update(identity); }
identity.addAttribute(new IdentityAttribute("email", email)); identity.setInactiveCredential(credential); identity.activate(); Group standardGroup = this.groupController.read("standard"); identity.getGroups().add(standardGroup);