Package org.w3c.tools.resources

Examples of org.w3c.tools.resources.ResourceContext


    protected RealmsCatalog realms = null ;
    protected ResourceReference rr_realms = null;

    private void initializeRealmsCatalog() {
  this.realms = new RealmsCatalog(
      new ResourceContext(getDefaultContext()),
      "adminRealms.db");
    }
View Full Code Here


    protected synchronized ResourceReference getContentTypes() {
  if ( contentTypes == null ) {
      String typesidxid = getIdentifier()+"-c";
      contentTypes = new DummyResourceReference(
            new TemplateContainer(
            new ResourceContext(getContext()),
            typesidxid+".db"));
  }
  return contentTypes;
    }
View Full Code Here

  System.out.println("register realm : "+realm.getIdentifier());
  addResource(realm, null) ;
    }

    public synchronized void registerRealm(String name) {
  registerRealm(AuthRealm.makeRealm(new ResourceContext(getContext()),
            name ));
    }
View Full Code Here

         Hashtable defs)
    {
  if ( resource instanceof AuthRealm) {
      registerRealm(
       AuthRealm.makeRealm(resource,
               new ResourceContext(getContext()),
               name ));
  }
    }
View Full Code Here

  if (! entryExists(name))
      return null;
  // Prepare a set of default parameters for the resource:
  defs.put(id, name);
  updateDefaultChildAttributes(defs);
  ResourceContext context = getContext();
  // Try to get the indexer to create the resource:
  Resource    resource = null;
  ResourceReference rr_indexer  = null;
  ResourceReference rr_lastidx  = null;
  while ( context != null ) {
      // Lookup for next indexer in hierarchy:
      do {
    rr_indexer = getIndexer(context);
    context = context.getParent();
      } while ((rr_indexer == rr_lastidx) && (context != null));
      // Is this a usefull indexer ?
      if ((rr_lastidx = rr_indexer) != null ) {
    try {
        ResourceIndexer indexer =
View Full Code Here

    /**
     * Initialize this server indexer.
     */
    private void initializeIndexer() {
  ResourceContext c  = getDefaultContext();
  IndexersCatalog ic = getIndexersCatalog();
  IndexerModule   m  = new IndexerModule(ic);
  // Register the default indexer:
  m.registerIndexer(c, "default");
  // Register the indexer module:
  c.registerModule(IndexerModule.NAME, m);
    }
View Full Code Here

     */
    public ResourceReference loadResource(String name) {
  Hashtable defs = new Hashtable(11) ;
  defs.put("url", "/"+name);
  defs.put("directory", space_dir) ;
  ResourceContext context = new ResourceContext(getDefaultContext());
  defs.put("context", context) ;
  ResourceReference rr = manager.loadRootResource(name, defs);
  if (rr != null)
      context.setResourceReference(rr);
  return rr;
    }
View Full Code Here

  // Restore the appropriate root resource:
  Hashtable defs = new Hashtable(11) ;
  defs.put("url", "/");
  defs.put("directory", space_dir) ;
  ResourceContext context = null;
  if ((editRootName != null) && (! name.equals(editRootName))) {
      if (editroot == null) {
    Hashtable edefs = new Hashtable(11) ;
    edefs.put("url", "/");
    edefs.put("directory", space_dir) ;
    ResourceContext econtext =
        new ResourceContext(getDefaultContext());
    edefs.put("context", econtext) ;
    editroot = manager.loadRootResource(editRootName, edefs);
    if (editroot != null)
        econtext.setResourceReference(editroot);
      }
      context = new ResourceContext(editroot);
  } else {
      context = new ResourceContext(getDefaultContext());
  }
  defs.put("context", context) ;
  ResourceReference rr = manager.loadRootResource(name, defs);
  if (rr != null)
      context.setResourceReference(rr);
View Full Code Here

     * Initialize the realms catalog for this server.
     */

    private void initializeRealmsCatalog() {
  this.realms =
      new RealmsCatalog(new ResourceContext(getDefaultContext()));
    }
View Full Code Here

     * get the indexer catalog of this server
     */
    public IndexersCatalog getIndexersCatalog() {
  if ( indexers == null )
      indexers = new IndexersCatalog(
    new ResourceContext(getDefaultContext()));
  return indexers;
    }
View Full Code Here

TOP

Related Classes of org.w3c.tools.resources.ResourceContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.