congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Description
Code IndexAdd Tabnine to your IDE (free)

How to use
Description
in
org.springframework.extensions.webscripts

Best Java code snippets using org.springframework.extensions.webscripts.Description (Showing top 20 results out of 315)

Refine searchRefine arrow

  • WebScript
  • WebScriptException
  • WebScriptRequest
origin: org.springframework.extensions.surf/spring-surf

public String[] getFamilys()
{
  List<String> familys = new ArrayList<String>(4);
  for (String f : description.getFamilys())
  {
    familys.add(f);
  }
  return familys.toArray(new String[familys.size()]);
}
origin: org.alfresco.surf/spring-webscripts

public void registerUri(WebScript script, String uri)
  Description desc = script.getDescription();
    wildcard = true;
  if (desc.getFormatStyle() != Description.FormatStyle.argument)
  String uriIdx = desc.getMethod() + ":" + uri;
  if (index.containsKey(uriIdx))
    if (!existingService.getDescription().getId().equals(desc.getId()))
      String msg = "Web Script document " + desc.getDescPath() + " is attempting to define the url '" + uriIdx + "' already defined by " + existingService.getDescription().getDescPath();
      throw new WebScriptException(msg);
origin: org.springframework.extensions.surf/spring-surf

public String[] getURIs()
{
  return description.getURIs();
}
origin: org.springframework.extensions.surf/spring-webscripts

if (scriptUrl == null || scriptUrl.length() == 0)
  throw new WebScriptException(HttpServletResponse.SC_BAD_REQUEST, "Script URL not specified");
    if ((match != null) && (match.getWebScript().getDescription().getRequiredAuthentication().equals(RequiredAuthentication.none)))
    throw new WebScriptException(HttpServletResponse.SC_NOT_FOUND, msg);
    throw new WebScriptException(HttpServletResponse.SC_METHOD_NOT_ALLOWED, msg);
if (debug) logger.debug("Agent: " + scriptReq.getAgent());
final Description description = script.getDescription();
    String reqFormat = scriptReq.getFormat();
    String format = (reqFormat == null || reqFormat.length() == 0) ? "[undefined]" : reqFormat;
    Description desc = scriptReq.getServiceMatch().getWebScript().getDescription();
    logger.debug("Invoking Web Script " + description.getId() + " (format " + format + ", style: " + desc.getFormatStyle() + ", default: " + desc.getDefaultFormat() + ")");
    logger.debug("Web Script " + description.getId() + " executed in " + (endScript - startScript)/1000000f + "ms");
origin: org.alfresco.surf/spring-webscripts

if (scriptUrl == null || scriptUrl.length() == 0)
  throw new WebScriptException(HttpServletResponse.SC_BAD_REQUEST, "Script URL not specified");
    if ((match != null) && (match.getWebScript().getDescription().getRequiredAuthentication().equals(RequiredAuthentication.none)))
    throw new WebScriptException(HttpServletResponse.SC_NOT_FOUND, msg);
    throw new WebScriptException(HttpServletResponse.SC_METHOD_NOT_ALLOWED, msg);
if (debug) logger.debug("Agent: " + scriptReq.getAgent());
final Description description = script.getDescription();
    String reqFormat = scriptReq.getFormat();
    String format = (reqFormat == null || reqFormat.length() == 0) ? "[undefined]" : reqFormat;
    Description desc = scriptReq.getServiceMatch().getWebScript().getDescription();
    logger.debug("Invoking Web Script " + description.getId() + " (format " + format + ", style: " + desc.getFormatStyle() + ", default: " + desc.getDefaultFormat() + ")");
    logger.debug("Web Script " + description.getId() + " executed in " + (endScript - startScript)/1000000f + "ms");
origin: org.springframework.extensions.surf/spring-webscripts

throw new WebScriptException("Failed to search for package descriptions in store " + apiStore, e);
    throw new WebScriptException("Failed to read package description document " + apiStore.getBasePath() + packageDescPath, e);
