// Path: build-service/src/main/java/com/ccoe/build/utils/ServiceConfig.java
// public class ServiceConfig {
// 	private static java.util.Properties prop = new java.util.Properties();
// 
// 	private static void loadProperties() {
// 		// get class loader
// 		ClassLoader loader = ServiceConfig.class.getClassLoader();
// 		if (loader == null) {
// 			loader = ClassLoader.getSystemClassLoader();
// 		}
// 		// load application.properties located in WEB-INF/classes/
// 		String propFile = "application.properties";
// 		java.net.URL url = loader.getResource(propFile);
// 		try {
// 			prop.load(url.openStream());
// 		} catch (Exception e) {
// 			System.err
// 					.println("Could not load configuration file: " + propFile);
// 		}
// 	}
// 
// 	public static String get(String key) {
// 		return prop.getProperty(key);
// 	}
// 	
// 	public static int getInt(String key) {
// 		return getInt(key, "3600");
// 	}
// 	
// 	public static int getInt(String key, String defaultValue) {
// 		return Integer.parseInt(prop.getProperty(key, defaultValue));
// 	}
// 	
// 	// load the properties when class is accessed
// 	static {
// 		loadProperties();
// 	}
// }


import java.io.File;
import java.io.IOException;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ws.rs.Consumes;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.apache.commons.io.FileUtils;
import org.glassfish.jersey.media.multipart.BodyPart;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import com.ccoe.build.utils.ServiceConfig;
/*
Copyright [2013-2014] eBay Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/

package com.ccoe.build.service.track;





@Path("")
public class QueueService {

    private final SimpleDateFormat actionDatePattern = new SimpleDateFormat("MM-dd-yyyy_HH-mm-ss-SSS");
// Path: build-service/src/main/java/com/ccoe/build/utils/ServiceConfig.java
// public class ServiceConfig {
// 	private static java.util.Properties prop = new java.util.Properties();
// 
// 	private static void loadProperties() {
// 		// get class loader
// 		ClassLoader loader = ServiceConfig.class.getClassLoader();
// 		if (loader == null) {
// 			loader = ClassLoader.getSystemClassLoader();
// 		}
// 		// load application.properties located in WEB-INF/classes/
// 		String propFile = "application.properties";
// 		java.net.URL url = loader.getResource(propFile);
// 		try {
// 			prop.load(url.openStream());
// 		} catch (Exception e) {
// 			System.err
// 					.println("Could not load configuration file: " + propFile);
// 		}
// 	}
// 
// 	public static String get(String key) {
// 		return prop.getProperty(key);
// 	}
// 	
// 	public static int getInt(String key) {
// 		return getInt(key, "3600");
// 	}
// 	
// 	public static int getInt(String key, String defaultValue) {
// 		return Integer.parseInt(prop.getProperty(key, defaultValue));
// 	}
// 	
// 	// load the properties when class is accessed
// 	static {
// 		loadProperties();
// 	}
// }


// Path: build-service/src/main/java/com/ccoe/build/service/track/QueueService.java
import java.io.File;
import java.io.IOException;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ws.rs.Consumes;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.apache.commons.io.FileUtils;
import org.glassfish.jersey.media.multipart.BodyPart;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import com.ccoe.build.utils.ServiceConfig;

/*
Copyright [2013-2014] eBay Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/

package com.ccoe.build.service.track;





@Path("")
public class QueueService {

    private final SimpleDateFormat actionDatePattern = new SimpleDateFormat("MM-dd-yyyy_HH-mm-ss-SSS");
    private final File queueRoot = new File(ServiceConfig.get("queue_root_dir"));