Examples of WebScript


Examples of com.github.dynamicextensionsalfresco.webscripts.annotations.WebScript

    final ConfigurableListableBeanFactory beanFactory = getBeanFactory();
    final Class<?> beanType = beanFactory.getType(beanName);
    if (beanType == null) {
      return Collections.emptyList();
    }
    final WebScript webScriptAnnotation = beanFactory.findAnnotationOnBean(beanName, WebScript.class) != null ? beanFactory
        .findAnnotationOnBean(beanName, WebScript.class) : getDefaultWebScriptAnnotation();
    final String baseUri = webScriptAnnotation.baseUri();
    if (StringUtils.hasText(baseUri) && baseUri.startsWith("/") == false) {
      throw new RuntimeException(String.format(
          "@WebScript baseUri for class '%s' does not start with a slash: '%s'", beanType, baseUri));
    }
View Full Code Here

Examples of org.springframework.extensions.webscripts.WebScript

      final WebScriptResponse response) {
    try {
      final Match match = uriIndex.findWebScript(httpMethod.name(), uri);
      assertNotNull(String.format("Could not find annotation-based WebScript for method '%s' and URI '%s'.",
          httpMethod, uri), match);
      final WebScript webScript = match.getWebScript();
      webScript.execute(request.setServiceMatch(match), response);
    } catch (final IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of org.springframework.extensions.webscripts.WebScript

    }
  }

  public void unregisterWebScripts() {
    for (final Iterator<WebScript> it = webScripts.iterator(); it.hasNext();) {
      final WebScript webScript = it.next();
      webScriptUriRegistry.unregisterWebScript(webScript);
      it.remove();
    }

  }
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.