Show
Ignore:
Timestamp:
01.04.2010 17:10:36 (9 years ago)
Author:
ak19
Message:

Overriding init() method to work with recently modified (previously unused) additional constructor.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/gs3-webservices-java-client/trunk/src/GS3Fedora/org/greenstone/fedora/services/FedoraGS3Connection.java

    r21835 r21859  
    7070    private static final Logger LOG = Logger.getLogger( 
    7171            FedoraGS3Connection.class.getName()); 
    72          
     72     
     73    /** Default name of Fedora index */ 
     74    private static final String DEFAULT_FEDORA_INDEX = "BasicIndex"; 
     75     
    7376    /** Complete list of services that are supported our FedoraGS3 would   
    7477     * support if everything goes well. If a connection to FedoraGSearch 
     
    214217        // when performing searches for GS3 docs stored in Fedora's repository. 
    215218        this.gSearchIndexName = properties.getProperty( 
    216                 "gsearch.indexName", "FedoraIndex"); // default to FedoraIndex 
     219                "gsearch.indexName", DEFAULT_FEDORA_INDEX); // default to FedoraIndex 
    217220        properties.setProperty("gsearch.indexName", this.gSearchIndexName); 
    218221        // Create a connection to FedoraGSearch's web services: 
    219222        initSearchFunctionality(); 
    220223    } 
     224     
     225    /** Overridden init method to work with the 5 argument constructor, so that we can 
     226     * bypass using setInitialisationProperties() which works with a Properties map. 
     227    */ 
     228    protected void init(String protocol, String host, String port,  
     229            String fedoraServerUsername, String fedoraServerPassword)  
     230        throws ParserConfigurationException, MalformedURLException,  
     231            AuthenticationFailedException, RemoteException, Exception 
     232    { 
     233        super.init(protocol, host, port, fedoraServerUsername, fedoraServerPassword); 
     234        this.gSearchWSDLSuffix = "gsearch/services/FgsOperations?wsdl"; 
     235        this.gSearchWSDLURL = this.baseURL + this.gSearchWSDLSuffix; 
     236        this.gSearchIndexName = DEFAULT_FEDORA_INDEX; 
     237        initSearchFunctionality(); 
     238    }     
     239 
    221240 
    222241    /** Init method that instantiates a GSearchConnection object used