Examples of ResourceLink


Examples of org.cedj.geekseek.web.rest.core.ResourceLink

    public List<ResourceLink> getLinks() {
        List<ResourceLink> links = super.getLinks();
        if (getUriInfo() != null) {
            if(doesNotContainRel("self") && id != null) {
                links.add(
                    new ResourceLink(
                        "self",
                        getUriInfo().getBaseUriBuilder().clone()
                            .path(ConferenceResource.class)
                            .segment("{id}")
                            .build(id)));
            }
            if(doesNotContainRel("session")) {
                links.add(
                    new ResourceLink(
                        "session",
                        getUriInfo().getAbsolutePathBuilder().clone()
                            .path("session")
                            .build()));
            }
View Full Code Here

Examples of org.cedj.geekseek.web.rest.core.ResourceLink

    public List<ResourceLink> getLinks() {
        List<ResourceLink> links = super.getLinks();
        if (getUriInfo() != null) {
            if(doesNotContainRel("self") && id != null) {
                links.add(
                    new ResourceLink(
                        "self",
                        getUriInfo().getBaseUriBuilder()
                        .path(SessionResource.class)
                        .segment("{id}")
                        .build(id),
                        SessionResource.SESSION_XML_MEDIA_TYPE));
            }
            if(doesNotContainRel("parent") && parentId != null) {
                links.add(
                    new ResourceLink(
                        "parent",
                        getUriInfo().getBaseUriBuilder()
                        .path(ConferenceResource.class)
                        .segment("{id}")
                        .build(parentId),
View Full Code Here

Examples of org.structr.web.entity.html.relation.ResourceLink

        }

        // special keyword "link", works on deeper levels, too
        if ("link".equals(part) && _data instanceof AbstractNode) {

          ResourceLink rel = ((AbstractNode) _data).getOutgoingRelationship(ResourceLink.class);
          if (rel != null) {

            _data = rel.getTargetNode();

            break;

          }

          continue;

        }

        if (value == null) {

          // check for default value
          if (defaultValue != null && StringUtils.contains(refKey, "!")) {
            return numberOrString(defaultValue);
          }

          // Need to return null here to avoid _data sticking to the (wrong) parent object
          return null;

        }

      }

      // data objects from parent elements
      if (this.hasDataForKey(part)) {

        _data = this.getDataNode(part);

        if (parts.length == 1) {
          return _data;
        }

        continue;

      }

      // special keyword "request"
      if ("request".equals(part)) {

        final HttpServletRequest request = this.getRequest(); //securityContext.getRequest();
        if (request != null) {

          if (StringUtils.contains(refKey, "!")) {

            return numberOrString(StringUtils.defaultIfBlank(request.getParameter(referenceKey), defaultValue));

          } else {

            return numberOrString(StringUtils.defaultString(request.getParameter(referenceKey)));
          }
        }

      }

      // special keyword "now":
      if ("now".equals(part)) {

        return new Date();
      }

      // special keyword "me"
      if ("me".equals(part)) {

        Principal me = (Principal) securityContext.getUser(false);

        if (me != null) {

          _data = me;

          if (parts.length == 1) {
            return _data;
          }

          continue;
        }

      }

      // special boolean keywords
      if ("true".equals(part)) {
        return true;
      }

      if ("false".equals(part)) {
        return false;
      }

      // the following keywords work only on root level
      // so that they can be used as property keys for data objects
      if (_data == null) {

        // details data object id
        if ("id".equals(part)) {

          GraphObject detailsObject = this.getDetailsDataObject();

          if (detailsObject != null) {
            return detailsObject.getUuid();
          }

        }

        // details data object
        if ("current".equals(part)) {

          GraphObject detailsObject = this.getDetailsDataObject();

          if (detailsObject != null) {

            _data = detailsObject;

            if (parts.length == 1) {
              return _data;
            }

            continue;
          }

        }

        // special keyword "this"
        if ("this".equals(part)) {

          _data = this.getDataObject();

          if (parts.length == 1) {
            return _data;
          }

          continue;

        }

        // special keyword "element"
        if ("element".equals(part)) {

          _data = entity;

          if (parts.length == 1) {
            return _data;
          }

          continue;

        }

        // special keyword "template", references the closest Template node in the current page
        if ("template".equals(part)) {

          _data = ((DOMNode) entity).getClosestTemplate(_page);

          if (parts.length == 1) {
            return _data;
          }

          continue;
        }

        // special keyword "ownerDocument", works only on root level
        if ("page".equals(part)) {

          _data = _page;

          if (parts.length == 1) {
            return _data;
          }

          continue;

        }

        // special keyword "link"
        if (entity instanceof NodeInterface && "link".equals(part)) {

          ResourceLink rel = ((NodeInterface) entity).getOutgoingRelationship(ResourceLink.class);

          if (rel != null) {
            _data = rel.getTargetNode();

            if (parts.length == 1) {
              return _data;
            }

            continue;
          }

        }

        // special keyword "parent"
        if ("parent".equals(part)) {

          _data = (DOMNode) ((DOMNode) entity).getParentNode();

          if (parts.length == 1) {
            return _data;
          }

          continue;

        }

        // special keyword "children", references the children of the closest Template node in the current page
        if ("children".equals(part)) {

          if (parts.length == 1) {

            final Template template = ((DOMNode) entity).getClosestTemplate(_page);

            if (template != null) {
              return template.getChildNodes();
            }
          }

          continue;

        }

        // special keyword "owner"
        if (entity instanceof NodeInterface && "owner".equals(part)) {

          Ownership rel = ((NodeInterface) entity).getIncomingRelationship(PrincipalOwnsNode.class);
          if (rel != null) {

            _data = rel.getSourceNode();

            if (parts.length == 1) {
              return _data;
            }
          }
View Full Code Here

Examples of wicket.markup.html.link.ResourceLink

        response.setAttachmentHeader("inscriptions - "
            + ListeInscritsPanel.this.course.getEvenement().getEndroit() + ".xls");
      }
    };
    export.setCacheable(false);
    this.add(new ResourceLink("download", export));

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