projectdoc Toolbox

Transcludes a snippet from a project on a Subversion (SVN) server.

Categories
Tags
Type
Iteration
Deprecated
Extension
Since
1.0

Deprecated since 1.0

 

Replace the macro with the System Transclusion Macro and the use of placeholders with space properties.

Due to the use of placeholders the URL is no longer required to be divided into reusable parts by the macro.

In version 1.0 the macro is still part of the add-on, but already disabled.

Transcludes a snippet from a project on a Subversion (SVN) server.

Including unknown text snippets inside a web page is dangerous!

 

Please be very careful when transcluding information from external servers!

Usually you should only transclude pages or parts of pages, if you also are in control of the contents. Transcluding arbitrary information my result in executing scripts on your server. A malicious attacker may steal other user's authentication cookie or do other harmful things!

 

Since projectdoc Toolbox version 1.11 this macro is part of the Information Systems Extension. Prior to that version the macro has been part of the projectdoc Toolbox.

The Since attribute above refers to the version of the extension, not to the version of the projectdoc Toolbox.

Properties

System Identifier

Identifies the connection information via Confluence shortcuts or space properties.

Defaults to subversion.

The system identifier is checked at three locations

 

Typically do not change the system identifier provided by the macro (if one is specified). Keep the default value of 'subversion' as long as you do not need to reference multiple server of the same type in one space. Then set the space property to reference the specific server accordingly. This makes it easier to create new links to artifacts since the system identifier need not to be changed.

The search for the system connection information is conducted as follows. Use the URI discovered first to connect to the server.

  1. Check for a space property url-subversion
  2. Check for a space property subversion
    Only available with projectdoc Toolbox version 1.11 and up!
  3. Check for a space property shortcut-id-subversion.
    Lookup the connection information from the shortcut links with the value retrieved from the space property.
  4. Check the shortcut links for a value subversion.
  5. Check application navigator for a value subversion.

If no value is specified at any of the locations above, the macro renders an error message like this:

In this example for a system macro the referenced, but undefined system, is called test-repo.

Project

The name of the project to transclude from. If not specified, the name defaults to Project Artifact ID and version provided by the space properties.

File

The file within the project to transclude from.

Snippet ID

The identifier of the snippet to include.

Lines

The line or line ranges to match.

Specified Description
-12 Transclude all lines up to and including line 12.
23 Transclude line 23 only.
42-50 Transclude lines 42 to 50, both edge values included.
90- Transclude from line 90 to the end of the file.
-12, 23, 42-50, 90- All of the above in combination.

Not used if snippet ID is provided.

Encoding

The encoding of the file. Defaults to the chartype announced by the response.

Use extra Snippet Marker

If the extra labels "SNIPPET START" and "SNIPPET END" should rendered.

Plain

If unchecked, the snippet is rendered within the Code Block Macro (only then do the following code attributes apply). Otherwise it is rendered as plain text fragment.

Plain

If unchecked, the snippet is rendered within the Code Block Macro (only then do the following code attributes apply). Otherwise it is rendered as plain text fragment.

Code Language

If the snippet is rendered not in plain text, this value is passed to the Code Block Macro.

The value "Default Language" refers to the value provided by the space property "Code Language".

Code Title

If the snippet is rendered not in plain text, this value is passed to the Code Block Macro.

Code Theme

If the snippet is rendered not in plain text, this value is passed to the Code Block Macro.

Code Line Numbers

If the snippet is rendered not in plain text, this value is passed to the Code Block Macro.

Code First Line

If the snippet is rendered not in plain text, this value is passed to the Code Block Macro.

Code Collapse

If the snippet is rendered not in plain text, this value is passed to the Code Block Macro.

Details

Space Properties

The following space properties help to provide defaults for the subversion macro.

Space PropertyDescription
url-subversionThe root URL for the subversion resources for this project.
subversion-subfolderThe folder within the SVN root.
project-artifactIdThe name of folder the sources are part of.
project-versionAppended to the project-identifier to form the name.
 

Suppose you want to reference the following file on your subversion server:

https://www.example.com/svn/os/util/tags/my-open-source-lib-1.0.2

Configure your space properties like this:

url-subversionhttps://www.example.com/svn/os
subversion-subfolderutil/tags
project-artifact-idmy-open-source-lib
project-version1.0.2

Related macros

The following macros help with referencing resources on other information servers:

Enterprise Architect Image Link Macro
Renders an image generated from an Enterprise Architect diagram, transcluded from a server.
HTML Snippet Macro
Transclude HTML content from a remote server.
Hudson Link Macro
Render links to jobs and services on a Hudson server.
Javadoc Link Macro
Links API documentation pages for Java elements.
Nexus Link Macro
Renders a link to an artifact stored on a Nexus server.
Site Link Macro
Links to a resource on a versioned site.
Sonar Link Macro
Renders a link to a project on a Sonar service.
Subversion Link Macro
Renders a link to a resource on a Subversion (SVN) repository.
System Image Link Macro
Renders an image transcluded from a remote server.
System Link Macro
Links to a resource on a server.
System Transclusion Macro
Transclude content from a resource from a remote system.
Text Snippet Macro
Transclude text content from a remote server.