コード例 #1
0
 public List getGlobalDataSources() throws Exception {
   List resources = new ArrayList();
   if (getResourceResolver().supportsGlobalResources()) {
     List globalResources = getResourceResolver().getApplicationResources();
     // add only those resources that have data source info
     filterDataSources(globalResources, resources);
   }
   return resources;
 }
コード例 #2
0
  public List getPrivateDataSources() throws Exception {
    List resources = new ArrayList();
    if (tomcatContainer != null && getResourceResolver().supportsPrivateResources()) {
      List apps = getTomcatContainer().findContexts();

      for (int i = 0; i < apps.size(); i++) {
        List appResources =
            getResourceResolver().getApplicationResources((Context) apps.get(i), this);
        // add only those resources that have data source info
        filterDataSources(appResources, resources);
      }
    }
    return resources;
  }