Codota Logo
EntityView.getFormat
Code IndexAdd Codota to your IDE (free)

How to use
getFormat
method
in
org.sakaiproject.entitybroker.EntityView

Best Java code snippets using org.sakaiproject.entitybroker.EntityView.getFormat (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: sakaiproject/sakai

public void handleAccess(EntityView view, HttpServletRequest req, HttpServletResponse res) {
  String format = view.getFormat();
  if (format.equals(Formats.HTML) || format.equals(Formats.RSS)) {
    // Okey dokey, do nothing but say all is well
    try {
      res.getWriter().print(prefix + ": EntityViewAccessProviderMock");
    } catch (IOException e) {
      log.error(e.getMessage(), e);
    }
    ((EntityHttpServletResponse) res).setStatus(HttpServletResponse.SC_OK);
  } else {
    throw new FormatUnsupportedException("No support for format: " + format, view.getEntityReference()+"", format);
  }
}
origin: org.sakaiproject.entitybroker/entitybroker-mocks

public void handleAccess(EntityView view, HttpServletRequest req, HttpServletResponse res) {
  String format = view.getFormat();
  if (format.equals(Formats.HTML) || format.equals(Formats.RSS)) {
    // Okey dokey, do nothing but say all is well
    try {
      res.getWriter().print(prefix + ": EntityViewAccessProviderMock");
    } catch (IOException e) {
      log.error(e.getMessage(), e);
    }
    ((EntityHttpServletResponse) res).setStatus(HttpServletResponse.SC_OK);
  } else {
    throw new FormatUnsupportedException("No support for format: " + format, view.getEntityReference()+"", format);
  }
}
origin: sakaiproject/sakai

res.setHeader("x-entity-reference", view.getEntityReference().toString());
res.setHeader("x-entity-url", view.getEntityURL());
res.setHeader("x-entity-format", view.getFormat());
origin: org.sakaiproject.entitybroker/entitybroker-restimpl

res.setHeader("x-entity-reference", view.getEntityReference().toString());
res.setHeader("x-entity-url", view.getEntityURL());
res.setHeader("x-entity-format", view.getFormat());
origin: sakaiproject/sakai

String format = view.getFormat();
origin: sakaiproject/sakai

if (accessFormats != null && ! ReflectUtils.contains(accessFormats, view.getFormat()) ) {
  throw new FormatUnsupportedException("Access provider for " + view.getEntityReference().getPrefix() 
      + " will not handle this format ("+view.getFormat()+")",
      view.getEntityReference()+"", view.getFormat());
origin: org.sakaiproject.entitybroker/entitybroker-restimpl

if (accessFormats != null && ! ReflectUtils.contains(accessFormats, view.getFormat()) ) {
  throw new FormatUnsupportedException("Access provider for " + view.getEntityReference().getPrefix() 
      + " will not handle this format ("+view.getFormat()+")",
      view.getEntityReference()+"", view.getFormat());
origin: org.sakaiproject.entitybroker/entitybroker-restimpl

String format = view.getFormat();
origin: org.sakaiproject.entitybroker/entitybroker-restimpl

req.setAttribute("entity-format", view.getFormat());
        } catch (EntityEncodingException e) {
          throw new EntityException("EntityEncodingException: Unable to handle " + (output ? "output" : "input") + " request for format  "+view.getFormat()+" for this path (" 
              + path + ") for prefix (" + prefix + ") for entity (" + view.getEntityReference() + "), request url (" + view.getOriginalEntityUrl() + "): " + e.getMessage(),
              view.getEntityReference()+"", HttpServletResponse.SC_INTERNAL_SERVER_ERROR);        
        } catch (IllegalArgumentException e) {
          throw new EntityException("IllegalArgumentException: Unable to handle " + (output ? "output" : "input") + " request for format  "+view.getFormat()+" for this path (" 
              + path + ") for prefix (" + prefix + ") for entity (" + view.getEntityReference() + "), request url (" + view.getOriginalEntityUrl() + "): " + e.getMessage(),
              view.getEntityReference()+"", HttpServletResponse.SC_BAD_REQUEST);        
        } catch (IllegalStateException e) {
          throw new EntityException("IllegalStateException: Unable to handle " + (output ? "output" : "input") + " request for format  "+view.getFormat()+" for this path (" 
              + path + ") for prefix (" + prefix + ") for entity (" + view.getEntityReference() + "), request url (" + view.getOriginalEntityUrl() + "): " + e.getMessage(),
              view.getEntityReference()+"", HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            if (formatInvalidFailure) {
              throw new FormatUnsupportedException("Nothing (AP and internal) available to handle the requested format", view.getEntityReference()+"", view.getFormat());
          throw new EntityException( "AccessProvider: Method/Format unsupported: Will not handle " + (output ? "output" : "input") + " request for format  "+view.getFormat()+" for this path (" 
              + path + ") for prefix (" + prefix + ") for entity (" + view.getEntityReference() + "), request url (" + view.getOriginalEntityUrl() + ")",
              view.getEntityReference()+"", HttpServletResponse.SC_NOT_ACCEPTABLE );
origin: sakaiproject/sakai

req.setAttribute("entity-format", view.getFormat());
        } catch (EntityEncodingException e) {
          throw new EntityException("EntityEncodingException: Unable to handle " + (output ? "output" : "input") + " request for format  "+view.getFormat()+" for this path (" 
              + path + ") for prefix (" + prefix + ") for entity (" + view.getEntityReference() + "), request url (" + view.getOriginalEntityUrl() + "): " + e.getMessage(),
              view.getEntityReference()+"", HttpServletResponse.SC_INTERNAL_SERVER_ERROR);        
        } catch (IllegalArgumentException e) {
          throw new EntityException("IllegalArgumentException: Unable to handle " + (output ? "output" : "input") + " request for format  "+view.getFormat()+" for this path (" 
              + path + ") for prefix (" + prefix + ") for entity (" + view.getEntityReference() + "), request url (" + view.getOriginalEntityUrl() + "): " + e.getMessage(),
              view.getEntityReference()+"", HttpServletResponse.SC_BAD_REQUEST);        
        } catch (IllegalStateException e) {
          throw new EntityException("IllegalStateException: Unable to handle " + (output ? "output" : "input") + " request for format  "+view.getFormat()+" for this path (" 
              + path + ") for prefix (" + prefix + ") for entity (" + view.getEntityReference() + "), request url (" + view.getOriginalEntityUrl() + "): " + e.getMessage(),
              view.getEntityReference()+"", HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            if (formatInvalidFailure) {
              throw new FormatUnsupportedException("Nothing (AP and internal) available to handle the requested format", view.getEntityReference()+"", view.getFormat());
          throw new EntityException( "AccessProvider: Method/Format unsupported: Will not handle " + (output ? "output" : "input") + " request for format  "+view.getFormat()+" for this path (" 
              + path + ") for prefix (" + prefix + ") for entity (" + view.getEntityReference() + "), request url (" + view.getOriginalEntityUrl() + ")",
              view.getEntityReference()+"", HttpServletResponse.SC_NOT_ACCEPTABLE );
org.sakaiproject.entitybrokerEntityViewgetFormat

Popular methods of EntityView

  • getEntityReference
  • getOriginalEntityUrl
  • setViewKey
  • <init>
  • getEntityURL
  • getViewKey
  • setEntityReference
  • setExtension
  • copy
  • getExtension
  • loadParseTemplates
    Override this method if creating a custom EntityView object
  • parseEntityURL
    Used to build this object after it has already been created (typically so custom templates can be in
  • loadParseTemplates,
  • parseEntityURL,
  • setMethod,
  • toString,
  • checkEntityURL,
  • getAnazlyzedTemplates,
  • getMethod,
  • getParseTemplate,
  • getParseTemplates

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • notifyDataSetChanged (ArrayAdapter)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • JComboBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now