/jboss-as-7.1.1.Final/controller-client/src/main/java/org/jboss/as/controller/client/ControllerClientMessages.java

# · Java · 331 lines · 73 code · 34 blank · 224 comment · 0 complexity · c596ddd76d7c21d5ca499d39ef2c240d MD5 · raw file

  1. /*
  2. * JBoss, Home of Professional Open Source.
  3. * Copyright 2011, Red Hat, Inc., and individual contributors
  4. * as indicated by the @author tags. See the copyright.txt file in the
  5. * distribution for a 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. package org.jboss.as.controller.client;
  23. import org.jboss.as.controller.client.helpers.domain.DeploymentAction.Type;
  24. import org.jboss.as.controller.client.helpers.domain.RollbackCancelledException;
  25. import org.jboss.logging.Cause;
  26. import org.jboss.logging.Message;
  27. import org.jboss.logging.MessageBundle;
  28. import org.jboss.logging.Messages;
  29. import java.io.IOException;
  30. import java.net.URL;
  31. /**
  32. * Date: 05.11.2011
  33. *
  34. * @author <a href="mailto:jperkins@redhat.com">James R. Perkins</a>
  35. */
  36. @MessageBundle(projectCode = "JBAS")
  37. public interface ControllerClientMessages {
  38. /**
  39. * The messages
  40. */
  41. ControllerClientMessages MESSAGES = Messages.getBundle(ControllerClientMessages.class);
  42. /**
  43. * Creates an exception indicating after starting creation of the rollout plan no deployment actions can be added.
  44. *
  45. * @return a {@link IllegalStateException} for the error.
  46. */
  47. @Message(id = 10620, value = "Cannot add deployment actions after starting creation of a rollout plan")
  48. IllegalStateException cannotAddDeploymentAction();
  49. /**
  50. * Creates an exception indicating no deployment actions can be added after starting the creation of the rollout
  51. * plan.
  52. *
  53. * @return an {@link IllegalStateException} for the error.
  54. */
  55. @Message(id = 10621, value = "Cannot add deployment actions after starting creation of a rollout plan")
  56. IllegalStateException cannotAddDeploymentActionsAfterStart();
  57. /**
  58. * A message indicating that {@code first} cannot be converted to {@code second}.
  59. *
  60. * @param first the type that could not be converted.
  61. * @param second the type attempting to be converted to.
  62. *
  63. * @return the message.
  64. */
  65. @Message(id = 10622, value = "Cannot convert %s to %s")
  66. String cannotConvert(String first, String second);
  67. /**
  68. * Creates an exception indicating the deployment name could not be derived from the URL.
  69. *
  70. * @param url the URL to the deployment.
  71. *
  72. * @return an {@link IllegalArgumentException} for the error.
  73. */
  74. @Message(id = 10623, value = "Cannot derive a deployment name from %s -- use an overloaded method variant that takes a 'name' parameter")
  75. IllegalArgumentException cannotDeriveDeploymentName(URL url);
  76. /**
  77. * Creates an exception indicating the {@code DeploymentPlan} cannot be used because it was not created by this
  78. * manager.
  79. *
  80. * @return an {@link IllegalArgumentException} for the error.
  81. */
  82. @Message(id = 10624, value = "Cannot use a DeploymentPlan not created by this manager")
  83. IllegalArgumentException cannotUseDeploymentPlan();
  84. /**
  85. * Creates an exception indicating the channel is closed.
  86. *
  87. * @return an {@link IOException} for the error.
  88. */
  89. @Message(id = 10625, value = "Channel closed")
  90. IOException channelClosed(@Cause IOException cause);
  91. /**
  92. * A message indicating the a deployment with the {@code name} is already present in the domain.
  93. *
  94. * @param name the name of the deployment.
  95. *
  96. * @return the message.
  97. */
  98. @Message(id = 10626, value = "Deployment with name %s already present in the domain")
  99. String domainDeploymentAlreadyExists(String name);
  100. /**
  101. * The word failed.
  102. *
  103. * @return failed.
  104. */
  105. @Message(id = 10627, value = "failed")
  106. String failed();
  107. /**
  108. * Creates an exception indicating a global rollback is not compatible with a server restart.
  109. *
  110. * @return an {@link IllegalStateException} for the error.
  111. */
  112. @Message(id = 10628, value = "Global rollback is not compatible with a server restart")
  113. IllegalStateException globalRollbackNotCompatible();
  114. /**
  115. * Creates an exception indicating the graceful shutdown already configured with a timeout, represented by the
  116. * {@code timeout} parameter.
  117. *
  118. * @param timeout the already configured timeout.
  119. *
  120. * @return an {@link IllegalStateException} for the error.
  121. */
  122. @Message(id = 10629, value = "Graceful shutdown already configured with a timeout of %d ms")
  123. IllegalStateException gracefulShutdownAlreadyConfigured(long timeout);
  124. /**
  125. * A message indicating only one version of a deployment with a given unique name can exist in the domain.
  126. *
  127. * @param deploymentName the deployment name.
  128. * @param missingGroups the missing groups.
  129. *
  130. * @return the message.
  131. */
  132. @Message(id = 10630, value = "Only one version of deployment with a given unique name can exist in the domain. The deployment " +
  133. "plan specified that a new version of deployment %s replace an existing deployment with the same unique " +
  134. "name, but did not apply the replacement to all server groups. Missing server groups were: %s")
  135. String incompleteDeploymentReplace(String deploymentName, String missingGroups);
  136. /**
  137. * Creates an exception indicating the action type, represented by the {@code type} parameter, is invalid.
  138. *
  139. * @param type the invalid type.
  140. *
  141. * @return an {@link IllegalStateException} for the error.
  142. */
  143. @Message(id = 10631, value = "Invalid action type %s")
  144. IllegalStateException invalidActionType(Type type);
  145. /**
  146. * Creates an exception indicating the preceding action was not a
  147. * {@link org.jboss.as.controller.client.helpers.standalone.DeploymentAction.Type type}.
  148. *
  149. * @param type the type that preceding action should be.
  150. *
  151. * @return an {@link IllegalStateException} for the error.
  152. */
  153. @Message(id = 10632, value = "Preceding action was not a %s")
  154. IllegalStateException invalidPrecedingAction(Object type);
  155. /**
  156. * Creates an exception indicating the URL is not a valid URI.
  157. *
  158. * @param cause the cause of the error.
  159. * @param url the URL.
  160. *
  161. * @return an {@link IllegalArgumentException} for the error.
  162. */
  163. @Message(id = 10633, value = "%s is not a valid URI")
  164. IllegalArgumentException invalidUri(@Cause Throwable cause, URL url);
  165. /**
  166. * Creates an exception indicating the value is invalid and must be greater than the {@code minValue}.
  167. *
  168. * @param name the name for the value.
  169. * @param value the invalid value.
  170. * @param minValue the minimum value allowed.
  171. *
  172. * @return an {@link IllegalArgumentException} for the error.
  173. */
  174. @Message(id = 10634, value = "Illegal %s value %d -- must be greater than %d")
  175. IllegalArgumentException invalidValue(String name, int value, int minValue);
  176. /**
  177. * Creates an exception indicating the value is invalid and must be greater than the {@code minValue} and less than
  178. * the {@code maxValue}.
  179. *
  180. * @param name the name for the value.
  181. * @param value the invalid value.
  182. * @param minValue the minimum value allowed.
  183. * @param maxValue the maximum value allowed
  184. *
  185. * @return an {@link IllegalArgumentException} for the error.
  186. */
  187. @Message(id = 10635, value = "Illegal %s value %d -- must be greater than %d and less than %d")
  188. IllegalArgumentException invalidValue(String name, int value, int minValue, int maxValue);
  189. /**
  190. * Creates an exception indicating that screen real estate is expensive and displayUnits must be 5 characters or
  191. * less.
  192. *
  193. * @return a {@link RuntimeException} for the error.
  194. */
  195. @Message(id = 10636, value = "Screen real estate is expensive; displayUnits must be 5 characters or less")
  196. RuntimeException maxDisplayUnitLength();
  197. /**
  198. * Creates an exception indicating no active request found for the batch id.
  199. *
  200. * @param batchId the batch id.
  201. *
  202. * @return an {@link IOException} for the error.
  203. */
  204. @Message(id = 10637, value = "No active request found for %d")
  205. IOException noActiveRequest(int batchId);
  206. /**
  207. * A message indicating that no failure details were provided.
  208. *
  209. * @return the message.
  210. */
  211. @Message(id = 10638, value = "No failure details provided")
  212. String noFailureDetails();
  213. /**
  214. * Creates an exception indicating the {@code name} is not configured.
  215. *
  216. * @param name the name that is not configured.
  217. *
  218. * @return an {@link IllegalStateException} for the error.
  219. */
  220. @Message(id = 10639, value = "No %s is configured")
  221. IllegalStateException notConfigured(String name);
  222. /**
  223. * Creates an exception indicating the variable, represented by the {@code name} parameter, is {@code null}.
  224. *
  225. * @param name the name of the variable.
  226. *
  227. * @return an {@link IllegalArgumentException} for the error.
  228. */
  229. @Message(id = 10640, value = "%s is null")
  230. IllegalArgumentException nullVar(String name);
  231. /**
  232. * Creates an exception indicating the object is closed.
  233. *
  234. * @param name the name of the object.
  235. *
  236. * @return an {@link IllegalStateException} for the error.
  237. */
  238. @Message(id = 10641, value = "%s is closed")
  239. IllegalStateException objectIsClosed(String name);
  240. /**
  241. * Creates an exception with the operation outcome.
  242. *
  243. * @param outcome the operation outcome.
  244. *
  245. * @return a {@link RuntimeException} for the error.
  246. */
  247. @Message(id = 10642, value = "Operation outcome is %s")
  248. RuntimeException operationOutcome(String outcome);
  249. /**
  250. * Creates an exception indicating operations are not not allowed after content and deployment modifications.
  251. *
  252. * @param name the name for the operations.
  253. *
  254. * @return an {@link IllegalStateException} for the error.
  255. */
  256. @Message(id = 10643, value = "%s operations are not allowed after content and deployment modifications")
  257. IllegalStateException operationsNotAllowed(String name);
  258. /**
  259. * Creates an exception indicating the rollback was cancelled.
  260. *
  261. * @return a {@link RollbackCancelledException} for the error.
  262. */
  263. @Message(id = 10644, value = "Rollback was cancelled")
  264. RollbackCancelledException rollbackCancelled();
  265. /**
  266. * Creates an exception indicating the rollback was itself rolled back.
  267. *
  268. * @return a {@link RollbackCancelledException} for the error.
  269. */
  270. @Message(id = 10645, value = "Rollback was itself rolled back")
  271. RollbackCancelledException rollbackRolledBack();
  272. /**
  273. * Creates an exception indicating the rollback timed out.
  274. *
  275. * @return a {@link RollbackCancelledException} for the error.
  276. */
  277. @Message(id = 10646, value = "Rollback timed out")
  278. RollbackCancelledException rollbackTimedOut();
  279. /**
  280. * A message indicating the a deployment with the {@code name} is already present in the domain.
  281. *
  282. * @param name the name of the deployment.
  283. *
  284. * @return the message.
  285. */
  286. @Message(id = 10647, value = "Deployment with name %s already present in the server")
  287. String serverDeploymentAlreadyExists(String name);
  288. /**
  289. * Creates an exception indicating the action type, represented by the {@code type} parameter, is unknown.
  290. *
  291. * @param type the unknown type.
  292. *
  293. * @return an {@link IllegalStateException} for the error.
  294. */
  295. @Message(id = 10648, value = "Unknown action type %s")
  296. IllegalStateException unknownActionType(Object type);
  297. }