--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.axyus.generator.pespj.utilities;
+
+import java.util.Properties;
+
+/**
+ *
+ * @author jp.tessier
+ */
+public abstract class PropertiesUtils {
+
+ /**
+ *
+ * @param props properties where find the value
+ * @param key property key
+ * @param defaultDir directory to return if null
+ * @return The value of the property or the default directory
+ */
+ public static String getDiretoryByProperty(Properties props, String key, String defaultDir) {
+ String directoryPath = props.getProperty(key);
+ if(directoryPath == null){
+ return defaultDir;
+ }
+ return directoryPath;
+ }
+
+}