Changeset 14402
- Timestamp:
- 2007-09-03T13:39:51+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/src/java/org/greenstone/gsdl3/service/Authentication.java
r14349 r14402 2 2 3 3 import org.greenstone.gsdl3.util.GSXML; 4 import org.greenstone.gsdl3.util.GSPath;5 4 import org.greenstone.gsdl3.util.DerbyWrapper; 6 5 import org.greenstone.gsdl3.util.UserQueryResult; 7 6 import org.greenstone.gsdl3.util.UserTermInfo; 8 import org.greenstone.gsdl3.util.GlobalProperties;9 7 10 8 import org.w3c.dom.Element; 11 9 import org.w3c.dom.NodeList; 12 10 13 import java.util.ArrayList;14 import java.util.Map;15 import java.util.Iterator;16 import java.util.Set;17 import java.util.HashMap;18 11 import java.util.Vector; 19 12 import java.sql.SQLException; 20 13 import org.apache.log4j.*; 21 14 22 import java.net.InetAddress;23 import java.net.URLEncoder;24 import java.util.Properties;25 import java.util.Date;26 15 import java.util.regex.Pattern; 27 16 import java.io.File; 28 17 import java.io.UnsupportedEncodingException; 29 //import javax.mail.*;30 //import javax.mail.internet.*;31 32 import java.awt.event.ActionEvent;33 import java.awt.event.ActionListener;34 import javax.swing.Timer;35 36 import org.apache.log4j.*;37 18 38 19 public class Authentication … … 172 153 Element authen_node = this.doc.createElement(GSXML.AUTHEN_NODE_ELEM); 173 154 result.appendChild(authen_node); 155 result.appendChild(getCollectList(this.site_home + File.separatorChar + "collect")); 174 156 // create a service node added into the Authentication node 175 157 Element service_node = this.doc.createElement(GSXML.SERVICE_ELEM); … … 653 635 } 654 636 637 private Element getCollectList(String collect){ 638 Element collect_list_node = this.doc.createElement(GSXML.COLLECTION_ELEM+"List"); 639 File[] collect_dir= (new File(collect)).listFiles(); 640 if(collect_dir!=null && collect_dir.length > 0){ 641 for (int i=0;i<collect_dir.length;i++){ 642 if (collect_dir[i].isDirectory() && (!collect_dir[i].getName().startsWith(".svn"))){ 643 Element collect_node = this.doc.createElement(GSXML.COLLECTION_ELEM); 644 collect_node.setAttribute("name",collect_dir[i].getName()); 645 collect_list_node.appendChild(collect_node); 646 } 647 } 648 } 649 return collect_list_node; 650 } 655 651 } 656 652
Note:
See TracChangeset
for help on using the changeset viewer.