throw new WebScriptException("Failed to search for schema descriptions in store " + apiStore, e);
      Description existingDesc = existingService.getDescription();
      String msg = "Web Script description document " + serviceDesc.getStorePath() + "/" + serviceDesc.getDescPath();
      msg += " overridden by " + existingDesc.getStorePath() + "/" + existingDesc.getDescPath();
      logger.debug(msg);
  serviceImpl.init(container, serviceDesc);
      logger.debug("Registered Web Script URL '" + serviceImpl.getDescription().getMethod() + ":" + uriTemplate + "'");
origin: org.springframework.extensions.surf/spring-webscripts

/**
 * Associate Web Script with Path
 * 
 * @param script WebScript
 */
public void addScript(WebScript script)
{
  scripts.put(script.getDescription().getId(), script);
}

origin: org.springframework.extensions.surf/spring-webscripts

if (match != null && match.getKind() != Match.Kind.URI)
  Description desc = match.getWebScript().getDescription();
  FormatStyle style = desc.getFormatStyle();
        throw new WebScriptException("Format specified both in extension and format argument");
    NegotiatedFormat[] negotiatedFormats = desc.getNegotiatedFormats();
    if (accept != null && negotiatedFormats != null)
      if (format == null)
        throw new WebScriptException(HttpServletResponse.SC_NOT_ACCEPTABLE, "Cannot negotiate appropriate response format for Accept: " + accept);
    format = desc.getDefaultFormat();
origin: org.springframework.extensions.surf/spring-webscripts

params.put("webscript", req.getServiceMatch().getWebScript().getDescription());
params.put("format", new FormatModel(container.getFormatRegistry(), req.getFormat()));
params.put("args", createArgs(req));
params.put("argsM", createArgsM(req));
params.put("headers", createHeaders(req));
params.put("headersM", createHeadersM(req));
params.put("guest", req.isGuest());
params.put("url", createURLModel(req));
params.put("msg", getScriptMessage());
  if (!(WebScriptRequestImpl.MULTIPART_FORM_DATA.equals(contentType) && getDescription().getMultipartProcessing() == false))
origin: org.springframework.extensions.surf/spring-webscripts

  throw new WebScriptException("WebScript " + description.getId() + " already associated with the '" + this.container.getName() + "' container");
this.basePath = description.getId();
origin: org.springframework.extensions.surf/spring-webscripts

String scriptId = getDescription().getId();
StatusTemplate template = getStatusTemplate(scriptId, statusCode, statusFormat);
String mimetype = container.getFormatRegistry().getMimeType(req.getAgent(), template.getFormat());
if (mimetype == null)
  throw new WebScriptException("Web Script format '" + template.getFormat() + "' is not registered");
  logger.debug("Force success status header in response: " + req.forceSuccessStatus());
  logger.debug("Sending status " + statusCode + " (Template: " + template.getPath() + ")");
  logger.debug("Rendering response: content type=" + mimetype);
res.setStatus(req.forceSuccessStatus() ? HttpServletResponse.SC_OK : statusCode);
String location = status.getLocation();
if (location != null && location.length() > 0)
origin: org.springframework.extensions.surf/spring-surf

if (scWebscript != null)
  String storePath = scWebscript.getDescription().getStorePath();
  String descPath = scWebscript.getDescription().getDescPath();
  model.put("subComponent_resolvedWSStorePath", storePath);
  model.put("subComponent_resolvedWSDescPath", descPath);
  if (webscript != null)
    String storePath = webscript.getDescription().getStorePath();
    String descPath = webscript.getDescription().getDescPath();
    model.put("resolvedWSStorePath", storePath);
    model.put("resolvedWSDescPath", descPath);
origin: deas/alfresco

if (script.getDescription().getPackage() == null ||
  !script.getDescription().getPackage().toString().startsWith(packageFilter))
  Set<String> familys = script.getDescription().getFamilys();
String[] uris = script.getDescription().getURIs();
for (String uri : uris)
origin: deas/alfresco

String scriptId = req.getExtensionPath();
if (scriptId == null || scriptId.length() == 0)
  throw new WebScriptException("Web Script Id not provided");
if (script == null)
  throw new WebScriptException("Web Script Id '" + scriptId + "' not found");
