PageRenderTime 90ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/servers/jain-slee/core/components/components/src/main/java/org/mobicents/slee/container/component/deployment/jaxb/descriptors/sbb/MSbbCMPField.java

http://mobicents.googlecode.com/
Java | 132 lines | 46 code | 17 blank | 69 comment | 6 complexity | 805377ec7fb4feb2a132cf7daa738b4a MD5 | raw file
Possible License(s): LGPL-3.0, GPL-3.0, LGPL-2.1, GPL-2.0, CC-BY-SA-3.0, CC0-1.0, Apache-2.0, BSD-3-Clause
  1. /*
  2. * JBoss, Home of Professional Open Source
  3. * Copyright 2011, Red Hat, Inc. and individual contributors
  4. * by the @authors tag. See the copyright.txt in the distribution for a
  5. * full listing of individual contributors.
  6. *
  7. * This is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU Lesser General Public License as
  9. * published by the Free Software Foundation; either version 2.1 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This software is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this software; if not, write to the Free
  19. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  20. * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  21. */
  22. /**
  23. * Start time:11:27:39 2009-01-20<br>
  24. * Project: mobicents-jainslee-server-core<br>
  25. *
  26. * @author <a href="mailto:baranowb@gmail.com">baranowb - Bartosz Baranowski
  27. * </a>
  28. * @author <a href="mailto:brainslog@gmail.com"> Alexandre Mendonca </a>
  29. */
  30. package org.mobicents.slee.container.component.deployment.jaxb.descriptors.sbb;
  31. import javax.slee.SbbID;
  32. import org.mobicents.slee.container.component.deployment.jaxb.slee.sbb.CmpField;
  33. import org.mobicents.slee.container.component.sbb.CMPFieldDescriptor;
  34. /**
  35. * Start time:11:27:39 2009-01-20<br>
  36. * Project: mobicents-jainslee-server-core<br>
  37. *
  38. * @author <a href="mailto:baranowb@gmail.com">baranowb - Bartosz Baranowski
  39. * </a>
  40. * @author <a href="mailto:brainslog@gmail.com"> Alexandre Mendonca </a>
  41. */
  42. public class MSbbCMPField implements CMPFieldDescriptor {
  43. /**
  44. * the description of the cmp field
  45. */
  46. private final String description;
  47. /**
  48. * the cmp field name
  49. */
  50. private final String cmpFieldName;
  51. /**
  52. * the sbb alias reference
  53. */
  54. private final String sbbAliasRef;
  55. /**
  56. * the id of the sbb referenced through the alias
  57. */
  58. private SbbID sbbRef = null;
  59. public MSbbCMPField(org.mobicents.slee.container.component.deployment.jaxb.slee11.sbb.CmpField cmpField) {
  60. this.description=cmpField.getDescription()==null?null:cmpField.getDescription().getvalue();
  61. this.cmpFieldName=cmpField.getCmpFieldName().getvalue();
  62. if (cmpField.getSbbAliasRef() == null) {
  63. this.sbbAliasRef = null;
  64. }
  65. else {
  66. this.sbbAliasRef=cmpField.getSbbAliasRef().getvalue();
  67. }
  68. }
  69. public MSbbCMPField(
  70. CmpField cmpField) {
  71. this.description=cmpField.getDescription()==null?null:cmpField.getDescription().getvalue();
  72. this.cmpFieldName=cmpField.getCmpFieldName().getvalue();
  73. if (cmpField.getSbbAliasRef() == null) {
  74. this.sbbAliasRef = null;
  75. }
  76. else {
  77. this.sbbAliasRef=cmpField.getSbbAliasRef().getvalue();
  78. }
  79. }
  80. /**
  81. * Retrieves the description of the cmp field
  82. * @return
  83. */
  84. public String getDescription() {
  85. return description;
  86. }
  87. /**
  88. * Retrieves the cmp field name
  89. * @return
  90. */
  91. public String getCmpFieldName() {
  92. return cmpFieldName;
  93. }
  94. /**
  95. * Retrieves the sbb alias reference
  96. * @return
  97. */
  98. public String getSbbAliasRef() {
  99. return sbbAliasRef;
  100. }
  101. /**
  102. * Retrieves the id of the sbb referenced through the alias
  103. * @return
  104. */
  105. public SbbID getSbbRef() {
  106. return sbbRef;
  107. }
  108. /**
  109. * Sets the id of the sbb referenced through the alias
  110. * @param sbbRef
  111. */
  112. public void setSbbRef(SbbID sbbRef) {
  113. this.sbbRef = sbbRef;
  114. }
  115. }