Web Script: org/alfresco/test/cmisrepo.get
Generated from /share/service/script/org/alfresco/test/cmisrepo.get on Jun 22, 2026 8:40:54 PM

Script Properties
Id:org/alfresco/test/cmisrepo.get
Short Name:CMIS Repository
Description:Sample Surf component using CMIS Service document
Authentication:none
Transaction:none
Method:GET
URL Template:/sample/cmis/repo?service={serviceUrl?}
Format Style:any
Default Format:html
Negotiated Formats:[undefined]
Implementation:class org.alfresco.web.scripts.DeclarativeWebScript
Extensions:[undefined]

Store: classpath:alfresco/site-webscripts

[No implementation files]

Store: classpath:alfresco/webscripts

File: org/alfresco/test/cmisrepo.get.desc.xml
<webscript>
  <shortname>CMIS Repository</shortname>
  <description>Sample Surf component using CMIS Service document</description>
  <url>/sample/cmis/repo?service={serviceUrl?}</url>
  <authentication>none</authentication>
</webscript>
File: org/alfresco/test/cmisrepo.get.html.ftl
<html>
  <head>
    <title>Repository: ${repo.name}</title>
    <link rel="stylesheet" type="text/css" href="${url.context}/themes/default/base.css" />
  </head>
  <body>
    <table>
      <tr><td>CMIS Repository</td></tr>
    </table>
    <br>
    <table>
        <tr><td>Name:</td><td>${repo.name} (<a href="${url.serviceContext}${repo.rootFolderId?replace(".*/api", "/sample/cmis/folder", "r")}">Root Folder</a>)</td></tr>
        <tr><td>Id:</td><td>${repo.id}<td></tr>
        <tr><td>Product Name:</td><td>${repo.productName}<td></tr>
        <tr><td>Product Version:</td><td>${repo.productVersion}<td></tr>
        <tr><td>Vendor:</td><td>${repo.vendorName}<td></tr>
        <tr><td>CMIS Version:</td><td>${repo.versionsSupported}<td></tr>
    </table>
  </body>
</html>
File: org/alfresco/test/cmisrepo.get.js
script:
{
    var serviceUrl = (args.service === null) ? "/api/repository" : args.service;
    var conn = remote.connect("alfresco");
    var result = conn.get(stringUtils.urlEncodeComponent(serviceUrl));
	
    var service = atom.toService(result.response);
    var workspace = service.workspaces.get(0);
    model.repo = workspace.getExtension(atom.names.cmis_repositoryInfo);
}