com.anaptecs.jeaf.fwk.tools.systemmanagement.DynamicPropertiesDTD Maven / Gradle / Ivy
/*
* anaptecs GmbH, Burgstr. 96, 72764 Reutlingen, Germany
*
* Copyright 2004 - 2013 All rights reserved.
*/
package com.anaptecs.jeaf.fwk.tools.systemmanagement;
import java.io.IOException;
import java.net.URL;
import com.anaptecs.jeaf.tools.api.Tools;
public final class DynamicPropertiesDTD {
/**
* Name of the DTD file in which all elements of this class are defined.
*/
public static final String DTD_NAME = "DynamicProperties.dtd";
/**
* System id of the DTD MessageData.dtd. The constant contains the location of the DTD file "MessageData.dtd" that
* defines the structure of the XML files that contain the messages that are loaded to the message repository. The
* system id is needed by the XML parser to resolve the DTD of an XML document during the paring process if the
* DOCTYPE directive uses a relative URI to point to its DTD.
*/
public static final String SYSTEM_ID;
/**
* Static initializer is used to initialize ErrorCode objects that are used within this class, since these constants
* can not be defined in a special class with constant definitions in order to avoid circular loops.
*/
static {
try {
// Locate DTD that defines structure of message resources.
URL lMessageDTDLocation = Tools.getFileTools().locateResourceURL(DTD_NAME);
SYSTEM_ID = lMessageDTDLocation.toExternalForm();
}
// DTD was not found within the class path.
catch (IOException e) {
throw new RuntimeException(e.getLocalizedMessage(), e);
}
}
/**
* Private constructor in order to avoid creation of instances of this class.
*/
private DynamicPropertiesDTD( ) {
// Nothing to do.
}
/**
* String constant for root element of XML document that contains all configuration information for error messages
* that are managed by this repository class.
*/
public static final String ROOT = "Root";
/**
* Constant for the name of the element "ComponentInfo".
*/
public static final String COMPONENT_INFO = "ComponentInfo";
/**
* Constant for the name of the attribute "name".
*/
public static final String COMPONENT_NAME = "name";
/**
* Constant for the name of the attribute "basePackage".
*/
public static final String BASE_PACKAGE = "basePackage";
/**
* Constant for the name of the attribute "cacheTTL".
*/
public static final String CACHE_TTL = "cacheTTL";
/**
* Constant for the name of the element "Property".
*/
public static final String PROPERTY = "Property";
/**
* Constant for the name of the attribute "name".
*/
public static final String PROPERTY_NAME = "name";
/**
* Constant for the name of the attribute "defaultValue".
*/
public static final String DEFAULT_VALUE = "defaultValue";
/**
* Constant for the name of the attribute "comment".
*/
public static final String COMMENT = "comment";
/**
* Constant for the name of the attribute "type".
*/
public static final String TYPE = "type";
}