Package org.jclouds.abiquo.rest.annotations

Examples of org.jclouds.abiquo.rest.annotations.EndpointLink


    */
   static RESTLink getLinkToUse(final GeneratedHttpRequest request, final SingleResourceTransportDto payload) {
      int argIndex = request.getInvocation().getArgs().indexOf(payload);
      Annotation[] annotations = request.getInvocation().getInvokable().getParameters().get(argIndex).getAnnotations();

      EndpointLink linkName = (EndpointLink) Iterables.find(Arrays.asList(annotations),
            Predicates.instanceOf(EndpointLink.class), null);

      if (linkName == null) {
         throw new BindException(request, "Expected a EndpointLink annotation but not found in the parameter");
      }

      return checkNotNull(payload.searchLink(linkName.value()), "No link was found in object with rel: " + linkName);
   }
View Full Code Here


    */
   static RESTLink getLinkToUse(final GeneratedHttpRequest request, final SingleResourceTransportDto payload) {
      int argIndex = request.getInvocation().getArgs().indexOf(payload);
      Annotation[] annotations = request.getInvocation().getInvokable().getParameters().get(argIndex).getAnnotations();

      EndpointLink linkName = (EndpointLink) Iterables.find(Arrays.asList(annotations),
            Predicates.instanceOf(EndpointLink.class), null);

      if (linkName == null) {
         throw new BindException(request, "Expected a EndpointLink annotation but not found in the parameter");
      }

      return checkNotNull(payload.searchLink(linkName.value()), "No link was found in object with rel: " + linkName);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.abiquo.rest.annotations.EndpointLink

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.