Project

General

Profile

1
/**
2
 *    '$RCSfile: ConfigurableEcogridEndPoint.java,v $'
3
 *
4
 *     '$Author: leinfelder $'
5
 *       '$Date: 2008/06/20 17:47:12 $'
6
 *   '$Revision: 1.1 $'
7
 *
8
 *  For Details: http://ecoinformatics.org
9
 *
10
 * Copyright (c) 2007 The Regents of the University of California.
11
 * All rights reserved.
12
 * 
13
 * Permission is hereby granted, without written agreement and without
14
 * license or royalty fees, to use, copy, modify, and distribute this
15
 * software and its documentation for any purpose, provided that the
16
 * above copyright notice and the following two paragraphs appear in
17
 * all copies of this software.
18
 * 
19
 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
20
 * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
21
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
22
 * IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY
23
 * OF SUCH DAMAGE.
24
 * 
25
 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
26
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
27
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
28
 * PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY
29
 * OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
30
 * UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
31
 */
32
package edu.ucsb.nceas.metacat.dataquery;
33

    
34
import org.ecoinformatics.datamanager.download.AuthenticatedEcogridEndPointInterface;
35

    
36
import edu.ucsb.nceas.metacat.service.PropertyService;
37
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
38

    
39
/**
40
 * This class implements AuthenticatedEcogridEndPointInterface 
41
 * and is configurable using the properties file.
42
 * Useful for switching to remote endpoints etc.
43
 * 
44
 * @author leinfelder
45
 *
46
 */
47
public class ConfigurableAuthenticatedEcogridEndPoint 
48
	extends ConfigurableEcogridEndPoint implements AuthenticatedEcogridEndPointInterface  {  
49
		
50
	private String metacatAuthenticatedEcogridEndPoint = null;
51
	private String sessionId = null;
52
	
53
	public ConfigurableAuthenticatedEcogridEndPoint() {
54
		
55
		try {
56
			metacatAuthenticatedEcogridEndPoint = PropertyService.getProperty("datamanager.endpoint.authenticatedquery");
57
		} catch (PropertyNotFoundException e) {
58
			e.printStackTrace();
59
		}
60
		
61
	}
62
	
63
	public ConfigurableAuthenticatedEcogridEndPoint(String sessionId) {
64
		this();
65
		this.sessionId = sessionId;
66
	}
67
	
68
	 /**
69
	    * Gets the end point which Metacat implements authenticated ecogrid interface.
70
	    * This end point will be used to handle ecogrid protocol
71
        * 
72
	    * @return end point url string
73
	    */
74
	   public String getMetacatAuthenticatedEcogridEndPoint()
75
	   {
76
		   return metacatAuthenticatedEcogridEndPoint;
77
	   }
78

    
79
	   public String getSessionId()
80
	   {
81
		   return sessionId;
82
	   }
83
	   
84
	   public void setSessionId(String id) {
85
		   sessionId = id;
86
	   }
87
       
88
}
89

    
(1-1/5)