Package org.w3c.tools.resources

Examples of org.w3c.tools.resources.ResourceReference.lock()


    while (lfs.hasMoreComponents()) {

        try {
      rra = ((FramedResource)
             the_rrf.lock()).getFramesReference();
      if (rra == null)
          error(request, "unknown frame");
        } catch (InvalidResourceException ex) {
      error(request, ex.getMessage());
        } finally {
View Full Code Here


        ResourceFrame     frame = null;

        for (int i = 0 ; i < rra.length ; i++) {
      rrf = rra[i];
      try {
          frame = (ResourceFrame) rrf.lock();
          if (frame.getIdentifier().equals(frameName)) {
        the_rrf = rrf;
        break;
          }
      } catch (InvalidResourceException ex) {
View Full Code Here

    {
  InputStream in = getInputStream(request);
  //Get the target resource to act on:
  ResourceReference   rr    = lookup(request);
  try {
      Resource r = rr.lock();
      ResourceDescription descr =
    AdminReader.readResourceDescription(in);
      AttributeDescription attrs[] = descr.getAttributeDescriptions();
      for (int i = 0 ; i < attrs.length ; i++) {
    AttributeDescription ad = attrs[i];
View Full Code Here

  if (vrroot == null) {
      return super.lookupOther(ls, lr);
  }
  try {
      lr.setTarget(vrroot);
      FramedResource resource = (FramedResource) vrroot.lock();
      boolean done =
        (resource != null ) ? resource.lookup(ls, lr) : false;
      if (! done) {
    lr.setTarget(null);
      }
View Full Code Here

  ResourceReference rr_root = null;
  FramedResource    root = null;
  rr_root = JigsawServletContext.getLocalRoot(server.getRootReference(),
                rr);
  try {
      root = (FramedResource) rr_root.lock();
      // Do the lookup:
      ResourceReference r_target = null;
      try {
    LookupState  ls = new LookupState(urlpath);
    LookupResult lr = new LookupResult(rr_root);
View Full Code Here

    protected synchronized CvsDirectory getCvsManager() {
  if (cvs == null) {
      ResourceReference rrp = resource.getParent();
      if (rrp != null) {
    try {
        Resource parent = rrp.lock();
        if (! (parent instanceof DirectoryResource)) {
      getServer().errlog(resource,
          "not a child of a DirectoryResource");
      throw new RuntimeException(
          "The server is misconfigured.");
View Full Code Here

    protected boolean isIndexed(String name) {
  ResourceReference rrp = resource.getParent();
  if (rrp != null) {
      try {
    Resource parent = rrp.lock();
    if (! (parent instanceof DirectoryResource)) {
        getServer().errlog(resource,
               "not a child of a DirectoryResource");
        throw new RuntimeException("The server is misconfigured.");
    }
View Full Code Here

  String tablecolor = "white";
  String parentpath = null;
  ResourceReference rr_parent = resource.getParent();
  try {
      Resource parent = rr_parent.lock();
      parentpath = parent.getURLPath();
  } catch (InvalidResourceException ex) {
      getServer().errlog(resource, "Invalid parent");
      throw new RuntimeException("The server is misconfigured.");
  } finally {
View Full Code Here

    if (action.equals("remove")) {
        //get the parent resource of our own resource
        ResourceReference rr = getResource().getParent();
        try {
      Resource res = rr.lock();
      DirectoryResource dirres = null;
      if (! (res instanceof DirectoryResource)) {
          getServer().errlog(res,
             "CvsFrame: not a child of a DirectoryResource");
          return error(this, request,
View Full Code Here

      for (int i=0; i < size; i++ ) {
          String name = names[i];
          ResourceReference childref = dirres.lookup(name);
          if (childref != null) {
        try {
            Resource children = childref.lock();
            if (children instanceof FileResource) {
          FileResource fres =
              (FileResource) children;
          // delete the file
          fres.getFile().delete();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.