Package org.springframework.extensions.webscripts

Examples of org.springframework.extensions.webscripts.DescriptionImpl


  /* Utility operations */

  protected AnnotationWebScript createWebScript(final String beanName, final WebScript webScript, final Uri uri,
      final HandlerMethods handlerMethods) {
    final DescriptionImpl description = new DescriptionImpl();
    if (StringUtils.hasText(webScript.defaultFormat())) {
      description.setDefaultFormat(webScript.defaultFormat());
    }
    final String baseUri = webScript.baseUri();
    handleHandlerMethodAnnotation(uri, handlerMethods.getUriMethod(), description, baseUri);
    handleTypeAnnotations(beanName, webScript, description);
    final String id = String.format("%s.%s.%s", generateId(beanName), handlerMethods.getUriMethod().getName(),
        description.getMethod().toLowerCase());
    description.setId(id);
    final Object handler = getBeanFactory().getBean(beanName);
    description.setStore(new AnnotationWebScriptStore());
    return createWebScript(description, handler, handlerMethods);
  }
View Full Code Here


  private final DescriptionImpl description;

  ExampleWebScript(final int status, final String... uris) {
    this.status = status;
    description = new DescriptionImpl();
    description.setMethod("GET");
    description.setUris(uris);
    description.setId(getClass().getName());
  }
View Full Code Here

TOP

Related Classes of org.springframework.extensions.webscripts.DescriptionImpl

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.