Changeset 22370 for main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/FedoraServiceProxy.java
- Timestamp:
- 2010-07-09T15:00:11+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/FedoraServiceProxy.java
r22366 r22370 108 108 // Try to instantiate a Fedora dl handle 109 109 try { 110 // The properties file containing the initial digital library connection 111 // settings which get displayed in the connection dialog fields 112 //final File propertiesFile = new File("gs3fedora.properties"); 113 //fedoraServicesAPIA = new FedoraServicesAPIA(propertiesFile); 114 115 // Defaults. Read host and port from global.properties 110 // Fedora connection settings defaults. 111 // Read host and port from global.properties, since by default, we expect the Greenstone server to be used 116 112 Properties globalProperties = new Properties(); 117 113 globalProperties.load(Class.forName("org.greenstone.util.GlobalProperties").getClassLoader().getResourceAsStream("global.properties")); … … 120 116 String protocol = "http"; 121 117 String username = "fedoraIntCallUser"; //"fedoraAdmin" 122 String password = "changeme"; //"pounamu" 123 124 fedoraServicesAPIA = new FedoraServicesAPIA(protocol, host, Integer.parseInt(port), username, password); //"fedoraAdmin", "pounamu" 118 String password = "changeme"; //"<user password>" 119 120 // See if buildConfig.xml overrides any of the defaults 121 // info is the <serviceRack> Element from buildConfig.xml (extra_info are the Elements of collectionConfig.xml) 122 123 NodeList nodes = info.getElementsByTagName("fedoraConnection"); 124 if(nodes != null && nodes.getLength() > 0) { 125 126 Element fedoraElement = (Element)nodes.item(0); 127 if(fedoraElement.hasAttribute("protocol")) { 128 protocol = fedoraElement.getAttribute("protocol"); 129 } 130 if(fedoraElement.hasAttribute("host")) { 131 host = fedoraElement.getAttribute("host"); 132 } 133 if(fedoraElement.hasAttribute("port")) { 134 port = fedoraElement.getAttribute("port"); 135 } 136 if(fedoraElement.hasAttribute("username")) { 137 username = fedoraElement.getAttribute("username"); 138 } 139 if(fedoraElement.hasAttribute("password")) { 140 password = fedoraElement.getAttribute("password"); 141 } 142 } 143 144 fedoraServicesAPIA = new FedoraServicesAPIA(protocol, host, Integer.parseInt(port), username, password); 145 125 146 } catch(org.greenstone.fedora.services.FedoraGS3Exception.CancelledException e) { 126 // The user pressed cancel in the fedora services instantiation d lg147 // The user pressed cancel in the fedora services instantiation dialog 127 148 return false; 128 149 } catch(Exception e) {
Note:
See TracChangeset
for help on using the changeset viewer.