All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.anaptecs.jeaf.xfun.annotations.MessageResource Maven / Gradle / Ivy

The newest version!
/**
 * Copyright 2004 - 2018 anaptecs GmbH, Burgstr. 96, 72764 Reutlingen, Germany
 *
 * All rights reserved.
 */
package com.anaptecs.jeaf.xfun.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.anaptecs.jeaf.xfun.api.XFun;

/**
 * Annotation can be used to mark classes as message resource class. JEAF X-Fun will loaded message resource that are
 * marked with this annotation already during startup to ensure that all messages are initialized when ever they are
 * needed.
 * 
 * There is no limit how many classes with this annotation are in your classpath. Usually classes with this annotation
 * are generated by JEAF Generator based on XML files that contain the message content.
 * 
 * In order to make configuration simpler JEAF's Maven Plugin can be used. The plugin analysis the projects classpath
 * for classes with this annotations and generates the required configuration file.
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface MessageResource {
  /**
   * Name of the resource that contains the names of all classes with the @MessageResource annotation.
   */
  String MESSAGE_RESOURCES_RESOURCE_NAME = "MessageResources";

  /**
   * Path under which the configuration file is stored.
   */
  String MESSAGE_RESOURCES_PATH = XFun.X_FUN_BASE_PATH + '/' + MessageResource.MESSAGE_RESOURCES_RESOURCE_NAME;

  /**
   * Name / path inside classpath of the XML file containing the message data that should be loaded.
   */
  String path();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy