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] Annotation 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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : dgarcia 1 package eu.smartlm.abs.portal.data.query.ws;
2 :    
3 :     import java.io.File;
4 :     import java.util.HashSet;
5 :     import java.util.Set;
6 :    
7 :     import org.gridforum.x2003.urWg.UserIdentityDocument.UserIdentity;
8 :    
9 :     import eu.smartlm.abs.portal.util.StringUtil;
10 :     import eu.smartlm.schemas.x2009.x06.urec.ProductType;
11 :    
12 :     public class Moment {
13 :    
14 :     /**
15 :     * @param args
16 :     */
17 :     public static void main(String[] args) {
18 :     // TODO Auto-generated method stub
19 :     EBSServiceClient client = new EBSServiceClient();
20 :     try {
21 :     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");
22 :     System.out.println("Current dir : " + rampartDirectory.getCanonicalPath());
23 :     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");
24 :     System.out.println("Clien properties : " + clientPropertiesFile.getCanonicalPath());
25 :     client.setUpConnection("", rampartDirectory.getCanonicalPath(), clientPropertiesFile.getCanonicalPath());
26 :     } catch (Exception e) {}
27 :    
28 :    
29 :     String startDate = "2009/02/03";
30 :     String endDate = "2010/03/01";
31 :    
32 :     Set<UserIdentity> users = client.getListOfUsers(
33 :     StringUtil.getDate(startDate, false),
34 :     StringUtil.getDate(endDate, false),
35 :     new HashSet<String>(),
36 :     new HashSet<String>(),
37 :     new HashSet<String>(),
38 :     new HashSet<String>(),
39 :     new HashSet<String>(),
40 :     new HashSet<String>(),
41 :     new HashSet<String>());
42 :    
43 :     for(UserIdentity user : users) {
44 :     System.out.println("USER: " + user.getLocalUserId());
45 :     }
46 :    
47 :     Set<String> usersString = new HashSet<String>();
48 :     usersString.add("usera");
49 :     usersString.add("userc");
50 :     usersString.add("smartlm");
51 :    
52 :     Set<ProductType> products = client.getListOfProducts(StringUtil.getDate(startDate, false),
53 :     StringUtil.getDate(endDate, false),
54 :     usersString,
55 :     new HashSet<String>(),
56 :     new HashSet<String>(),
57 :     new HashSet<String>(),
58 :     new HashSet<String>(),
59 :     new HashSet<String>(),
60 :     new HashSet<String>());
61 :    
62 :     for(ProductType product : products) {
63 :     System.out.println("PRODUCT: " + product.getName());
64 :     }
65 :    
66 :     }
67 :    
68 :     }

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

Powered By FusionForge