Package org.sonatype.nexus.proxy

Examples of org.sonatype.nexus.proxy.IllegalRequestException


    }

    // check for writing to read only repo
    // Readonly is ALWAYS read only
    if (RepositoryWritePolicy.READ_ONLY.equals(getWritePolicy()) && !isActionAllowedReadOnly(action)) {
      throw new IllegalRequestException(request, "Repository with ID='" + getId()
          + "' is Read Only, but action was '" + action.toString() + "'!");
    }
    // but Write/write once may need to allow updating metadata
    // check the write policy
    enforceWritePolicy(request, action);
View Full Code Here


  protected void enforceWritePolicy(ResourceStoreRequest request, Action action)
      throws IllegalRequestException
  {
    // check for write once (no redeploy)
    if (Action.update.equals(action) && !RepositoryWritePolicy.ALLOW_WRITE.equals(this.getWritePolicy())) {
      throw new IllegalRequestException(request, "Repository with ID='" + getId()
          + "' does not allow updating artifacts.");
    }
  }
View Full Code Here

      // if item is null throw not found
      String key = describeParameter.getValue();

      // check
      if (!viewProviders.containsKey(key)) {
        throw new IllegalRequestException(request, "No view for key: " + key);
      }

      Object result = viewProviders.get(key).retrieveView(store, request, item, req);

      // make sure we have valid content
View Full Code Here

        request.popRequestPath();
      }
    }
    else {
      // this is "above" repositories
      throw new IllegalRequestException(request, "The path '" + request.getRequestPath()
          + "' does not points to any repository!");
    }
  }
View Full Code Here

          else if (item instanceof StorageCollectionItem) {
            toRoute.getTargetedRepository().createCollection(to,
                item.getRepositoryItemAttributes().asMap());
          }
          else {
            throw new IllegalRequestException(from, "Cannot copy item of class='"
                + item.getClass().getName() + "' over multiple repositories.");
          }

        }
      }
      finally {
        from.popRequestPath();
        to.popRequestPath();
      }
    }
    else {
      // this is "above" repositories
      if (!fromRoute.isRepositoryHit()) {
        throw new IllegalRequestException(from, "The path '" + from.getRequestPath()
            + "' does not points to any repository!");
      }
      else {
        throw new IllegalRequestException(to, "The path '" + to.getRequestPath()
            + "' does not points to any repository!");
      }
    }
  }
View Full Code Here

        request.popRequestPath();
      }
    }
    else {
      // this is "above" repositories
      throw new IllegalRequestException(request, "The path '" + request.getRequestPath()
          + "' does not points to any repository!");
    }
  }
View Full Code Here

        request.popRequestPath();
      }
    }
    else {
      // this is "above" repositories
      throw new IllegalRequestException(request, "The path '" + request.getRequestPath()
          + "' does not points to any repository!");
    }
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.IllegalRequestException

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.