/utils/old-cim/Service.java

https://bitbucket.org/pau-minoves/opennaas · Java · 364 lines · 93 code · 50 blank · 221 comment · 8 complexity · 2981e79f6cc5f38ce26f058c84b05ef4 MD5 · raw file

  1. /**
  2. * This file was auto-generated by mofcomp -j version 1.0.0 on Wed Jan 12
  3. * 09:21:06 CET 2011.
  4. */
  5. package org.opennaas.extensions.router.model;
  6. import java.io.Serializable;
  7. import java.util.List;
  8. /**
  9. * This Class contains accessor and mutator methods for all properties defined in the CIM class Service as well as methods comparable to the
  10. * invokeMethods defined for this class. This Class implements the ServiceBean Interface. The CIM class Service is described as follows:
  11. *
  12. * A Service is a LogicalElement that represents the availability of functionality that can be managed. This functionality may be provided by a
  13. * seperately modeled entity such as a LogicalDevice or a SoftwareFeature, or both. The modeled Service typically provides only functionality required
  14. * for management of itself or the elements it affects.
  15. */
  16. public class Service extends EnabledLogicalElement implements Serializable {
  17. /* HOSTED SERVICE */
  18. /**
  19. * @return System associated with this Service through HostedService dependency.
  20. */
  21. public System getHostSystem() {
  22. return (System) this.getFirstFromAssociatedElementByType(HostedService.class);
  23. }
  24. /**
  25. *
  26. * @param host
  27. * System to be associated with this Service through HostedService dependency.
  28. */
  29. public void setHostSystem(System host) {
  30. if (host != null)
  31. HostedService.link(host, this);
  32. }
  33. /**
  34. * This constructor creates a ServiceBeanImpl Class which implements the ServiceBean Interface, and encapsulates the CIM class Service in a Java
  35. * Bean. The CIM class Service is described as follows:
  36. *
  37. * A Service is a LogicalElement that represents the availability of functionality that can be managed. This functionality may be provided by a
  38. * seperately modeled entity such as a LogicalDevice or a SoftwareFeature, or both. The modeled Service typically provides only functionality
  39. * required for management of itself or the elements it affects.
  40. */
  41. protected Service() {
  42. };
  43. /**
  44. * The following constants are defined for use with the ValueMap/Values qualified property systemCreationClassName.
  45. */
  46. private String systemCreationClassName;
  47. /**
  48. * This method returns the Service.systemCreationClassName property value. This property is described as follows:
  49. *
  50. * The CreationClassName of the scoping System.
  51. *
  52. * @return String current systemCreationClassName property value
  53. * @exception Exception
  54. */
  55. public String getSystemCreationClassName() {
  56. return this.systemCreationClassName;
  57. } // getSystemCreationClassName
  58. /**
  59. * This method sets the Service.systemCreationClassName property value. This property is described as follows:
  60. *
  61. * The CreationClassName of the scoping System.
  62. *
  63. * @param String
  64. * new systemCreationClassName property value
  65. * @exception Exception
  66. */
  67. public void setSystemCreationClassName(String systemCreationClassName) {
  68. this.systemCreationClassName = systemCreationClassName;
  69. } // setSystemCreationClassName
  70. /**
  71. * The following constants are defined for use with the ValueMap/Values qualified property systemName.
  72. */
  73. private String systemName;
  74. /**
  75. * This method returns the Service.systemName property value. This property is described as follows:
  76. *
  77. * The Name of the scoping System.
  78. *
  79. * @return String current systemName property value
  80. * @exception Exception
  81. */
  82. public String getSystemName() {
  83. return this.systemName;
  84. } // getSystemName
  85. /**
  86. * This method sets the Service.systemName property value. This property is described as follows:
  87. *
  88. * The Name of the scoping System.
  89. *
  90. * @param String
  91. * new systemName property value
  92. * @exception Exception
  93. */
  94. public void setSystemName(String systemName) {
  95. this.systemName = systemName;
  96. } // setSystemName
  97. /**
  98. * The following constants are defined for use with the ValueMap/Values qualified property creationClassName.
  99. */
  100. private String creationClassName;
  101. /**
  102. * This method returns the Service.creationClassName property value. This property is described as follows:
  103. *
  104. * CreationClassName indicates the name of the class or the subclass that is used in the creation of an instance. When used with the other key
  105. * properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
  106. *
  107. * @return String current creationClassName property value
  108. * @exception Exception
  109. */
  110. public String getCreationClassName() {
  111. return this.creationClassName;
  112. } // getCreationClassName
  113. /**
  114. * This method sets the Service.creationClassName property value. This property is described as follows:
  115. *
  116. * CreationClassName indicates the name of the class or the subclass that is used in the creation of an instance. When used with the other key
  117. * properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
  118. *
  119. * @param String
  120. * new creationClassName property value
  121. * @exception Exception
  122. */
  123. public void setCreationClassName(String creationClassName) {
  124. this.creationClassName = creationClassName;
  125. } // setCreationClassName
  126. // /**
  127. // * The following constants are defined for use with the ValueMap/Values
  128. // * qualified property name.
  129. // */
  130. // private String name;
  131. /**
  132. * This method returns the Service.name property value. This property is described as follows:
  133. *
  134. * The Name property uniquely identifies the Service and provides an indication of the functionality that is managed. This functionality is
  135. * described in more detail in the Description property of the object.
  136. *
  137. * @return String current name property value
  138. * @exception Exception
  139. */
  140. @Override
  141. public String getName() {
  142. return super.getName();
  143. } // getName
  144. /**
  145. * This method sets the Service.name property value. This property is described as follows:
  146. *
  147. * The Name property uniquely identifies the Service and provides an indication of the functionality that is managed. This functionality is
  148. * described in more detail in the Description property of the object.
  149. *
  150. * @param String
  151. * new name property value
  152. * @exception Exception
  153. */
  154. @Override
  155. public void setName(String name) {
  156. super.setName(name);
  157. } // setName
  158. /**
  159. * The following constants are defined for use with the ValueMap/Values qualified property primaryOwnerName.
  160. */
  161. private String primaryOwnerName;
  162. /**
  163. * This method returns the Service.primaryOwnerName property value. This property is described as follows:
  164. *
  165. * The name of the primary owner for the service, if one is defined. The primary owner is the initial support contact for the Service.
  166. *
  167. * @return String current primaryOwnerName property value
  168. * @exception Exception
  169. */
  170. public String getPrimaryOwnerName() {
  171. return this.primaryOwnerName;
  172. } // getPrimaryOwnerName
  173. /**
  174. * This method sets the Service.primaryOwnerName property value. This property is described as follows:
  175. *
  176. * The name of the primary owner for the service, if one is defined. The primary owner is the initial support contact for the Service.
  177. *
  178. * @param String
  179. * new primaryOwnerName property value
  180. * @exception Exception
  181. */
  182. public void setPrimaryOwnerName(String primaryOwnerName) {
  183. this.primaryOwnerName = primaryOwnerName;
  184. } // setPrimaryOwnerName
  185. /**
  186. * The following constants are defined for use with the ValueMap/Values qualified property primaryOwnerContact.
  187. */
  188. private String primaryOwnerContact;
  189. /**
  190. * This method returns the Service.primaryOwnerContact property value. This property is described as follows:
  191. *
  192. * A string that provides information on how the primary owner of the Service can be reached (for example, phone number, e-mail address, and so
  193. * on).
  194. *
  195. * @return String current primaryOwnerContact property value
  196. * @exception Exception
  197. */
  198. public String getPrimaryOwnerContact() {
  199. return this.primaryOwnerContact;
  200. } // getPrimaryOwnerContact
  201. /**
  202. * This method sets the Service.primaryOwnerContact property value. This property is described as follows:
  203. *
  204. * A string that provides information on how the primary owner of the Service can be reached (for example, phone number, e-mail address, and so
  205. * on).
  206. *
  207. * @param String
  208. * new primaryOwnerContact property value
  209. * @exception Exception
  210. */
  211. public void setPrimaryOwnerContact(String primaryOwnerContact) {
  212. this.primaryOwnerContact = primaryOwnerContact;
  213. } // setPrimaryOwnerContact
  214. /**
  215. * The following constants are defined for use with the ValueMap/Values qualified property StartMode.
  216. */
  217. @Deprecated
  218. public enum StartMode {
  219. AUTOMATIC,
  220. MANUAL
  221. }
  222. @Deprecated
  223. private StartMode startMode;
  224. /**
  225. * This method returns the Service.startMode property value. This property is described as follows:
  226. *
  227. * Note: The use of this element is deprecated in lieu of the EnabledDefault property that is inherited from EnabledLogicalElement. The
  228. * EnabledLogicalElement addresses the same semantics. The change to a uint16 data type was discussed when CIM V2.0 was defined. However, existing
  229. * V1.0 implementations used the string property. To remain compatible with those implementations, StartMode was grandfathered into the schema.
  230. * Use of the deprecated qualifier allows the maintenance of the existing property but also permits an improved, clarified definition using
  231. * EnabledDefault. Deprecated description: StartMode is a string value that indicates whether the Service is automatically started by a System, an
  232. * Operating System, and so on, or is started only upon request.
  233. *
  234. * @return String current startMode property value
  235. * @exception Exception
  236. */
  237. @Deprecated
  238. public StartMode getStartMode() {
  239. return this.startMode;
  240. } // getStartMode
  241. /**
  242. * This method sets the Service.startMode property value. This property is described as follows:
  243. *
  244. * Note: The use of this element is deprecated in lieu of the EnabledDefault property that is inherited from EnabledLogicalElement. The
  245. * EnabledLogicalElement addresses the same semantics. The change to a uint16 data type was discussed when CIM V2.0 was defined. However, existing
  246. * V1.0 implementations used the string property. To remain compatible with those implementations, StartMode was grandfathered into the schema.
  247. * Use of the deprecated qualifier allows the maintenance of the existing property but also permits an improved, clarified definition using
  248. * EnabledDefault. Deprecated description: StartMode is a string value that indicates whether the Service is automatically started by a System, an
  249. * Operating System, and so on, or is started only upon request.
  250. *
  251. * @param String
  252. * new startMode property value
  253. * @exception Exception
  254. */
  255. @Deprecated
  256. public void setStartMode(StartMode startMode) {
  257. this.startMode = startMode;
  258. } // setStartMode
  259. /**
  260. * The following constants are defined for use with the ValueMap/Values qualified property started.
  261. */
  262. private boolean started;
  263. /**
  264. * This method returns the Service.started property value. This property is described as follows:
  265. *
  266. * Started is a Boolean that indicates whether the Service has been started (TRUE), or stopped (FALSE).
  267. *
  268. * @return boolean current started property value
  269. * @exception Exception
  270. */
  271. public boolean isStarted() {
  272. return this.started;
  273. } // getStarted
  274. /**
  275. * This method sets the Service.started property value. This property is described as follows:
  276. *
  277. * Started is a Boolean that indicates whether the Service has been started (TRUE), or stopped (FALSE).
  278. *
  279. * @param boolean new started property value
  280. * @exception Exception
  281. */
  282. public void setStarted(boolean started) {
  283. this.started = started;
  284. } // setStarted
  285. /**
  286. * Adds a new ProvidesEndpoint association between a given ProtocolEndpoint and this element.
  287. *
  288. * @param protocolEndpoint
  289. */
  290. public void addProtocolEndpoint(ProtocolEndpoint protocolEndpoint) {
  291. if (protocolEndpoint != null)
  292. ProvidesEndpoint.link(this, protocolEndpoint);
  293. }
  294. /**
  295. * Removes the ProvidesEndpoint association between the given ProtocolEndpoint and this element.
  296. *
  297. * @param protocolEndpoint
  298. */
  299. public void removeProtocolEndpoint(ProtocolEndpoint protocolEndpoint) {
  300. if (protocolEndpoint != null) {
  301. Association a = this.getFirstToAssociationByTypeAndElement(ProvidesEndpoint.class, protocolEndpoint);
  302. if (a != null)
  303. a.unlink();
  304. }
  305. }
  306. /**
  307. * Returns the list of all ProtocolEndpoint associated to this element.
  308. *
  309. * @return
  310. */
  311. public List<ProtocolEndpoint> getProtocolEndpoint() {
  312. return (List<ProtocolEndpoint>) this.getToAssociatedElementsByType(ProvidesEndpoint.class);
  313. }
  314. } // Class Service