/** * This interface to be fleshed out later when error messages are fully externalized. * * @author Stan Silvert ssilvert@redhat.com (C) 2012 Red Hat Inc. */ @MessageBundle(projectCode = "TLIP") public interface KeycloakMessages { /** * The messages */ KeycloakMessages MESSAGES = Messages.getBundle(KeycloakMessages.class); }
/** * Returns the project code from the annotation on the element. * * @param interfaceElement the interface element that contains the annotation, * @return the project code from the annotation or {@code null}. */ public static String getProjectCode(final TypeElement interfaceElement) { String result = null; final MessageBundle messageBundle = interfaceElement.getAnnotation(MESSAGE_BUNDLE_ANNOTATION); final MessageLogger messageLogger = interfaceElement.getAnnotation(MESSAGE_LOGGER_ANNOTATION); if (messageBundle != null) { result = messageBundle.projectCode(); } else if (messageLogger != null) { result = messageLogger.projectCode(); } return result; }
@Override public void processTypeElement(final TypeElement annotation, final TypeElement element, final Collection<ExecutableElement> methods) { try { final String interfaceName = elementUtils().getBinaryName(element).toString(); final MessageLogger messageLogger = element.getAnnotation(MessageLogger.class); final MessageBundle messageBundle = element.getAnnotation(MessageBundle.class); if (messageLogger != null) { createClass(new MessageLoggerImplementor(interfaceName, messageLogger.projectCode(),extendsBasicLogger(element)), methods); } if (messageBundle != null) { createClass(new MessageBundleImplementor(interfaceName, messageBundle.projectCode()), methods); } } catch (IOException e) { logger().error(element, e); } catch (IllegalStateException e) { logger().error(element, e); } }
/** * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> * 3/12/12 * * Logger Code 13 * * each message id must be 6 digits long starting with 13, the 3rd digit should be 9 * * so 139000 to 139999 */ @MessageBundle(projectCode = "HQ") public class HornetQJBossBundle { }
/** * This interface to be fleshed out later when error messages are fully externalized. * * @author Stan Silvert ssilvert@redhat.com (C) 2012 Red Hat Inc. */ @MessageBundle(projectCode = "TLIP") public interface KeycloakMessages { /** * The messages */ KeycloakMessages MESSAGES = Messages.getBundle(KeycloakMessages.class); }
/** * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> * 3/12/12 * * Logger Code 10 * * each message id must be 6 digits long starting with 10, the 3rd digit should be 9 * * so 109000 to 109999 */ @MessageBundle(projectCode = "HQ") public class HornetQBootstrapBundle { }
/** * Informational CLI messages. These start from 19500 so as not to overlap with the logging messages defined in {@link Log} * Messages. * * @author Tristan Tarrant * @since 5.2 */ @MessageBundle(projectCode = "ISPN") public interface Messages { Messages MSG = org.jboss.logging.Messages.getBundle(Messages.class); @Message(value="Synchronized %d entries using migrator '%s' on cache '%s'", id=19500) String synchronizedEntries(long count, String cacheName, String migrator); @Message(value="Disconnected '%s' migrator source on cache '%s'", id=19501) String disonnectedSource(String migratorName, String cacheNname); @Message(value="Dumped keys for cache %s", id=19502) String dumpedKeys(String cacheName); }
/** * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> * 3/12/12 * * Logger Code 19 * * each message id must be 6 digits long starting with 19, the 3rd digit should be 9 * * so 199000 to 199999 */ @MessageBundle(projectCode = "HQ") public class HornetQRestBundle { }
/** * <p>JBoss Logging message bundle.</p> * * @author <a href="mailto:psilva@redhat.com">Pedro Silva</a> * */ @MessageBundle(projectCode = "JBAS") public interface PicketLinkMessages { /** * A logger with the category of the package name. */ PicketLinkMessages MESSAGES = Messages.getBundle(PicketLinkMessages.class); @Message(id = 12600, value = "No writer provided for element %s. Check if a writer is registered in PicketLinkSubsystemWriter.") IllegalStateException noModelElementWriterProvided(String modelEmement); @Message(id = 12601, value = "No IdentityConfiguration provided. Maybe you forgot to provide a @Producer method for the IdentityConfiguration.") IllegalStateException idmNoConfigurationProvided(); }
/** * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> * 3/12/12 * * Logger Code 20 * * each message id must be 6 digits long starting with 20, the 3rd digit should be 9 * * so 209000 to 209999 */ @MessageBundle(projectCode = "HQ") public interface HornetQUtilBundle { HornetQUtilBundle BUNDLE = Messages.getBundle(HornetQUtilBundle.class); @Message(id = 209000, value = "invalid property: {0}" , format = Message.Format.MESSAGE_FORMAT) HornetQIllegalStateException invalidProperty(String part); @Message(id = 209001, value = "Invalid type: {0}", format = Message.Format.MESSAGE_FORMAT) IllegalStateException invalidType(Byte type); @Message(id = 209002, value = "the specified string is too long ({0})", format = Message.Format.MESSAGE_FORMAT) IllegalStateException stringTooLong(Integer length); @Message(id = 209003, value = "Error instantiating codec {0}", format = Message.Format.MESSAGE_FORMAT) IllegalArgumentException errorCreatingCodec(@Cause Exception e, String codecClassName); }
/** * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> * 3/12/12 * * Logger Code 14 * * each message id must be 6 digits long starting with 14, the 3rd digit should be 9 * * so 149000 to 149999 */ @MessageBundle(projectCode = "HQ") public interface HornetQJournalBundle { HornetQJournalBundle BUNDLE = Messages.getBundle(HornetQJournalBundle.class); @Message(id = 149000, value = "failed to rename file {0} to {1}", format = Message.Format.MESSAGE_FORMAT) HornetQIOErrorException ioRenameFileError(String name, String newFileName); @Message(id = 149001, value = "Journal data belong to a different version", format = Message.Format.MESSAGE_FORMAT) HornetQIOErrorException journalDifferentVersion(); @Message(id = 149002, value = "Journal files version mismatch. You should export the data from the previous version and import it as explained on the user's manual", format = Message.Format.MESSAGE_FORMAT) HornetQIOErrorException journalFileMisMatch(); @Message(id = 149003, value = "File not opened", format = Message.Format.MESSAGE_FORMAT) HornetQIOErrorException fileNotOpened(); }
@MessageBundle(projectCode = "JBWEB") public interface WebMessages {
/** * @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a> * 3/12/12 * * Logger Code 14 * * each message id must be 6 digits long starting with 14, the 3rd digit should be 9 * * so 149000 to 149999 */ @MessageBundle(projectCode = "HQ") public interface HornetQJournalBundle { HornetQJournalBundle BUNDLE = Messages.getBundle(HornetQJournalBundle.class); @Message(id = 149000, value = "failed to rename file {0} to {1}", format = Message.Format.MESSAGE_FORMAT) HornetQIOErrorException ioRenameFileError(String name, String newFileName); @Message(id = 149001, value = "Journal data belong to a different version", format = Message.Format.MESSAGE_FORMAT) HornetQIOErrorException journalDifferentVersion(); @Message(id = 149002, value = "Journal files version mismatch. You should export the data from the previous version and import it as explained on the user's manual", format = Message.Format.MESSAGE_FORMAT) HornetQIOErrorException journalFileMisMatch(); @Message(id = 149003, value = "File not opened", format = Message.Format.MESSAGE_FORMAT) HornetQIOErrorException fileNotOpened(); }
@MessageBundle(projectCode = "JBWEB") public interface NamingMessages {
@MessageBundle(projectCode = "JBWEB") public interface JSONMessages {
@MessageBundle(projectCode = "JBWEB") public interface ELMessages {
@MessageBundle(projectCode = "JBWEB") public interface FileUploadMessages {
@MessageBundle(projectCode = "PBOXHTTP") public interface PicketBoxHTTPMessages {
@MessageBundle(projectCode = "PBOXCORE") public interface PicketBoxMessages {
@MessageBundle(projectCode = "HQ") public interface HornetQClientMessageBundle