Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleServices

This section lists services available in the velocity context to be used with user macros in Confluence.

Section
titleprojectdoc Document Manager

projectdoc documents are accessible via the projectdoc document manager by the key projectdocDocumentManager.

Section
titlegetDocumentByPageId


pageIdThe identifier of a Confluence page.

Provides access to a document with all properties set. The document is referenced by a page identifier.

Code Block
languagexml
#set ( $document = $projectdocDocumentManager.getDocumentBasicsByPageId(819207)) 
#set ( $property = $document.getProperty($paramName)) 
#set ( $propertyValue = $property.getRenderedValue()) 



Section
titlegetDocumentByPage


pageA Confluence page.

Provides access to a document with all properties set. The document is referenced by a page.

Code Block
languagexml
#set ( $page = $pageManager.getPage(819207)) 

#set ( $document = $projectdocDocumentManager.getDocumentBasicsByPage($page)) 
#set ( $property = $document.getProperty($paramName)) 
#set ( $propertyValue = $property.getRenderedValue()) 



Section
titlegetDocumentBasicsByPageId


pageIdThe identifier of a Confluence page.

Provides access to a document with basic properties set. The document is referenced by a page identifier.

This version is faster in case only properties entered by a user are to accessed.


Section
titlegetDocumentBasicsByPage


pageA confluence page.

Provides access to a document with basic properties set. The document is referenced by a page.

This version is faster in case only properties entered by a user are to accessed.



Section
titleprojectdoc Document Property Manager

Properties of projectdoc documents are directly accessible via the projectdoc document property manager by the key  projectdocDocumentPropertyManager .

Section
titlegetDocumentPropertyAsString (by page)


pageA Confluence page.
nameThe name of the property.

Provides access to a document property by page and document property name.

Code Block
languagexml
#set ( $page = $pageManager.getPage(819207)) 
#set ( $propertyValue = $projectdocDocumentPropertyManager.getDocumentPropertyAsString($page, "Name")) 



Section
titlegetDocumentPropertyAsString (by page ID)


pageIdThe identifier of a Confluence page.
nameThe name of the property.

Provides access to a document property by page identifier and document property name.

Code Block
languagexml
#set ( $propertyValue = $projectdocDocumentPropertyManager.getDocumentPropertyAsString(819207, "Name")) 



Section
titlegetDocumentPropertyByKeyAsString (by page)


pageA Confluence page.
nameThe name of the property.

Provides access to a document property value by page identifier and document property name key.

This allows to access a property dependent on the currently used locale.

Code Block
languagexml
#set ( $page = $pageManager.getPage(819207)) 
#set ( $propertyValue = $projectdocDocumentPropertyManager.getDocumentPropertyByKeyAsString($page, "projectdoc.doctype.common.name")) 



Section
titlegetDocumentPropertyByKeyAsString (by page ID)


pageIdThe identifier of a Confluence page.
nameThe name of the property.

Provides access to a document property value by page identifier and document property name.

This allows to access a property dependent on the currently used locale.

Code Block
languagexml
#set ( $propertyValue = $projectdocDocumentPropertyManager.getDocumentPropertyByKeyAsString(819207, "projectdoc.doctype.common.name")) 





Section
titleDomain Objects

The following domain objects are returned by the services.

Section
titleProjectdocPropertiesDocument


typede.smartics.projectdoc.atlassian.confluence.api.services.ProjectdocPropertiesDocument


Code Block
languagejava
titleinterface ProjectdocPropertiesDocument
import de.smartics.projectdoc.atlassian.confluence.document.DocumentProperty;

import com.atlassian.confluence.pages.Page;

import java.util.Date;
import java.util.Map;

  /**
   * Returns the page if the document refers actually to a page. If it is not a
   * page, <code>null</code> is returned.
   *
   * @return a reference to the page or <code>null</code>.
   */
  @Nullable
  Page getPage();

  /**
   * Returns the unique identifier of the Confluence document.
   *
   * @return the unique identifier of the Confluence document.
   */
  long getDocumentId();

  /**
   * Returns the key of the space the document is part of.
   *
   * @return the key of the space the document is part of.
   */
  String getSpaceKey();

  /**
   * Returns the title of the document in Confluence.
   *
   * @return the title of the document in Confluence.
   */
  String getTitle();

  /**
   * Returns the display title of the document in Confluence.
   *
   * @return the display title of the document in Confluence.
   */
  String getDisplayTitle();

  /**
   * Returns the path to the document within Confluence.
   *
   * @return the path to the document within Confluence.
   */
  String getUrlPath();

  /**
   * Returns the last modification date of the document in Confluence.
   *
   * @return the last modification date of the document in Confluence.
   */
  Date getLastModificationDate();

  /**
   * Returns only the properties that have been specified in the document. That
   * is the properties that are not artificial.
   *
   * @return the non-artificial properties. May be empty, but is never
   *         <code>null</code>.
   */
  Map<String, DocumentProperty> getNonArtificialProperties();

  /**
   * Returns all artificial properties.
   *
   * @return all artificial properties. May be empty, but is never
   *         <code>null</code>.
   */
  Map<String, DocumentProperty> getArtificialProperties();

  /**
   * Returns all properties.
   *
   * @return all properties. May be empty, but is never <code>null</code>.
   */
  Map<String, DocumentProperty> getProperties();

  /**
   * Returns the rendered property.
   *
   * @param the name of the property to return. <code>null</code> will be
   *        returned, if the property is unknown to the document.
   */
  @Nullable
  DocumentProperty getProperty(String propertyName);

  /**
   * Returns the rendered property identified by the property key. The property
   * key is the I18n resource key.
   *
   * @param propertyKey the key to the name of the property to return.
   *        <code>null</code> will be returned, if the property is unknown to
   *        the document.
   */
  @Nullable
  DocumentProperty getPropertyByKey(String propertyKey);




Section
ignore-template-buttonstrue
titleSubordinate Topics


Hide From Reader

Create from template
blueprintModuleCompleteKeyde.smartics.atlassian.confluence.smartics-projectdoc-confluence-space-core:projectdoc-blueprint-doctype-topic
buttonLabelCreate Topic

Display Table
doctypetopic
render-no-hits-as-blanktrue
render-modedefinition
selectName, Short Description
restrict-to-immediate-childrentrue
sort-bySort Key, Name

...