Hashtable<WidgetAccess, Vector<WidgetFeature>> accessTable = new Hashtable<WidgetAccess, Vector<WidgetFeature>>();
// Populate "LOCAL" access list
String localpath = "WidgetConfig.WIDGET_LOCAL_DOMAIN";
boolean hasFeatures = false;
WidgetAccess localAccess = new WidgetAccess(localpath, true);
Vector<WidgetFeature> featureList = getFeatureListFromNode(widgetNode);
if (featureList.size() > 0) {
hasFeatures = true;
}
accessTable.put(localAccess, featureList);
// Populate all "access" nodes access lists
for (int i = 0; i < list.getLength(); i++) {
Node node = list.item(i);
if (node.getNodeName().equalsIgnoreCase("access")
&& node.getNodeType() == Node.ELEMENT_NODE) {
NamedNodeMap nodeAttributes = node.getAttributes();
// uri information
Node uriNode = nodeAttributes.getNamedItem("uri");
String uri = "";
if (uriNode != null) {
uri = uriNode.getNodeValue();
}
// subdomains information
Node subdomainsNode = nodeAttributes.getNamedItem("subdomains");
boolean subdomains = false;
if (subdomainsNode != null) {
if (subdomainsNode.getNodeValue().equalsIgnoreCase("true")) {
subdomains = true;
}
}
if (!uri.trim().equals("*")) {
WidgetAccess access = new WidgetAccess(uri, subdomains);
// Find all sub-feature nodes
if (uri.length() > 0) {
featureList = getFeatureListFromNode(node);
if (featureList.size() > 0) {