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

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

Best Java code snippets using org.sakaiproject.entitybroker.EntityView.getEntityReference (Showing top 20 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 ViewParameters getViewParameters() {
    EntityViewViewParamsInferrer evvpi = null;
    if (entityViewProxy.getEntityReference() != null) {
      String prefix = entityViewProxy.getEntityReference().prefix;
      evvpi = (EntityViewViewParamsInferrer) inferrermap.get(prefix);
    }
    return evvpi == null ? null : evvpi.inferDefaultViewParameters(entityViewProxy);
  }
}
origin: uk.org.ponder.sakairsf/sakairsf

 public ViewParameters getViewParameters() {
  EntityViewViewParamsInferrer evvpi = null;
  if (entityViewProxy.getEntityReference() != null) {
   String prefix = entityViewProxy.getEntityReference().prefix;
   evvpi = (EntityViewViewParamsInferrer) inferrermap.get(prefix);
  }
  return evvpi == null? null : evvpi.inferDefaultViewParameters(entityViewProxy);
 }
}
origin: sakaiproject/sakai

public void handleAccess(final EntityView view, HttpServletRequest req, HttpServletResponse res) {
  commonAccessHandler.handleAccess(req, res, view.getEntityReference(), new WBLAcceptor() {
    public Object acceptWBL(WriteableBeanLocator toaccept) {
      toaccept.set("sakai-EntityView", view);
      return null;
    }
  });
}
origin: sakaiproject/sakai

public void handleAccess(EntityView view, HttpServletRequest req, HttpServletResponse res) {
  EntityReference reference = view.getEntityReference();
  accessHandler.handleAccess(req, res, reference, null);
}
origin: uk.org.ponder.sakairsf/sakairsf

public void handleAccess(final EntityView view, HttpServletRequest req,
  HttpServletResponse res) {
 commonAccessHandler.handleAccess(req, res, view.getEntityReference(), new WBLAcceptor() {
  public Object acceptWBL(WriteableBeanLocator toaccept) {
   toaccept.set("sakai-EntityView", view);
   return null;
  }});
}
origin: uk.org.ponder.sakairsf/sakairsf

public void handleAccess (EntityView view, HttpServletRequest req, HttpServletResponse res) {
  EntityReference reference = view.getEntityReference();
  accessHandler.handleAccess(req, res, reference, null);
}
origin: org.sakaiproject.entitybroker/entitybroker-restimpl

/**
 * @param ev the entity view
 * @param customAction the custom action
 * @return a URL for triggering the custom action (without http://server/direct)
 */
protected String makeActionURL(EntityView ev, CustomAction customAction) {
  // switched to this since it is more correct
  String URL = EntityView.SEPARATOR + ev.getEntityReference().getPrefix() + EntityView.SEPARATOR + customAction.action;
  String viewKey = customAction.viewKey;
  if (viewKey != null 
      && (EntityView.VIEW_SHOW.equals(viewKey) || EntityView.VIEW_EDIT.equals(viewKey) || EntityView.VIEW_DELETE.equals(viewKey))) {
    URL = ev.getEntityURL(EntityView.VIEW_SHOW, null) + EntityView.SEPARATOR + customAction.action;
  }
  return URL;
}
origin: sakaiproject/sakai

/**
 * @param ev the entity view
 * @param customAction the custom action
 * @return a URL for triggering the custom action (without http://server/direct)
 */
protected String makeActionURL(EntityView ev, CustomAction customAction) {
  // switched to this since it is more correct
  String URL = EntityView.SEPARATOR + ev.getEntityReference().getPrefix() + EntityView.SEPARATOR + customAction.action;
  String viewKey = customAction.viewKey;
  if (viewKey != null 
      && (EntityView.VIEW_SHOW.equals(viewKey) || EntityView.VIEW_EDIT.equals(viewKey) || EntityView.VIEW_DELETE.equals(viewKey))) {
    URL = ev.getEntityURL(EntityView.VIEW_SHOW, null) + EntityView.SEPARATOR + customAction.action;
  }
  return URL;
}
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

public Object executeActions(EntityView entityView, String action, Map<String, Object> actionParams, OutputStream outputStream) {
 Object result = null;
 if ("double".equals(action)) {
   result = myDoubleAction(entityView);
 } else if ("xxx".equals(action)) {
   MyEntity me = (MyEntity) getEntity(entityView.getEntityReference());
   me.extra = "xxx";
   me.setStuff("xxx");
   myEntities.put(me.getId(), me);
 } else if ("clear".equals(action)) {
   myEntities.clear();
 }
 return result;
}
origin: org.sakaiproject.entitybroker/entitybroker-mocks

