com.anaptecs.jeaf.fwk.tools.scheduling.SchedulingDTD Maven / Gradle / Ivy
/*
* anaptecs GmbH, Burgstr. 96, 72764 Reutlingen, Germany
*
* Copyright 2004 - 2013 All rights reserved.
*/
package com.anaptecs.jeaf.fwk.tools.scheduling;
import java.io.IOException;
import java.net.URL;
import com.anaptecs.jeaf.tools.api.Tools;
public final class SchedulingDTD {
/**
* Name of the DTD file in which all elements of this class are defined.
*/
public static final String DTD_NAME = "Scheduling.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 SchedulingDTD( ) {
// 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 "ScheduledTask".
*/
public static final String SCHEDULED_TASK = "ScheduledTask";
/**
* Constant for the name of the attribute "serviceClass".
*/
public static final String SERVICE_CLASS = "serviceClass";
/**
* Constant for the name of the attribute "description".
*/
public static final String DESCRIPTION = "description";
/**
* Constant for the name of the element "OneTimeExecution".
*/
public static final String ONE_TIME_EXECUTION = "OneTimeExecution";
/**
* Constant for the name of the element "PeriodicExecution".
*/
public static final String PERIODIC_EXECUTION = "PeriodicExecution";
/**
* Constant for the name of the attribute "periodInitialStart".
*/
public static final String PERIOD_INITIAL_START = "periodInitialStart";
/**
* Constant for the name of the attribute "period".
*/
public static final String PERIOD = "period";
/**
* Constant for the name of the attribute "periodEndTime".
*/
public static final String PERIOD_END_TIME = "periodEndTime";
/**
* Constant for the name of the attribute "onceExecutionTime".
*/
public static final String ONCE_EXECUTION_TIME = "onceExecutionTime";
}