Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Accounting and Billing Portal
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[abportal] View of /src/main/java/eu/smartlm/abs/portal/data/query/ws/Moment.java
[abportal] / src / main / java / eu / smartlm / abs / portal / data / query / ws / Moment.java Repository:
ViewVC logotype

View of /src/main/java/eu/smartlm/abs/portal/data/query/ws/Moment.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (download) (annotate)
Wed Jul 28 10:05:51 2010 UTC (13 years, 9 months ago) by dgarcia
File size: 2486 byte(s)
First code commit
package eu.smartlm.abs.portal.data.query.ws;

import java.io.File;
import java.util.HashSet;
import java.util.Set;

import org.gridforum.x2003.urWg.UserIdentityDocument.UserIdentity;

import eu.smartlm.abs.portal.util.StringUtil; 
import eu.smartlm.schemas.x2009.x06.urec.ProductType;

public class Moment {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		EBSServiceClient client = new EBSServiceClient();
		try {
			File rampartDirectory = new File("/home/david/code-smartlm/smartlm-abs/trunk/smartlm-accountingandbilling-portal/target/smartlm-accountingandbilling-portal-1.0-SNAPSHOT/WEB-INF/conf/rampart");
			   System.out.println("Current dir : " + rampartDirectory.getCanonicalPath());
			   File clientPropertiesFile = new File("/home/david/code-smartlm/smartlm-abs/trunk/smartlm-accountingandbilling-portal/target/smartlm-accountingandbilling-portal-1.0-SNAPSHOT/WEB-INF/conf/rampart");
			   System.out.println("Clien properties : " + clientPropertiesFile.getCanonicalPath());
			   client.setUpConnection("", rampartDirectory.getCanonicalPath(), clientPropertiesFile.getCanonicalPath());
		} catch (Exception e) {}
			
		
		String startDate = "2009/02/03";
		String endDate = "2010/03/01";
		
		Set<UserIdentity> users = client.getListOfUsers(
								   						StringUtil.getDate(startDate, false),
								   						StringUtil.getDate(endDate, false), 
								   						new HashSet<String>(), 
								   						new HashSet<String>(), 
								   						new HashSet<String>(), 
								   						new HashSet<String>(), 
								   						new HashSet<String>(), 
								   						new HashSet<String>(), 
								   						new HashSet<String>());
		
		for(UserIdentity user : users) {
			System.out.println("USER: " + user.getLocalUserId());
		}
		
		Set<String> usersString = new HashSet<String>();
		usersString.add("usera");
		usersString.add("userc");
		usersString.add("smartlm");
		
		Set<ProductType> products = client.getListOfProducts(StringUtil.getDate(startDate, false),
															StringUtil.getDate(endDate, false),
															usersString, 
															new HashSet<String>(), 
									   						new HashSet<String>(), 
									   						new HashSet<String>(), 
									   						new HashSet<String>(), 
									   						new HashSet<String>(), 
									   						new HashSet<String>());
		
		for(ProductType product : products) {
			System.out.println("PRODUCT: " + product.getName());
		}
		
	}

}

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge