Advertisement
Guest User

Untitled

a guest
Jul 30th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. package com.poc.osgiannotation.core.servlets;
  2.  
  3. import org.osgi.service.component.annotations.Activate;
  4. import org.osgi.service.component.annotations.Component;
  5. import org.osgi.service.component.annotations.Modified;
  6. import org.osgi.service.metatype.annotations.Designate;
  7.  
  8. @Component(service=UserAccountDetail.class,immediate=true)
  9. @Designate(ocd = UserConfiguration.class)
  10. public class UserAccountDetail {
  11.  
  12. private String userName;
  13.  
  14. private String password;
  15.  
  16. private Boolean isAdminUser;
  17.  
  18. private String memberOf;
  19.  
  20. private int validity;
  21.  
  22. private String[] environments;
  23.  
  24. @Activate @Modified
  25. protected void activate(final UserConfiguration userConfiguration) {
  26. userName = userConfiguration.getUserName();
  27. password = userConfiguration.getPassword();
  28. isAdminUser = userConfiguration.isAdminUser();
  29. memberOf = userConfiguration.getMemberOf();
  30. validity = userConfiguration.getValidity();
  31. environments = userConfiguration.getEnvironments();
  32. }
  33.  
  34. /**
  35. * @return the userName
  36. */
  37. public String getUserName() {
  38. return userName;
  39. }
  40.  
  41. /**
  42. * @return the password
  43. */
  44. public String getPassword() {
  45. return password;
  46. }
  47.  
  48. /**
  49. * @return the isAdminUser
  50. */
  51. public Boolean getIsAdminUser() {
  52. return isAdminUser;
  53. }
  54.  
  55. /**
  56. * @return the memberOf
  57. */
  58. public String getMemberOf() {
  59. return memberOf;
  60. }
  61.  
  62. /**
  63. * @return the validity
  64. */
  65. public int getValidity() {
  66. return validity;
  67. }
  68.  
  69. /**
  70. * @return the environments
  71. */
  72. public String[] getEnvironments() {
  73. return environments;
  74. }
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement