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

org.dbdoclet.doclet.util.ReleaseServices Maven / Gradle / Ivy

Go to download

dbdoclet is a javadoc doclet, which creates DocBook XML and UML class diagrams from javadoc comments.

The newest version!
package org.dbdoclet.doclet.util;

import java.util.Properties;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.dbdoclet.service.ResourceServices;

public class ReleaseServices {

	private static Log logger = LogFactory.getLog(ReleaseServices.class);

	Properties releaseProperties = null;

	public String getVersion() {
		return getReleaseProperties().getProperty("version");
	}

	private Properties getReleaseProperties() {

		if (releaseProperties == null) {
			
			releaseProperties = new Properties();
			
			try {
				releaseProperties.load(ResourceServices.getResourceAsStream("/release.properties"));
			} catch (Throwable oops) {
				logger.error("", oops);
			}
		}

		return releaseProperties;
	}

	public String getBuild() {
		return getReleaseProperties().getProperty("build");
	}

	public String getTimestamp() {
		return getReleaseProperties().getProperty("timestamp");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy