Project

General

Profile

« Previous | Next » 

Revision 5057

Added by daigle over 14 years ago

Add session validation to metacat tpc and workflow scheduler. Fix sanparks skin session management so it always uses the logged in session id.

View differences:

SchedulerService.java
166 166
        // schedule the job
167 167
		return scheduleJob(jobDAO.getName(), startTimeCal, endTimeCal, jobDAO.getIntervalValue(), 
168 168
				jobDAO.getIntervalUnit(), jobDAO.getClassName(), jobDAO.getGroupName(), 
169
				jobParams, username, groups);
169
				jobParams);
170 170
	}
171 171
	
172 172
	/**
......
195 195
	 * @return a message saying that the job was scheduled
196 196
	 */
197 197
	public String scheduleJob(String jobName, Calendar startCal, Calendar endCal, int intervalValue, 
198
			String intervalUnit, String jobClassName, String jobGroup, HashMap<String, String> jobParams, 
199
			String username, String[] groups) throws ServiceException {
198
			String intervalUnit, String jobClassName, String jobGroup, HashMap<String, String> jobParams) 
199
	throws ServiceException {
200 200
        
201 201
        Class<Job> jobClass = null;
202 202
        try {
......
219 219
					intervalValue, intervalUnit, jobParams);
220 220
		} catch (AccessException ae) {
221 221
			try {
222
				deleteJob(jobName, username, groups);
222
				deleteJob(jobName);
223 223
			} catch (Exception e) {
224 224
				// Not much we can do here but log this
225 225
				logMetacat.error("SchedulerService.scheduleJob - An access exception was thrown when writing job: "
......
425 425
	 *            the user's group name
426 426
	 * @return a message saying that the job was deleted
427 427
	 */
428
	public String deleteJob(String jobName, String username,
429
			String[] groups) throws ServiceException {
428
	public String deleteJob(String jobName) throws ServiceException {
430 429
		
431 430
		ScheduledJobDAO jobDAO = null;
432 431
		try {	
......
437 436
					+ "scheduled job : " + jobDAO.getName() + " because of db access issue: ", ae);
438 437
		}
439 438
		
440
		return deleteJob(jobDAO, username, groups);
439
		return deleteJob(jobDAO);
441 440
	}
442 441
	
443 442
	/**
......
450 449
	 *            the user's group name
451 450
	 * @return a message saying that the job was deleted
452 451
	 */
453
	public String deleteJob(ScheduledJobDAO jobDAO, String username,
454
			String[] groups) throws ServiceException {
452
	public String deleteJob(ScheduledJobDAO jobDAO) throws ServiceException {
455 453

  
456 454
		String groupName = "";
457 455
		try {

Also available in: Unified diff