Interface OpenProjectLinkObjectsResource


public interface OpenProjectLinkObjectsResource
Resource for creating the link to an Open Project entity.
Since:
1.2.0-rc-1
Version:
$Id$
  • Method Summary

    Modifier and Type
    Method
    Description
    org.xwiki.rest.model.jaxb.Object
     
    javax.ws.rs.core.Response
    link(String id, String instanceId, Boolean minorRevision, WorkPackageLink link)
    Creates the link between an xwiki page and an OpenProject entity.
  • Method Details

    • link

      javax.ws.rs.core.Response link(String id, String instanceId, Boolean minorRevision, WorkPackageLink link) throws org.xwiki.rest.XWikiRestException
      Creates the link between an xwiki page and an OpenProject entity. Once created, these links can be accessed through the OpenProjectLinkSearchResource.
      Parameters:
      id - the unique identifier, created through OpenProjectDocumentResource, that uniquely identifies an xwiki page on the instance.
      instanceId - the id of the OpenProject instance that should be taken into consideration when creating links.
      minorRevision - if set to true, the new page version will be a minor one.
      link - the WorkPackageLink model that will be used to create a link.
      Returns:
      201: If the object was created (The Location header will contain the URI associated to the newly created object). 401: If the user is not authorized.
      Throws:
      org.xwiki.rest.XWikiRestException - if any exception was thrown when the object was created.
    • getLink

      org.xwiki.rest.model.jaxb.Object getLink(String id)
      Parameters:
      id - the unique identifier of the xwiki page.
      Returns:
      the link to the OpenProject entity if it exists.