"[EMAIL PROTECTED]" wrote : You can use Component.getInstance().

Thanks:

  | 
  |     /* Really this should to be 15; it was extended to allow for the crypt 
to take place!
  |      * A bad side effect is the GUI is now allowing upto 50 length.
  |      * This routine will still fail if you put a password in of close to 50 
length as the crypt is longer that 50.
  |      * This really is an Aspect on the set/get Password! - ToDo
  |      */
  |     @NotNull(message="required")
  |     @Length(min = 5, max = 50)
  |     public String getPassword() {
  |             String theValueToReturn = null;
  |             if (password != null) {
  |                     EncryptionController anEncryptionController = 
(EncryptionController) Component.getInstance("encryptionController", true);
  |                     theValueToReturn = 
anEncryptionController.decrypt(password);
  |             }
  |             return theValueToReturn;
  |     }
  | 
  |     public void setPassword(String password) {
  |             if (password != null) {
  |                     EncryptionController anEncryptionController = 
(EncryptionController) Component.getInstance("encryptionController", true);
  |                     this.password = 
anEncryptionController.encrypt(password);
  |             } else {
  |                     this.password = null;
  |             }
  |     }
  | 
  |     @NotNull(message="required")
  |     @Length(min = 5, max = 15)
  |     @Pattern(regex = "^\\w*$")
  |     public String getUsername() {
  |             return username;
  |     }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006596#4006596

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006596
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to