Map<String, String> implPaths = new HashMap<String, String>();
List<ScriptStore> modelStores = new ArrayList<ScriptStore>();
model.put("script", script.getDescription());
model.put("script_class", script.getClass().toString());
model.put("stores", modelStores);
    throw new WebScriptException("Failed to search for documents for script "
        + script.getDescription().getId() + " in store " + store, e);
origin: org.alfresco.surf/spring-surf

Set<String> familys = webscript.getDescription().getFamilys();
if (familys != null && familys.contains(family))
  values.add(new ScriptWebScript(webscript.getDescription()));
values.add(new ScriptWebScript(webscript.getDescription()));
origin: org.alfresco.surf/spring-webscripts

  public StatusTemplate getStatusTemplate()
  {
    int statusCode = we.getStatus();
    String format = req.getFormat();
    String scriptId = getDescription().getId();
    return AbstractWebScript.this.getStatusTemplate(scriptId, statusCode, (format == null) ? "" : format);
  }
});
origin: org.springframework.extensions.surf/spring-webscripts

/**
 * Register a Web Script URI
 * 
 * @param script WebScript
 */
private void registerURIs(WebScript script)
{
  Description desc = script.getDescription();
  for (String uri : desc.getURIs())
  {
    PathImpl path = uriByPath.get("/");
    String[] parts = uri.split("/");
    for (String part : parts)
    {
      if (part.indexOf("?") != -1)
      {
        part = part.substring(0, part.indexOf("?"));
      }
      PathImpl subpath = uriByPath.get(PathImpl.concatPath(path.getPath(), part));
      if (subpath == null)
      {
        subpath = path.createChildPath(part);
        uriByPath.put(subpath.getPath(), subpath);
      }
      path = subpath;
    }
    path.addScript(script);
  }
}
origin: org.springframework.extensions.surf/spring-surf

public String getId()
{
  return description.getId();
}
origin: org.springframework.extensions.surf/spring-webscripts

/**
 * Register a lifecycle
 * 
 * @param script WebScript
 */
private void registerLifecycle(WebScript script)
{
  Description desc = script.getDescription();
  Lifecycle lifecycle = desc.getLifecycle();
      PathImpl path = lifecycleByPath.get("/");
  PathImpl subpath = lifecycleByPath.get(PathImpl.concatPath(path.getPath(), lifecycle.toString()));
  if (subpath == null)
  {
     subpath = path.createChildPath(lifecycle.toString());
     lifecycleByPath.put(subpath.getPath(), subpath);
  }          
  subpath.addScript(script);
}
origin: org.springframework.extensions.surf/spring-webscripts

public FormatStyle getFormatStyle()
{
  Match match = getServiceMatch();
  if (match == null)
  {
    return FormatStyle.any;
  }
  FormatStyle style = match.getWebScript().getDescription().getFormatStyle();
  if (style != FormatStyle.any)
  {
    return style;
  }
  else
  {
    String argFormat = getParameter(ARG_FORMAT);
    if (argFormat != null && argFormat.length() > 0)
    {
      return FormatStyle.argument;
    }
    else
    {
      return FormatStyle.extension;
    }
  }
}
org.springframework.extensions.webscriptsDescription

Javadoc

Web Script Description

Most used methods

  • getFamilys
    Gets the family(s) of this service in the order that they are defined
  • getId
  • getURIs
    Gets the URIs this service supports
  • getDefaultFormat
    Gets the default response format Note: the default response format is the first listed in the servic
  • getDescPath
    Gets the path of the description xml document for this web script
  • getFormatStyle
    Gets the style of Format discriminator supported by this web script
  • getLifecycle
    Get the lifecycle
  • getMethod
    Gets the HTTP method this service is bound to
  • getMultipartProcessing
  • getNegotiatedFormats
    Gets the formats available for negotiation
  • getRequestTypes
    Gets webscript request types
  • getRequiredAuthentication
    Gets the required authentication level for execution of this service
  • getRequestTypes,
  • getRequiredAuthentication,
  • getRequiredCache,
  • getResponseTypes,
  • getScriptPath,
  • getShortName,
  • getStorePath,
  • getArguments,
  • getDescDocument,
  • getPackage

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JCheckBox (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now