public Object executeActions(EntityView entityView, String action, Map<String, Object> actionParams, OutputStream outputStream) {
 Object result = null;
 if ("double".equals(action)) {
   result = myDoubleAction(entityView);
 } else if ("xxx".equals(action)) {
   MyEntity me = (MyEntity) getEntity(entityView.getEntityReference());
   me.extra = "xxx";
   me.setStuff("xxx");
   myEntities.put(me.getId(), me);
 } else if ("clear".equals(action)) {
   myEntities.clear();
 }
 return result;
}
origin: sakaiproject/sakai

String prefix = view.getEntityReference().getPrefix();
EntityProvider provider = entityProviderManager.getProviderByPrefix(prefix);
res.setHeader("x-entity-prefix", prefix);
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

public Object doubleUp(EntityView view) {
 MyEntity me = (MyEntity) getEntity(view.getEntityReference());
 MyEntity togo = me.copy();
 togo.setNumber( togo.getNumber() * 2 );
 return new ActionReturn(new EntityData(view.getEntityReference().toString(), togo.getStuff(), togo), (String)null);
}
origin: sakaiproject/sakai

private Object myDoubleAction(EntityView view) {
 MyEntity me = (MyEntity) getEntity(view.getEntityReference());
 MyEntity togo = me.copy();
 togo.setNumber( togo.getNumber() * 2 );
 return new ActionReturn(new EntityData(view.getEntityReference().toString(), togo.getStuff(), togo), (String)null);
}
origin: org.sakaiproject.entitybroker/entitybroker-mocks

public Object doubleCustomAction(EntityView view) {
 MyEntity me = (MyEntity) getEntity(view.getEntityReference());
 MyEntity togo = me.copy();
 togo.setNumber( togo.getNumber() * 2 );
 return new ActionReturn(new EntityData(view.getEntityReference().toString(), togo.getStuff(), togo), (String)null);
}
origin: sakaiproject/sakai

public Object doubleCustomAction(EntityView view) {
 MyEntity me = (MyEntity) getEntity(view.getEntityReference());
 MyEntity togo = me.copy();
 togo.setNumber( togo.getNumber() * 2 );
 return new ActionReturn(new EntityData(view.getEntityReference().toString(), togo.getStuff(), togo), (String)null);
}
origin: org.sakaiproject.entitybroker/entitybroker-mocks

public Object doubleUp(EntityView view) {
 MyEntity me = (MyEntity) getEntity(view.getEntityReference());
 MyEntity togo = me.copy();
 togo.setNumber( togo.getNumber() * 2 );
 return new ActionReturn(new EntityData(view.getEntityReference().toString(), togo.getStuff(), togo), (String)null);
}
origin: org.sakaiproject.entitybroker/entitybroker-mocks

private Object myDoubleAction(EntityView view) {
 MyEntity me = (MyEntity) getEntity(view.getEntityReference());
 MyEntity togo = me.copy();
 togo.setNumber( togo.getNumber() * 2 );
 return new ActionReturn(new EntityData(view.getEntityReference().toString(), togo.getStuff(), togo), (String)null);
}
origin: sakaiproject/sakai

/**
 * Makes a copy of an EntityView which can be changed independently
 * @param ev any EntityView
 * @return the copy
 * @throws IllegalArgumentException if the input is null OR not completely constructed
 */
public static EntityView copy(EntityView ev) {
  if (ev == null) {
    throw new IllegalArgumentException("input entity view must not be null");
  }
  if (ev.viewKey == null || ev.entityReference == null) {
    throw new IllegalArgumentException("input entity view must be completely constructed");         
  }
  EntityView togo = new EntityView();
  EntityReference ref = ev.getEntityReference();
  togo.setEntityReference( new EntityReference(ref.getPrefix(), ref.getId() == null ? "" : ref.getId()) );
  togo.preloadParseTemplates( ev.getAnazlyzedTemplates() );
  togo.setExtension( ev.getExtension() );
  togo.setViewKey( ev.getViewKey() );
  return togo;
}
org.sakaiproject.entitybrokerEntityViewgetEntityReference

Popular methods of EntityView

  • getOriginalEntityUrl
  • setViewKey
  • <init>
  • getEntityURL
  • getViewKey
  • setEntityReference
  • setExtension
  • copy
    Makes a copy of an EntityView which can be changed independently
  • getExtension
  • getFormat
  • 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

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
  • startActivity (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Collectors (java.util.stream)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
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