Package org.sonatype.nexus.rest.model

Examples of org.sonatype.nexus.rest.model.NotFoundReasoning


    return result;
  }

  protected NotFoundReasoning buildNotFoundReasoning(final Repository repository, final Throwable t) {
    final NotFoundReasoning reasoning = new NotFoundReasoning();

    reasoning.setReasonMessage(t.getMessage());
    reasoning.setThrowableType(t.getClass().getName());
    if (repository != null) {
      reasoning.setRepositoryId(repository.getId());
    }

    if (t instanceof GroupItemNotFoundException) {
      final GroupItemNotFoundException ginf = (GroupItemNotFoundException) t;
      reasoning.setRepositoryId(ginf.getReason().getRepository().getId());

      for (Map.Entry<Repository, Throwable> r : ginf.getMemberReasons().entrySet()) {
        reasoning.addNotFoundReasoning(buildNotFoundReasoning(r.getKey(), r.getValue()));
      }
    }

    return reasoning;
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.rest.model.NotFoundReasoning

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.