Revision 4419
Added by ben leinfelder over 15 years ago
DocInfoHandler.java | ||
---|---|---|
49 | 49 |
private Hashtable docinfo = new Hashtable(); |
50 | 50 |
private String currentTag = null; |
51 | 51 |
|
52 |
private Vector acccessControlList = new Vector(); |
|
53 |
|
|
52 | 54 |
public DocInfoHandler() |
53 | 55 |
{ |
54 | 56 |
} |
... | ... | |
62 | 64 |
currentTag = localName; |
63 | 65 |
} |
64 | 66 |
|
67 |
public void endElement (String uri, String localName, String qName) |
|
68 |
throws SAXException |
|
69 |
{ |
|
70 |
if (currentTag.equals("access")) { |
|
71 |
//harvest the latest values from the Map |
|
72 |
String docid = (String) docinfo.get("docid"); |
|
73 |
String principal = (String) docinfo.get("principal"); |
|
74 |
String permission = (String) docinfo.get("permission"); |
|
75 |
String permType = (String) docinfo.get("permType"); |
|
76 |
String permOrder = (String) docinfo.get("permOrder"); |
|
77 |
AccessControlForSingleFile acfsf = null; |
|
78 |
try { |
|
79 |
acfsf = new AccessControlForSingleFile(docid, principal, permission, permType, permOrder); |
|
80 |
} catch (Exception e) { |
|
81 |
// TODO Auto-generated catch block |
|
82 |
e.printStackTrace(); |
|
83 |
} |
|
84 |
acccessControlList.add(acfsf); |
|
85 |
} |
|
86 |
//save the list when we are done |
|
87 |
if (currentTag.equals("acccessControl")) { |
|
88 |
docinfo.put("acccessControl", acccessControlList); |
|
89 |
} |
|
90 |
} |
|
91 |
|
|
65 | 92 |
/** |
66 | 93 |
* put the content and the name of the tag into the hashtable. the name of |
67 | 94 |
* the tag is the key. |
Also available in: Unified diff
replicate xml_access entries across servers.
see: http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3464
note: still needs to be tested...but needed to be checked in for other metacat installations to be updated....