Subversion Repositories XServices

Rev

Rev 42 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 42 Rev 52
Line 45... Line 45...
45
import net.brutex.sbm.wsclient.Auth;
45
import net.brutex.sbm.wsclient.Auth;
46
import net.brutex.sbm.wsclient.Field;
46
import net.brutex.sbm.wsclient.Field;
47
import net.brutex.sbm.wsclient.NameValue;
47
import net.brutex.sbm.wsclient.NameValue;
48
import net.brutex.sbm.wsclient.Note;
48
import net.brutex.sbm.wsclient.Note;
49
import net.brutex.sbm.wsclient.ObjectFactory;
49
import net.brutex.sbm.wsclient.ObjectFactory;
-
 
50
import net.brutex.sbm.wsclient.ReportCategory;
-
 
51
import net.brutex.sbm.wsclient.ReportInfo;
-
 
52
import net.brutex.sbm.wsclient.ReportResult;
-
 
53
import net.brutex.sbm.wsclient.ReportsFilter;
-
 
54
import net.brutex.sbm.wsclient.RunReportResult;
50
import net.brutex.sbm.wsclient.TTItem;
55
import net.brutex.sbm.wsclient.TTItem;
51
import net.brutex.sbm.wsclient.TableData;
56
import net.brutex.sbm.wsclient.TableData;
52
import net.brutex.sbm.wsclient.TableType;
57
import net.brutex.sbm.wsclient.TableType;
53
import net.brutex.sbm.wsclient.Value;
58
import net.brutex.sbm.wsclient.Value;
Line 137... Line 142...
137
							SBMConnectorPlugin.PLUGIN_ID, e.getMessage(), e));
142
							SBMConnectorPlugin.PLUGIN_ID, e.getMessage(), e));
138
		} 
143
		} 
139
		return list;
144
		return list;
140
	}
145
	}
Line -... Line 146...
-
 
146
	
-
 
147
	public List<TTItem> getTTItemsByReport(String reportuuid) throws CoreException {
-
 
148
		List<TTItem> list = new ArrayList<TTItem>();
-
 
149
		try {
-
 
150
			RunReportResult result = port.runReport(
-
 
151
					getAuth(), of.createQueryRange(), reportuuid, null, null, null, null, null, null,
-
 
152
					null, null, null, null, null);
-
 
153
			List<ReportResult> resultlist = result.getResult();
-
 
154
			for(ReportResult r : resultlist) {
-
 
155
				list.add(port.getItem( getAuth(), r.getItemId().getValue(), null));
-
 
156
			}
-
 
157
		} catch (AEWebservicesFaultFault e) {
-
 
158
			throw new CoreException(
-
 
159
					RepositoryStatus.createInternalError(
-
 
160
							SBMConnectorPlugin.PLUGIN_ID, e.getMessage(), e));
-
 
161
		} 
-
 
162
		return list;
-
 
163
	}
-
 
164
	
-
 
165
	
-
 
166
	public List<ReportInfo> getReportList(String solutionname) throws CoreException {
-
 
167
		ReportsFilter filter = of.createReportsFilter();
-
 
168
		List<ReportInfo> reportlist = new ArrayList<ReportInfo>();
-
 
169
		filter.setSolutionName(of.createSolutionDataName(solutionname));
-
 
170
		filter.setReportCategory(ReportCategory.USERREPORTS); //Limit this for now, because we execute by uuid only
-
 
171
		try {
-
 
172
			reportlist = port.getReports(getAuth(), null, filter).getReport();
-
 
173
		} catch (AEWebservicesFaultFault e) {
-
 
174
			throw new CoreException(
-
 
175
					RepositoryStatus.createInternalError(
-
 
176
							SBMConnectorPlugin.PLUGIN_ID, e.getMessage(), e));
-
 
177
		}
-
 
178
		
-
 
179
		return reportlist;
-
 
180
	}
141
	
181
	
142
	public List<String> getResultCount(String tablename, String sql) throws CoreException {
182
	public List<String> getResultCount(String tablename, String sql) throws CoreException {
143
		List<TTItem> list = new ArrayList<TTItem>();
183
		List<TTItem> list = new ArrayList<TTItem>();
144
		List<String> idlist = new ArrayList<String>();
184
		List<String> idlist = new ArrayList<String>();
145
		try {
185
		try {