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
    javax.ws.rs.core.Response
    link(String wikiName, String id, Boolean withInstance, 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 wikiName, String id, Boolean withInstance, 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:
      wikiName - the wiki where the xwiki page resides.
      id - the unique identifier, created through OpenProjectDocumentResource, that uniquely identifies an xwiki page on the instance.
      withInstance - If set to true, the request goes through only if it's initiated from one of the internally configured Open Project instances. Since multiple open project instances can be configured, we need to make sure that we operate only on the pages linked to the instance that makes the request. If set to false, the created link will only populate the project and/or work package properties.
      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.